sun2000 Posted July 7, 2013 Share Posted July 7, 2013 (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! Quote Link to comment https://forums.phpfreaks.com/topic/279942-header-then-moved-temporarily/ Share on other sites More sharing options...
requinix Posted July 7, 2013 Share Posted July 7, 2013 Have you checked the server error log like the message indicates? Quote Link to comment https://forums.phpfreaks.com/topic/279942-header-then-moved-temporarily/#findComment-1439838 Share on other sites More sharing options...
sun2000 Posted July 8, 2013 Author Share Posted July 8, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/279942-header-then-moved-temporarily/#findComment-1439937 Share on other sites More sharing options...
sun2000 Posted July 8, 2013 Author Share Posted July 8, 2013 P.S. I have "==" in each if () in my website, just I forgot to type them here. And all 3(test.php, process.php and result.php) are in the same directory. Quote Link to comment https://forums.phpfreaks.com/topic/279942-header-then-moved-temporarily/#findComment-1439938 Share on other sites More sharing options...
requinix Posted July 8, 2013 Share Posted July 8, 2013 Ask your hosting provider where you can find the error logs. Quote Link to comment https://forums.phpfreaks.com/topic/279942-header-then-moved-temporarily/#findComment-1439956 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.