943,929 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 3576
  • PHP RSS
Feb 16th, 2007
0

Problems with PHP and the mysql_connect() command.

Expand 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
Last edited by EnderX; Feb 16th, 2007 at 5:13 pm.
Similar Threads
Reputation Points: 483
Solved Threads: 1
Posting Shark
EnderX is offline Offline
999 posts
since Aug 2006
Feb 16th, 2007
0

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

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.
Reputation Points: 12
Solved Threads: 3
Light Poster
jblacdao is offline Offline
37 posts
since Jan 2007
Feb 17th, 2007
0

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

Click to Expand / Collapse  Quote originally posted by EnderX ...
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
Reputation Points: 21
Solved Threads: 26
Posting Whiz in Training
Rhyan is offline Offline
240 posts
since Oct 2006
Feb 19th, 2007
0

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

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?
Reputation Points: 483
Solved Threads: 1
Posting Shark
EnderX is offline Offline
999 posts
since Aug 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: embed javascript in php
Next Thread in PHP Forum Timeline: find and query an LDAP path with PHP?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC