954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Changes hosting but problem in opening file

Hello everyone,

I have changed hosting my website. But at the time of connectivity to database , i have changed mysql_connect( ) parameters.
still i am facing some problem in opening website.
what can be problem . please suggest me.

thanks,
gagan

gagan22
Junior Poster
131 posts since Feb 2009
Reputation Points: 10
Solved Threads: 0
 

hello,
You can slove it by editing SQL commands :

Select * from tb_name

to :

Select filed1_name, filed2_name ....,  from tb_name


And the best thing to change the Scriot that you are using to another one using Cache, and convert the Database.

good Luck .

marabe7.com
Newbie Poster
5 posts since Mar 2009
Reputation Points: 10
Solved Threads: 1
 

For starters the above code has absolutely nothing to do with troubleshooting a connection to your database server.

gagan22: Is your site throwing any php errors and/or any mysql connection errors?

if you're not getting any errors or are simply getting a blank page, I would create a separate file and try something like the following, to troubleshoot your connection issue.

<?php
error_reporting( E_ALL );

$link = mysql_connect("localhost", "mysql_user", "mysql_password") or die( mysql_error() );

mysql_select_db('foo', $link) or die( mysql_error() );


run that script but replacing the login information with your login details and the database name with your database name. If it works then the problem lies elsewhere. If that returns a php or mysql error then please post it back here and i'm sure everyone will be able to help you out once we see what is actually going on.

mschroeder
Work Harder
Team Colleague
666 posts since Jul 2008
Reputation Points: 279
Solved Threads: 131
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You