#50009 [NEW]: Call to undefined function mysql_connect()
| From: | khanyawar at yahoo dot com | Date: | Tue, 27 Oct 2009 06:42:14 +0000 |
| Subject: | #50009 [NEW]: Call to undefined function mysql_connect() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-143991@lists.php.net to get a copy of this message | ||
From: khanyawar at yahoo dot com
Operating system: OEL 4.6 64Bit
PHP version: 5.2.11
PHP Bug Type: MySQL related
Bug description: Call to undefined function mysql_connect()
Description:
------------
when calling MySQL functions from php file, getting the following error;
Fatal error: Call to undefined function mysql_connect() in
/usr/local/apache/htdocs/as/dbconnect.php on line 17
You might say that this is not a bug, but i have followed your
documentation and enabled MySQL support in the config statement. Why am i
still getting this issue?
Reproduce code:
---------------
I have used the following configuration for php
/configure --with-apxs2=/usr/local/apache/bin/apxs --with-libdir=lib64
--with-mysql=shared --prefix=/usr/local/apache/php
--with-config-file-path=/usr/local/apache/php
--with-config-file-scan-dir=/usr --with-zlib --with-gdbm --with-gettext
--with-xml --with-regex=system --enable-ftp --enable-inline-optimization
--enable-magic-quotes --enable-mbstring --enable-mm=shared
--enable-safe-mode --enable-track-vars --enable-trans-sid
--enable-wddx=shared --enable-xml --with-dom
Expected result:
----------------
database connection should be established
Actual result:
--------------
Fatal error: Call to undefined function mysql_connect() in
/usr/local/apache/htdocs/as/dbconnect.php on line 17
--
Edit bug report at http://bugs.php.net/?id=50009&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50009&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50009&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50009&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50009&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50009&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50009&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50009&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50009&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50009&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50009&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50009&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50009&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50009&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50009&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50009&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50009&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50009&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50009&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50009&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50009&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50009&r=mysqlcfg