Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Directive 'allow_call_time_pass_reference' warning

Tags:

laravel

I recently started working on a Laravel project in my local development environment (MAMP, with PHP 5.4.3) and have been somewhat annoyed by an odd occurrence that doesn't seem to be documented.

Once in awhile, when I attempt to load a page, I get an unhandled exception screen instead, with the message "Directive 'allow_call_time_pass_reference' is no longer available in PHP." (The location listed is "Unknown on line 0.") If I reload the page once or twice, it works as expected. But the problem comes back shortly after. It's been doing it since I first ran Laravel, even before I added any of my own controllers or models.

I've tried commenting out allow_call_time_pass_reference in the PHP config, as well as explicitly setting it to be off (restarting the server after making changes, of course) but the intermittent warning continues to appear. It wouldn't be a big deal for production, I assume, since the setting to display errors would be off, but it's kind of annoying when working on the project locally.

Any ideas as to what could be causing this?

like image 572
redwall_hp Avatar asked Oct 18 '12 03:10

redwall_hp


1 Answers

According to PHP 5.4 Backward Incompatible Changes, Call time pass by references have been removed. Now because the error your getting says Directive and line 0 I'm lead to believe its an issue with your php.ini file, I'm sure if you open it up and comment out the line that says allow_call_time_pass_reference the error will go away. Hope that helps!

P.s. if your not sure where your php.ini file is you can find it by loading a page which calls phpinfo() and then searching for .ini

like image 99
William Cahill-Manley Avatar answered Nov 20 '22 16:11

William Cahill-Manley