Question:
How do I upload a PHP website to a godaddy hosting server?
viintageecstasy
2009-08-10 17:12:23 UTC
I made a PHP website with XAMPP, MySQL, and Dreamweaver and am trying to upload it to godaddy through the FTP client in Internet Explorer. I use this FTP client for my HTML websites. I have never upload a PHP website before and its not working. I get this error when I visit the index.php of the website:

Warning: mysql_pconnect(): Unknown MySQL server host '127.0.0.1/mdcphc' (1) in /home/content/m/d/c/mdcphotoclub/html/Connections/connPhotoClub.php on line 9

Fatal error: Unknown MySQL server host '127.0.0.1/mdcphc' (1) in /home/content/m/d/c/mdcphotoclub/html/Connections/connPhotoClub.php on line 9


Any ideas? Do I have to upgrade my GoDaddy hosting service? Or do I have to change an IP address? If yes, what IP address do I use?
Six answers:
Nick M
2009-08-10 17:37:57 UTC
Well you need to create a mySQL table, or even database, your file: mysql_pconnect() is trying to access this database, and table but it doesn't exist. You need to create it.



Login in to the CPanel and find, MySQL Databases, and even PHPmyAdmin to insert the values.





Cheers,



Nick
Shelley
2016-04-04 03:47:35 UTC
I don't know exactly how GoDaddy works but I would say its not much different from my host. What you need to do is go into your Cpanel and look for the database section, then you need to go to mysql databases or whatever database you use and create a user, you then use that username and password to connect to the database and most often then not the host for your database is 'localhost' not the ip address that you would use to navigate to your website. You will also need to create a database and assign a users priveledges to it, this can all be done through the mysql databases section in your Cpanel. I also would not use mysql_pconnect as the connection will not close and that can leave you vulnerable to attacks. The way I would write my script is: Then in mysql_query I would always add my connection variable like this: mysql_query($sql, $connect); I've never had any problems with this and I hope it can help you out.
sjAy
2009-08-10 17:23:37 UTC
Ok according to error messages you have not created the MySQl database on godaddy server.



Create a new database and create a database user (same as the one you created on the local machine would be nice and easy) and in your code change the MySQL Host to the new server address which is the one you created on godaddy server. You should be able to get the server address in the godaddy help or faq or it should be in the control page.



I do not think you have to upgrade godaddy hosting. Only change the MySQL ip address to the one created on the godaddy. As I know you can create MySQL db for free in godaddy.



Hope this will solve your problem and good luck with your site.
Jaz
2009-08-10 17:35:28 UTC
When I viewed the error, it seems like you didn't get the database through goDaddy, but through another client. You will need to sign up for goDaddy's database, and then try it. If it still doesn't work, check that:



- you have php installed.



If everything I've mentioned seems right, convert to html. Keep the php contents, but embed it in html. i.e:









Your Title Here


content="Alleycode HTML Editor">


content="Your description here...">


content="Your keywords here...">


//see how it is embedded in html.

?>











I kept the php contents, but embedded in html. Then, upload it to file manager and you shall be set.





HOPE THIS HELPS.



P.S. Supposedly, you are using paid hosting, correct? GoDaddy isn't the best... I'm not trying to promote the product or anything, but just as a fyi, I've personally tried both GoDaddy and 000webhost and prefer 000webhost. It is more reliable and you can upload php. :)
anonymous
2009-08-10 17:30:35 UTC
.. no help sorry with my last response , sorry



127.0.0.1 is a loop back address meaning your machine not the godaddy server



i have a godayyweb site not a good one but its hosted there and i use the one thats on the site.



my sql databases.



to the post below



25 emails accounts

25 databases

$7 a month its more than enough no extra subscriptions just working the site is the problem.
EatByDate.com
2009-08-10 18:33:51 UTC
Easy steps to upload your files and website to godaddy.com from adobe dreamweaver. Also other tutorials on how to increase your views and add a user comment section.



http://makeitfiction.com/Tutorials/uploadgodaddy.html



http://www.makeitfiction.com/Tutorials


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...