Blank zm.php page and mysql_pconnect() undefined function.

Support and queries relating to all previous versions of ZoneMinder
Locked
Dirky
Posts: 22
Joined: Sat Oct 16, 2004 6:10 pm

Blank zm.php page and mysql_pconnect() undefined function.

Post by Dirky »

Hi,
I've just installed zoneminder on Fedora core 2. (apache 2.0.49)
However when I go to the zm.php page it is blank. The source of the page is totally blank to.

Looking at the httpd error log I see:

Code: Select all

[client 192.168.1.27] PHP Notice:  import_request_variables(): No prefix specified - possible security hazard in /var/www/html/zm/zm.php on line 21
[client 192.168.1.27] PHP Fatal error:  Call to undefined function:  mysql_pconnect() in /var/www/html/zm/zm_db.php on line 21
I've checked my php (4.3.4) and it shows:-

Code: Select all

Configure Command  './configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-apxs2=/usr/sbin/apxs'


Any ideas where I am going wrong?

Many thanks,
Mike
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Your php is defined as supporting mysql in shared mode. This means that if it can find the mysql shared library object, mysql.so, in the php library directory, in my case /usr/lib/php4, then it will support mysql, otherwise it won't.

So if you don't have a mysql.so you will either need to build one or find one somewhere. It will need to match your php and mysql versions though. If you are using a package based distribution then try searching for a php-mysql package which I think may contain it.

Phil,
Dirky
Posts: 22
Joined: Sat Oct 16, 2004 6:10 pm

Post by Dirky »

Hi Phil,
you are spot on the mark!

I did a

Code: Select all

yum install php-mysql.i386
And now I can connect to it.

many thanks!

Mike
Locked