User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 426,126 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,693 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1804 | Replies: 3 | Solved
Reply
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Problems with PHP and the mysql_connect() command.

  #1  
Feb 16th, 2007
I am currently responsible for a set of server units. Recently, the group of users working with one of these units informed me that they were having problems with a php-based report generating program. I did not write the program; my predecessor did. I did manage to track down the error, though; the program throws the message
Fatal error: Call to undefined function mysql_connect() in  /srv/www/htdocs/tech_site_lst.php on line 123
when attempting to access a mysql database.

Another server, running the same code, has no problems, but is running a different version of PHP. (Working program is running 4.3.10, broken version is running 5.2.*, I think the star is a 0 but cannot recall for certain.) Both systems are running on SuSE 9.2 OS's, both systems are running MySQL 4.1.10a.

Does anyone know what the problem might be? Or perhaps know of someplace I can go to find out more about the problem in question?

Thank you for your consideration,
EnderX
Last edited by EnderX : Feb 16th, 2007 at 4:13 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 37
Reputation: jblacdao is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 3
jblacdao jblacdao is offline Offline
Light Poster

Re: Problems with PHP and the mysql_connect() command.

  #2  
Feb 16th, 2007
You might wanna check the libraries compiled with your PHP. You get that error because the library that's supposed to implement that function is not compiled with your PHP.
Reply With Quote  
Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 135
Reputation: Rhyan is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Junior Poster

Re: Problems with PHP and the mysql_connect() command.

  #3  
Feb 17th, 2007
Originally Posted by EnderX View Post
I am currently responsible for a set of server units. Recently, the group of users working with one of these units informed me that they were having problems with a php-based report generating program. I did not write the program; my predecessor did. I did manage to track down the error, though; the program throws the message
Fatal error: Call to undefined function mysql_connect() in  /srv/www/htdocs/tech_site_lst.php on line 123
when attempting to access a mysql database.

Another server, running the same code, has no problems, but is running a different version of PHP. (Working program is running 4.3.10, broken version is running 5.2.*, I think the star is a 0 but cannot recall for certain.) Both systems are running on SuSE 9.2 OS's, both systems are running MySQL 4.1.10a.

Does anyone know what the problem might be? Or perhaps know of someplace I can go to find out more about the problem in question?

Thank you for your consideration,
EnderX

I've had this problem with php 5.2.x on windows machine running apache 2.2.x. For some reason the PHP cannot find the mysql libraries, although they are present in the extension directory.

Running a query on google brought up a solution. I had to put the file libmysql.dll into Apache directory and it worked perfectly.

You can try the same solution, however Suse 9 is a bit messy, so I am not sure it will work for you. Also I do not know exactly what is the libmysql.dll corresponding file for Linux, so you have to figure it out by yourself.

When you get a solution, would you share it with us, as a "know how"?


Cheers
Reply With Quote  
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

Re: Problems with PHP and the mysql_connect() command.

  #4  
Feb 19th, 2007
Does anyone know what the names of the library files are likely to be? I'm not sure what to look for, and I'm not sure what path the original PHP4 system was using; it would be nice if I had some way of tracking down the files it wants so I can put their path into the configuration. Any suggestions on some names to look for?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:26 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC