forked from kellan/magpierss
-
Notifications
You must be signed in to change notification settings - Fork 1
/
TROUBLESHOOTING
152 lines (94 loc) · 4.74 KB
/
TROUBLESHOOTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
TROUBLESHOOTING
Trouble Installing MagpieRSS:
1. Fatal error: Failed opening required '/path/to/script/rss_fetch.inc'
(include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear')
2. Cache couldn't make dir './cache'.
3. Fatal error: Failed to load PHP's XML Extension.
http://www.php.net/manual/en/ref.xml.php
Trouble Using MagpieRSS
4. Warning: MagpieRSS: Failed to fetch example.com/index.rdf.
(HTTP Error: Invalid protocol "")
5. Warning: MagpieRSS: Failed to parse RSS file.
(not well-formed (invalid token) at line 19, column 98)
6. Warning: MagpieRSS: Failed to fetch http://localhost/rss/features.1-0.rss.
(HTTP Response: HTTP/1.1 404 Not Found)
If you would rather provide a custom error, see the COOKBOOK
(http://magpierss.sf.net/cookbook.html) recipe 2.
*************************************************************************
1. Fatal error: Failed opening required '/path/to/script/rss_fetch.inc'
(include_path='.:/usr/local/lib/php:/usr/local/lib/php/pear')
This could mean that:
a) PHP can't find the MagpieRSS files.
b) PHP found them the MagpieRSS files, but can't read them.
a. Telling PHP where to look for MagpieRSS file.
This might mean your PHP program can't find the MagpieRSS libraries.
Magpie relies on 4 include files, rss_fetch.inc, rss_parse.inc,
rss_cache.inc, rss_util.inc, and for normal use you'll need all 4 (see the
cookbook for exceptions).
This can be fixed by making sure the MagpieRSS files are in your include
path.
If you can edit your include path (for example your on a shared host) then
you need to replace:
require_once('rss_fetch.inc');
-with-
define('MAGPIE_DIR', '/path/to/magpierss/');
require_once(MAGPIE_DIR.'rss_fetch.inc');
b. PHP can't read the MagpieRSS files
All PHP libraries need to be readable by your webserver.
On Unix you can accomplish this with:
chmod 755 rss_fetch.inc rss_parse.inc rss_cache.inc rss_util.inc
*************************************************************************
2. Cache couldn't make dir './cache'.
MagpieRSS caches the results of fetched and parsed RSS to reduce the load on
both your server, and the remote server providing the RSS. It does this by
writing files to a cache directory.
This error means the webserver doesn't have write access to the current
directory.
a. Make a webserver writeable cache directory
Find the webserver's group. (on my system it is 'www')
mkdir ./cache
chgrp www directory_name
chmod g+w directory_name
(this is the best, and desired solution)
b. Tell MagpieRSS to create the cache directory somewhere the webserver can
write to.
define('MAGPIE_CACHE_DIR', '/tmp/magpierss');
(this is not a great solution, and might have security considerations)
c. Turn off cacheing.
Magpie can work fine with cacheing, but it will be slower, and you might
become a nuiance to the RSS provider, but it is an option.
define('MAGPIE_CACHE_ON', 0);
d. And lastly, do NOT
chmod 777 ./cache
Any of the above solutions are better then this.
NOTE: If none of this works for you, let me know. I've got root, and a
custom compiled Apache on almost any box I ever touch, so I can be a little
out of touch with reality. But I won't know that if I don't feedback.
************************************************************************* 3.
3. Fatal error: Failed to load PHP's XML Extension.
http://www.php.net/manual/en/ref.xml.php
-or-
Fatal error: Failed to create an instance of PHP's XML parser.
http://www.php.net/manual/en/ref.xml.php
Make sure your PHP was built with --with-xml
This has been turned on by default for several versions of PHP, but it might
be turned off in your build.
See php.net for details on building and configuring PHP.
*************************************************************************
4. Warning: MagpieRSS: Failed to fetch index.rdf.
(HTTP Error: Invalid protocol "")
You need to put http:// in front of your the URL to your RSS feed
*************************************************************************
5. Warning: MagpieRSS: Failed to parse RSS file.
(not well-formed (invalid token) at line 19, column 98)
There is a problem with the RSS feed you are trying to read.
MagpieRSS is an XML parser, and therefore can't parse RSS feed with invalid
characters. Some RSS parser are based on regular expressions, and can
parse invalid RSS but they have their own problems.
You could try contacting the author of the RSS feed, and pointing them to
the online RSS validator at:
http://feeds.archive.org/validator/
*************************************************************************
6. Warning: MagpieRSS: Failed to fetch http://example.com/index.rdf
(HTTP Response: HTTP/1.1 404 Not Found)
Its a 404! The RSS file ain't there.