PHP & MySQL wont Communicate

ackfeldwire

Registered
OK guys,

I have finally given up and am asking for help. Here is the Situation:

Running OS X 10.3.8
PHP 4.3.1
Apache
MySQL 4.1
PHPnuke

All three of these are running fine. Apache pulls the right files for the site. PHP shows that it is running (I installed the Moduals and other per instructions) I created the globals file. MySQL is also running fine. I created user acounts and can acess MySQL from the terminal window through administrator and from another computer via the same methods.

So what is the problem you ask. I installed a site with PHPnuke and set the user and database information but PHP is not accessing MySQL on localhost. Thinking about it I loaded the same database on a server outside of my LAN that I use for other sites and put in the db information for that server and the site ran slow but it did work.

So I know PHP works and so does MySQL just not together on this machine!!!!! I have searched for two days for the answer and still have not found anything. Please Help!!!!!!!
 
well, it's probably not the answer you're looking for, but check out MAMP

it'll install all the services (apache/mysql/php) in their own directory, and have them all working together flawlessly. good for a temporary (or noob) dev environment.
 
Do you run any other software that makes use of "localhost" ? Shot in the dark, but make sure "localhost" actually resolves. Worst comes to worst you can use "127.0.0.1" instead of "localhost" or if that machine has a static IP use that.
 
No nothing else tht I know of uses the localhost. Used the Mamp solutions ant that worked great. Thank you for the help.
 
I know this is a silly question... but you configured phpNuke to connect to MySQL (username, hostname, password, database) as well as created a DB user(other than root) and database instance?
 
There is never a silly question. But yes I did all of that. Now this works with MAMP.....But the problem now is I want to host it and from what I can tell the security is kinda weak with MAMP. Basically I can not secure MAMP..... So now I am back where I started. I really need to get the on board php taling to Mysql.......

Still looking for help.

Thanks,.....
Ed
 
I got it I got it I got it!!!!!!!!!! for all of you out there having this same problem here is the answer!!!!!!!!
PHP 4 does not accept password hashing!!!!
Either upgrade to PHP 5 or follow the instrucitons here to set for an old Password. This fixed the problems that I was having right away. I figured out that if I set it up with no passwords it worked fine and then Put two and two together. So here is the link...... http://dev.mysql.com/doc/mysql/en/old-client.html
 
Back
Top