Peculiar problem with working of php
Posted: Tue Jun 21, 2005 12:12 pm
Hi all,
I am facing a peculiar problem with some of the things not working in the main server , but works perfectly in the local machine.
For example:
<? $cmssite = @fsockopen("cmsweb.gci.db.com", 80, $errno, $errstr, 30);
if(!$cmssite)
{?>
<td valign=top width="6%"><img src=bulletred.gif width=15 height=15 border=0></td>
<?}
else
{?>
<td valign=top width="6%"><img src=bulletgreen.gif width=15 height=15 border=0>The site is up and running</td>
<? } ?>
The result of this code in my local machine gives as color green and displays The site is up and running. But the same code in the main server is displaying both the colors next to each other which means its not looking at the if statement at all. If I have to think that php is not installed properly in that box , then the site itself shouldn't be coming up. The name of the file is index.php and its coming up properly.
What could be the problem in the server?
I am facing a peculiar problem with some of the things not working in the main server , but works perfectly in the local machine.
For example:
<? $cmssite = @fsockopen("cmsweb.gci.db.com", 80, $errno, $errstr, 30);
if(!$cmssite)
{?>
<td valign=top width="6%"><img src=bulletred.gif width=15 height=15 border=0></td>
<?}
else
{?>
<td valign=top width="6%"><img src=bulletgreen.gif width=15 height=15 border=0>The site is up and running</td>
<? } ?>
The result of this code in my local machine gives as color green and displays The site is up and running. But the same code in the main server is displaying both the colors next to each other which means its not looking at the if statement at all. If I have to think that php is not installed properly in that box , then the site itself shouldn't be coming up. The name of the file is index.php and its coming up properly.
What could be the problem in the server?