Boo-urns Posted February 5, 2009 Share Posted February 5, 2009 I have a dropdown and when a user selects how many entries they want to add it calls a file to create a form and bring it back. Well it works great locally but not on a live server. Firebug is saying I'm getting a 500 error. (I've tried absolute and relative paths but it's not working.) If I copy the include file on that script page it will run hardcoded but isn't getting the variables. The data posts just fine but PHP isn't pulling the variables. <?php $numForms = mysql_real_escape_string($_REQUEST['numForms']); Is something screwed up in the php.ini file or something on the server? Any ideas? I'm stumped -Corey Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/ Share on other sites More sharing options...
PFMaBiSmAd Posted February 5, 2009 Share Posted February 5, 2009 What does a phpinfo() statement show for register_globals? Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/#findComment-755248 Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 It says Off (on both local and live site) Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/#findComment-755253 Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 Another interesting thing that might help is if I send the variable back via json_encode $arr = array ('errors'=>$error,'output'=>$output, 'numForms'=>$_REQUEST['numForms']); echo json_encode($arr); It will display the correct number for numForms. Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/#findComment-755255 Share on other sites More sharing options...
PFMaBiSmAd Posted February 5, 2009 Share Posted February 5, 2009 Have you done a "view source" of the form so that you know it is being created correctly? Have you echoed $_REQUEST['numForms'] so that you know what is in it? Is the problem that $numForms is not set, in which case you probably don't have a valid mysql connection at the time the mysql_real_escape_string() statement is being executed. Do you have any error checking logic as part of your mysql_connect() statement so that you know if it worked of failed? Are you executing this code on a system with error_reporting set to E_ALL and display_errors set to ON to get php to help you? Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/#findComment-755258 Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 Yea i have echoed the request variable and it wasn't pulling but I checked up on display_errors and it was off so I'll go at it for a bit and hopefully i find the solution! Thanks for the help. Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/#findComment-755265 Share on other sites More sharing options...
Boo-urns Posted February 5, 2009 Author Share Posted February 5, 2009 You definitely pointed me in the right direction. I don't recall what I changed that made it work probably a all of the above but its running now! Thanks! Link to comment https://forums.phpfreaks.com/topic/143932-solved-works-fine-locally-but-not-on-a-live-server/#findComment-755292 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.