J N
asked on
Adding header('Content-Type: text/calendar; charset=utf-8') causing ERR_INVALID_RESPONSE and FILE_NOT_FOUND errors
HI,
I have created a php script for individuals to add a url to their calendar application such as outlook/ google calendar.
I have validated the output on https://icalendar.org/ and get a header warning about the content type being text/html
Validator
Problem is when i add
i get
chrome -> ERR_INVALID_RESPONSE
firefox -> file not found
ie -> i get a download prompt that could not be downloaded if save is clicked
if i add the URL to outlook it throws an invalid url error
Not sure whats going on here because i had it working last night
i am using plesk on my centos 7 server
I have created a php script for individuals to add a url to their calendar application such as outlook/ google calendar.
I have validated the output on https://icalendar.org/ and get a header warning about the content type being text/html
Validator
Problem is when i add
header('Content-Type: text/calendar; charset=utf-8');
// header('Content-Disposition: inline; filename=calendar.ics');
i get
chrome -> ERR_INVALID_RESPONSE
firefox -> file not found
ie -> i get a download prompt that could not be downloaded if save is clicked
if i add the URL to outlook it throws an invalid url error
Not sure whats going on here because i had it working last night
i am using plesk on my centos 7 server
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Another strange this is it just started to work>
Im an so lost why this is happening
Im an so lost why this is happening
ASKER
- So i removed the URL encoding because that seemed to be causing a problem between copying and pasting the link and clicking it.
But i still cannot get the link to add into outlook/gmail
and it still wont validate at the icalendar.org
new link :
But i still cannot get the link to add into outlook/gmail
and it still wont validate at the icalendar.org
new link :
https://www.mjmnagy.info/calendar/p-kFw0z84YSztlBImYsTDHpuEMQP2wrV7XE5hZbjrlZmY0t08FwIOpR4ieHapJp0QSfqFS+Ap+RpaTPp5hpHRKYQ==
ASKER
It all works now
I have no idea what i changed but for some reason it works
I have no idea what i changed but for some reason it works
ASKER
Open in new window
which outputs via echo "<pre>"; -> the pre tag was just use for this question to show the format
Open in new window
If you validate the text there is no errors.
However, if i try and add this url to outlook / gmail /etc this does not work.
There are some funny things going on
1) in the morning when i wrote this questions https://icalendar.org/validator.html would fetch the results from the URL - it is not anymore
2) When i add the missing content headers in php - the file cannot be found