I installed zoneminder a couple of days ago. At the time I was able to add a monitor. While I was waiting for my PV-183 card to arrive, I decided to update my system with yum. PHP among many other things were updated. I had not updated in several months.
Now that I have installed my new card, I can not add a monitor. When I select to add a monitor the window comes up ok. However, when I click to the tab to type the device path, or any other tab in that window, I get "Forbidden \n You don't have permission to access /zm/index.php on this server."
PHP version is 5.3.3
Apache version is 2.2.15
ZM version is 1.24.2
All files in ../html/zm are 755 / apache / apache
I get this error if I'm on the same machine with firefox, or a client pc with windows 7 / IE.
In the httpd error log I am getting this error each time I try to load the page.
PHP Deprecated: Function split() is deprecated in /usr/share/zoneminder/www/skins/classic/views/monitor.php on line 129, referer: http://www.moering.com/zm/index.php
Has anyone seen this? Does anyone know what to do? I just spent a lot of money on this card, and I want it to work...
Access Error to index.php - Fedora 12, PV-183
UPDATE:
I modified the php file with the error in the httpd log, and replaced split() with explode().
I no longer have the error in the httpd log, but I still get the access denied error.
From the FAQ, it advised to recompile zoneminder if you perform a major update of a dependant package. I used yum to install, so I tried yum erase, and then yum install, but I still have the same problem.
Also the FAQ seems to list this issue as a question, but the response is to search the posts. I haven't found an applicable post yet. If you know of one, please point me in that direction.
For Log details:
zmdc.log Had these lines for each failure-
11/27/2010 00:42:13.556878 zmdc[2552].INF [Starting pending process, zmwatch.pl]
11/27/2010 00:42:13.557828 zmdc[2552].INF ['zmwatch.pl' starting at 10/11/27 00:42:13, pid = 3278]
11/27/2010 00:42:13.626660 zmdc[2552].ERR ['zmwatch.pl ' exited abnormally, exit status 9]
No other "zm" log files in /tmp showed any other errors that seemed to be related.
I modified the php file with the error in the httpd log, and replaced split() with explode().
I no longer have the error in the httpd log, but I still get the access denied error.
From the FAQ, it advised to recompile zoneminder if you perform a major update of a dependant package. I used yum to install, so I tried yum erase, and then yum install, but I still have the same problem.
Also the FAQ seems to list this issue as a question, but the response is to search the posts. I haven't found an applicable post yet. If you know of one, please point me in that direction.
For Log details:
zmdc.log Had these lines for each failure-
11/27/2010 00:42:13.556878 zmdc[2552].INF [Starting pending process, zmwatch.pl]
11/27/2010 00:42:13.557828 zmdc[2552].INF ['zmwatch.pl' starting at 10/11/27 00:42:13, pid = 3278]
11/27/2010 00:42:13.626660 zmdc[2552].ERR ['zmwatch.pl ' exited abnormally, exit status 9]
No other "zm" log files in /tmp showed any other errors that seemed to be related.
Compare what you did to this:http://www.zoneminder.com/wiki/index.php/Fedora. Especially the "DENY FROM ALL" part.
I generally used this page as a guide to setup my zoneminder.bb99 wrote:Compare what you did to this:http://www.zoneminder.com/wiki/index.php/Fedora. Especially the "DENY FROM ALL" part.
1) I commented out the "Deny from all" in zoneminder.conf in httpd/conf.d
2) I set short_open_tag = On in php.ini
3) I performed the mysql commands to setup the database, and set access.
I have just verified again, that each of these items was done, and the services had been restarted.
I already had the following packages installed (and running where applicable):
Mysql-server - 5.1.47
Mysql-devel - 5.1.47
PCRE-devel - 7.8
httpd - 2.2.15
Yum does not show ffmpeg installed, and it also doesn't list it as an available package to install. This might be an issue for video recording, but it wasn't installed the other day when the site was working, and doesn't seem to be related to an access issue.
Since this appears to be a apache access issue I thought I'd post more about the zm file permissions.
This is a snippet from /var/www/html/zm:
[root@Moering zm]# ls -la
total 1720
drwxr-xr-x. 7 apache apache 4096 2010-11-27 00:23 .
drwxr-xr-x. 45 root root 4096 2010-04-10 11:22 ..
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 events
-rwxr-xr-x. 1 apache apache 318 2008-10-18 15:19 favicon.ico
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 graphics
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 images
lrwxrwxrwx. 1 root root 6 2010-04-10 08:27 index.php -> zm.php
-rwxr-xr-x. 1 apache apache 2393 2008-10-18 15:19 mootools.ext.js
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 sounds
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 temp
-rwxr-xr-x. 1 apache apache 44781 2008-10-18 15:19 zm_actions.php
-rwxr-xr-x. 1 apache apache 10068 2008-10-18 15:19 zm_config.php
-rwxr-xr-x. 1 apache apache 16020 2008-10-18 15:19 zm_control_funcs.php
-rwxr-xr-x. 1 apache apache 11554 2008-10-18 15:19 zm_control_funcsX.php
-rwxr-xr-x. 1 apache apache 4727 2008-10-18 15:19 zm_db.php
-rwxr-xr-x. 1 apache apache 9399 2008-10-18 15:19 zm_export_funcs.php
-rwxr-xr-x 1 root root 49625 2010-11-27 00:19 zm_funcs.php
-rwxr-xr-x. 1 apache apache 3877 2008-10-18 15:19 zm_html_base.css
-rwxr-xr-x. 1 apache apache 8538 2008-10-18 15:19 zm_html_config.php
-rwxr-xr-x. 1 apache apache 1295 2008-10-18 15:19 zm_html.js
-rwxr-xr-x. 1 apache apache 2585 2008-10-18 15:19 zm_html_js.php
-rwxr-xr-x. 1 apache apache 3717 2008-10-18 15:19 zm_html.php
-rwxr-xr-x. 1 apache apache 2026 2008-10-18 15:19 zm_html_reset.css
-rwxr-xr-x. 1 apache apache 4895 2008-10-18 15:19 zm_html_styles.css
This is from /etc/zm.conf:
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
This is from /etc/httpd/conf/httpd.conf
User apache
Group apache
This is from /etc/httpd/conf.d/zoneminder.conf
Alias /zm "/usr/share/zoneminder/www"
<Directory>
Options -Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
#Deny from all # DELETE THIS LINE
</Directory>
ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
<Directory>
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
This is a snippet from /var/www/html/zm:
[root@Moering zm]# ls -la
total 1720
drwxr-xr-x. 7 apache apache 4096 2010-11-27 00:23 .
drwxr-xr-x. 45 root root 4096 2010-04-10 11:22 ..
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 events
-rwxr-xr-x. 1 apache apache 318 2008-10-18 15:19 favicon.ico
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 graphics
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 images
lrwxrwxrwx. 1 root root 6 2010-04-10 08:27 index.php -> zm.php
-rwxr-xr-x. 1 apache apache 2393 2008-10-18 15:19 mootools.ext.js
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 sounds
drwxr-xr-x. 2 apache apache 4096 2008-10-18 15:19 temp
-rwxr-xr-x. 1 apache apache 44781 2008-10-18 15:19 zm_actions.php
-rwxr-xr-x. 1 apache apache 10068 2008-10-18 15:19 zm_config.php
-rwxr-xr-x. 1 apache apache 16020 2008-10-18 15:19 zm_control_funcs.php
-rwxr-xr-x. 1 apache apache 11554 2008-10-18 15:19 zm_control_funcsX.php
-rwxr-xr-x. 1 apache apache 4727 2008-10-18 15:19 zm_db.php
-rwxr-xr-x. 1 apache apache 9399 2008-10-18 15:19 zm_export_funcs.php
-rwxr-xr-x 1 root root 49625 2010-11-27 00:19 zm_funcs.php
-rwxr-xr-x. 1 apache apache 3877 2008-10-18 15:19 zm_html_base.css
-rwxr-xr-x. 1 apache apache 8538 2008-10-18 15:19 zm_html_config.php
-rwxr-xr-x. 1 apache apache 1295 2008-10-18 15:19 zm_html.js
-rwxr-xr-x. 1 apache apache 2585 2008-10-18 15:19 zm_html_js.php
-rwxr-xr-x. 1 apache apache 3717 2008-10-18 15:19 zm_html.php
-rwxr-xr-x. 1 apache apache 2026 2008-10-18 15:19 zm_html_reset.css
-rwxr-xr-x. 1 apache apache 4895 2008-10-18 15:19 zm_html_styles.css
This is from /etc/zm.conf:
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
This is from /etc/httpd/conf/httpd.conf
User apache
Group apache
This is from /etc/httpd/conf.d/zoneminder.conf
Alias /zm "/usr/share/zoneminder/www"
<Directory>
Options -Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
#Deny from all # DELETE THIS LINE
</Directory>
ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
<Directory>
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
I've just realized that the zoneminder.conf in httpd/conf.d is pointing to /usr/share/zoneminder/www and not /var/www/zm.
Since /usr/share/zoneminder/www does not have access rights, maybe this is the issue.
I'm confused though as the permissions for /usr/share/zoneminder/www is how yum installer left it, and the zoneminder.conf file is as yum install created it. I also don't see how it could have changed from the other day to today.
Please advise should the zoneminder.conf point to the /usr/share folders or to /var/www folders?
Since /usr/share/zoneminder/www does not have access rights, maybe this is the issue.
I'm confused though as the permissions for /usr/share/zoneminder/www is how yum installer left it, and the zoneminder.conf file is as yum install created it. I also don't see how it could have changed from the other day to today.
Please advise should the zoneminder.conf point to the /usr/share folders or to /var/www folders?
I missed part of the point of your original post. Had problems upgrading from a PV-143 to a PV-149, broke ZM almost completely, never did figure out what exactly was wrong but rebuilding from scratch with the new card installed fixed it all. Nice card by the way, looks like Bluecherry.net has them on sale.
If you add rpmfusion as a repository ffmpeg is available.
If you add rpmfusion as a repository ffmpeg is available.
SOLVED
Well, I still don't know what the problem was. I resolved my issue by using 'yum history undo'.
There were about 300 updates in the yum update that I had to undo, so I don't know which package update caused the issue.
This may be just my machine, but I would suggest that everyone keep this in mind and if you get an update that causes this issue and you have a solution, please let everyone know. Eventually I'll have to update my packages and I may run into this again. However, I will do it in smaller increments this time.
yum history info list:
http://www.moering.com/share/update47list.nfo
There were about 300 updates in the yum update that I had to undo, so I don't know which package update caused the issue.
This may be just my machine, but I would suggest that everyone keep this in mind and if you get an update that causes this issue and you have a solution, please let everyone know. Eventually I'll have to update my packages and I may run into this again. However, I will do it in smaller increments this time.
yum history info list:
http://www.moering.com/share/update47list.nfo
Does anyone have any other ideas here? I discovered too late that when I performed the yum undo, I also took out my X11 somehow. Once I got zoneminder working, I could no longer launch startx.
Luckily I broke my mirror raid and kept an image prior to performing the undo, so I'm back to where I was (one a single drive). I also have a drive image from a month ago, but for some reason it won't boot now.
I do have both hard drives (pre and post yum undo). I'd like to do a comparison of the two, but with 300 packages difference, I'm not sure where to start.
Any advice?
Luckily I broke my mirror raid and kept an image prior to performing the undo, so I'm back to where I was (one a single drive). I also have a drive image from a month ago, but for some reason it won't boot now.
I do have both hard drives (pre and post yum undo). I'd like to do a comparison of the two, but with 300 packages difference, I'm not sure where to start.
Any advice?