php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50009 Call to undefined function mysql_connect()
Submitted: 2009-10-27 06:42 UTC Modified: 2009-10-27 10:08 UTC
From: khanyawar at yahoo dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.11 OS: OEL 4.6 64Bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: khanyawar at yahoo dot com
New email:
PHP Version: OS:

 

 [2009-10-27 06:42 UTC] khanyawar at yahoo dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-27 10:08 UTC] johannes@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

When compiling it shared you have to enable it in the (correct) php.ini file. Please verify with phpinfo(). As this works for everybody else this is a local configuration error, please see above mentioned resources for further help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 16:01:28 2024 UTC