Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing functions in PHP 4.3.8

Status
Not open for further replies.

Wishdiak

Technical User
Mar 7, 2004
1,787
0
0
US
Using PHP 4.3.8 (cli), I just started noticing the following errors in my error log.

[error] PHP Fatal error: Call to undefined function: mysql_connect()
[error] PHP Fatal error: Call to undefined function: mysql_pconnect()
[error] PHP Fatal error: Call to undefined function: preg_match()

I know that some MySQL functions were removed in PHP 5, but shouldn't they still be there in PHP 4?

Wishdiak
 
those functions should still be there. I'm writing code right now that's using those and it works fine (I have the same version of PHP). You might check your php.ini settings...
 
It was kind of weird, but I recompiled with ./configure --with-mysql and life is good.

Now, I wish I could delete my own post.

Wishdiak
 
I had the same problem, and the problem wasn't that the function wasn't available, it was that my code was wrong.
Check that what you are asking the code to do is correct, and it has all the variables it needs to work.
for instance, I was trying to get my code to mysql_select(NOW()) which brings up that error, as PHP claims the mysql_select function for itself, and you can only use it to get info from the database.

----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top