Øystein Håland wrote:

>on my own machine, W2k+Apache+php4.2 this works without problem,
>on the Internet-server though, (Linux), the following script produces a
>blank page:
>
><?php
> require "../utils.php";
> $link=openDB();
> $file = $target.form;
>
>// Queries for student
>if ($target == "student") {
> // Add student <Query to add>
>
> // Change student info <Query to change info>
>
> // Delete student <Query to delete>
>}
>
>// Queries for result
>if ($target == "result") {
> // Delete result  <Query to delete>
>}
>
>if(!isset($administrate) && $goal) {
> if ($logga_in == "ok" ) {
>  $adm_user = "admin";
>  $adm_pass = "password";
>
>  if ($operation == "logon") {
>   if ($password == $adm_pass && $admin == $adm_user) {
>    setcookie("administrate", "OK", 0);
>
>    include("../recycle/head.php");
>    include ("$file.php");
>   } else {
>    include("../recycle/head.php");
>    echo "<CENTER><FONT SIZE=\"5\" COLOR=\"#C90000\">Please try again. Check
>your spelling.</FONT><CENTER>";
>    include ("loginform.php");
>   }
>  }
> } else {
>  include("../recycle/head.php");
>  include ("loginform.php");
> }
>} elseif ($target) {//When logged in this load the right form
> include("../recycle/head.php");
> include ("$file.php");
>}
>if (!$target) {//This happens when first loaded. In the head.php there's a
>menu and the different targets are set
> include("../recycle/head.php");
> echo "
><H2>Administration of  <SUB><IMG BORDER=0 SRC=\"../pics/mypicmin.gif\"
>WIDTH=135 HEIGHT=30></SUB></H2>
> ";
>}
>include("../recycle/bottom.php");
>?>
>
>Explanation: utils.php with the two functions openDB() and queryDB() connect
>to the database and do the query. loginform.php contains the html to the
>loginform.
> $file = $target.form; so the right form will be loaded.
>So, what is wrong, why does it 'behave' so different?
>
>
>
>
>
>  
>
Does not look that there are any problems in your script. The real 
problem could be in the include files though!

You might start doing the following
1) check if your internet server allows access to the other directories 
(like ../recycle and ../). I suppose that you did not forget to copy 
these files too ;-)
2) compare the php.ini of your test system and the internet server. 
Differences might give a clue to the problem
3) view the source code of the 'blank page' . Is it realy blank? It 
might contain a bit of HTML output that can give a hint of were your 
script stops
4) include  error_reporting(E_ALL); as first line of code in your 
php-scripts. It might help debugging
5) does your internet server have access to the database? Is it the same 
database? Arre the access rights the same?
6) run this script on both machines and look for differences in the outputs:
        <?php php_info() ?>


Good luck

René




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to