php error: Call to undefined function: mysql_pconnect()
"PHP Fatal error: Call to undefined function mysql_pconnect() in file.php" is the error that I am getting in /var/log/httpd/ssl_error_log after installing php using these commands:
Code:
./configure --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --prefix=/usr --enable-force-cgi-redirect --disable-debug --enable-pic --enable-inline-optimization --with-bz2 --with-db4 --with-curl --with-exec-dir=/usr/bin --with-freetype --with-png --with-gd=shared --enable-gd-native-ttf --with-gdbm --with-gettext --with-ncurses=shared --with-gmp --with-iconv --with-jpeg --with-openssl --with-png --with-pspell --with-xml --with-expat --with-dom --with-dom-xslt --with-dom-exslt --with-xmlrpc=shared --with-pcre-regex --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 --with-mssql --with-mhash --with-pgsql=shared --with-snmp=shared --enable-ucd-snmp-hack --with-unixODBC-dir=/usr/include --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-mime-magic Code:
'./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-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=shared' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses=shared' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--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-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-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring=shared' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime' '--with-apxs2=/usr/sbin/apxs' |
Incidentally, in recompiling, I spotted this series of errors starting with the command above them. Maybe it gives away what I need to do?
Code:
/bin/sh /usr/local/src/php-5.1.2/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/mbstring/ -I/usr/local/src/php-5.1.2/ext/mbstring/ -DPHP_ATOM_INC -I/usr/local/src/php-5.1.2/include -I/usr/local/src/php-5.1.2/main -I/usr/local/src/php-5.1.2 -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/local/src/php-5.1.2/ext/date/lib -I/usr/include/imap -I/usr/local/src/php-5.1.2/ext/mbstring/oniguruma -I/usr/local/src/php-5.1.2/ext/mbstring/libmbfl -I/usr/local/src/php-5.1.2/ext/mbstring/libmbfl/mbfl -I/usr/include/freetds -I/usr/include/mysql -I/usr/include/ncurses -I/usr/include/pspell -I/usr/local/src/php-5.1.2/TSRM -I/usr/local/src/php-5.1.2/Zend -I/usr/include -g -O2 -prefer-non-pic -c /usr/local/src/php-5.1.2/ext/mbstring/mbstring.c -o ext/mbstring/mbstring.lo |
mysql_pconnect establishes a persistent connection to a mysql database. This connection is "pooled" and reused when another client connects to the server. This allows a mysql connection to persist transaction sessions. Accordingly, you cannot use pconnect if the php interpreter is invoked instead of using the isapi apache module (or other web server specific extension).
Now, perhaps you are running the isapi module, in which case I have no clue what is wrong (perhaps you need to specify specifically that you want to use pconnect?) |
Thanks for the info. I still don't know what was wrong, but removing everything php and installing php via yum as part of a set of dependencies seems to have straightened it out.
|
All times are GMT -5. The time now is 06:18 PM. |