Deprecated http request

Found a bug? Tell us!!
Post Reply
Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

Deprecated http request

Post by Noelb » Sat Apr 07, 2012 7:46 am

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.

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Deprecated http request

Post by garvinhicking » Sat Apr 07, 2012 9:42 am

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

Re: Deprecated http request

Post by Noelb » Sun Apr 08, 2012 2:10 pm

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 :)

Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

Re: Deprecated http request

Post by Noelb » Sun Apr 08, 2012 2:17 pm

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?

Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

Re: Deprecated http request

Post by Noelb » Sun Apr 08, 2012 2:27 pm

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?

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Deprecated http request

Post by garvinhicking » Mon Apr 09, 2012 3:18 pm

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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Noelb
Regular
Posts: 37
Joined: Wed Jul 27, 2011 7:16 am

Re: Deprecated http request

Post by Noelb » Tue Apr 10, 2012 4:49 am

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!

Post Reply