SA-MP Forums Archive
PHP Problem with webhosts - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: PHP Problem with webhosts (/showthread.php?tid=302006)



PHP Problem with webhosts - Biesmen - 06.12.2011

Hey,

I am not sure if this is the correct board to post a topic regarding PHP help, however I couldn't find a better one.

So, I started to follow this tutorial and create a script: https://sampforum.blast.hk/showthread.php?tid=301435
Everything worked fine on the webhost I used it. Now I decided to move from webhost, because that webhost was just a test. However, on that other webhost the website doesn't work. (I am using this script: https://sampforum.blast.hk/showthread.php?tid=301435). On my first webhost which will expire soon it worked fine, when I go to a different host (000webhosts) I get a blank white screen. If I host it at my home, XAMPP, I also get white screen.

The PHP versions are all the same: 5.2.

I hope you're able to help me out, it's really frustrating.


Re: PHP Problem with webhosts - CJ101 - 06.12.2011

Are you making sure all your hosts support Php? Also, keep in note that some hosts do not allow external connections (mysql).


Re: PHP Problem with webhosts - Oh - 06.12.2011

You have to contact your host to get outter connections white listed.

I don't think 000webhost supports it either.

I could possibly give you a offshore host, I think it's in Poland or somewhere offshore.

Just PM me if you're interested.


Re: PHP Problem with webhosts - TheJayMan - 06.12.2011

Do you have an error log created on your website? It sounds like maybe a syntax error but PHP errors are disabled.


Re: PHP Problem with webhosts - ColorHost-Kevin - 07.12.2011

Yes, it looks like something is disabled.

Look at the error_log


Re: PHP Problem with webhosts - Scones - 07.12.2011

maybe gdlib


Re: PHP Problem with webhosts - Biesmen - 07.12.2011

Quote:
Originally Posted by cj101
Посмотреть сообщение
Are you making sure all your hosts support Php? Also, keep in note that some hosts do not allow external connections (mysql).
I am not sure what external means, you mean it doesn't allow any mysql connection except localhost?
If that's the case, then why isn't it working for my own host neither?

--
I checked the error logs and I get this error:
[06-Dec-2011 23:04:09] PHP Notice: Undefined variable: i in C:\xampp\htdocs\s4s\conv.php on line 35.
It shows the same error on those pieces of script:
PHP код:

    $Playername
=mysql_result($result,$i,"Name"); 
    
$Kills=mysql_result($result,$i,"Kills");
    
$Deaths=mysql_result($result,$i,"Deaths");
    
$Bombsd=mysql_result($result,$i,"BombsDefused");
    
$Bombsp=mysql_result($result,$i,"BombsPlanted");
    
$TPlayed=mysql_result($result,$i,"TimePlayed"); 
I don't really understand this. I am not really professional with PHP.


Re: PHP Problem with webhosts - Biesmen - 09.12.2011

The issue still exists. (Not sure if I am allowed to 'bump' after two days, you may remove this post if it's not allowed)


Re: PHP Problem with webhosts - XFlawless - 09.12.2011

It requires GD Library to process the image.

Try running this

PHP код:
<?php phpinfo(); ?>
See if you have GD library available.

If you still get white screen comment /*header();*/ and see for errors at bottom. Correct the errors and un-comment header();


Re: PHP Problem with webhosts - Pinguinn - 09.12.2011

I assume that the problem is that you never used
PHP код:
$i = ...; 
A possible fix might be:
PHP код:
while($i mysql_fetch_array($result)) {
    
$Playername=mysql_result($result,$i,"Playername"); 
    
$Money=mysql_result($result,$i,"Money"); 
    
$Score=mysql_result($result,$i,"Score"); 
    
$Kills=mysql_result($result,$i,"Kills"); 
    
$Deaths=mysql_result($result,$i,"Deaths"); 
    
$RegisterDate=mysql_result($result,$i,"RegisterDate");
    
$LastLogged=mysql_result($result,$i,"LastLogged"); 

However, I am not sure. You might get the same error but I think its worth a try
You could also try what Flawless said, but I don't think that the gd library is causing the "undefined index: $i"