PHP Error only in remote server not in localsystem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
varghesedxb
Forum Newbie
Posts: 3
Joined: Sat Nov 15, 2008 8:47 am

PHP Error only in remote server not in localsystem

Post by varghesedxb »

myPHP script is working in my localsystem, i am using WAMP server in localsystem.
But when i hosted the files in the server, nothing is working..
its bascially getting the images from flash file and displaying using PHP.
But there is no error message also displaying.

attaching all files below except the .swf, pls help

index.php

<?PHP ini_set('display_errors', 'On');
error_reporting(E_ALL);
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<title>Photoportfolio</title>
<script src="AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
body{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#000;
}
</style>

</head>
<body style="margin:0px; background-image:url(iii/body_background.jpg); background-repeat:no-repeat;">
<div align="center"><strong>Click the image to view the next</strong></div>
<div align="center" style="margin-top:10px; vertical-align:top;">

<object id="flashmovie" type="application/x-shockwave-flash" data="gallery.swf" width="800" height="600" align="middle" style="background-color:#364F62;">
<param name="movie" value="gallery.swf" />
<param name="FlashVars" value="<?php if(isset($_GET["image"])) { echo "topimage=".$_GET["image"]; } ?>" />
</object>
</div>
</body>
</html>
<noscript>


GALLERY.php

<?PHP
$xml = '<?xml version="1.0"?'.'>';
$handle = opendir(".");
while ( ($file=readdir($handle)) !== false ) {
if ( !is_dir($file) ){
$pic = @getimagesize($file);
if($pic != false && $pic[2] == 2){
$xml .= '<img src="'.$file.'" width="'.$pic[0].'" height="'.$pic[1].'" />';
}
}
}
echo $xml;
?>




GALLERY.XML

<?xml version="1.0"?>
<img src="1.JPG" width="700" height="525" />
<img src="2.JPG" width="700" height="525" />
<img src="3.jpg" width="700" height="525" />
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: PHP Error only in remote server not in localsystem

Post by Eran »

Since you are mixing php and xml in the same page, make sure the directive short_open_tag is off (ie, =0) since the xml document opens with the same tag.

Also use lowercase open tag:

Code: Select all

 
<?php
 
Since linux is case sensitive (I'm assuming your server is running it).
varghesedxb
Forum Newbie
Posts: 3
Joined: Sat Nov 15, 2008 8:47 am

Re: PHP Error only in remote server not in localsystem

Post by varghesedxb »

done that aslo, still blank page, and i am surprised, its working in my localhost and not in remote server..

when i do a view source in my blank page its showing like this""

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<title>Photoportfolio</title>
<script src="AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
body{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#000;
}
</style>

</head>
<body style="margin:0px; background-image:url(iii/body_background.jpg); background-repeat:no-repeat;">
<div align="center"><strong>Click the image to view the next</strong></div>

<div align="center" style="margin-top:10px; vertical-align:top;">

<object id="flashmovie" type="application/x-shockwave-flash" data="gallery.swf" width="800" height="600" align="middle" style="background-color:#364F62;">
<param name="movie" value="gallery.swf" />
<param name="FlashVars" value="" />
</object>



</div>
</body>
</html>
<noscript>
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: PHP Error only in remote server not in localsystem

Post by Eran »

Do you have firebug installed? it's a firefox extension that is of great help in web development. Using it you can analyze the requests your javascript sends to your php script and see what went wrong.

http://getfirebug.com/
varghesedxb
Forum Newbie
Posts: 3
Joined: Sat Nov 15, 2008 8:47 am

Re: PHP Error only in remote server not in localsystem

Post by varghesedxb »

its helpful for javascript and HTML not for PHP
Post Reply