Jump to content

Recommended Posts

(It works on WAMP, but not on a public server)

I have 3 php files: test.php, in which 1/3 tests(forms) are generated, then it is sent to process.php, then in rezult.php

 

process.php:

 

I have 3 header ( ) :

$score = 0;
$form_id = $_GET['id'];

if($form_id='test1'){
   $answer1=$_POST['ans1'];
   $answer2=$_POST['ans2'];
 .................
header("Location:rezult.php?score=$score&fid=$form_id&r1=$answer1&r2=$answer2.....
die(); // I also tried with exit();
}

if($form_id='test2'){
   $answer1=$_POST['ans1'];
   $answer2=$_POST['ans2'];
 .................
header("Location:rezult.php?score=$score&fid=$form_id&r1=$answer1&r2=$answer2.....
die();
}

if($form_id='test3'){
   $answer1=$_POST['ans1'];
   $answer2=$_POST['ans2'];
 .................
header("Location:rezult.php?score=$score&fid=$form_id&r1=$answer1&r2=$answer2.....
die();
}

I don't arrive on result.php, but get this message:

 

Moved Temporarily

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@XXXXXXX.XXX and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_bwlimited/1.4 Server at dianag.5gbfree.com Port 80

 

It's my first php online and I have no idea what else do correct since I followed a tutorial and it worked on WAMP...

 

Thank you in advance!

Link to comment
https://forums.phpfreaks.com/topic/279942-header-then-moved-temporarily/
Share on other sites

Have you checked the server error log like the message indicates?

 

I looked on youtube to see where I can find the errorLog, but in my version (cPanel Accelerated 2) I see no error log option. In Log's submenu i have only Bandwidth and Resource Usage. I did click on "reveal all boxes" which is on the bottom of the page just in case by mistake I woul hide the icon of it. The documentation is poor... they mention about error log but only in other versions of cPanel(11.30, 11.38) http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/ErrorLog

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.