Ubuntu 10.04 Server & PHP Deprecated Errors and more

Forum for questions and support relating to the 1.24.x releases only.
Locked
rdmapes
Posts: 17
Joined: Sat Feb 09, 2008 10:04 pm

Ubuntu 10.04 Server & PHP Deprecated Errors and more

Post by rdmapes »

All,
I broke ZM and went through various processes to re-load, purge, and try to get it worked out. I did not fair to well and really did a wonderful job of screwing things up. I broke it good. So I decided to load Ubuntu Server 10.04.3 LTS. Thought I would be OK, but I noticed a I was getting several errors in my apache2 error.log.

Below is what I did to clean up the errors. I don't seem to be getting them anymore in the error.log.

Function split() is deprecated in /usr/share/zoneminder/skins/classic/views/options.php on line 193

//$options = split( "\|", $value['Hint'] );
$options = explode( "\|", $value['Hint'] ); <-- Changed line 193 to this. I have not seen any adverse effects. But, if someone would let me
if this could be a problem that would be cool

The other errors were all to do with browser detection. So I did what you see below. Checked the PHP website to see how to use preg_match.
The top line is the original code. Anyway, if someone sees that this could be bad let me know.
I can access from Firefox, MSIE gives me a cert error which is not related to this and it is on my wifes laptop. She has no interest in ZM so I am ok.

PHP Deprecated: Function ereg() is deprecated in /usr/share/zoneminder/includes/functions.php on line 830

//if (ereg( 'MSIE ([0-9].[0-9]{1,2})',$_SERVER['HTTP_USER_AGENT'],$logVersion))
if (preg_match ( '/^MSIE\/([0-9].[0-9]{1,2})/',$_SERVER['HTTP_USER_AGENT'],$logVersion))

//elseif (ereg( 'Safari/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$logVersion))
elseif (preg_match ( '/^Safari\/([0-9.]+)/',$_SERVER['HTTP_USER_AGENT'],$logVersion))

//elseif (ereg( 'Konqueror/([0-9.]+)',$_SERVER['HTTP_USER_AGENT'],$logVersion))
elseif (preg_match ( '/^Konqueror\/([0-9.]+)/',$_SERVER['HTTP_USER_AGENT'],$logVersion))

//elseif (ereg( 'Opera ([0-9].[0-9]{1,2})',$_SERVER['HTTP_USER_AGENT'],$logVersion))
elseif (preg_match ( '/^Opera\/( [0-9].[0-9]{1,2})/',$_SERVER['HTTP_USER_AGENT'],$logVersion))

//elseif (ereg( 'Mozilla/([0-9].[0-9]{1,2})',$_SERVER['HTTP_USER_AGENT'],$logVersion))
elseif (preg_match ( '/^Mozilla\/([0-9].[0-9]{1,2})/',$_SERVER['HTTP_USER_AGENT'],$logVersion))

The last error I am trying to work out is: WAR [Invalid SOS parameters for sequential JPEG]
I get this error on all my cameras now. Did not get them before. I adjusted /etc/sysctl.conf. Re-booted....
When I access the cam's through a browser all is well. Other then reloading I installed a Cisco switch and created VLAN's to keep the cameras on their own subnet. Port settings are duplex full, speed auto.
Just not sure how to clean this one up.
Any ideas would be handy.

Thanks,
Ron
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Ubuntu 10.04 Server & PHP Deprecated Errors and more

Post by mastertheknife »

This is all fixed in latest ZM versions, except the JPEG error you are getting.

mastertheknife
Kfir Itzhak.
rdmapes
Posts: 17
Joined: Sat Feb 09, 2008 10:04 pm

Re: Ubuntu 10.04 Server & PHP Deprecated Errors and more

Post by rdmapes »

mastertheknife,
Thanks for jogging the pea melon. I upgraded to the latest again. Used Synaptic last time. Still suffer from the SOS errors. Will tinker with those.

Ron
Locked