Bug 556166

Summary: zoneminder php syntax error in functions.php
Product: [Fedora] Fedora Reporter: Scott R. Godin <rhbugzilla>
Component: zoneminderAssignee: Jason Tibbitts <j>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 14CC: fedora, haebler, j, kreucher, maarten, moe, steve
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: zoneminder-1.24.2-6.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-25 19:25:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott R. Godin 2010-01-16 22:05:21 UTC
Description of problem:

after setting up zoneminder and getting it running (service zoneminderstart) with no errors, I go to http://localhost/zm/ to start with the configuring in more detail, and all I get is a blank page. 

this is because there appears to be a parse error in /usr/share/zoneminder/www/includes/functions.php

Version-Release number of selected component (if applicable):
zoneminder-1.24.2-3.fc12.x86_64

How reproducible:
every time

Steps to Reproduce:
1. install zoneminder
2. enable httpd and mysql
3. mysql -u root -p mysql < /usr/share/zoneminder/db/zm_create.sql
4. remove the DELETE ME line from the /etc/httpd/conf.d/zoneminder.conf
5. service httpd restart
6. service zoneminder start
7. go to http://localhost/zm/
  
Actual results:
blank page, and the following error msg in /var/log/httpd/error_log
[Sat Jan 16 16:57:18 2010] [error] [client ::1] PHP Parse error:  syntax error, unexpected $end in /usr/share/zoneminder/www/includes/functions.php on line 2309


Expected results:
running version of zoneminder

Additional info:

Comment 1 Maarten Bremer 2010-02-21 00:48:32 UTC
This problem can easily be resolved by enabling PHP short tags. You can find this setting in /etc/php.ini, change short_open_tag to On.

The problem should be solved by replacing all short tags in the zoneminder files to the full <?php tags.

Comment 2 Jeff Moe (jebba) 2010-04-13 19:42:06 UTC
I had the same problem in the original report. I can confirm that the solution in comment #1 worksforme.

Comment 3 Nicholas J Kreucher 2010-04-26 17:05:52 UTC
i can confirm also; and agree with the proposed fix.

Comment 4 Marcus Haebler 2010-07-05 19:53:17 UTC
(In reply to comment #1)
For completeness, you have to restart Apache once you changed php.ini:

service httpd restart

Comment 5 Bug Zapper 2010-11-04 00:47:16 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Jeff Moe (jebba) 2010-11-11 03:23:06 UTC
This bug still exists in Fedora 14 in zoneminder-1.24.2-5.fc14.x86_64.

Perhaps a note could be added to the /usr/share/doc/zoneminder-1.24.2/README.Fedora file mentioning that /etc/php.ini needs this:

-short_open_tag = Off
+short_open_tag = On

Comment 7 Jason Tibbitts 2011-01-22 17:51:32 UTC
The problem here, of course, is that Fedora's php changed the default for short_open_tag from On to Off between F11 and F12.  My production camera server is still on F11 so I never personally noticed the change.

I'm just a co-maintainer here and this isn't my area of expertise, but Martin doesn't seem to be around so I've attempted the easy fix.  Since we already install an apache .conf file, I've added php_value short_open_tag 1 on the appropriate directory.  Testing shows that this works fine, though I suppose it's always possible that I've missed something or that this won't work for all configurations.  Sorry it took so long for a trivial fix.

Comment 8 Fedora Update System 2011-01-26 00:43:08 UTC
zoneminder-1.24.2-6.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/zoneminder-1.24.2-6.fc14

Comment 9 Fedora Update System 2011-01-26 20:54:07 UTC
zoneminder-1.24.2-6.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update zoneminder'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/zoneminder-1.24.2-6.fc14

Comment 10 Fedora Update System 2011-03-25 19:25:14 UTC
zoneminder-1.24.2-6.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.