Hi I am trying to run 2.8 on a suse 10 box with php and apache2. The server seems to work as does openemr for everything except the calendar when I get variations on …
Fatal error: Call to undefined function: pnsessionsetup() in /srv/www/htdocs/openemr/interface/main/calendar/includes/pnAPI.php on line 410
What PHP version? If 5.x you’ll need to revert to PHP4 until OpenEMR is debugged for PHP5.
If you’re already running PHP4 then check your log file for an error or warning message preceding the one you listed. It appears the include of pnSession.php failed for some reason.
I am also running a SuSE system (OpenSuSE), and I had a very similar error message. I believe that changing the two include statements above pnSessionSetup() in the file /openemr/interface/main/calendar/includes/pnAPI.php to:
include ‘/srv/www/htdocs/openemr/interface/main/calendar/includes/pnSession.php’;
and
include ‘/srv/www/htdocs/openemr/interface/main/calendar/includes/pnUser.php’;
p.s. A little hint: if you’re using kwrite to edit pnAPI.php you can find the include statements I’m talking about easily by doing a search (not case sensitive) for pnSessionSetup() and then looking above the highlighted line for the include statements.
One last thing: This fix will eliminate the error messages, but for some reason, Session Initialization will probably still fail, I’m not sure why this is: but I’m working on it.
We’re also encountering this exact same error
Fatal error: Call to undefined function: pnsessionsetup() in /srv/www/htdocs/openemr/interface/main/calendar/includes/pnAPI.php on line 410
on a SuSE 10.0 installation. It’s running PHP 4.4.0 and MySQL version 4.1.13
I have not tried the fixes described by shortname but am curious what you all come up with as a final conclusion.
Hi guys - had the same problem on my suse 10.0 - added a ‘./’ in the includes & that got rid of that error, but now also get the ‘Session initialization failed’ message after login.
by default php saves session data on a /tmp dir,
reading php.ini file can be very useful,
make sure all settings related to session stuff makes sense, and if in doubt send a copy of the ini file. (after you read it)
Thanks Andres - checked it out - all seems OK - can see the sessions being created (& updated) in the tmp dir.
Am able to log in & all the other functions seem to be working normally, just the calendar seems to be failing with the ‘Session initialisation failed’ error - this happens in both the front page and under Administration --> Calendar Settings.
Have CHOWN’ed the entire dir structure to the appropriate apache2 user - still no luck.
The calendar page should not be blank unless there’s a PHP error. You need to configure php.ini so that errors are logged somewhere, and then check wherever that is for relevant errors when you have a problem.
Trying to install OpenEMR without seeing the error messages is an exercise in futility.
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
Two things :-
1) I’m an idiot - watching the apache logs with an eagle eye, while the errors were going to syslog - sorry for wasting your time on that furfy.
2) Tracked down, killed the errors & got back to the ‘Session initialisation failed’ error again - went hacking my way through & caused a woefull mess.
Will delete, drop d’base, download a new copy, start from scratch & try to do a better job.
Got 2.8.1, cleaned out old version & installed from scratch - got a blank calendar in both the front & admin pages - found a couple of errors generated by pnAPI.php - fixed those & am now getting ‘Session initialisation failed’ on both those screens.
php.ini set with ‘error_reporting = E_ALL’ - getting lots of notices about undefined indices and variables in globals.php, but no errors.
Very strange. Looks like adodb is having trouble where the native PHP MySQL interface is not.
I don’t like it that OpenEMR contains its own bundled-in adodb, and I REALLY don’t like that it contains it *twice* – two different versions! This needs to be looked at, in particular to see what it would take to use the distribution’s native adodb drivers. Has anyone looked at this?