PHPiCalendar problems...again

apps

#1

So I’ve been using PHPiCal pretty succesfully for a while, and suddenly I’m getting the following errors which look a little something like this:

Warning: session_start(): open(/tmp/sess_9ef9080406015e7ac7c5a5e582881520, O_RDWR) failed: Permission denied (13) in /home/.duncan/mbaizman/baizman.net/icalendar/functions/userauth_functions.php on line 74

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/.duncan/mbaizman/baizman.net/icalendar/functions/userauth_functions.php:74) in /home/.duncan/mbaizman/baizman.net/icalendar/functions/userauth_functions.php on line 74

Warning: Cannot modify header information - headers already sent by (output started at /home/.duncan/mbaizman/baizman.net/icalendar/functions/userauth_functions.php:74) in /home/.duncan/mbaizman/baizman.net/icalendar/functions/userauth_functions.php on line 75

Warning: Cannot modify header information - headers already sent by (output started at /home/.duncan/mbaizman/baizman.net/icalendar/functions/userauth_functions.php:74) in /home/.duncan/mbaizman/baizman.net/icalendar/day.php on line 15

Warning: Invalid argument supplied for foreach() in /home/.duncan/mbaizman/baizman.net/icalendar/functions/template.php on line 504

Warning: Unknown(): open(/tmp/sess_9ef9080406015e7ac7c5a5e582881520, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

Now I’m no PHP expert (although I play one on TV - ok, not really), but I figured I’d drill down into the guts of the thing, and see if I could puzzle it out. So, here’s lines 71 - 83 of functions/userauth_functions.php:

71 // Look for session authentication.
72 if ($login_cookies != ‘yes’) {
73 if (!session_id()) {
74 session_start();
75 setcookie(session_name(), session_id(), time()+(606024712*10), ‘/’, $cookie_uri, 0);
76 }
77 if (isset($_SESSION[‘username’]) &&
78 isset($_SESSION[‘password’]))
79 {
80 $username = $_SESSION[‘username’];
81 $password = $_SESSION[‘password’];
82 }
83 }

So PHPiCal is clearly trying to use session variables and set cookies. so why the error messages? It looks like a permissions thing, but I’m not sure what the heck I can do about it.

Ideas, anyone? Am I overthinking this? FYI, I’m getting the errors on a clean install of PHPiCal. Thanks in advance to the PHP gurus out there,

Marc


#2

Following up on my own post, I changed the config file to use a different temp directory, specifically phpicalinstalldir/tmp which I 777ed. So what gives? Has there been some sort kind of upgrade and/or security thing implemented?


#3

mark -

any update?? i’m trying to do the same thing and i can’t seem to find any information on how to fix it anywhere…


#4

No update, sadly. It’s wierd - it’s been fine, then error-filled, then fine again. This suggests to me some monkeying on DreamHost’s end. Not sure what’s going on. This is a 3rd party app, so I certainly don’t expect them to support it, but it is a little frustrating to have it work flawlessly for a long time, then suddenly break due to a change in configuration on Dreamhost’s part. From what I can decipher from the error messages, it looks like there’s some sort of permissions error (the script can’t write to the /tmp directory). However, there is is a place in the config.inc.php to specify temp directory, which I’ve chaged from /tmp to ~/tmp. So it’s wierd. In a nutshell, no update. :frowning:


#5

I’m bumping this to the top, because I found a workaround on the phpicalendar.net forums:

Add this line to init.inc.php:

error_reporting(0);

This will turn off php’s error reporting when using PHPiCalendar, and so your calendar will display error-free. Again, this is not a proper fix, but it will get your calendars to display nicely.