Jump to content

Need some help bad! "Fatal error: Call to undefined function p() in"


Recommended Posts

I have a PHP page that runs fine on one server. On a different server I am receiving the error:

 

"Fatal error: Call to undefined function p() in ......"

 

This is the code generating the error:

<?php

include_once('common.php');

if(p()->send)
    {
    $users_acct=$db->users_acct->email(p()->email);    
    if(count($users_acct) > 0)
        {
        $headers = "From:info@xxxxx.com";
        $subject = "Password Reminder";
        $message="Recently you requested a password reminder from xxxxxxx.\n\nYour password: {$users_acct->password}\n\nRegards,\xxxxxxxxxx";
        mail($users_acct->email,$subject,$message,$headers);
        echo msg("Your password has been sent to {$users_acct->email}.");
        }
    else echo error_msg('The E-mail you provided is not registered with us.');
    }
?>

 

I'd certainly appreciate any help if you know what this is telling me.

 

Thanks!

It's likely you have some short open tags in the common.php file that is causing part of the php code in it to be ignored. Since part of common.php works and part does not, you would need to post it for anyone here to be able to directly help you with why your function is not being seen.

Thanks for the advise. Here is the common:

<?php

ini_set('include_path',ini_get('include_path').':/home/content/c/u/s/***/html/admin/classes/pearMain');


include_once('/home/content/c/u/s/***/html/admin/classes/pear/DB-1.6.8/DB.php');
include_once('classes/class.php');


$_INFO_NAME = "***";
$_INFO_KEEPER ="***";
$_INFO_CODE = "***";
$_ACCESS_CODE = "***";
$_CONN = "mysql://".$_INFO_CODE.":".$_ACCESS_CODE."@".$_INFO_KEEPER."/".$_INFO_NAME."";
define("_DB_CONN",$_CONN);





define("PATH","/home/content/c/u/s/***/html/admin/");
define("FCKUPLOADPATH","/***/admin/uploads/");	

define ("BS_DIR","/home/content/c/u/s/***/html/");


?>

That's not the code were the function p() is defined. Keep looking.

 

Also, add the following two lines of code immediately after your first opening <?php tag in the main code to get all php detected errors to be displayed -

 

ini_set("display_errors", "1");
error_reporting(E_ALL);

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.