Page 1 of 1

Deprecated http request

Posted: Sat Apr 07, 2012 7:46 am
by Noelb
Hi,
Well this ones all over the net, with little to no useful fixes.

[Sat Apr 07 13:50:19.417991 2012] [:error] [pid 2952:tid 2987785072] [client xxxxxx45717] PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/HTTP/Request.php on line 412,

and repeated constantly for lines 736, 749, 794.
php.ini : error_reporting = E_ALL & ~E_NOTICE

I've grep'd our host server and the only place this appears is with serendipity blogs.

Any clues as to how to fix this?

Each vhost has its own logs, but many of them also run other stuff, and the error logs for these blog hosts (mine included) are massive, which makes searching for other errors, rather difficult for anyone.

Blog 1.5.5
PHP/5.3.10 (and earlier)
Apache 2.4.1, 2.2.22 (and earlier)
We've run pear upgrade to ensure everything is latest.
Commenting out deprecated in php.ini is not an option.

Re: Deprecated http request

Posted: Sat Apr 07, 2012 9:42 am
by garvinhicking
Hi!

In the s9y 1.7 beta's (on github) this issue shoud be fixed. Basically this is just a "Notice" so it doesn't do anything wrong or bad.

You might want to set your error_reporting also to ~E_DEPRECATED, why is that not an option?

You can also copy over the bundled-libs/PEAR.php and the /HTTP subdir from the 1.7 betas over to your installs.

HTH,
Garvin

Re: Deprecated http request

Posted: Sun Apr 08, 2012 2:10 pm
by Noelb
Noelb wrote:Hi,
Well this ones all over the net, with little to no useful fixes.

[Sat Apr 07 13:50:19.417991 2012] [:error] [pid 2952:tid 2987785072] [client xxxxxx45717] PHP Deprecated: Assigning the return value of new by reference is deprecated in /usr/local/lib/php/HTTP/Request.php on line 412,

and repeated constantly for lines 736, 749, 794.
php.ini : error_reporting = E_ALL & ~E_NOTICE

I've grep'd our host server and the only place this appears is with serendipity blogs.

Any clues as to how to fix this?

Each vhost has its own logs, but many of them also run other stuff, and the error logs for these blog hosts (mine included) are massive, which makes searching for other errors, rather difficult for anyone.

Blog 1.5.5
PHP/5.3.10 (and earlier)
Apache 2.4.1, 2.2.22 (and earlier)
We've run pear upgrade to ensure everything is latest.
Commenting out deprecated in php.ini is not an option.
Thanks I'm geting it from github now to try.
As for the need to display deprecated, we have a couple of devs who host with me, and they asked for it to not be supressed, gives them a heads up they need to change their code when they see it I guess? I more a perl monger than php :)

Re: Deprecated http request

Posted: Sun Apr 08, 2012 2:17 pm
by Noelb
garvinhicking wrote:
You can also copy over the bundled-libs/PEAR.php and the /HTTP subdir from the 1.7 betas over to your installs.

HTH,
Garvin
Hrmm these files seem identical to already installed, unless I d/l'd an old set?

Re: Deprecated http request

Posted: Sun Apr 08, 2012 2:27 pm
by Noelb
Noelb wrote:
garvinhicking wrote:
You can also copy over the bundled-libs/PEAR.php and the /HTTP subdir from the 1.7 betas over to your installs.

HTH,
Garvin
Hrmm these files seem identical to already installed, unless I d/l'd an old set?

/usr/local/lib/php/HTTP/Request.php It doesnt seem to be using your included, how would we change that?

Re: Deprecated http request

Posted: Mon Apr 09, 2012 3:18 pm
by garvinhicking
Hi!

Hm. In that case, you might either simply want to diff our Request.php with the /usr/local/lib/php one, and also port the removal of that "&new" string; or you could edit the serendipity_config_local.inc.php and insert a line "$serendipity['use_PEAR'] = false".

Or, you could also add/edit a .htaccess in the blgo'S directory and there you could set error_reporting to exclude E_DEPRECATED only for the blogs, and leave it for your other customers on...

Regards,
Garvin

Re: Deprecated http request

Posted: Tue Apr 10, 2012 4:49 am
by Noelb
garvinhicking wrote:Hi!

Hm. In that case, you might either simply want to diff our Request.php with the /usr/local/lib/php one, and also port the removal of that "&new" string; or you could edit the serendipity_config_local.inc.php and insert a line "$serendipity['use_PEAR'] = false".

Or, you could also add/edit a .htaccess in the blgo'S directory and there you could set error_reporting to exclude E_DEPRECATED only for the blogs, and leave it for your other customers on...

Regards,
Garvin
Thanks,
php_admin_value error_reporting "E_ALL & ~E_NOTICE & ~E_DEPRECATED" did the trick in httpd.conf under blog dirs.


UPDATED: My bad,

The above apparently mutes logging to error log?

php_admin_value error_reporting 22519
since httpd needs to send bitwise value when used in httpd.conf to php... or something like that :)

Thanks muchly for your help Garvin!