Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi! I have apache running on my server, and also Zoneminder, a surveillance system running on the same machine. Both services runs without glitches, and I think apache's config as well as ZM's config are fine. The problem, is first of all, I am not sure I understand how apache (not to mention the whole thing zoneminder, apache, web browser...) works...
Pretty hard to manage when you dont know what you are doing. Also, when I try the supposed to work zoneminder webpage in my web browser, I get nothing (a blank page), or sometimes a "Not found" error message. The latest seems to be from apache because it is the same font as the "It works!" message when I try http://localhost:80
The only bit of information I have so far is in the apache error log (/var/log/httpd/error_log) and it says:
Code:
[Sun Mar 21 00:35:14 2010] [error] [client 192.168.0.100] script '/srv/httpd/htdocs/zm.php' not found or unable to stat
[Sun Mar 21 00:46:04 2010] [error] [client 127.0.0.1] File does not exist: /srv/httpd/htdocs/zm
It seems that the "zm.php" is missing.... That would be why Apache cant find the page?
What does your website configuration look like? Do you have the PHP stuff installed and enabled for apache? Just checking a couple of obvious things to cover bases.
Well being an idiot in this field, I didn't know what to do so here's the content of my /etc/httpd/mod_php.conf
Code:
#
# mod_php - PHP Hypertext Preprocessor module
#
# Load the PHP module:
LoadModule php5_module lib/httpd/modules/libphp5.so
# Tell Apache to feed all *.php files through PHP. If you'd like to
# parse PHP embedded in files with different extensions, comment out
# this line and see the example below.
AddType application/x-httpd-php .php
# Tell Apache to feed all *.php, *.html, and *.htm files through
# the PHP module. Add or subtract extensions here as desired. Please
# note that running pages through PHP for no reason can be both slow
# and insecure, so be sure to know what you're doing. It's a convenient
# shortcut, but probably isn't suitible for high-traffic sites if you
# write any of your pages in straight HTML.
#AddType application/x-httpd-php .php .html .htm
# This will display PHP files in colored syntax form. Use with caution.
#AddType application/x-httpd-php-source .phps
I also have a php.ini file in the same folder, but the forum wont let me post the content of the file (too long).
well not being confidant enough to customize the apps, I followed the setup instructions from the appz websites... for example Zoneminder was compiled from sources with the commands:
Now I recognize that the argument I entered for the webdir was "/var/www/htdocs" but "/var/www/htdocs" is a link to the DocumentRoot variable "/srv/httpd/htdocs"... At least I think because I created a test text file in "/var/www/htdocs" and saw the file in "/srv/www/htdocs"
strange thing is that in "/var/www/htdocs" I cant see any zoneminder related files ( I am thinking here about my first post in this thread when the apache error log was complaining about missing files => script '/srv/httpd/htdocs/zm.php' not found or unable to stat)
I searched the whole machine for that zm.php file but no results....
My feeling is that zoneminder is installed but maybe not correctly, and did not created the proper files to connect to apache...
Zoneminder often creates an addition apache.conf file that gets linked in to the main http.d conf (depending on the distro that is).
Do a quick search for apache.conf and see if you have one that appears to be in a strange 'zm' directory like '/etc/zm/apache.conf' My guess is you will only need to alter it's contents to get yourself up and running. Failing that create a virtual host for Zoneminder, give it a suitable alias and point it to the right directory and you're cooking on gas :-)
Of course if you've already set up a virtual host for it, just change the path. The default vh declaration on Ubuntu for zm looks like this if it's any use to you:
Well I guess I made progress and getting close but still not there... I created a virtualhost in apache and now when I type the address localhost:8080/zm, I get what I asked for.. the problem is that I dont get what I should.. I explain:
There is no such folder as "/usr/share/zoneminder" in the system.... So in the alias, I entered /usr/bin (taken from the zm.conf file) and when I type the address above, I get a listing of the folder /usr/bin... Ok apache seems to work fine but not having that zoneminder folder, its like having gas, but no BBQ...
the content of zm.conf is:
Code:
# Current version of ZoneMinder
ZM_VERSION=1.24.2
# Path to build directory, used mostly for finding DB upgrade scripts
ZM_PATH_BUILD=/usr/local/zoneminder-setup-files
# Build time, used to record when to trigger various checks
ZM_TIME_BUILD=1269144727
# Path to ZoneMinder binaries
ZM_PATH_BIN=/usr/bin
# Path to ZoneMinder libraries (none at present, for future use)
ZM_PATH_LIB=/usr/lib
# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc
# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/htdocs
# Path to ZoneMinder cgi files
ZM_PATH_CGI=/srv/httpd/cgi-bin
# Username and group that web daemon (httpd/apache) runs as
ZM_WEB_USER=apache
ZM_WEB_GROUP=apache
# ZoneMinder database hostname or ip address
ZM_DB_HOST=localhost
# ZoneMinder database name
ZM_DB_NAME=zm
# ZoneMinder database user
ZM_DB_USER=zmuser
# ZoneMinder database password
ZM_DB_PASS=zmappz
As you can see, the address for the zm binaries is really /usr/bin...
In /usr/bin, there is a bunch of zm related files... From there what should I do?
Forget about the 'binary' files for zone minder that are in /usr/bin. These are the backend of the application and not run directly by Apache. You probably have something like this there (just for reference)
Your Apache 'gui' requires that it can find the zone minder web scripts that make calls to these binaries. Where the PHP and other web files will be is system and build dependent but you are looking for a directory crammed with files like this:
On the ZM installs I've done and have these are found in "/usr/share/zoneminder". On your system that is not the case. The easiest way to find the containing directory is to do a simple search for any one of those specific files - such as:
Code:
find / -iname zm.php
Once you have the containing directory of this file just modify the virtual host section in Apache. For example, if the search comes back as "/usr/chocolateteapot/zoneminder/zm.php" set your vh declaration to something like:
Code:
Alias /zm /usr/chocolateteapot/zoneminder
<Directory /usr/chocolateteapot/zoneminder>
php_flag register_globals off
Options Indexes FollowSymLinks
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
</Directory>
Yeah I had the feling that the binaries in /usr/bin were only back end binaries...
Also I did a search of the files you listed (php and webfiles) and like I was expecting, found nothing....
there is not even a /usr/share/zoneminder folder.. in fact there is NO zoneminder folders system wide... I searched the installation logs, configuration logs and etc and found no errors or messages telling that installation was botched....
the only folder that seems to contain web files is in the original folder where i extracted the .tar.gz file... it is names "web" and contains:
I can't speak for Slackware, but the Debian & Ubuntu installs I've done with ZM were trouble free. If none of the web application appears to be there I'd probably take the view the install is not complete or failed - or the version you have (which is a minor on from mine) does things very differently.
This is one of those threads that you follow with increasing interest just to discover that the answer isn't there. This may be because, like me, you still have the same problem.
I'm running Topologilinux - a slackware distribution modified for colinux and have (eventually) got a clean installation of ZoneMinder 1.24.2 and dependancies which starts OK and apache will happily return "It Works" from index.http. However, there is no sign of zm.php or anything similar in /srv/httpd/htdocs/ or anywhere else on the system for that matter.
Based upon your and my experience there appears to be a slackware specific issue which results in no zm specific web objects being generated.
thats funny! I've just seen your post on Zoneminder forums.... look there I explained what happened and where I am at this point...
The fact that apache returns "It Works" from index.http shows that your server is working properly (I assume so).
I couldnt find any zm.php but try to locate the index.php in the web root of ZM and open it with wither nano, kwrite, Kate or anything else... and see the first few lines (commented out). It says that this file is the zm main web script... I thing we got fooled by the generic instructions on the web and that for some reasons, zm. php is in fact index.php... now after you look at my post on the ZM forums, you'll see that I still cant run the php file as normal....
I thought i'd try installing 1.24.1 to see if it made a difference (I believe Spampig uses this) but it didn't.
I noticed on the ZoneMinder forum that Kingofkya has made a suggestion so I tried adding the two additional lines into http.conf but again to no avail.
After some more investigation I believe Spampig may be correct when he says that the install is not complete or failed in some way. I also cannot find the php and web files he has listed, other than the ZoneMinder index.php and the zm directories (ajax, css etc) in /srv/http/htdocs, and looking at the output from make install there is no evidence of any zm_http.. files being copied anywhere. There does not appear to be any failures during the compilation but again it is noticeable that there are no references to any zm_http.. files.
Stepping further back the configure completed successfully but there are some problems reported in the log for line 2641 with /* condefs.h /* where 'exit' appears to be used out of scope. The configure continued with some subsequent problems with condefs.h later. Do you see these in your config.log?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.