473,802 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL undefined function error - php.ini looks right, but phpinfo() says otherwise

3 New Member
Hello, this is my first post here. W00T. (Forgive me for using leet speak, it's not my fault.)

Here's the rundown:

I have MySQL.
I have configured the PHP.INI to the correct settings, including allowing the extension, and changing the extensions directory to the correct path.
I have configured Apache to gather information from the correct PHP.INI (C:/PHP/PHP.INI).
I have the "libmysql.D LL" in both the System and System32 folders in the WINDOWS directory.

However, what happens is I receive not a wink of information about MySQL when I run the PHPInfo() function, and if I use Apache to test the script, it returns a fatal error: "undefined function," whenever I try and utilize a MySQL command.

It works when hosted on a remote server, like an FTP server, obviously, but when I use localhost to test the script it returns the aforementioned error.

My versions are as follows:
PHP 5.2.6
Apache 2.0.63
MySQL 5.0

Hopefully someone can help.
Oct 9 '08 #1
3 2534
Atli
5,058 Recognized Expert Expert
Hi.

Try adding your PHP installation directory to the PATH variable and rebooting the server. That, and uncommenting the extension dll in the PHP.INI, usually works for me.
Oct 9 '08 #2
gamereality
3 New Member
The PHPIniDir variable is already set to the installation folder's path, and I have already uncommented the MySQL DLL in PHP.INI.

Not sure about the registry path, but I'd assume that the installation of MySQL 5.0 would handle that automatically?

Okay, there isn't a registry path for PHP, since I did not install it, I extracted it to a folder. That means that it runs by either the Apache server, or the Windows folder.

Sooo... What the heck?
Oct 9 '08 #3
gamereality
3 New Member
Help really appreciated, I'd like to be able to test scripts like these locally, instead of having to upload it before...
Oct 10 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
10056
by: fabriZio | last post by:
I run php pages in IIS in cgi-mode(only pointing them to PHP.exe). But I can't connect to database: Fatal error: Call to undefined function: mysql_pconnect()..... I read that I have to activate PHP with mySQL support...but where in my scenario?? I looked at php.ini...but no results...
6
3866
by: das dsf | last post by:
Hi there! I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the mysqld daemon up and running. But when I look at the output of phpinfo() , I do not see it there, which is worrisome and so I tried to recompile PHP and do ./configure with the --with-mysql=path but I don't really know where my mysql's header files should be , is there any way to find that out by using any of the mysql commands? I did try to do...
10
11161
by: Patrick | last post by:
Hi I am a newbie and was just getting started working on a guestbook tutorial when I got an error message upon running my PHP code: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\add.php on line 6 So I searched the web for hours trying stuff to no avail. I think something needs to be copied/pasted from a directory to another or
4
2472
by: gregsands | last post by:
Hi I have read all (ok most) of the posts relating to "Call to undefined function mysql_connect()", read the manual on PHP.net and done eveything thats ive been asked to do but cant get PHP to talk to MySQL, PHP is working fine but I dont get any mysql info when running <? phpinfo() ?> and get the "Call to undefined function mysql_connect()" when trying to connect to mysql through php in browser, please help. 1. I have added C:\php;...
8
9591
by: Schmalz | last post by:
Hi all. Probably not an original posting but I have searched high and low for a satisfactory resolution to this problem. I am using Windows XP, IIS 5.1, PHP 5.1.4 and MySQL 5.0.23 and Dreamweaver 8. When I try to create a database connection I get the "Your PHP server doesn't have the MySQL module loaded or you can't use the mysql_(p)connect functions" error. I have downloaded the latest mysqli and mysql extensions (PHP 5.1.6 and MySQL...
18
2250
by: Bruce A. Julseth | last post by:
I have the following code $Host = "localhost"; $User = "Fred"; $Database = "house"; $Password = "mypw" echo "before mysqli<br />Host: " . $Host . "<br />" . $User . "<br />" . $Database;
9
3189
by: christopher_board | last post by:
Hi all. I am trying to connect to a MySQL Database using PHP on a local machine using locahost. I am using the following code <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
2
1899
by: Colorado Trout | last post by:
From a command prompt, the calls to mysql work, but from a browser they do not.. Fatal error: Call to undefined function mysql_pconnect() in D:\work\php\chorelist.php on line 139 is the error, but basically it just means it cannot find mysql..
11
2154
by: Robin S. | last post by:
I've used phpinfo() to confirm settings for mySQL on our host server, and it's not returning accurate info. phpinfo() returns a mySQL client API version of 3.23.54 (uselss for me), where as a SELECT VERSION() query on the mySQL database returns version 5.0.27 (exactly what we need). I think there's something wrong with the mySQL library in PHP. Is there any more thurough method of seeing php's settings for mySQL? Obviously I don't...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.