SQL Database, Index.php don't like each other…
Posted 28 September 2006 - 05:59 AM
I pulled all the files from a commerce site, written mainly in PHP, from another server and transferred it to Godaddy. I created a database using their tools, and uploaded the SQL file I pulled from the old server into the new database.
But the homepage, index.php, won't come up. I'm sure something somewhere needs to be changed. What's the most likely error? I'm assuming it's some sort of conflict between the index.php file and the SQL file.
Any help would really be appreciated.
Posted 28 September 2006 - 04:11 PM
I removed those lines, and that particular error went away.
Would it help If I were to show you the script?
Posted 29 September 2006 - 04:59 AM
Posted 29 September 2006 - 11:56 PM
Your first problem is you have a GoDaddy account. ;D I am not a big fan as I have almost a year left on an account that I am not using. If you script was written for PHP 5, you will have to rename your files index.php5 on that hosting service.
If you script does not have anything too sensitive or personal you can post it or email it to me as I to have access to their site and can get it to work.
Posted 30 September 2006 - 08:03 AM
Posted 30 September 2006 - 11:55 AM
pbase, what you sent me was the mysqldump. This is the information used to recreate a database onto a new server. Thanks. I am new to this stuff also and will learn a lot from this experience. I am going to use the information you sent to go back into my unused GoDaddy account and create what you have. This will take a while but we will learn this together.
From your orginal post when you mentioned "script" I thought that you were having a problem with your index.php script and I thought that was what you would be posting or sending. If you have successfully recreated the db and are having a problem with the index.php, please cut and paste it here so others can view your php code. Before you post, be sure to xxx out your login name and actual password from the code.
Posted 30 September 2006 - 01:36 PM
Does you index.php access the db from the start? If so be sure your login information matches. Even if you do not successfully connect to the db you shouldn't get a blank page. I will need to see the index.php script to know anymore.
Posted 02 October 2006 - 12:38 AM
I'm still having trouble attaching or even pasting the code into my replies. I did email you the script however.
Posted 02 October 2006 - 02:16 AM
It looks OK and I am sure it is if it worked on the last hosting site. The next place to look is in your connection set up. The second line of your code is looking for a script name connection.php in a sub-folder from where the index.php file is. This script brings in, (includes), the settings to connect to the database. Another pointer here is you may want to consider giving it a trickier name (the file and folder) for security reasons so no one can guess it. Do that after you have gotten everything up and running.
Make sure the username and password used in the connection.php is what you assigned to your GoDaddy database. And that the database where listed in the connection information is the same as what you are calling it now. From the control panel at GoDaddy find out what your connetion settings are. They are different than most hosting services. They don't use "localhost" I have different server names for the two database I have there. They are: mysql211.secureserver.net, and mysql119.secureserver.net. Yours may be different. ($host = 'mysql211.secureserver.net'
This may get you in the right direction. Let us know how it goes.
Posted 02 October 2006 - 09:21 PM
You're right about the settings in the "connection.php" file. They're still set to the old server.
I'll correct this, and let you know how it turned out.
Posted 07 October 2006 - 12:03 AM
This simple problem stymied all of us. But thanks to your assistance, the site is now active!
It needs a bit of tweaking, but the hard work is done. I'm sure that in no time, you're going to be a wonderful asset to the PHP community.
Posted 07 October 2006 - 01:22 AM
Good luck with your site.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users