Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

thomas159's avatar

Hosting laravel on digitalocean/cloudways

Hi,

I have setup my laravel instance on cloudways (digitalocean) using their pre install of laravel.

I get the error listed below when trying to run the application, to test I downloaded the code to see if it would work locally and it does, no errors when ran on xampp locally, so I believe it is the way it is hosted?

ErrorException in BladeCompiler.php line 261: preg_replace_callback(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 47

in BladeCompiler.php line 261
at HandleExceptions->handleError('2', 'preg_replace_callback(): Compilation failed: internal error: previously-checked referenced subpattern not found at offset 47', '/home/25887-16990.cloudwaysapps.com/azvdxyphuz/public_html/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php', '261', array('value' => '@extends('layouts.twocolumnhome') @section('content') 
0 likes
12 replies
bashy's avatar

Show us the code where that error is talking about?

Could be PHP version but they use >= 5.5?

thomas159's avatar

They use php 5.4 with laravel 5.0.27

It gives this error when going to the route of my server e.g '' not on any particular pages, as said before I'm sure this isn't a code issue as such as it works locally.

anon9348's avatar

I have the same issue. Is it related to the PHP version?

Chainlist's avatar

Same issue here. Since yesterday. We are using PHP 5.5 with Laravel 5.0.*. Tried to reboot the server we are working on, nothing changed.

Does someone have an idea ?

anon9348's avatar

I read about this on the internet and it seems it appears on Debian if the PCRE extension is not compatible with the PHP version. Anyway it seems that there is no way around this, at least I could not find anything relevant. My app is running perfectly on my home setup but I have PHP 5.6. I asked the guys at cloudways and they say PHP 5.6 will be available in the coming months so it is a bit long to wait. And by the way they have php 5.5 on debian. Hope somebody comes with a better solution.

Chainlist's avatar

OK, something weird is happening, do you have the same behaviors ?

When I reach any page which renders a blade.php template, I got the well known (or unknown :) ) error. OK, it's bugging "like usually".

But when I pull out the piece of code breaking all the app, write it in a new "test.php" file and run "php test.php", everyting is working fine, no error. Does this happen to you as well ?

hecpalomares's avatar

Had the same issue, I downgraded the php version to 5.4 and worked 100%.

Im using php 5.5.12 locally and my DO server is using 5.4 atm (neither 5.6 or 5.5 worked).

Please or to participate in this conversation.