Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Newb: Please help me with phpicalendar...

Newb: Please help me with phpicalendar...
Thread Tools
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 24, 2003, 09:05 AM
 
Hi,

I'm very new to this stuff...

I have PHP enabled on my OSX client box. (I guess, as phpicalendar runs)
I also have webdav enabled (I guess, as I can publish a calendar to my own computer)

I can publish a calendar to <http://localhost/DAVdocs> using ical but when I go to <http://localhost/phpicalendar/index.php> (it seems to be 'forwarded' to <http://localhost/phpicalendar/day.php> I get:

Invalid calendar file. Please try a different calendar.

The calendar "http://simonmartins-computer.local/DAVdocs/SimonWork.ics" was being processed when this error occurred.

This is my confic.inc.php file inside my phpicalendar folder:

<?php

// Configuration file for PHP iCalendar 0.9.4
//
// To set values, change the text between the single quotes
// Follow instructions to the right for detailed information

$style_sheet = 'silver'; // Themes support - silver, red, green, orange, grey, tan
$default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year'
$minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current'
$default_cal = $ALL_CALENDARS_COMBINED; // Exact filename of calendar without .ics. Or set to $ALL_CALENDARS_COMBINED to open all calenders combined into one.
$language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto'
$week_start_day = 'Sunday'; // Day of the week your week starts on
$day_start = '0800'; // Start time for day grid
$day_end = '2000'; // End time for day grid
$gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred
$num_years = '3'; // Number of years to display in 'Jump to'
$month_event_lines = '1'; // Number of lines to wrap each event title in month view, 0 means display all lines.
$tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines.
$week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$timezone = ''; // Set timezone. Read TIMEZONES file for more information
$default_path = 'http://localhost/phpicalendar'; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar
$tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X)
$calendar_path = ''; // Leave this blank on most installs, place your full path to calendars if they are outside the phpicalendar folder.
$second_offset = '0'; // The time in seconds between your time and your server's time.

// Advanced settings for custom installs, cookies, etc.
// In most cases these will not need to be set.
$cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar
$download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars

// Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase.
$save_parsed_cals = 'yes'; // Recommended 'yes'. Saves a copy of the cal in /tmp after it's been parsed. Improves performence.
$use_sessions = 'no'; // This has not yet been implemented.
$display_custom_goto = 'no'; // In the 'Jump To' box, display the custom 'go to day' box.
$display_ical_list = 'yes'; // In the 'Jump To' box, display the pop-up menu with the list of all calendars in the $calendar_path directory.
$allow_webcals = 'yes'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below.
$this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page.
$use_color_cals = 'yes'; // Display each calendar in the pop-up as a different color.
$daysofweek_dayview = 'no'; // Display the days of the week in day.php view.
$enable_rss = 'yes'; // Enable RSS access to your calendars (good thing).
$show_search = 'no'; // Show the search box in the sidebar.
$allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies.
$printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above).
$show_todos = 'yes'; // Show your todo list on the side of day and week view.
$show_completed = 'yes'; // Show completed todos on your todo list.

// Administration settings
$allow_admin = 'no'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $auth_method
$auth_method = 'ftp'; // Valid values are: 'ftp', 'internal', or 'none'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $auth_internal_username and $auth_internal_password defined below - CHANGE the password. 'none' uses NO authentication - meant to be used with another form of authentication such as http basic.
$auth_internal_username = 'admin'; // Only used if $auth_method='internal'. The username for the administrator.
$auth_internal_password = 'default'; // Only used if $auth_method='internal'. The password for the administrator.
$ftp_server = 'localhost'; // Only used if $auth_method='ftp'. The ftp server name. 'localhost' will work for most servers.
$ftp_calendar_path = ''; // Only used if $auth_method='ftp'. The full path to the calendar directory on the ftp server. If = '', will attempt to deduce the path based on $calendar_path, but may not be accurate depending on ftp server config.

