Hi, For some reason the home page is displaying but no inner pages are displaying, all I did was transfer it. This is the code in index file: <?php if (!$op) { include ("list.php"); } else { if (file_exists("$op.php")) { include( "includes/header.inc"); include( "includes/left_side.inc"); include ("$op.php"); include( "includes/right_side.inc"); include( "includes/footer.inc"); } else { include ("list.php"); } } ?> PHP: Am I suppost to have special server requirements to run this (!$op) command on the site? This is what I have in my .htaccess file.. <IfModule mod_php4.c> php_flag register_globals on </IfModule> PHP: What am I missing here? Do you know why my site isnt pulling up? --Thanks!
Well... where is $op defined? The variable, obviously meant to be a filename, must be defined somewhere. It also seems that you don't have the files placed in the correct directories - or that the directory structure on the new server is different from that of the former one - 'cause when one click on different links, you get lots of "missing include" errors. Something is wrong, but it's got nothing to do directly with the code you've shown us - there is something wrong with either the variables defines, the values of the defined variables, or the structure of the files/directories.
I place the directory structure just as it was on the previous server.. and the site worked just fine on the other server. I think I have to add a server requirement through .htaccess or php.ini file, I just don't know what.. Here is the OP file.. <?PHP define ("REALPATH", '/home/massivet/'); if (strcmp ($HTTP_USER_AGENT, "Active Worlds Browser")) exit(); $IsZip = 0; if (! empty ($DOCUMENT_ROOT)) $DocRoot = $DOCUMENT_ROOT; else $DocRoot = ''; if ($Content = strrchr ($QUERY_STRING, '.')) { if (stristr ($Content, '.zip')) { $IsZip = 1; Header ('Content-Type: application/zip'); } else Header ('Content-type: image/jpeg'); } if (! ($Filename = strrchr ($QUERY_STRING, '/'))) $Filename = strrchr ($QUERY_STRING, '\\'); if ($Filename) { $Filename = substr ($Filename, 1); Header( 'Content-Disposition: attachment; filename='.$Filename ); } if ($Filename[0] == '.') exit(); $Filename = $DocRoot.REALPATH.$QUERY_STRING; if (! file_exists ($DocRoot.REALPATH.$QUERY_STRING)) exit(); $arr = split ("[\\/]", $Filename); for ($i=0; $i<sizeof($arr); $i++) if (! strcmp ($arr[$i], '..')) { array_splice ($arr, $i-1, 2); $i=0; } $Filename = $arr[0]; for ($i=1; $i<sizeof($arr); $i++) $Filename .= '/'.$arr[$i]; if (strncmp ($DocRoot.REALPATH, $Filename, strlen($DocRoot.REALPATH))) exit(); $Filesize = filesize ($Filename); Header ('Content-Length: '.$Filesize); if ($fIn = fopen ($Filename, 'rb')) fpassthru ($fIn); ?> PHP:
Okay - and the new server has a document root path of "/home/massivet/"? Not something else, like "/www/", "/home/public_html/" or something similar?
Maybe php_flag register_globals on isn't working. Create a new file, and do echo $test (pass it via the url). If it doesn't work, then you have to convert $op to: $op = $_GET['op']; Peace,