Cann't view zm via firefox

Support and queries relating to all previous versions of ZoneMinder
Locked
tomlj
Posts: 13
Joined: Sat Sep 10, 2005 3:55 pm
Location: China and Singapore

Cann't view zm via firefox

Post by tomlj »

Hi, All

This is my first time to install zm. Following the instruction of installation, i got the zm service start without error. But when i open firefox browser to http://localhost/zm, the following error message pop up:
Could not connect to database: Can't connect to local MySql server through socket 'var/lib/mysql/mysql.sock'

mysqld and httpd services have been started successfully.
Anyone can help me to figure out this installation problem?
Thanks

tomlj
MK
Posts: 24
Joined: Fri Jun 24, 2005 11:13 pm

Post by MK »

which method did you use to install it?
what's your system??

just to compare with the install test i did on different systems
But acording to the error message, something is bad with mysql components.
may be:
1- libmysqlclient?
2- have you runned zminit?
3-php-mysql, perlmodules,?



----> try connect to localhost only, and see if you can see apache homepage to be sure no pb whith apache....

I met similar error untilli have installed zm without error. what i did is to install phpmyadmin (on debian apt-get install phpmyadmin), and this installed someother packages to fix dependences, and the error was fixed. today, not know really te pb I had, but it worksfine now!! :wink:

regards
mk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Please check your logs and post any errors here as well as more information on your installation. BTW, If you installed from source your will not find a zminit.
Regards,
Cordel
tomlj
Posts: 13
Joined: Sat Sep 10, 2005 3:55 pm
Location: China and Singapore

Post by tomlj »

Hi, All
Thanks for your reply.
My system is Fedora core 3.
I am trying to use zm rpm to install zoneminder.
All the required rpm are downloaded and installed from ftp://download.computerntelecom.com/pub ... xtra-RPMS/.

The error logs are attached, please help me to figure out the problem.

MK: I installed phpmyadmin. but the problem remains.

Thanks in advance for your kind help.


MySQL server log is:
050912 23:11:40 mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/libexec/mysqld: ready for connections


Apache error log is:
[client 127.0.0.1] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /usr/lib/zm/html/zm_db.php on line 21
[Mon Sep 12 23:14:15 2005] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[client 127.0.0.1] PHP Notice: import_request_variables(): No prefix specified - possible security hazard in /usr/lib/zm/html/zm.php on line 21


The system error log is:
Sep 12 23:14:15 localhost kernel: audit(1126538055.354:0): avc: denied { write } for pid=2798 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:18:30 localhost kernel: audit(1126538310.932:0): avc: denied { write } for pid=2800 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:18:34 localhost kernel: audit(1126538314.802:0): avc: denied { write } for pid=2802 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:18:36 localhost kernel: audit(1126538316.409:0): avc: denied { write } for pid=2811 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:27:34 localhost su(pam_unix)[7182]: session opened for user apache by root(uid=0)
Sep 12 23:27:35 localhost su(pam_unix)[7182]: session closed for user apache
Sep 12 23:27:52 localhost kernel: audit(1126538871.934:0): avc: denied { write } for pid=2799 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:27:55 localhost kernel: audit(1126538875.090:0): avc: denied { write } for pid=2801 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:27:56 localhost kernel: audit(1126538876.569:0): avc: denied { write } for pid=2803 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:27:57 localhost kernel: audit(1126538877.270:0): avc: denied { write } for pid=2811 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:27:57 localhost kernel: audit(1126538877.851:0): avc: denied { write } for pid=2799 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 12 23:28:05 localhost kernel: audit(1126538885.459:0): avc: denied { write } for pid=2811 exe=/usr/sbin/httpd name=mysql.sock dev=hda8 ino=19236 scontext=user_u:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Disable SELinux and you should be good to go.
I haven't yet finninshed the policies for SELinux so it has to be disabled.
Regards,
Cordel
tomlj
Posts: 13
Joined: Sat Sep 10, 2005 3:55 pm
Location: China and Singapore

Post by tomlj »

Thanks, cordel

After disable SELinux, the login web page can be successfully displayed.

tomlj
Locked