$blacklisted_cals[] = ''; // Fill in between the quotes the name of the calendars
$blacklisted_cals[] = ''; // you wish to 'blacklist' or that you don't want to show up in your calendar
$blacklisted_cals[] = ''; // list. This should be the exact calendar filename without .ics
$blacklisted_cals[] = ''; // the parser will *not* parse any cal that is in this list (it will not be Web accessible)
// add more lines as necessary

$list_webcals[] = 'http://simonmartins-computer.local/DAVdocs/SimonWork.ics'; // Fill in between the quotes exact URL of a calendar that you wish
$list_webcals[] = ''; // to show up in your calendar list. You must prefix the URL with http://
$list_webcals[] = ''; // or webcal:// and the filename should contain the .ics suffix
$list_webcals[] = ''; // $allow_webcals does *not* need to be "yes" for these to show up and work
// add more lines as necessary

$color_cals[] = 'silver'; // Fill in between the quotes the colors you want to display
$color_cals[] = 'red'; // multiple calendars in.
$color_cals[] = 'orange'; // The first color will be used if no color is selected.
$color_cals[] = 'grey'; //
$color_cals[] = 'green'; //
$color_cals[] = 'tan'; //
// add more lines as necessary
?>

Hope someone can help me past this :-)

Thanks!

Simon
London Uk
     
Senior User
Join Date: Jun 2002
Location: UK
Status: Offline
Reply With Quote
Sep 24, 2003, 09:35 AM
 
Do you have personal web sharing turned on? It won't work if you don't have it turned on.

     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 24, 2003, 12:13 PM
 
Originally posted by VEGAN:
Do you have personal web sharing turned on? It won't work if you don't have it turned on.

VEGAN,

Yup, it's on.

I'm thinking it's a permissions issue in the WebDav folder.

The webdav folder is password protected so phpicalendar can't reach the calendar it's after.

I guess I need an htaccess file inside the webdav folder to give access to the calendar.

Or perhaps I should have a folder inside the webdav folder especially for published calendars.

Would that work?

Simon
(Last edited by simonmartin; Sep 24, 2003 at 12:26 PM. )
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 24, 2003, 12:24 PM
 
Double post
     
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Sep 25, 2003, 07:12 AM
 
Originally posted by simonmartin:
I'm thinking it's a permissions issue in the WebDav folder.

The webdav folder is password protected so phpicalendar can't reach the calendar it's after.

I guess I need an htaccess file inside the webdav folder to give access to the calendar.
phpicalendar is not using webdav to get the cal file. the folder needs to be served by apache like any web page, so if you can get it via safari then phpicalendar can get it too.

If you're only using one computer then your setup is too complicated, just access the file directly and take webdav out of the loop.

webdav will let you publish from ical and choose which calendars to serve which is cool but you may not need all that.



.........

Invalid calendar file. Please try a different calendar.

The calendar "http://simonmartins-computer.local/DAVdocs/SimonWork.ics" was being processed when this error occurred.
looks like it can't find the calendar.

lets tweak your setup a little.

in the config file,

first take this out:

$list_webcals[] = 'http://simonmartins-computer.local/DAVdocs/SimonWork.ics'; // Fill in between the quotes exact URL of a calendar that you wish


this is for calendars that it gets over the internet, you want it to read your cal right off the disk.

set :
$calendar_path = '/full/path/to/DAVdocs/folder';

now it should get all you calendars from the same folder you're publishing your calendars to.
you need to make sure DAVdocs has permission set to be world readable. get info then check ownership and permissions, group and others access should be read only, same with enclosing folders.

the next question is if you really have webdav up and running or not. when you publish the cal does the file really show up in the folder?

an easier way is to bag the whole 'publish' thing and just drag a copy of your calendar file into the phpicalendar/calendars folder

ical keeps it calendars in ~/Library/Calendars

I just made a symlink to that folder in the phpicalendar folder so it just serves the real file.

