Jump to content

Directive 'allow_call_time_pass_reference' is no longer available in PHP


buddy
 Share

Recommended Posts

Hi all,

I've just deployed my ProcessWire-based app to a new web server running PHP 5.4.5, and started noticing this error showing up in the logs:

[url]/processwire/page/edit/ 
Core Error Directive
'allow_call_time_pass_reference' is no longer available in PHP (line 0 of Unknown)

The error sometimes will cause a page inside the CMS admin panel to not load (with a blank "error has been logged" screen), but usually hitting back or reload will render the page just fine. The allow_call_time_pass_reference directive in PHP has been deprecated for a while, but finally removed in PHP 5.4, so that's clearly what's causing the error.

The problem is that I have no idea why ProcessWire is triggering this error. There's no line number, and from what I can tell "allow_call_time_pass_reference" doesn't appear in any PW source code. Despite that, I think it is somehow the PW code which is causing this, since I haven't seen this error in any of my custom code, and it only shows up while using the PW admin panel.

Any guesses?

Thanks!

Link to comment
Share on other sites

I've never even heard of allow_call_time_pass_reference, so haven't ever put it into PW's code anywhere. Though wondering if some kind of '&' usage is triggering it or something. Is there any specific page that it's occurring on, or does it appear random? I'm also wondering PHP might be picking this up from a php.ini or .htaccess file somewhere on your server (given that it says line 0 of Unknown)?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

OK. I think you mean this suggestion, right?

You should comment out allow_call_time_pass_reference in php.ini, because it's no longer available. The following should fix it:

But... what does that mean? How do I do that? Once I copy/paste that line into the php.ini field, it doesnt work.

Sorry, no php nerd here, but only a web designer...  :-[

Link to comment
Share on other sites

By putting a semi-colon in front of the line in your php.ini...i.e.

; Example - this line is commented out. Comment out the below line..
; allow_call_time_pass_reference//comment this out; deprecated and now removed in php 5.4

The directive has been removed from PHP 5.4. Hence, comment it out as suggested. Have a read here:

http://uk1.php.net/manual/en/ini.core.php#ini.allow-call-time-pass-reference

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...