I just upgraded my Xampp installation to 1.7.4
I had a working script (jquery calling PHP script and showing the returned value).
After upgrade, my jquery is getting the result correctly, but in addition to the results, there are also some warnings that are returned, hence stopping my script to show the result (I checked in firebug). Here are the warnings:
Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\php\PEAR\Config.php on line 80
Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\php\PEAR\Config.php on line 166
Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\php\PEAR\Config\Container.php on line 111
Deprecated: Assigning the return value of new by reference is deprecated in D:\xampp\htdocs\phil\batteries\includes\class.db.php on line 73
["Motor Cycle ","Scooter","Personal Watercraft ","Snowmobile","ATV","Ride-on Mower","Utility Vehicle"]
Keeping in mind the last line is the result being returned. but due to warnings, results are not populated. What can be the problem? I dont want to just off the error_reporting.
thanks
A bug was filed with the PEAR Config folks in 2008. They didn't act on it until last December, when version 1.10.12 was released.
If you can update that package, you should. pear update Config
(or maybe it's pear upgrade Config
?) should do the job.
Ok here was the deal. The problem was in the PEAR files as mentioned in the warnings.
I just changed the files mentioned in the question. and removed
=&
to
=
and my script is up again. There were three warnings for PEAR files i.e
- D:\xampp\php\PEAR\Config.php on line 80
- D:\xampp\php\PEAR\Config.php on line 166
- D:\xampp\php\PEAR\Config\Container.php on line 111
PHP 5.3 marked a few older functions as deprecated, therefore your php scripts now complain if they're using one of those.
A dirty way to get round this would be changing the php error behaviour (either via php.ini or in the script itself while using error_reporting)
Better: Update your PEAR-scripts, if there are updates possible.
pear update-channels
pear upgrade-all
Try this in a safe enviroment first to avoid breaking even more code due to possible changes in the pear scripts you're using.
A good summary of all the changed functions which are now deprecated can be found here.
来源:https://stackoverflow.com/questions/5617605/xampp-1-7-4-and-php-5-3-5-deprecated-warnings