Page 1 of 1

problem posting on host

Posted: Mon Jan 18, 2010 7:45 pm
by rowinboc
hello,
if i want to post my game(almost finished) on my host to test it online i can upload it but when i try to open the index.php or an other page it says it doesn't exist. can u guys help me?

Re: problem posting on host

Posted: Mon Jan 18, 2010 8:06 pm
by hallsofvallhalla
you are in the right directory? You didn't copy the entire directory with the main folder name did you? In other words if it was all in a folder called \tutorial\index.php then you need to navigate that way....www.yourhost.com/tutorials/index.php

Re: problem posting on host

Posted: Mon Jan 25, 2010 4:34 pm
by rowinboc
sorry for the late reply but it is solved now.
the website of the host said that it supported php but it didn't.
i have a new host now but when i open a page like register.php for example it says:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\ZPanel\hostdata\rowinboc\connect.php on line 3
Could not connect to db

I think i have to change something in the connect.php
but what do i have to change?

Btw i uploaded the db of the host already to the hosts phpmyadmin

Thanks,
Rowin

Re: problem posting on host

Posted: Mon Jan 25, 2010 4:50 pm
by OldRod
You will need to change the settings to match the settings of your host.

It will not be 'localhost' any more - it will be something like http://www.somewebsite.com/mysqlhost or something.

Plus the user will probably not be 'root' and you'll most likely have a password. When you set up your host, they should have given you all the info you need.

Re: problem posting on host

Posted: Mon Jan 25, 2010 6:29 pm
by rowinboc
thanks man! im going to try!

Re: problem posting on host

Posted: Mon Jan 25, 2010 10:41 pm
by Jackolantern
rowinboc wrote:sorry for the late reply but it is solved now.
the website of the host said that it supported php but it didn't.
i have a new host now but when i open a page like register.php for example it says:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\ZPanel\hostdata\rowinboc\connect.php on line 3
Could not connect to db

I think i have to change something in the connect.php
but what do i have to change?

Btw i uploaded the db of the host already to the hosts phpmyadmin

Thanks,
Rowin
If you are getting that output to the browser on a webhost, you probably need to be suppressing errors on your database connection calls. If that is being output, that is giving far too much info about your database.

Add a '@' in front of your database calls once you are on a live server to suppress errors such as those, and then check for them with the mysqli_check_errno() function to view errors instead. You should also create new MySQL users if your host allows it to access your database through PHP code. Root has far too many privileges.

Re: problem posting on host

Posted: Tue Jan 26, 2010 2:59 am
by ZeroComp
I had the same problem when I was in development stage for my game I didn't have a host at the time so I just copied the original connect.php and it worked

Re: problem posting on host

Posted: Fri Jan 29, 2010 5:57 pm
by rowinboc
it's solved!
even have a domain for it
just for my friends to test