Page 1 of 1
Any known problems with PHP 5.2.5?
Posted: Thu Jan 03, 2008 10:15 am
by philipt
I've just updated to SuSE 10.3 from 10.2 and can't get ZoneMinder to behave - the web pages display incorrectly, even the initial page has text like '<?=zmSlangRefresh ?> in one of the buttons. I'm no PHP expert but it seems to me that there is either a PHP incompatibility or something has moved so a path is wrong.
I use another PHP application (open2300 for a weatherstation, if you are interested you should try it!) and that is suffering a similar problem on SuSE10.3. So I'm pretty sure that it isn't a zoneminder config problem on my server, but a more general PHP problem.
I guess the learning point is that as things were working quite nicely on SuSE10.2, why did I have to meddle with it?
Has anyone got any ideas, please?
Thanks, Philip.
Posted: Thu Jan 03, 2008 10:32 am
by cordel
Enable short tags in your php config, sounds like the updated config has diabled them.
Edit : php.ini
set line:
short_open_tag = On
After edit, restart apache.
Many thanks, PHP working again
Posted: Thu Jan 03, 2008 10:53 am
by philipt
Once again, many thanks - all working again. I suspect as I'd never touched the php.ini file before it just overwrote the previous default with the new one. Everything else seemed to upgrade fine.
Cheers, Philip.
Sorry, more problems!
Posted: Thu Jan 03, 2008 9:02 pm
by philipt
I have a few more problems - zoneminder is running OK but I'm gettin errors when I view events now - and I suspect its another PHP feature which has somehow been changed. The symptoms are that the default rate to view streamed events is 100x, the default size is at 4x - both cases the maximum value instead of a more sensible real time and actual size.
In my apache error log I'm getting a 'divide by zero' error in zm_html_view_event.php on line 101 and the parameter is $rate.
In /var/log/messages I'm getting a 'bogus scale factor of zero' error from zms.
I have rebuit zoneminder from scratch since I upgraded to SuSE10.3.
Any more suggestions appreciated! Thanks!
Philip.
Posted: Fri Jan 04, 2008 10:59 am
by zoneminder
It is possible perhaps that something has changed in php but not obvious what. I suggest you edit zm.php and look for the line
Code: Select all
error_reporting(E_ALL ^ E_NOTICE);
which is right at the top. Change it to
and then try again.
You will almost certainly get loads of warnings in your apache error logs. Most will be trivial but it may be something in there will offer a clue.
Posted: Fri Jan 04, 2008 12:58 pm
by philipt
Thanks for the advice. There seems to be an authentication problem of some sort, with zoneminder not able to set the default values because it doesn't know who the user is; but it does allow a login. Here is a clip from the apache2 error_log file which I hope gives you a clue, because I'm stumped! Your help would be much appreciated.
Thanks, Philip.
[Fri Jan 04 12:15:03 2008] [notice] Apache/2.2.4 (Linux/SUSE) PHP/5.2.5 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 04 12:20:53 2008] [error] [client 172.16.1.49] PHP Warning: Division by zero in /srv/www/htdocs/zm_html_view_event.php on line 88
[Fri Jan 04 12:32:19 2008] [notice] caught SIGTERM, shutting down
[Fri Jan 04 12:32:20 2008] [notice] Apache/2.2.4 (Linux/SUSE) PHP/5.2.5 with Suhosin-Patch configured -- resuming normal operations
[Fri Jan 04 12:36:42 2008] [error] [client 172.16.1.49] PHP Warning: Division by zero in /srv/www/htdocs/zm_html_view_event.php on line 88
[Fri Jan 04 12:42:21 2008] [notice] caught SIGTERM, shutting down
[Fri Jan 04 12:42:22 2008] [notice] Apache/2.2.4 (Linux/SUSE) PHP/5.2.5 with Suhosin-Patch configured -- resuming normal operations
Error, unable to authenticate user
Error, unable to authenticate user
[Fri Jan 04 12:43:45 2008] [error] [client 172.16.1.49] PHP Warning: Division by zero in /srv/www/htdocs/zm_html_view_event.php on line 88
[/url]