in the terminal:
ln -s /Users/grc/Library/Calendars /Users/grc/Sites/phpicalendar/
maybe rename the original cal folder first.

you'll need to set the permissions of ~/Library/Calendars and ~/Library to read only
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 25, 2003, 10:46 AM
 
Originally posted by Gavin:
phpicalendar is not using webdav to get the cal file. the folder needs to be served by apache like any web page, so if you can get it via safari then phpicalendar can get it too.

If you're only using one computer then your setup is too complicated, just access the file directly and take webdav out of the loop.

webdav will let you publish from ical and choose which calendars to serve which is cool but you may not need all that.



.........


looks like it can't find the calendar.

lets tweak your setup a little.

in the config file,

first take this out:

$list_webcals[] = 'http://simonmartins-computer.local/DAVdocs/SimonWork.ics'; // Fill in between the quotes exact URL of a calendar that you wish


this is for calendars that it gets over the internet, you want it to read your cal right off the disk.

set :
$calendar_path = '/full/path/to/DAVdocs/folder';

now it should get all you calendars from the same folder you're publishing your calendars to.
you need to make sure DAVdocs has permission set to be world readable. get info then check ownership and permissions, group and others access should be read only, same with enclosing folders.

the next question is if you really have webdav up and running or not. when you publish the cal does the file really show up in the folder?

an easier way is to bag the whole 'publish' thing and just drag a copy of your calendar file into the phpicalendar/calendars folder

ical keeps it calendars in ~/Library/Calendars

I just made a symlink to that folder in the phpicalendar folder so it just serves the real file.

in the terminal:
ln -s /Users/grc/Library/Calendars /Users/grc/Sites/phpicalendar/
maybe rename the original cal folder first.

you'll need to set the permissions of ~/Library/Calendars and ~/Library to read only
Gavin,

Thanks for your input.

I need to do this in the pukka way so that others/my wife can subscribe to the calendar.

I did everything you said and now I get a different error:

Unable to open the path: "http://simonmartins-Computer.local/DAVdocs/calendars/SimonWork.ics"

The calendar "all_calendars_combined971" was being processed when this error occurred.

The published calendar is definitey being placed in the Davdocs/calendars folder.

Permissions on the Davdocs folder are:
Owner:www, Read&Write
Group:www, Read only
Others:Read only

I hit the "apply to enclosed folders"

The thing is: When I try to access the webdav folder with a browser I am asked for a username and PW. How can I expect phpicalendar to be able to access a calendar in the same folder without a username & PW?

Isn't that the issue?

Any thoughts?

Thanks

Simon
     
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Sep 27, 2003, 02:22 AM
 
OK, sounds like you have the publish side working, as in iCal sends the calendar to the right place. Now you need the web server to be able to get to the folder.

What is the full path to your DAVdocs folder? Not the web url, but the path in the finder.

For instance my server is set to have /Users/me/Sites/webdocs/ as the root folder. Some have it in /Library/WebServer/DAVdocs/

phpical needs to read the calendar file off the disk just like textedit opens a text file. So apache needs disk access to the cal folder. I think you have it set up to get it via http and that is not necessary.

instead of this:
$list_webcals[] = 'http://simonmartins-computer.local/DAVdocs/SimonWork.ics';

you need this:
$calendar_path = '/Library/WebServer/Documennts/DAVdocs/calendars/';

substitute the actual path the the calandars folder

the $list_webcals[] = parameter is for calendars on someone else's computer out there over the internet. For instance if you want to display the Chicago Cubs calendar on your web page along with your own; assuming the Cubs calendar is freely available on their web site. Actually I found it here:

$list_webcals[] = 'http://ical.mac.com/cstoughton/Cubs32200332Scedule.ics';


Have fun
You can take the dude out of So Cal, but you can't take the dude outta the dude, dude!
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 28, 2003, 03:03 PM
 
