This topic is locked

Call to undefined function

9/15/2006 3:39:26 AM
PHPRunner General questions
rjks author

Morning,
This Problem has been discussed already but it doesn´t seem to have been solved or I can´t find the relavent solution.
After building my Projekt and testing it locally, everything OK, I uploaded it to my provider.
The first problem was that I became session expired about 6 times, searching in a _list, viewing a table, and adding a new record, after submit which also killed my where statment so the page was reopened (myURL) without a filter!
Next I became the following error, not with all tables but for a table for uploaded images.

Fatal error: Call to undefined function: CheckFileTime(); in /homepages/42/d76631239/htdocs/accomodation/update/administration/hauptmenu_einheit_list.php on line 20


After putting the funcion call CheckFileTime() in comment brackets // I recieved the following error

Fatal error: Call to undefined function: checksecurity() in /homepages/42/d76631239/htdocs/accomodation/update/administration/hauptmenu_einheit_list.php on line 28


Why are these functions accepted in some pages and not in others? Is there a connection between the session problems and the undefined function error.
I really need a little help on this one as I´m over my deadline and this problem is blocking me.
Thanks in advance for a quick reply
Robert

rjks author 9/19/2006

Morning Support,
seems as if you have missed these Questions or arn´t interested in answering them.
A few insights and part answers to the problems.

  • The problem of undefined function seems to be solved, not the cause though, I found that if I create a table view i.e. Hauptmenu_Einheit I get as generated files

    Hauptmenu_Einheit_list, Hauptmenu_Einheit_add etc.
    If I change this to hauptmenu_einheit the generated files are still

    Hauptmenu_Einheit_list, Hauptmenu_Einheit_add etc.
    Note the upcase H and E
    Only after

  1. deleting the view
  2. saving the project
  3. reloading the project
  4. creating the table view hauptmenu_einheit
  5. generating the project
    do I get the correct generated files

    hauptmenu_einheit_list, hauptmenu_einheit_add etc.
    (All h and e in small case)
    and the problem of undefined function disapears.

    As I am devoloping on a windows system and my provider system is unix the problem only comes after a project upload, which is clear as unix differentiates between upcase and lowcase characters.
    The other problem with session expired I am still working on but it has got a lot better since the generated file names are the same as the given view name.
    I don´t quite understand the function CheckFileTime, does it do anything??
    function CheckFileTime()

    {

    return;

    if(!@$_SERVER["PATH_TRANSLATED"])

    return;

    $time=filemtime($_SERVER["PATH_TRANSLATED"]);

    if(@$_SESSION[$_SERVER["PATH_TRANSLATED"]."_filetime"] && $time!=$_SESSION[$_SERVER["PATH_TRANSLATED"]."_filetime"])

    session_unset();

    $_SESSION[$_SERVER["PATH_TRANSLATED"]."_filetime"]=$time;

    }


Anyway the answers to the session expired problem which I have found in the forum don´t seem to help at all.
Thanks in advance for a quick reply, as a matter of fact thanks for any reply.
Robert

Alexey 9/19/2006

Robert,
I'm sorry for the delay with reply.

Please zip and send me the full set of generated PHP files along with your database creation script.

I'll find what's wrong with your project running it on my test box.
To resolve the sessions problem contact your hosting administrator and find if there are any limitations or requirements on using sessions at your hosting.

Sho me it's response and I'll try to help you.

rjks author 9/19/2006

Hello Alexey,
I have checked with my Provider and there are no special restrictions to the sessions.
I will send you a complete copy of the files which didn´t work, also my test data. You will see that I have changed a lot og the files in templates and also use a different Menu file but it should work.
I´ll Post the results here for the rest of the Forum so that your wotk will be known to all.
Thanks in advance
Robert

rjks author 9/21/2006

Morning all,
my main problem with Session expired seems to have been solved after I changed all my views as descibed below, not only the missing function error but also session expired has now disapeared and everything seems to be working correctly.
So if session expired keeps appearing check that the built files are exactly the same as the name given in the database sources. My example was in the database source I had a view table named Hauptmenu_Einheit which was generated OK, after changing the name of the view file to hauptmenu_einheit the generated file was still named Hauptmenu_Einheit and caused the errors on a Unix system.
Alexey, I won´t need to send you the Projekt after all which saves you and me some time to do other important things, like how to set a date range in the date picker.
Robert