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

TonsOfLaz's avatar

Fresh laravel install: catachable fatal error on Apache with PHP 5.4

Hi,

Has anyone seen this error before, instead of their app?

Catchable fatal error: Argument 2 passed to array_first() must be callable, unknown given, called in /home/user/path/app/vendor/compiled.php on line 1454 and defined in /home/user/path/app/vendor/laravel/framework/src/Illuminate/Support/helpers.php on line 148

Some background: I have just added a fresh install of laravel 5.1 to an Apache server. When i navigate to the laravel app, I get the error. I have never gotten an app to load on the server in question, this is my first attempt.

I have PHP 5.4 installed, as well as Apache 2.2. This fresh install works fine on my local device. I am looking for any assistance in what to look for to debug. I have opened this file and I don't see any clear indication of what might be wrong.

Is there a way to check if I have all the requirements to use laravel on my server?

Thanks in advance, -Laz

0 likes
1 reply
TonsOfLaz's avatar
TonsOfLaz
OP
Best Answer
Level 2

Here is the issue from my debugging, for future reference. The server I am working on apparently has a package called eAccelerator for PHP. Laravel appears to be incompatible with this PHP accelerator, and it breaks it in unpredictable ways.

Add to the very top of public/index.php:

ini_set('eaccelerator.enable', 0);

For what its worth, I then got a blank screen, which was solved by changing the permissions of the storage folder: http://stackoverflow.com/questions/20678360/laravel-blank-white-screen

The command in 5.0: chmod -R guo+w storage

I really wish it were possible to give an error like "The permissions don't allow Laravel to write anything to the storage folder, which it needs to do to load your application. Please set the permissions to..."

I have had blank screens with no feedback on almost every one of my new laravel projects on different servers.

Listen, I think Laravel is amazing. But nothing makes Taylor's peppy, cheery comments like "It feels nice to relax" more annoying than a blank screen with no output or error log on a fresh install.

1 like

Please or to participate in this conversation.