wexter Posted April 1, 2010 Share Posted April 1, 2010 hello, i moved my site from godaddy to another host every thing is ok but when i am trying to EDIT a page from the back end administration i m getting this message (Fatal error: Call to undefined function sql_replace() in /home/xxxxxx/public_html/admin/cont_edit.php on line 32). here is the code of line 32 $_cont_detail = sql_replace($_POST['cont_detail']); looking forward for your kind reply. Quote Link to comment https://forums.phpfreaks.com/topic/197220-call-to-undefined-function-sql_replace/ Share on other sites More sharing options...
ignace Posted April 1, 2010 Share Posted April 1, 2010 The sql_replace() is a function found in the SPIP extension which is apparently not present on GoDaddy Quote Link to comment https://forums.phpfreaks.com/topic/197220-call-to-undefined-function-sql_replace/#findComment-1035222 Share on other sites More sharing options...
wexter Posted April 1, 2010 Author Share Posted April 1, 2010 hello, the site was fully functional on Godaddy the problem is on the new host, on Godaddy the PHP version is 5.x while on new host it is 5.2.9, may be it is the cause? i thik i should change some thing in the php file but i dont know. Quote Link to comment https://forums.phpfreaks.com/topic/197220-call-to-undefined-function-sql_replace/#findComment-1035266 Share on other sites More sharing options...
PFMaBiSmAd Posted April 1, 2010 Share Posted April 1, 2010 You likely have an include statement that is failing (the file is either not present or was relying on the include_path setting to work) or some code is using short open tags and is no longer being seen as php code. To help narrow down some of the possible reasons, add the following two lines of code immediately after the first opening php tag in the main file - ini_set("display_errors", "1"); error_reporting(E_ALL); It would take seeing all the relevant code (i.e. the code from the start of the main file up to and including the line where the error is occurring) to be able to directly help with the problem. Quote Link to comment https://forums.phpfreaks.com/topic/197220-call-to-undefined-function-sql_replace/#findComment-1035271 Share on other sites More sharing options...
wexter Posted April 1, 2010 Author Share Posted April 1, 2010 hi, add the code and now got this error "Notice: Undefined index: act in /home/xxx/public_html/admin/cont_edit.php on line 23" code on line# 33 is: $_cont_detail = sql_replace($_POST['cont_detail']); Notice: Undefined index: act in /home/soniadev/public_html/admin/cont_edit.php on line 207 code on line# 207 is: <?php if($_REQUEST['act'] == 'edit' && $msg!=1) { echo "Record could not be edited,".$msg; } else if ($_REQUEST['act'] == 'edit' && $msg==1){ echo "Record updated successfully"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/197220-call-to-undefined-function-sql_replace/#findComment-1035280 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.