Receivng the following error when browsing to gallery:
Fatal error: Call to undefined function mysql_connect() in /home/<somedir>/http/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 347
Showed up today without any other systems changes or upgrades. Original version with this error was gallery 2.0.2. Upgraded to 2.1.2 to see if that would fix it. Got the same error when I browsed to the upgrade directory. Can anyone point me in the right direction
Gallery version : 2.1.2 upgrade from 2.0.2 which had same error
PHP version : 5.1.6
Webserver : Apache 2.0.52
Database : Mysql 5.0.22
Activated toolkits (e.g. NetPbm, GD):
Operating system: Centos 4.2
Browser : Firefox 2.x
PHPInfo folows:
System Linux aewa.aewa.org 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686
Build Date Nov 17 2006 08:54:12
Configure Command './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--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-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php.ini
Scan this dir for additional .ini files /etc/php.d
additional .ini files parsed /etc/php.d/gd.ini, /etc/php.d/ldap.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.bzip2, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*
Posts: 32509
> Showed up today without any other systems changes or upgrades.
are you sure your webhost didn't change anything?
please post a phpinfo link. it all looks like there's no mysql support in your php anymore.
FAQ: What information is required when I ask for help in the forums?
--------------
Enter the Gallery 2 Theme Contest today!
Posts: 9
No ISP involved, I manage the server. I recently (10 days ago) update pathes on the server using yum. A querey of the rpm database shows for php:
php-pear-1.4.9-1.2.centos
php-pdo-5.1.6-1.2.1.centos
php-gd-5.1.6-1.2.1.centos
php-ldap-5.1.6-1.2.1.centos
php-5.1.6-1.2.1.centos
php-mysql-5.1.6-1.2.1.centos
Link to phpinfo is: http://www.aewa.org/gallery/info.php
Another symptom has cropped up -- another php application, phpBBS has also stopped functioning but with no error. I have stopped and restarted httpd and mysql with no luck. Not sure where this problem came up as both php applications worked as recently as last weekend. Any updates had been done as least 2-3 days previously.
Thx
Bill
Posts: 32509
heh, so there was a system change / upgrade after all.
your php configuration clearly lacks mysql support.
your php was compiled without mysql support ('--without-mysql') and you're not loading the mysql extension through php.ini either.
you'll need php with mysql support.
--------------
Enter the Gallery 2 Theme Contest today!
Posts: 9
Yes there were updates that predated the start of the problem. An rpm -qa|fgrep -i php showed the following as being installed:
php-pear-1.4.9-1.2.centos
php-pdo-5.1.6-1.2.1.centos
php-gd-5.1.6-1.2.1.centos
php-ldap-5.1.6-1.2.1.centos
php-5.1.6-1.2.1.centos
php-mysql-5.1.6-1.2.1.centos
On closer inspection a rpm -qi php-mysql-5.1.6-1.2.1.centos came back stating that php-mysql-5.1.6-1.2.1.centos was not installed. Thus I pulled down that rpm and force a reinstall. It now shows as being installed. The info states:
"The php-mysql package contains a dynamic shared object that will add MySQL database support to PHP. MySQL is an object-relational database management system. PHP is an HTML-embeddable scripting language. If you need MySQL support for PHP applications, you will need to install this package and the php package."
The way I read that is that all you need is this module installed in order to have the mysql support but that does not seem to be the case. The phpinfo also seems unchanged.
What am I doing wrong?
Posts: 9
Things have magically started working now. Both Gallery (http://www.aewa.org/gallery)and the Discussion Board are now working. Still confused but happy