I have just finished making a large-scale project for a client of mine and when I went to move it over to his servers I got a little confused. He uses GoDaddy and their control panel is completely different than what I'm used to (cPanel 11)... so I need some help :P
I have successfully transfered the database over but now I can't seem to connect to it... oddly enough? Do I have to use some different kind of php connection script to connect to their databases or something? Here's what I currently use:
Is that okay? I'm not sure... a quick reply would be greatly appreciated! Thanks!
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
I don't know if you can use pconnect on godaddy. I use mysql_connect and I'm able to connect to my database. Open the database manager to be sure you are selecting the right database. echo out mysql_error() to see if something is wrong.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
Someone correct me if I am wrong, but godaddy runs PHP as a CGI wrapper.
If the above statement is true, then pconnect won't work as expected. I believe a mysql_pconnect would behave exactly like a mysql_connect under these conditions.
Adding the error reporting that _Aerospace_Eng_ suggested will help pinpoint if this is the case. Also, check the web server log file for errors and/or put the following two lines in after your first opening <?php tag -
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
Just to probably state the obvious (you never know) did you change the username and password in your script. When you transfered the databases its probable that you didnt also transfer the users and permissions.
Just to probably state the obvious (you never know) did you change the username and password in your script. When you transfered the databases its probable that you didnt also transfer the users and permissions.
Lol - yes I did infact change the username/password/db name when I switched it, that was the first thing I checked.
As for the mysql_error reporting thanks! I will try that tonight and see what I get +rep both of you!
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
Okay... tried echoing the error while using mysql_connect instead of pconnect and got this message:
Quote:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
The "Can't connect to MySQL server on 'localhost' (10061)" is because you check the error after the mysql_select_db() call, which attempts to connect with it's default settings (found in php.ini).
__________________
I'm not sure if this was any help, but I hope it didn't make you stupider.
Experience is something you get just after you really need it. PHP Installation Guide Feedback welcome.
After emailing GoDaddy Support they told me that Windows Hosting does not support PHP! I felt so stupid! But anyways... now I have to try and get my client to switch his hosting to Linux :S
Thanks for all the help!!
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
I thought their Windows plans had support for php and asp, maybe thats just for some of them.
Close but not quite.... their Windows Hosting Plans only have ASP (with Access, MySql, and SQL Databases). If you want PHP, CGI, MySQL, etc. you need their Linux Hosting.
Who knew eh?
__________________
Everyone hears what you say, friends listen to what you say, best friends listen to what you don't say. Radio DJ Panel v3 - It's Here!
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,687
Thanks: 42
Thanked 637 Times in 625 Posts
You're gong to want to switch hosts once you discover Godaddy is running MySQL 4.0 and has no plans to upgrade.
Quote:
Our support staff has responded to your request, details of which are described below:
Discussion Notes
Support Staff Response
Dear Randy Whitaker,
Thank you for your email. We apologize for the inconvenience, but currently we have no schedule for upgrading MySQL. Please send this suggestion to suggestions@godaddy.com as many of our products and features have either been created or improved by customer suggestions.
Please let us know if we can help you in any other way.
Sincerely,
Aris Q.
Customer Care Specialist
Customer Inquiry
Browser Info : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
What are your plans for upgrading MySQL to 4.1 or (preferrably) 5.0? Version 4.0 has many drawbacks I am running into; namely, subselects do not work. Do you have a schedule for upgrades?