By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,467 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

500 CGI error (session variables)

P: 194
Hi Everybody,

I am submitting a form to the paypal and then returning to a url. return to the url is successful means the code is workin properly. but at the return url im having this 500 CGI error and it also not containing any values in the session variables. as im getting records and updating records if the return is successfull from paypal depending upon the session variables.

this is working fine at my server where i hosted it. but at other server its not working and having the problem which i mentioned above. the same code is not working on the other server. the troubleshooting has also done with the hosting company and they said there is problem with the code not with the CGI or any other thing. now im failed to understand that one code is working fine at one server and its not working (no values in the session) on the other. what should i do now? please help me so i can get rid of this problem.

Expand|Select|Wrap|Line Numbers
  1. if ($_REQUEST['action']=='success' && $_REQUEST['someid']<>''){
  2. $order_id=$_REQUEST['someid'];
  4. echo "<br />".$transection = "SELECT * FROM ".$GLOBALS['pre_tbl']."tran where id=".$id;
  6. $transectionq = mysql_query($transection) or die(mysql_error());
  7. $transrow=mysql_fetch_array($transectionq);
  8. extract($transrow);
  9. $tid=$ticket_id;
  10. $qty=$no_tickets;
  11. //echo "<br />".$userid    = $_SESSION['username']; 
  12. echo "<br />".$user_id = "select * from ".$GLOBALS['pre_tbl']."user where email='$userid'";
  13. $user_id_rs = mysql_query($user_id)or die(mysql_error());
  14. $user_id_rows=mysql_fetch_array($user_id_rs);
  15. $user_id = $user_id_rows['id'];
  16. $first_name = $user_id_rows['first_name'];
  17. $last_name = $user_id_rows['last_name'];
  18. $user_name = $first_name." ".$last_name; 
  19. echo "<br />".$querycheckshoworartist="SELECT e.type,e.event_id,s.eid,s.tid,s.orderid FROM ".$GLOBALS['pre_tbl']."seats s,".$GLOBALS['pre_tbl']."events e where s.tid=$tid and e.event_id=s.eid LIMIT 1";
this is not full code but a part from the code. in the above code the session has nothing if it is displayed. so im not able to execute SQL and get the result. this website is currently hosted at IXwebhosting where it has the problem. while its working fine at my server. please tell me how i can get rid of it. thanking you.
Mar 6 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.