/    Sign up×
Community /Pin to ProfileBookmark

PHP Not Recognizing MySQL Functions

Ok. I have been trying to set up a web server on my computer but it’s not working.

I have:
Apache 1.3.31
PHP 5.0.1
MySQL 4.0.21
Windows 98se

I have been able to successfully get Apache and PHP to work fine, all the PHP functions and such work but when ever I try to use a MySQl function it gives me an error saying that “mysql_connect()” is an undefined function.

I deleted the “;” from the extension for mysql in the PHP .ini file, have copied several DLL’s to the windows/system32 directory and still it is not working.

I really would like to be able to use PHP in conjunction with MySQL on my computer but I can only do so when this problem is fixed.

Can someone please help me???

Thanks,
~Draike

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@drythirstSep 30.2004 — You prolly didnt set something up right.....
Copy linkTweet thisAlerts:
@MstrBobSep 30.2004 — [i]Originally posted by drythirst [/i]

[B]You prolly didnt set something up right..... [/B][/QUOTE]


Obviously. :rolleyes:


I had a similar issue with setting up PHP 5 with MySQL. Right, so you uncommented this line of the php.ini file:


extension=php_mysql.dll
[/QUOTE]


Now, make sure that your extension directory is pointing to the folder containing the dll, so maybe it is something like:


extension_dir = "C:php5ext"
[/QUOTE]


Or wherever the ext folder is located. And, libmysql.dll has to be in your Windows->System or Windows->System32 folder. I can't remember which, I put it in both to be on the safe side. Now, I did this and still had issues. It appeared my changes to the php.ini file weren't working! The I realized, that in the main php 5 folder, that the file is named either php.ini-dist or php.ini-recommended. Yeah, you need to change it so that it's php.ini If it means opening notepad, copying the entire php.ini-recommended file in there (with your changes) and saving it as php.ini, so be it. But make sure the extension is just plain .ini Do you have that so far?
Copy linkTweet thisAlerts:
@DraikeauthorOct 01.2004 — OH!!! That is just bout what I've done so far!

I copied php_mysql.dll into both my php root directory (c:/php), my windows/system and system32 directories and just about did exactly what you did... except for the php.ini renaming.

That's gotta do it!

I'll change the file extension then let ya know if it worked. Thanks MstrBob!!

THANKS,

~Draike
Copy linkTweet thisAlerts:
@drythirstOct 02.2004 — I would also like to know when it works!! ? :p ? ?
Copy linkTweet thisAlerts:
@DraikeauthorOct 04.2004 — Ok it worked!!!

I opened php.ini-recommended, saved it as php.ini and php recognized mysql functions!!!

One problem though. I can't configure any new users or create new databases with MySQL.

I'm not sure how to do it.

Could I also get help with this too?

Thanks,

~Draike
Copy linkTweet thisAlerts:
@DraikeauthorOct 07.2004 — Won't anyone help me get my MySQL prob fixed? It's related to PHP in that it's MySQL.

I'll say please.

PLEASE!!!... ?

Thanks,

~Draike
Copy linkTweet thisAlerts:
@HaganeNoKokoroOct 07.2004 — So you start up your mysql server (mysqlbinmysqld.exe), start up a mysql shell from the prompt (mysqlbinmysql.exe), and you can't create databases or users? What user name are you using to log on? Does it have permissions for creating databases and modifying users? That's the only thing I can think of to stop you from doing these things.
×

Success!

Help @Draike spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...