PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Fatal error (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Fatal error
#219
douglasfabiano (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Fatal error 3 Months, 3 Weeks ago Karma: 0  
Good morning,
I have a problem when executo a file in php which has 400 lines and access to the database.

Fatal error: Call to undefined function showpagenav () in / opt / lampp / htdocs / site / joomla / plugins / content / DirectPHP.php (49): eval () 'd code on line 1

If the file directly execute it works. someone could help me?
 
  The administrator has disabled public write access.
#220
kksou (Admin)
Admin
Posts: 254
graph
User Online Now Click here to see the profile of this user
Re:Fatal error 3 Months, 3 Weeks ago Karma: 7  
Hi Douglas,

As the error message suggests, it simply means it cannot find the function showpagenav().

Although you mention that the file works when it is directly execute, I believe you are running that portion of code within some Joomla component or module - in which case all the various libraries have been included automatically by Joomla.

In any case, here are a few suggestions:

1) Try to locate where is this function showpagenav(), and include that file at the start of your php code.

2) It's extremely difficult to debug inside an eval() function. So what I usually do is to copy the whole chunk of php code out and place them in a standalone php file. Then use require() or include() to run the code. If the code runs, I'll copy the entire code back into the content item. If it doesn't run, then it's much easier to debug that php file.

Try the above first and see if it works for your case.

Regards,
/kksou
 
 
Last Edit: 2008/05/16 13:19 By kksou.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Copyright © 2006-2008. kksou.com. All Rights Reserved