473,772 Members | 2,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP not supporting MySQL

My PHP version is obviously not compiled with MySQL support,
consequently I get the following message:-

Fatal error: Call to undefined function mysql_connect() in
C:\http-dir\board\conne ct.php on line 3

Question:- How do I instruct PHP to support MySQL?

Please note:-

extension=php_m ysql.dll
extension=php_p do_mysql.dll

in php.ini are enabled, and php.ini is located in the php root directory.

Thank you.
Feb 7 '07 #1
7 9399
be sure libmysql.dll is available to the systems PATH.

from php.net:

Go to Control Panel and open the System icon (Start -Settings ->
Control Panel -System, or just Start -Control Panel -System for
Windows XP/2003)

Go to the Advanced tab

Click on the 'Environment Variables' button

Look into the 'System Variables' pane

Find the Path entry (you may need to scroll to find it)

Double click on the Path entry

Enter your PHP directory at the end, including ';' before (e.g. ;C:\php)

Press OK and restart your computer


hope this helps

Siegfreed schreef:
My PHP version is obviously not compiled with MySQL support,
consequently I get the following message:-

Fatal error: Call to undefined function mysql_connect() in
C:\http-dir\board\conne ct.php on line 3

Question:- How do I instruct PHP to support MySQL?

Please note:-

extension=php_m ysql.dll
extension=php_p do_mysql.dll

in php.ini are enabled, and php.ini is located in the php root directory.

Thank you.
Feb 7 '07 #2
Siegfreed wrote:
My PHP version is obviously not compiled with MySQL support,
consequently I get the following message:-

Fatal error: Call to undefined function mysql_connect() in
C:\http-dir\board\conne ct.php on line 3

Question:- How do I instruct PHP to support MySQL?

Please note:-

extension=php_m ysql.dll
extension=php_p do_mysql.dll

in php.ini are enabled, and php.ini is located in the php root directory.

Thank you.
First of all, there's no need to change the registry if you have your
php.ini file in the right place.

Secondly, there are three extensions you could be interested in.

extension=php_m ysql.dll // (older) mysql_xxx interface
extension=php_m ysqli.dll // (newer) mysqli_xxx objects
extension=php_p do_mysql.dll // (newest) PDO interface for MySQL
extension=php_p do.dll // also required for PDO

(note: the last, PHP Data Objects, is an abstraction layer for data
access. It's relatively new, so you probably won't see much existing
code using it.

Most sites use the mysql_xxx interface, while there are some going to
the mysqli_interfac e.

And the interfaces are quite compatible - you can load all three and
pick whichever one you want to use in your code.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Feb 7 '07 #3

"Siegfreed" <si**@freed.org wrote in message
news:45******** *************** @news.optusnet. com.au...
My PHP version is obviously not compiled with MySQL support, consequently
I get the following message:-

Fatal error: Call to undefined function mysql_connect() in
C:\http-dir\board\conne ct.php on line 3

Question:- How do I instruct PHP to support MySQL?

Please note:-

extension=php_m ysql.dll
extension=php_p do_mysql.dll

in php.ini are enabled, and php.ini is located in the php root directory.

Thank you.
Along with the previous advice to add PHP dir to your system path, from the
top of my head

1) Run phpinfo() and see if the report displays the correct path to your
php.ini
2) Uncomment extension_dir in php.ini and set it to the appropriate folder

Something along the lines of
extension_dir = "C:\PHP\ext \"
p.s I do hope you installed PHP from the binary zip, not the installer, as
the second one doesn't include mysql support to my knowledge
Denis Gerina
Feb 7 '07 #4
I copied "libmysql.d ll", and "php.ini" to the system PATH, and the
"fatal error" message disappeared. I will modify the system PATH (as
you suggested) if for some reason I need the "php.ini" in the in the
"php" directory.

Thank you.

Vincent wrote:
be sure libmysql.dll is available to the systems PATH.

from php.net:

