Calendar permissions...HELP!

thephil2005 wrote on Sunday, February 01, 2009:

Would someone shed some light on EXACTLY what the permissions should be for PostNuke’s calendar to function?

Working on a clean install on a Celeron-D with Fedora, with PHP, mySQL, etc…

I installed using the available instructions, and that went flawlessly (every time).

But I kept getting the ‘white screen of death’ in the calendar (top) portion of the user ‘admin’ login screen.  In the server log files I kept seeing the ‘smarty error…writing…’ errors, so I could see it was a permissions things.

I remove the install, and started from scratch - twice, with the same results.

So I began moving up the directory tree from
/var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/

…invoking (in addition to the steps spelled out in what documentation I could find) . . .
chmod -R 777 …    and
chown nobody:… -R

I didn’t want to go higher than the ‘main’ folder, so now it and everything under it are owned by nobody, and have 777 - which i can live with 'til I get this to work.

Now I get this screen at login:

Problem in Database Connection

This Website is powered by PostNuke
Although this site is running the PostNuke software
it has no other connection to the PostNuke Developers.
Please refrain from sending messages about this site or its content
to the PostNuke team, the end will result in an ignored e-mail.

According to PostNuke it’s a common problem - changed password.

But in the PN config.php, it ‘includes’ sqlconf.php, which is correct in its database settings.

???

Have I induced another permissions error by moving up the tree like that?

If there is some switch I’ve missed, I would be happy to find that out, and start the install again.  I’ve gotten pretty good at it.

:slight_smile:

Thanks for any assistance.

thephil2005 wrote on Monday, February 02, 2009:

I wonder if this has ever worked anywhere?

I’m using a tar file with -2.9.0 specified. It looked like the most recent tar file.

There’s a lot of stuff failing or at least hiccuping here, and I’m way, way, WAAAYYYY deeper into logfiles and linux than I thought I’d ever be again.

What’s with all the missing variables?

And what about the folders missing under …main/calendar
(/images, and /images/powered)?

And, x-ty hours later, following the instructions to the ‘t’, the calendar still doesn’t work!

I know the idea is to bring value to the customer’s equation, but THIS…c’mon…

[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once(…/…/globals.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 33, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘…/…/globals.php’ for inclusion (include_path=’.:’) in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 33, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined variable: srcdir in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 34, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once() [<a href=‘function.include-once’>function.include-once</a>]: Unable to access /calendar.inc in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 34, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once(/calendar.inc) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 34, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘/calendar.inc’ for inclusion (include_path=’.:’) in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 34, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined variable: srcdir in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 35, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once() [<a href=‘function.include-once’>function.include-once</a>]: Unable to access /patient.inc in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 35, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once(/patient.inc) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 35, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Warning: include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘/patient.inc’ for inclusion (include_path=’.:’) in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 35, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined index: pc_username in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 40, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined index: all_users in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 43, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined index: pc_username in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 48, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined index: pc_facility in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 55, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined index: pc_facility in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 56, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] PHP Notice: Undefined index: viewtype in /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/index.php on line 60, referer: http://oemr.com/openemr/interface/main/main_info.php
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] File does not exist: /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/images, referer: http://oemr.com/openemr/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&pc_username=admin&framewidth=1306
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] File does not exist: /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/images, referer: http://oemr.com/openemr/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&pc_username=admin&framewidth=1306
[Sun Feb 01 23:40:55 2009] [error] [client 74.232.227.223] File does not exist: /var/www/vhosts/oemr.com/httpdocs/openemr/interface/main/calendar/images, referer: http://oemr.com/openemr/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&pc_username=admin&framewidth=1306

mike-h30 wrote on Monday, February 02, 2009:

Is this a 64 bit machine?  I also had the "white screen of death" for the calendar when I switched from a 32 bit machine to a 64 bit machine.   See my thread here that describes my problem. 

https://sourceforge.net/forum/forum.php?thread_id=1899265&forum_id=202506

The problem was solved by increasing the memory limit in my php.ini file.  Apparently the default memory limit set by my distro was too low for a 64 bit processor.  Hope this helps.

-Mike

thephil2005 wrote on Monday, February 02, 2009:

I’ll check, but I’m pretty sure I changed that to 128Mb.

It’s a 64-bit machine, yes.

The one thing that is still lurking out there in the back of my mind, is on the setup.php screens, it all works swell if I use ‘localhost’. 

That value gets put into sqlconf.php.

Then when the calendar tries to start, it appears to fetch sqlconf.php for global variables, including ‘localhost’.

I haven’t exhausted it yet, but I found something about the ‘PostNuke’ screen coming up because of either credentials (I’ve verified everything at the command line of linux/mysql), or something IP-related:  like it doesn’t like the ‘localhost’ value.

This is a vhost system, running in a caged environment and I have complete access to everything. 

Is it possible that the “real” IP address of the mySQL server is different somehow, and calendar can’t handle the credentials?  Does calendar establish a new mySQL thread?

Sorry if my post sounded ‘venty’ but I started trying to get this to work on 18JAN09, and yesterday was about 10 hours worth.  Crazy.

It’s kind of cramping my other - bigger - plans for what I’d hoped to be able to do (or at least try to do) with OpenEMR.

cfapress wrote on Monday, February 02, 2009:

I agree with Mike, this sounds like a PHP memory limit issue.

If you have the files and the permissions are correct then the Apache process is likely running out of memory and not loading all the necessary PHP files to process the software. Seems like an odd way to fail to me but … ???

Jason

thephil2005 wrote on Monday, February 02, 2009:

Thanks for responding.

…from /etc/php.ini:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

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 = 32M      ; Maximum amount of memory a script may consume (16MB)
memory_limit = 128M      ; Changed to 128M - 2/1/09

It’s not memory, unless there’s somewhere else to change it.

Here’s what comes up in the TOP window on login as admin/pass:

Problem in Database Connection

This Website is powered by PostNuke
Web site powered by PostNuke ADODB database libraryPHP Scripting Language
Although this site is running the PostNuke software
it has no other connection to the PostNuke Developers.
Please refrain from sending messages about this site or its content
to the PostNuke team, the end will result in an ignored e-mail.

cfapress wrote on Tuesday, February 03, 2009:

Hi Phil(?),

Your memory limit line looks OK to me. I’m running 32-bit Debian Linux and my memory-limit is 64mb. I haven’t encountered any troubles.

So let’s go back to looking at some of the other points you’ve brought up. The PostNuke calendar is part of the OpenEMR database. When any PostNuke database calls are made they are done through the same database connection defined in openemr/library/sql.conf. But it seems you already know this much.

PostNuke appears to create a new connection in the openemr/interface/main/calendar/includes/pnAPI.php file with a ADONewConnection call.

Are you able to even log in to OpenEMR? Is the failure just the calendar? Can you access the patient screens?

Can you tell use what your versions are for:
OpenEMR
PHP
Apache
MySQL

We’ll get this sorted out.
Jason