PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Are you by chance trying to run Joomla on a 5.3 machine? We had a client moved to our hosting, and man oh man, every page load products about (no joke here) 2,000 lines of that crap!!! Even going in through joomla's settings and changing the error reporting still have us about 14 per call. (I even did a fresh install to see if it was some module he had installed, nope, "out of the box" within 10 minutes had a 20meg error log.
In the end we moved it over to our PHP 4 legacy server. One of our guys tried to work with it going through and changing all calls to be by reference (adding &), but 1. there are so many places, and 2, who knows when a function that is intended to act on a local copy will change something that affects the class elsewhere.
Client was soon switching to out CMS we use, so temp housing on the legacy server was good enough. But I did a lot of searching and didn't find how to squash those messages easily.
No, this for a script which is sold and still supports PHP 4. The issue here is that PHP is being instructed to not display errors however it is still displaying depreciated errors. I've tried pretty much everything except editing php.ini because I shouldn't have to change php.ini to make these go away.
In fact, the errors still display even if the line in question isn't even executed. The only way I was able to get rid of them was by testing the version and then using eval
John Cartwright wrote:I don't get any notices in 5.3.1, so I'm not sure. Although, as you probably know, objects are automatically passed by reference.
Are they turned off in php.ini? If so give it a go with then enabled and see what happens. This may be a new issue with 5.3.2 though.
This particular error is a compile-time error, not runtime. Changing error_reporting or display_errors inside the file won't work - you have to do sometime before the file gets included (or in php.ini).