Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
Johnamc328

Call To Undefined Function Escape_Data()

Recommended Posts

Hello,

 

I have given up on Godaddy and WAMP.  I am back to windows and IIS. I seem to be having a  problem with the session since I always have the display showing Admin selections when I am classified as a user.  I click on logout and they do go away.  I click on the Home tab and they come back.  I try the login and I get this error

 

Fatal error: Call to undefined function escape_data() in C:\inetpub\wwwroot\ecommerce2\includes\login.inc.php on line 12

 

Any ideas are appreciated

 

Share this post


Link to post
Share on other sites

This has nothing to do with sessions. It's a call to a function that isn't defined. This, in particular, is a user-defined function, so it must be referenced before the file with the definition is included. 

Share this post


Link to post
Share on other sites

So are the source files that are downloaded complete or do they still need modifying?  I added the function to login.inc.php and it does not throw an error.  It takes me to the home page.  Then I put in a bogus email and it took me to the home page with no errors displayed.  I entered a bogus PW and it took me to the home page with no errors displayed.  It does not seem to be catching the errors - the register.php works fine with error checking, registering etc.  Not sure why these include files are not catching errors.

Share this post


Link to post
Share on other sites

The files are complete assuming you've configured your web server properly and setup the database properly. They're really intended to facilitate learning in conjunction with the book, not that you'd just drop them into a project without further consideration.

Share this post


Link to post
Share on other sites

I have been going through each chapter - the db is fine - the registration process works.  Trying to figure out the IIS - includes problem since it is always with an included file where the trouble starts.

Share this post


Link to post
Share on other sites

If you're pretty certain that IIS is causing the problem, then I would not use IIS. I haven't used it in years, and never for a PHP site, so I don't have any insights on that. 

Share this post


Link to post
Share on other sites

Hi, when I started working through Larry's PHP and MySQL books a few years ago, I installed IIS on my then Windows XP PC. But I pretty soon switched to XAMPP and upgraded to Windows 7 both of which have worked perfectly for me and all Larry's code has executed properly.

 

For what it's worth.

 

Cheers.

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...