Originally posted by Gavin:
OK, sounds like you have the publish side working, as in iCal sends the calendar to the right place. Now you need the web server to be able to get to the folder.

What is the full path to your DAVdocs folder? Not the web url, but the path in the finder.

For instance my server is set to have /Users/me/Sites/webdocs/ as the root folder. Some have it in /Library/WebServer/DAVdocs/

phpical needs to read the calendar file off the disk just like textedit opens a text file. So apache needs disk access to the cal folder. I think you have it set up to get it via http and that is not necessary.

instead of this:
$list_webcals[] = 'http://simonmartins-computer.local/DAVdocs/SimonWork.ics';

you need this:
$calendar_path = '/Library/WebServer/Documennts/DAVdocs/calendars/';

substitute the actual path the the calandars folder

the $list_webcals[] = parameter is for calendars on someone else's computer out there over the internet. For instance if you want to display the Chicago Cubs calendar on your web page along with your own; assuming the Cubs calendar is freely available on their web site. Actually I found it here:

$list_webcals[] = 'http://ical.mac.com/cstoughton/Cubs32200332Scedule.ics';


Have fun
Gavin,

Still doesn't work I'm afraid.

The path to the calendar folder is: /Library/Webserver/Documents/DAVdocs/calendars

To publish a calndar from ical I use: http://192.168.0.2/DAVdocs/calendars

Here is my config.inc.php in my phpicalendar folder:
<?php

// Configuration file for PHP iCalendar 0.9.4
//
// To set values, change the text between the single quotes
// Follow instructions to the right for detailed information

$style_sheet = 'silver'; // Themes support - silver, red, green, orange, grey, tan
$default_view = 'day'; // Default view for calendars = 'day', 'week', 'month', 'year'
$minical_view = 'current'; // Where do the mini-calendars go when clicked? = 'day', 'week', 'month', 'current'
$default_cal = $ALL_CALENDARS_COMBINED; // Exact filename of calendar without .ics. Or set to $ALL_CALENDARS_COMBINED to open all calenders combined into one.
$language = 'English'; // Language support - 'English', 'Polish', 'German', 'French', 'Dutch', 'Danish', 'Italian', 'Japanese', 'Norwegian', 'Spanish', 'Swedish', 'Portuguese', 'Catalan', 'Traditional_Chinese', 'Esperanto'
$week_start_day = 'Sunday'; // Day of the week your week starts on
$day_start = '0800'; // Start time for day grid
$day_end = '2000'; // End time for day grid
$gridLength = '15'; // Grid distance in minutes for day view, multiples of 15 preferred
$num_years = '3'; // Number of years to display in 'Jump to'
$month_event_lines = '1'; // Number of lines to wrap each event title in month view, 0 means display all lines.
$tomorrows_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$allday_week_lines = '1'; // Number of lines to wrap each event title in all-day events in week view, 0 means display all lines.
$week_events_lines = '1'; // Number of lines to wrap each event title in the 'Tommorrow's events' box, 0 means display all lines.
$timezone = ''; // Set timezone. Read TIMEZONES file for more information
$default_path = 'http://192.168.0.2/phpicalendar'; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar
$tmp_dir = '/tmp'; // The temporary directory on your system (/tmp is fine for UNIXes including Mac OS X)
$calendar_path = 'http://192.168.0.2/Library/Webserver/Documents/DAVdocs/calendars'; // Leave this blank on most installs, place your full path to calendars if they are outside the phpicalendar folder.
$second_offset = '0'; // The time in seconds between your time and your server's time.

// Advanced settings for custom installs, cookies, etc.
// In most cases these will not need to be set.
$cookie_uri = ''; // The HTTP URL to the PHP iCalendar directory, ie. http://www.example.com/phpicalendar
$download_uri = ''; // The HTTP URL to your calendars directory, ie. http://www.example.com/phpicalendar/calendars