Go to Control Panel and open the System icon (Start -Settings ->
Control Panel -System, or just Start -Control Panel -System for
Windows XP/2003)

Go to the Advanced tab

Click on the 'Environment Variables' button

Look into the 'System Variables' pane

Find the Path entry (you may need to scroll to find it)

Double click on the Path entry

Enter your PHP directory at the end, including ';' before (e.g. ;C:\php)

Press OK and restart your computer

hope this helps

Siegfreed schreef:
>My PHP version is obviously not compiled with MySQL support,
consequently I get the following message:-

Fatal error: Call to undefined function mysql_connect() in
C:\http-dir\board\conne ct.php on line 3

Question:- How do I instruct PHP to support MySQL?

Please note:-

extension=php_ mysql.dll
extension=php_ pdo_mysql.dll

in php.ini are enabled, and php.ini is located in the php root directory.

Thank you.
Feb 9 '07 #5
Jerry Stuckle wrote:
Siegfreed wrote:
>My PHP version is obviously not compiled with MySQL support,
consequently I get the following message:-

Fatal error: Call to undefined function mysql_connect() in
C:\http-dir\board\conne ct.php on line 3

Question:- How do I instruct PHP to support MySQL?

Please note:-

extension=php_ mysql.dll
extension=php_ pdo_mysql.dll

in php.ini are enabled, and php.ini is located in the php root directory.

Thank you.


First of all, there's no need to change the registry if you have your
php.ini file in the right place.

Secondly, there are three extensions you could be interested in.

extension=php_m ysql.dll // (older) mysql_xxx interface
extension=php_m ysqli.dll // (newer) mysqli_xxx objects
extension=php_p do_mysql.dll // (newest) PDO interface for MySQL
extension=php_p do.dll // also required for PDO

(note: the last, PHP Data Objects, is an abstraction layer for data
access. It's relatively new, so you probably won't see much existing
code using it.

Most sites use the mysql_xxx interface, while there are some going to
the mysqli_interfac e.

And the interfaces are quite compatible - you can load all three and
pick whichever one you want to use in your code.
I think you are right in saying: "there's no need to change the registry
if you have your php.ini file in the right place". By moving the
"php.ini" to "c:\windows ", the "fatal error" message was eliminated.

In addition, I copied "libmysql.d ll" to "c:\windows ", it appears to work
fine so far.

Thank you.
Feb 9 '07 #6
I think you are right in saying: "there's no need to change the registry
if you have your php.ini file in the right place". By moving the
"php.ini" to "c:\windows ", the "fatal error" message was eliminated.

In addition, I copied "libmysql.d ll" to "c:\windows ", it appears to work
fine so far.
I knew some would get around to saying they copied files into C:
\WINDOWS.

There is no reason to place ANYTHING in C:\windows.

No reason to modify the registry (I don't consider ENV VARS registry,
yes I know, that's where it lives, but...)

go to

http://web.torres.ws/walters_way

I have complete docs that explain how to set up Apache and PHP without
doing on of this "windows-centric" stuff.

In fact, I had to replace my OS drive last week. Took my 2 hours to
reinstall XP Pro and the drivers and the like.

It took my 10 minutes to "reinstall" Apache, mySQL, Perl, PHP and
SSH2, along with 90% of linux command line tools.

See if that method helps you.

Walter

Feb 9 '07 #7
ot*******@gmail .com wrote:
>I think you are right in saying: "there's no need to change the registry
if you have your php.ini file in the right place". By moving the
"php.ini" to "c:\windows ", the "fatal error" message was eliminated.

In addition, I copied "libmysql.d ll" to "c:\windows ", it appears to work
fine so far.

I knew some would get around to saying they copied files into C:
\WINDOWS.

There is no reason to place ANYTHING in C:\windows.
That's one opinion. I happen to keep certain configuration files there.
No reason to modify the registry (I don't consider ENV VARS registry,
yes I know, that's where it lives, but...)
Changing the environment *is* changing the registry. And environment
changes are applied to every program loaded, not just the one process
reading the configuration file. My environment is already 3K long -
without adding unnecessary things to it.
go to

http://web.torres.ws/walters_way

I have complete docs that explain how to set up Apache and PHP without
doing on of this "windows-centric" stuff.
There is nothing wrong with making use of the tools at hand.
In fact, I had to replace my OS drive last week. Took my 2 hours to
reinstall XP Pro and the drivers and the like.
Good for you. I lost my hard drive. It took me 4 days to reinstall
Windows 2K, apply all of the patches and restore from backup. Next step
is a better backup program.
It took my 10 minutes to "reinstall" Apache, mySQL, Perl, PHP and
SSH2, along with 90% of linux command line tools.
Didn't even take me that long. Once the OS was restored, it was a
simple matter to restore the rest of the system (about 40GB).
See if that method helps you.

Walter


--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Feb 9 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1998
by: Richie | last post by:
I went through the past six months or so of entries in c.l.javascript, and found a couple where people had expressed opinions about the value of supporting much older versions of Netscape and IE. The entries included incidental mention of server logs showing how many pages had been retrieved by such browsers. I'd like to get some sort of communal variety of opinions on how much effort it's worth to put in the support, or in some...
48
8899
by: Nirvana | last post by:
How to make the font size constant in HTML code, so that in a web browser it remains fixed. For e.g in IE if you press CTRL and move mouse wheel front or back the font size changes, cheers
3
1353
by: TClancey | last post by:
Hi all. I have an app that needs to connect to either - an Access database, MySql database or MsSql database. It will be the end users decision which they want to use. I've done a lot of work with Access in the past, and a good deal with MySql and realise that there are syntax issues between these two back ends. I haven't done a great deal with MsSql yet, but I would imagine that syntax is going to be an issue here as well.
35
2218
by: salad | last post by:
I have an application written in MS-Access. It is a complete application that manages the day-to-day operations of a business. The program is nearly ready to be used in other customer sites. I am wondering if any of you have advice on supporting an application. Since it has never had any outside exposure, what I don't want is to make a bunch of sales and not be able to support the issues that arise. I believe as kinks are worked out...
399
12938
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or to python-3000@python.org In summary, this PEP proposes to allow non-ASCII letters as identifiers in Python. If the PEP is accepted, the following identifiers would also become valid as class, function, or variable names: Löffelstiel,...
0
1405
by: egur | last post by:
Hi, I'm looking for reliable MySQL version (for Windows) that supports "EXCEPT" and "INTERSECT" execution. Would somebody recommend such version (and corresponding client), please?
3
1419
by: =?Utf-8?B?U29hcHk=?= | last post by:
Hi: I heard from a friend that Microsoft will no longer support XP. There is a sign-up page for those people who still use it and would like MS to continue supporting it. I don't know if this is proper for me to do this on this board, however, I don't know where else to go. I have supplied the link if anyone here would like to ask MS to continue supporting XP. THanks. http://www.infoworld.com/article/08/01/14/02FE-why-save-xp_1.html
4
1805
by: Gilles Ganault | last post by:
Hello What does it take to support locales? The following test code found on the PHP site doesn't work as planned: ======= setlocale(LC_TIME, "C"); echo strftime("%A"); setlocale(LC_TIME, "fi_FI"); echo strftime(" in Finnish is %A,");
2
2396
by: Abhijat Vatsyayan | last post by:
Hi, I am looking for a MySQL driver (or configuration) for PHP which will support fail-over to a slave database in case of a master failure (we have a MySQL master-slave replication setup). I have already looked at MySQL proxy and if nothing works, I will end up using it but I was hoping that PHP has some kind of built in support (through the driver or otherwise) for MySQL fail-over (like MySQL JDBC driver has). We would prefer not to...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
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
9914
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
8937
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...
1
7461
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4009
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
3
2851
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.