Jump to content

Call to undefined function sql_replace()


wexter

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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";

					 } ?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.