// Yes/No questions --- 'yes' means Yes, anything else means no. 'yes' must be lowercase.
$save_parsed_cals = 'yes'; // Recommended 'yes'. Saves a copy of the cal in /tmp after it's been parsed. Improves performence.
$use_sessions = 'no'; // This has not yet been implemented.
$display_custom_goto = 'no'; // In the 'Jump To' box, display the custom 'go to day' box.
$display_ical_list = 'yes'; // In the 'Jump To' box, display the pop-up menu with the list of all calendars in the $calendar_path directory.
$allow_webcals = 'yes'; // Allow http:// and webcal:// prefixed URLs to be used as the $cal for remote viewing of "subscribe-able" calendars. This does not have to be enabled to allow specific ones below.
$this_months_events = 'yes'; // Display "This month's events" at the bottom off the month page.
$use_color_cals = 'yes'; // Display each calendar in the pop-up as a different color.
$daysofweek_dayview = 'no'; // Display the days of the week in day.php view.
$enable_rss = 'yes'; // Enable RSS access to your calendars (good thing).
$show_search = 'no'; // Show the search box in the sidebar.
$allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies.
$printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above).
$show_todos = 'yes'; // Show your todo list on the side of day and week view.
$show_completed = 'yes'; // Show completed todos on your todo list.

// Administration settings
$allow_admin = 'no'; // Set to yes to allow the admin page - remember to change the default password if using 'internal' as the $auth_method
$auth_method = 'ftp'; // Valid values are: 'ftp', 'internal', or 'none'. 'ftp' uses the ftp server's username and password as well as ftp commands to delete and copy files. 'internal' uses $auth_internal_username and $auth_internal_password defined below - CHANGE the password. 'none' uses NO authentication - meant to be used with another form of authentication such as http basic.
$auth_internal_username = 'admin'; // Only used if $auth_method='internal'. The username for the administrator.
$auth_internal_password = 'default'; // Only used if $auth_method='internal'. The password for the administrator.
$ftp_server = 'localhost'; // Only used if $auth_method='ftp'. The ftp server name. 'localhost' will work for most servers.
$ftp_calendar_path = ''; // Only used if $auth_method='ftp'. The full path to the calendar directory on the ftp server. If = '', will attempt to deduce the path based on $calendar_path, but may not be accurate depending on ftp server config.

$blacklisted_cals[] = ''; // Fill in between the quotes the name of the calendars
$blacklisted_cals[] = ''; // you wish to 'blacklist' or that you don't want to show up in your calendar
$blacklisted_cals[] = ''; // list. This should be the exact calendar filename without .ics
$blacklisted_cals[] = ''; // the parser will *not* parse any cal that is in this list (it will not be Web accessible)
// add more lines as necessary

$list_webcals[] = ''; // Fill in between the quotes exact URL of a calendar that you wish
$list_webcals[] = ''; // to show up in your calendar list. You must prefix the URL with http://
$list_webcals[] = ''; // or webcal:// and the filename should contain the .ics suffix
$list_webcals[] = ''; // $allow_webcals does *not* need to be "yes" for these to show up and work
// add more lines as necessary

$color_cals[] = 'silver'; // Fill in between the quotes the colors you want to display
$color_cals[] = 'red'; // multiple calendars in.
$color_cals[] = 'orange'; // The first color will be used if no color is selected.
$color_cals[] = 'grey'; //
$color_cals[] = 'green'; //
$color_cals[] = 'tan'; //
// add more lines as necessary
?>

Make any sense?

Thanks

Simon
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Sep 28, 2003, 03:15 PM
 
Originally posted by Gavin:
you need this:
$calendar_path = '/Library/WebServer/Documennts/DAVdocs/calendars/';
Gavin,

It's fixed.

It turns out that the address needs to be $calendar_path = '../DAVdocs/calendars';

A local address is required.

Thanks to a very patient man by the name of Greg Westin for this.

<http://www.gregwestin.com>

Thanks for everyone's help with this.

Simon
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:49 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2