Problems installing 1.23.3

Support and queries relating to all previous versions of ZoneMinder
Post Reply
xj25vm
Posts: 5
Joined: Wed Nov 26, 2008 10:54 pm

Problems installing 1.23.3

Post by xj25vm » Wed Nov 26, 2008 11:06 pm

I've installed 1.23.3 on a Slackware 12.1 --current box. Kernel is 2.6.27.7, Perl is 5.10, MySQL 5.0.67, Apache is 2.2.10.

Installation is from source. I've managed to configure it, after installing a whole bunch of Perl modules from CPAN until the 'configure' script stopped complaining. I've also placed the ffmpeg headers in places where ZoneMinder is looking for them.

I've managed to create the corresponding database and user on MySQL.

When trying to run zmpkg.pl, I get the following:

Code: Select all

Use of uninitialized value in transliteration (tr///) at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/Config.pm line 82, <CONFIG> line 50.
Can't use an undefined value as a symbol reference at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/Config.pm line 83, <CONFIG> line 50.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/Config.pm line 100, <CONFIG> line 50.
Compilation failed in require at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder.pm line 33, <CONFIG> line 50.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder.pm line 33, <CONFIG> line 50.
Compilation failed in require at /usr/bin/zmpkg.pl line 45, <CONFIG> line 50.
BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 45, <CONFIG> line 50.
I have checked and double checked everything, I've googled the error messages, and had a look in the Perl files to see if there is something obvious which ZoneMinder is expecting in a particular place, but I'm afraid I ran out of ideas.

Is anything in my box incompatible, am I missing any package anywhere, or have I missed any step in the installation process by any chance?

Many thanks for any suggestions.

P.S. One more thing, in case it is significant. This is what I've used for the config command:

Code: Select all

./configure --with-webdir=/srv/www/htdocs --with-cgidir=/srv/www/cgi-bin --prefix=/usr --sysconfdir=/etc ZM_DB_PASS=zmpass ZM_DB_NAME=zm

xj25vm
Posts: 5
Joined: Wed Nov 26, 2008 10:54 pm

Post by xj25vm » Thu Nov 27, 2008 12:11 am

I am adding my own reply, It turned out that the whole thing was related to php not running properly (or at all) and an improperly configured zmuser user in MySQL (during some initializing commands, I ended up with zmuser@localhost and zmuser@% with different passwords).

It seems to be starting ok now.

we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Post by we4zonM » Fri Jan 16, 2009 2:01 am

I was getting that same transliteration error. Can you explain how you find out what database you have for mysql and also what the user name that has been set and what passwords have been set for it? Can you also explain how to get php to run properly?

xj25vm
Posts: 5
Joined: Wed Nov 26, 2008 10:54 pm

Post by xj25vm » Fri Jan 16, 2009 2:25 am

If I remember correctly - Slackware uses a strict php.ini - quite good for security purposes - but can be a pain on a test system until things get going. I've just replaced the default php.ini with php.ini.dist in /etc/httpd/ if I remember correctly. However, I believe that if you are not using Slackware, this is not relevant to you - as the 'tight' php.ini seems to be an idea from the Slackware development team.

Secondly, you need to use the mysql command (once you have mysql up and running) to check what users you have. If I remember correctly something like:

Code: Select all

mysql mysql
at the command prompt will log you into the mysql console, using the 'mysql' database. Then:

Code: Select all

SELECT * FROM USER;
should show you what system users you have configured. Note that this is the user the code in ZoneMinder is using to access the MySQL database. The users you will use in the ZoneMinder web interface are stored in the actual zm database, and are something different. My system shows, among other columns: "localhost" and "zmuser" - which I believe are the defauls ZoneMinder will try to connect to MySQL with - so you have to have them - unless you have modified your setup. I believe it's not enough to have zmuser - it has to be zmuser defined for localhost - as MySQL is strict as to where the incoming connection is coming from and what is allowed. For good reasons MySQL is configured initially to permit connections from the ZoneMinder software on the local machine only.

All this stuff and the commands are somewhere in the installation tutorials. Let me know if you need more suggestions. If anybody has spotted any mistakes in the above - don't hesitate to point them out. It's been few months since the ZM installation and I've had my nose in all sorts of other things in the meanwhile - so some details might have 'washed off' :D

we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Post by we4zonM » Fri Jan 16, 2009 9:48 am

I am using version 14.12 of mysql. At a command prompt, if I type in "mysql mysql" it says that access is denied. If I use a root console, then it works. If I type in "mysql -u root -p mysql" then it works, as there is no password by default.

This brings a "mysql" prompt. From there, if I type in "SELECT * FROM USER" it does not seem to do anything except to show a -> prompt. Then from that -> prompt, I can not exit by "exit" or "quit"?

I also read about the php.ini-dist file, and that could be helpful too.

xj25vm
Posts: 5
Joined: Wed Nov 26, 2008 10:54 pm

Post by xj25vm » Fri Jan 16, 2009 1:11 pm

Hello,

The first part is normal - by default most MySQL installations allow root access with blank password (which in a production environment can be a security risk if left like that, but is useful to get things started).

The second part - all commands in the mysql console need to end in semicolon - otherwise it assumes you haven't finished the command and you are typing a continuation on the following line - hence the strange > character when you press enter - it is thinking you are continuing the previous line. I've been there done the same :)

Good luck.

we4zonM
Posts: 56
Joined: Fri May 30, 2008 7:21 am

Post by we4zonM » Fri Jan 16, 2009 9:35 pm

xj25vm wrote:The second part - all commands in the mysql console need to end in semicolon
That was the problem! Now, it does show "zmuser", but how do I know what database zmuser is connected to? It prints out a table, with the host and the user, but not the database name?

xj25vm
Posts: 5
Joined: Wed Nov 26, 2008 10:54 pm

Post by xj25vm » Fri Jan 16, 2009 11:51 pm

I can't remember for sure but I think you can find out from one of the tables in mysql database what privileges the zmuser has. However, it is much easier to run the commands shown in the ZoneMinder installation guide which will grant the right privileges. Checkout here: http://www.zoneminder.com/wiki/index.ph ... rom_Source. The key line is the third one, which starts with 'GRANT'. Few things to keep in mind:

1. When you checked the 'USER' table, what did it say next to zmuser? 'localhost' or '%'. It has to be localhost, because if my memory serves right, user accounts in mysql are fully qualified (include the host part) - thus zmuser@localhost is treated differently then zmuser@%. Most ZoneMinder default install will use zmuser@localhost.
2. The password that you will use in the GRANT statement has to be already in mysql - hopefully you will have set it up during the compilation steps (or left the default one in place).
3. Hopefully obvious, but replace necessary fields in the statement. Like:
'database name' replace with zm (if memory serves right).
'database user' replace with zmuser
etc.

nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck » Sat Jan 17, 2009 6:08 am

On a slack 12.1 system, read the contents of rc.mysqld for instructions on how to get mysql going ( hint : mysql_install_db --user=mysql ). Once you have zoneminder iinstalled it's not a bad idea to run mysql_secure_installation to lock down mysql if your host system is exposed to any sort of threats.

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

Post by cordel » Mon Jan 19, 2009 1:17 am

Just to add to this, you don't want to use a wildcard "%" for the host, other wise it will allow a connection from any host, especially if you have not set a custom user and password during configure.

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests