473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Fatal Error: Win2003 & mysql_connect function [PLEASE HELP]

I am running Win2k3 Server and when I try to use the mysql_connect
function I am getting an error:

Fatal error: Call to undefined function mysql_connect() in
C:\Inetpub\wwwroot\programs\index.php on line 8

Now, I def know I've configured my php.ini correctly (its literally the
same as my XP machine) and I know that mysql works fine with PHP as I
can run it from the command line :D
I've got the files (tried in multiple places - but happiest with it in
my php & php/ext dirs with Windows path set.)
PHP 5 is running as an ISAPI (for some reason I cant get the CGI to
parse php files).
I have amended my php.ini with the doc_root, and cgi-force_redirect and
extension dir - all the permissions on my php / inetpub folders have
been given set for iusr, iwam and IWG full control (purely for
troubleshooting).
MySQL is 4.1, IIS 6.0 on Windows 2003 with PHP 5.

Its caused me lots of grief so any help would be much appreciated!

Regards

FrobinRobin

Jul 17 '05 #1
2 1983
Make a call to phpinfo() and tell me exactly what the value of:
"Configuration File (php.ini) Path" is. Also, you should use the mysqli
extension with MySQL 4.1+

Remember, PHP 5 requires mysql a dll file loaded in php.ini whereas PHP
4 does not. See the manual for details.

Jul 17 '05 #2
Thanks Philip, I can blatantly see that my PHP path is set to
c:\windows when the php.ini doesnt even exist in that dir!
This is my first Win2003 install (I've usually used WinXP/2000) and
I've come across quite a few differences with configuring for 2003.
Sure enough as soon as I put a copy in c:\windows - phpinfo displays
the filename as well as the path!
I soon found a way to correct the php.ini file location by creating a
registry file as follows:

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]
"IniFilePath"="c:\\PHP"

A quick restart of IIS6 and it all works fine.
Thank you very much for your help Philip!

Jul 17 '05 #3

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

Similar topics

1
by: BT | last post by:
Hi .. a newbie question. I get the following error: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/index.php on line 3. I have the following RPMS installed on RH7.2...
4
by: gc | last post by:
I'm a PHP and MySQL newbie. I have a feeling a lot of you may have seen this before. I'm teaching myself PHP/MySQL and trying to setup a guestbook. I'm running latest versions of Apache, PHP and...
1
by: Mike | last post by:
Last weekend I decided to install Apache 2.0.53-win32-x86-no_ssl PHP 5.0.3 Smarty 2.6.7 MySQL essential-4.1.10-win32 I have Apache up (Port 80 blocked at the router and firewall!) and I have...
2
by: inonzuk | last post by:
why strange you ask? here goes: I have been working with Php and Mysql for a week without any problems. Today I tried executing a php page that connects to mysql and creates a new database, I...
5
by: Grant Nosbush | last post by:
I have searched the newsgroups and the web trying to solve this problem and just can't get it. Maybe someone will be able to help. I am getting the following error when I try to view a test page...
4
by: MLH | last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application for me. When he was done, he sent me the PHP files and the MySQL dump file. Now, when I connect to the application on my LAN using...
5
by: awdsites | last post by:
Hi, I'm a noob with a server so keep that in mind :) Been trying to connect with php to mysql and all I get is: "Fatal error: Call to undefined function: mysql_connect()" I've read and read...
6
mmarif4u
by: mmarif4u | last post by:
Hi everyone. i make a page that a user input thier icnumber with confirm ic number, it saves the data to mysql db with current date and a random access code generated automatically, NOW i have...
49
by: Julian Bowler | last post by:
Please can some one help with my problem; I am running Apache web server on my lap top, plus a mysql server and php. The version of php currently installed is 5.2.5. when i write some php to connect...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.