Any known problems with PHP 5.2.5?

Support and queries relating to all previous versions of ZoneMinder
Locked
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Any known problems with PHP 5.2.5?

Post 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.
Philip
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Many thanks, PHP working again

Post 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.
Philip
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Sorry, more problems!

Post 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.
Philip
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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

Code: Select all

error_reporting(E_ALL);
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.
Phil
philipt
Posts: 37
Joined: Sat Jun 11, 2005 8:29 am
Location: North East England

Post 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]
Philip
Locked