473,386 Members | 1,835 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,386 software developers and data experts.

MySQL_connect() working in PHP4 not in PHP5?

Hey - - --

I upgraded my development machine to PHP5. My pages with the subject
function no longer work. I am able to do an ODBC connect to the data
files from other programs.

I get the error:

Fatal error: Call to undefined function mysql_connect() in
<file.php> on line 190.

This is a W2K machine running IIS4, if that makes a difference...
Still works on server running PHP4.

Clues for me?

Many TIA - - --

Ken
May 30 '06 #1
1 7122
Rik
Swincher wrote:
Hey - - --

I upgraded my development machine to PHP5. My pages with the subject
function no longer work. I am able to do an ODBC connect to the data
files from other programs.

I get the error:

Fatal error: Call to undefined function mysql_connect() in
<file.php> on line 190.

This is a W2K machine running IIS4, if that makes a difference...
Still works on server running PHP4.

Clues for me?


www.php.net:
http://nl3.php.net/manual/en/ref.mysql.php
PHP 5+

MySQL is no longer enabled by default, so the php_mysql.dll DLL must be
enabled inside of php.ini. Also, PHP needs access to the MySQL client
library. A file named libmysql.dll is included in the Windows PHP
distribution and in order for PHP to talk to MySQL this file needs to be
available to the Windows systems PATH. See the FAQ titled "How do I add my
PHP directory to the PATH on Windows" for information on how to do this.
Although copying libmysql.dll to the Windows system directory also works
(because the system directory is by default in the system's PATH), it's not
recommended.

As with enabling any PHP extension (such as php_mysql.dll), the PHP
directive extension_dir should be set to the directory where the PHP
extensions are located. See also the Manual Windows Installation
Instructions. An example extension_dir value for PHP 5 is c:\php\ext

Grtz,
--
Rik Wasmus
May 30 '06 #2

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

Similar topics

5
by: Tim Tyler | last post by:
I'm sure this is a FAQ - but I could not find a coherent statement of the answer: Some of my clients want PHP4. Other ones want PHP5. Can I run both PHP4 and PHP5 under the same instance of...
8
by: Wilfred Johnson | last post by:
I thought that I'd try php / mysql on windows 2000. I am running php 5.0.0 and it works fine, except when I try to use mysql functions. I get: Fatal error: Call to undefined function...
0
by: Dave Pham | last post by:
I just cleaned my comp, and I am trying to re-config my webserver... I am trying to setup apache 2 so it runs both php4 and php5, I also have two instances of mysql running. I know this can be...
1
by: dk_sz | last post by:
Is it just me... Or is PHP5 XML very limited? Or am I missing something very obvious? Any way to use PHP4 Dom XML in PHP5? Does anyone know why support for it was dropped? I have following...
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...
12
by: Drazen Gemic | last post by:
How long will PHP4 be supported ? When is PHP4 end of life scheduled ? DG
3
by: xhe | last post by:
I have just upgraded my php version form php4 to php5. and I met this problem, and don't know if you know the solution. My site was written in PHP4, and most parts can be running smoothly in PHP5,...
8
by: FFMG | last post by:
Hi, I am slowly moving my code to php5. But I would like to make it backward compatible in case something bad happens, (and to make sure I understand what the changes are). The way the...
3
by: jmark | last post by:
I am currently running php 4.4.7 in windows xp and apache 2. If I enter php in command line. I get the following error The application has failed to start because php5ts.dll was not found" I...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...

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.