Fedora 12 - ZM 1.24.2 - PHP Parse Error in functions.php
Fedora 12 - ZM 1.24.2 - PHP Parse Error in functions.php
I am trying to install ZM on Fedora 12, but there is the follow error:
PHP Parse error: syntax error, unexpected $end in /usr/share/zoneminder/www/includes/functions.php on line 2309
I aready tried to update the php, httpd, perl....
I also tried to downgrade php to the original of F12 dvd...
But the error persist...
Thank you in advance.........
PHP Parse error: syntax error, unexpected $end in /usr/share/zoneminder/www/includes/functions.php on line 2309
I aready tried to update the php, httpd, perl....
I also tried to downgrade php to the original of F12 dvd...
But the error persist...
Thank you in advance.........
I know that it's definitely related to the version of PHP included in Fedora 12. Here's the output from validating the functions.php script on a Fedora 12 system with PHP:
[scott@skidder-fc12ppc includes]$ php --version
PHP 5.3.0 (cli) (built: Nov 17 2009 19:22:28)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
[scott@skidder-fc12ppc includes]$ php -l functions.php
PHP Parse error: syntax error, unexpected $end in functions.php on line 2309
Errors parsing functions.php
And here's the output from running the same command on a Fedora 9 machine with release 5.2.9 of PHP (as provided with Fedora 9):
scott@eowyn includes]$ php --version
PHP 5.2.9 (cli) (built: Apr 17 2009 03:42:25)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
[scott@eowyn includes]$ php -l functions.php
No syntax errors detected in functions.php
The functions.php file was the same in both cases. I believe that PHP 5.2.9 will likely work in the meantime. But the long-term solution is to find the cause of the errors with the 5.3.0 release of PHP.
[scott@skidder-fc12ppc includes]$ php --version
PHP 5.3.0 (cli) (built: Nov 17 2009 19:22:28)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
[scott@skidder-fc12ppc includes]$ php -l functions.php
PHP Parse error: syntax error, unexpected $end in functions.php on line 2309
Errors parsing functions.php
And here's the output from running the same command on a Fedora 9 machine with release 5.2.9 of PHP (as provided with Fedora 9):
scott@eowyn includes]$ php --version
PHP 5.2.9 (cli) (built: Apr 17 2009 03:42:25)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
[scott@eowyn includes]$ php -l functions.php
No syntax errors detected in functions.php
The functions.php file was the same in both cases. I believe that PHP 5.2.9 will likely work in the meantime. But the long-term solution is to find the cause of the errors with the 5.3.0 release of PHP.
I found the problem, and it's due to the default PHP configuration included with the Fedora Core 12 RPM of PHP. The short_open_tag (<?) tag is disabled by default in the /etc/php.ini file. The functions.php file makes extensive of this tag.
The fix is easy:
1) Edit the file /etc/php.ini: sudo vi /etc/php.ini
2) Change the value for short_open_tag from 'Off' to 'On' on line 229
3) Save the changes
4) Restart Apache HTTPD: sudo /etc/init.d/httpd restart
The fix is easy:
1) Edit the file /etc/php.ini: sudo vi /etc/php.ini
2) Change the value for short_open_tag from 'Off' to 'On' on line 229
3) Save the changes
4) Restart Apache HTTPD: sudo /etc/init.d/httpd restart
-
- Posts: 24
- Joined: Fri Aug 14, 2009 6:30 am
- Location: Puerto Rico (Various Locations)
-
- Posts: 13
- Joined: Mon Feb 02, 2009 2:46 pm
- Location: Bangalore, India
It's all here, including the PHP fix, step by step:
http://www.zoneminder.com/forums/viewto ... wers+candy
http://www.zoneminder.com/forums/viewto ... wers+candy
php parse error
urlgrey. thanks.
I have been running Zoneminder on 32 bit Centos 5 release and did not encounter any problems with installation/compile. However I am migrating to Fedora 14 64 bit and have had a couple of "headbangers" this being one. None of the problems were 64 bit related, but rather having to do with "newer" compilers, php, etc. This completes my list of problems. The page displays now I just need to transfer the video card from old machine to new.
Again thanks for the effort.
Ron
I have been running Zoneminder on 32 bit Centos 5 release and did not encounter any problems with installation/compile. However I am migrating to Fedora 14 64 bit and have had a couple of "headbangers" this being one. None of the problems were 64 bit related, but rather having to do with "newer" compilers, php, etc. This completes my list of problems. The page displays now I just need to transfer the video card from old machine to new.
Again thanks for the effort.
Ron