473,573 Members | 2,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP5.05, Mysql4.1, Apache on Windows XP - cant get php to talk to mysql

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; to the end of the environment variable path
2. I have edited my php.ini file to :
extension_dir = "c:\php\ext "
extension=php_m ysql.dll - removed the ";"
... ive checked i only have 1 php.ini file!
3. The dll "libmysql.d ll" is in the folder C:\php
4. The dll "php_mysql. dll" is in the folder c:\php\ext

I cant find any other tips, please help

thanks
Greg

Oct 2 '05 #1
4 2448
ktsirig
11 New Member
Greg, for installing and such I used

http://mpcon.org/apacheguide/

I am not sure whether you have done any mistake or not, but check this mini tutorilal, maybe you could get some tips!
Oct 2 '05 #2
On 2 Oct 2005 12:24:39 -0700, "gregsands" <sa*******@gmai l.com> wrote:
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; to the end of the environment variable path
2. I have edited my php.ini file to :
extension_dir = "c:\php\ext "
extension=php_m ysql.dll - removed the ";"
... ive checked i only have 1 php.ini file!
Is PHP reading this php.ini file? Check what it says for the configuration
file path near the top of the phpinfo() output.
3. The dll "libmysql.d ll" is in the folder C:\php
4. The dll "php_mysql. dll" is in the folder c:\php\ext


This and your points 1 and 2 above all look to be correct.

Are there any errors when starting the Apache server?

Do you have MySQL itself installed on the machine, and if so where is its
directory on the PATH environment variable compared with PHP's copy of the
client libraries (which are older).

When you set PATH did you set it as a system environment variable not a user
environment variable - else the Apache service won't see it as it doesn't run
as your user (unless you specifically configured it that way).

Also check permissions on the files involved for the same reason.
--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Oct 2 '05 #3
On 2 Oct 2005 12:24:39 -0700, gregsands wrote:
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; to the end of the environment variable path
2. I have edited my php.ini file to :
extension_dir = "c:\php\ext "
extension=php_m ysql.dll - removed the ";"
... ive checked i only have 1 php.ini file!
3. The dll "libmysql.d ll" is in the folder C:\php
4. The dll "php_mysql. dll" is in the folder c:\php\ext


I've found the biggest pain in Win32 installs of PHP/MySQL to be the
path to the PHP.INI file not being read correctly - or ditto with
paths to extensions.

Make some odd, highly visible (or error-producing) change to check
that you are actually editing the right one. I've sometimes found that
even with setting up the PATH properly, Windows seems to insist on
having the ini file in the windows directory - even after rebooting
etc.

Adam.
Oct 3 '05 #4
Hi Andy

OK php is looking for the php.ini file in C:\WINDOWS - so i have copied
php.ini to C:\WINDOWS

The PATH i set was in environment variables and the end of it looks
like this C:\php;C:\MySQL \bin

I get no errors when starting the Apache server

MySQL is installed on the machine and running - i have installed
NaviCat and it successfully connects to MySQL databases

I checked the libmysql.dll and php_mysql.dll and found that they were
blocked - i unblocked them, all permissions are fine

unfortunately its still not working... :+[

Oct 3 '05 #5

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

Similar topics

7
3681
by: Christoph Nothdurfter | last post by:
Hallo! I was wondering if my PHP4-Scripts will run under PHP5 (Haeven't tried the beta yet). Does anybody know? Thank you, -Christoph
4
3300
by: Philipp Lenssen | last post by:
OK, I can get PHP5 running on Apache 2 installed on Windows XP Home Edition. Now I want to add MySQL4 to the package. I installed it but I'm not sure what to do now. My PHP5 scripts are running fine. The MySQL server seems to be running though actually I'm not sure. When I write $link = mysql_connect("localhost", "mysql"); I get the PHP5...
4
3259
by: >>-Archer--> | last post by:
I've upgraded to PHP5 from PHP4 on a Win2K3 Server and now I can't use the MySQL databases. I checked the documentation, to discover that MySQL libraries are no longer bundled with PHP. So I've uncommented the 'extension=php_mysql.dll' and copied libmySQL.dll to Windows\System32 (as well as Windows, Apache2\bin, and anywhere else I could...
0
2043
by: Derek | last post by:
Hi there, Thank you for your time to see my question. I am new in PHP. I installed MySQL, SSL, and Aparche2 in my fedora 3 box. everything working fine. now I am installing PHP5. I followed PHP installation instruction, everything is OK before 14th step: 14. Edit your httpd.conf to load the PHP module. The path on the right hand side of...
1
1878
by: Nospam | last post by:
I am trying to get mysql 4, php5, and apache to work on my winxp sp2 comp, unfortunately even though php5 and apache seems to work ok I am unable to utilise mysql with php and apache, I have yet to see a guide that has a problem free installation, if there is such a guide or a fix on how to get php5, apache and mysql all working on winxp sp2,...
8
1592
by: Tony B | last post by:
Hi, I'm trying out my local copy of a site that uses php4, mysql,apache2. I've moved it from a php4 machine to a php5 machine, and it doesn't work at all now. A couple of other php4 sites I've moved, which are straight php and do not use mysql are working fine though. So it seems that the mysql php interface maybe the problem. Are there any...
5
3045
by: jcoder | last post by:
im using win xp and installed apache 2.x and php5...both working fine. when i test: <?php phpinfo(); ?> it works fine. trouble starts when i started installing mysql 4.x server on the same machine. mysql run successfully but the issue is i cant integrate it with php. i already copied -- php_mysql.dll on my
3
2132
by: R.A.M. | last post by:
I use PHP5 in Windows XP Professional with Apache and MySQL installed. I would like to use MySQL. Now, I cannot use mysql_* functions because mysql_connect(...) returns Fatal error: Call to undefined function mysql_connect() PHP is problably not correctly configured to use MySQL. I think so, because when I open: localhost/phpinfo.php I...
12
2575
by: Alan M Dunsmuir | last post by:
After having worked with Apache/MySQL/PHP for a year or so under Linux I need, purely for convenience, to set up a parallel platform under Windows. Unfortunately, since I last did this (using Windows XP Pro) I've moved on to Windows Vista (Home Premium). MySQL and Apache2 have both installed satisfactorily, but I'm having problems with PHP5....
0
7788
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...
0
7707
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...
0
8037
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8080
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...
0
6430
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...
1
5604
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...
0
3737
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...
0
3742
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2226
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

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.