pbase Posted September 28, 2006 Share Posted September 28, 2006 I'm a real novice at dealing with PHP and SQL databases, so I'm hoping that someone more knowledgeable can give me a bit of help.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. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/ Share on other sites More sharing options...
fenway Posted September 28, 2006 Share Posted September 28, 2006 Are you getting any errors in any log files? Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-100293 Share on other sites More sharing options...
pbase Posted September 28, 2006 Author Share Posted September 28, 2006 When I uploaded the SQL file I got from the other server, there was a "user not permitted" type of error as the file attempted to create it's own database under a different name.I removed those lines, and that particular error went away.Would it help If I were to show you the script? Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-100345 Share on other sites More sharing options...
fenway Posted September 28, 2006 Share Posted September 28, 2006 Not really... you must be getting errors somewhere. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-100394 Share on other sites More sharing options...
pbase Posted September 29, 2006 Author Share Posted September 29, 2006 When trying to access the home page with a browser, the site simply won't come up. Where would I look for the errors? Is there a server error log file somewhere? Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-100670 Share on other sites More sharing options...
fenway Posted September 29, 2006 Share Posted September 29, 2006 You're getting a blank page? That's definitely PHP-related... I don't know how to turn errors on explicitly, though. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-100968 Share on other sites More sharing options...
NevadaSam Posted September 29, 2006 Share Posted September 29, 2006 Your first problem is you have a GoDaddy account. ;D;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.Sam Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-101197 Share on other sites More sharing options...
pbase Posted September 30, 2006 Author Share Posted September 30, 2006 Here's the SQL script: Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-101282 Share on other sites More sharing options...
pbase Posted September 30, 2006 Author Share Posted September 30, 2006 Actually, I con't seem to upload the script! I sent it to you by email, Sam. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-101288 Share on other sites More sharing options...
NevadaSam Posted September 30, 2006 Share Posted September 30, 2006 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. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-101335 Share on other sites More sharing options...
NevadaSam Posted September 30, 2006 Share Posted September 30, 2006 OK, I created a database and uploaded your dumped file. I did not get any errors and all seems good. Your data seems to be only test data you create so perhaps it is not senistive material as I thought.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.Sam Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-101359 Share on other sites More sharing options...
pbase Posted October 2, 2006 Author Share Posted October 2, 2006 Sam,I'm still having trouble attaching or even pasting the code into my replies. I did email you the script however. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-102053 Share on other sites More sharing options...
NevadaSam Posted October 2, 2006 Share Posted October 2, 2006 The weekend was my best time, but let's see what we can do. Perhaps this will be enought to help. First I want to point out that while Godaddy does have short_open_tag set to On, it is not good pratice not to use them. Consider using [b]<?php[/b] instead of [b]<?[/b]. Probably the reason you could not post your index.php code was this fourm has a limit on how my lines of code can be posted. Normally one only needs to post the part they are having a problem with. Whenever you want to share more code you can upload it to a text file (index.txt) and it will be viewable from a link on your site. This is the code you emailed to me. [url=http://nevadasam.zoomcities.com/index.txt]http://nevadasam.zoomcities.com/index.txt[/url]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 [b]connection.php[/b] 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.[code]<?session_start();include('include/connection.php');[/code]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.Sam Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-102093 Share on other sites More sharing options...
pbase Posted October 2, 2006 Author Share Posted October 2, 2006 Sam,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. Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-102685 Share on other sites More sharing options...
pbase Posted October 7, 2006 Author Share Posted October 7, 2006 Samantha,This simple problem stymied all of us. But thanks to your assistance, the site is now active!dbboutique.comIt 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.Thanks again,- Collwyn Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-105315 Share on other sites More sharing options...
NevadaSam Posted October 7, 2006 Share Posted October 7, 2006 I am glad you are headed in the right direction now.Good luck with your site.Sam Link to comment https://forums.phpfreaks.com/topic/22346-sql-database-indexphp-dont-like-each-other%E2%80%A6/#findComment-105344 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.