Re:Fatal error (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Re:Fatal error
|
|
|
|
Fatal error 3 Months, 2 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.
|
kksou (Admin)
Admin
Posts: 241
|
|
Re:Fatal error 3 Months, 2 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.
|
|
|
|
|