divadiva Posted June 16, 2008 Share Posted June 16, 2008 Experts I have a project datascraper(php mysql) which works fine in testserver. But when I move it to production server nothing happens.I tried debugging in there abd found it connects to the database but it doesnt runs the insert command which parses the data.My production server and test server both are in Unix. Please suggest me something.I will be grateful to you. Regards Diva Link to comment https://forums.phpfreaks.com/topic/110481-project-doesnt-work-in-production-server/ Share on other sites More sharing options...
jonsjava Posted June 16, 2008 Share Posted June 16, 2008 could you post the exact error you receive? Link to comment https://forums.phpfreaks.com/topic/110481-project-doesnt-work-in-production-server/#findComment-566816 Share on other sites More sharing options...
divadiva Posted June 16, 2008 Author Share Posted June 16, 2008 In PRODUCTION SERVER I dont get any error.After connecting to database it doesnt do anything.Test Server works absolutely fine.I added debug statement in the test server it printed list of insert queries.Confused why is it doing that. I have used wamp. Link to comment https://forums.phpfreaks.com/topic/110481-project-doesnt-work-in-production-server/#findComment-566819 Share on other sites More sharing options...
jonsjava Posted June 16, 2008 Share Posted June 16, 2008 could you post your code, for us to view? (sanitize the db connection info first) Link to comment https://forums.phpfreaks.com/topic/110481-project-doesnt-work-in-production-server/#findComment-566824 Share on other sites More sharing options...
divadiva Posted June 16, 2008 Author Share Posted June 16, 2008 Here is the database connection : <?php print "before connect"; mysql_connect("", "username", "pwd") ; print "select db"; mysql_select_db("dataparsing"); // database name print "moving on"; function executeNonQuery($query) //insert/update/delete { $res = mysql_query($query) or die('Database Error while executign query: ' . $query .' '. mysql_error()); print "<p>".$query."<p>"; return $res; } function executeScalar($query) //returns just a column value string/number/boolean { $res = mysql_query($query) or die('Database Error: ' . mysql_error()); $arr = mysql_fetch_array($res); return $arr[0]; } function executeNextRecord($query) //returns a array for a row { $res = mysql_query($query) or die('Database Error while executign query: ' . $query .' '. mysql_error()); $arr = mysql_fetch_array($res); return $arr; } function executeAllRecords($query) //returns object { $res = mysql_query($query) or die('Database Error: ' . mysql_error()); return $res; } function handlOldData($site) { executeNonQuery("update data set onmarket = 0 where Site='".$site."'"); } function checkExists($site, $WebsiteId) { if(strlen(trim($WebsiteId)) == 0) return 0; $count = executeScalar("select count(*) from data where Site='".$site."' and trim(WebsiteId)='".trim($WebsiteId)."'"); if($count > 0) executeNonQuery("update data set onmarket = 1 where Site='".$site."' and trim(WebsiteId)='".trim($WebsiteId)."'"); return $count; } ?> Link to comment https://forums.phpfreaks.com/topic/110481-project-doesnt-work-in-production-server/#findComment-566829 Share on other sites More sharing options...
trq Posted June 16, 2008 Share Posted June 16, 2008 Unless you can post some relevent code / information we can't do anything but guess. Make sure you enable error reporting and display errors is all I can say. Link to comment https://forums.phpfreaks.com/topic/110481-project-doesnt-work-in-production-server/#findComment-566843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.