Error after Update: weblogping
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Your output must read like this to work:
include_path .:/usr/share/php (local and master value)
open_basedir .:/home/www/webxxx:/usr/share/php (local value, master = no value)
The dot and colon at the beginning are okay, they indicate "current directory".
Best regards,
Garvin
Your output must read like this to work:
include_path .:/usr/share/php (local and master value)
open_basedir .:/home/www/webxxx:/usr/share/php (local value, master = no value)
The dot and colon at the beginning are okay, they indicate "current directory".
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi,
unfortunately I am experiencing exactly the same problem.
My provider can in the short term not install PEAR modules for me, but I don't know about setting the include_path is allowed or not.
Other parts of s9y using PEAR seem to be working. Is there no connection between those cases?
How can I resolve this issue?
Thanks!
matsch
P.S.: Following is my output of the error just for completeness.
I recently updated to Serendipity 1.1.1 und PHP 4.3.10-18. Before I did not have this issue.
unfortunately I am experiencing exactly the same problem.
Also for me, this does not solve the issue - or do I have to do anything to make this config-change into effect? (when is it read?)garvinhicking wrote:Edit your serendipity_config_local.inc.php file (check the FAQ about 'fixperm' if you have no write access to that file) and insert:
This will instruct s9y to NOT use the advocated PEAR libraries on the server, but the ones provider with serendipity.Code: Select all
$serendipity['use_PEAR'] = false;
My provider can in the short term not install PEAR modules for me, but I don't know about setting the include_path is allowed or not.
Other parts of s9y using PEAR seem to be working. Is there no connection between those cases?
How can I resolve this issue?
Thanks!
matsch
P.S.: Following is my output of the error just for completeness.
I recently updated to Serendipity 1.1.1 und PHP 4.3.10-18. Before I did not have this issue.
Code: Select all
Warning: event_hook(): open_basedir restriction in effect. File(/usr/share/php/XML/RPC.php) is not
within the allowed path(s): (/home/chroot/home) in
/home/chroot/home/matsch/public_html/blog/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php
on line 150
Warning: event_hook(XML/RPC.php): failed to open stream: Operation not permitted in
/home/chroot/home/matsch/public_html/blog/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php
on line 150
Warning: event_hook(): Failed opening 'XML/RPC.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear:/home/chroot/home/matsch/public_html/blog/bundled-libs/:/home/chroot/home/matsch/public_html/blog/bundled-libs/Smart
y/libs/:/home/chroot/home/matsch/public_html/blog/:')
in
/home/chroot/home/matsch/public_html/blog/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php
on line 150
Sende XML-RPC ping zu rpc.pingomatic.com...
Fatal error: Cannot instantiate non-existent class: xml_rpc_value in
/home/chroot/home/matsch/public_html/blog/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php
on line 172-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi matsch!
Please talk to your provider about making the settings that have been discussed in this thread (include_path vs. open_basedir path) - his current setting seems to cause the trouble that PEAR is advocated on your server, but not usable.
If after setting use_PEAR=false the problem does not go away, as you've mentioned, this is because setting the include_path is forbidden by your provider. In that case, s9ys options are ineffectively, because they require include_path to be setable (because your provider set it wrong).
Best regards,
Garvin
Please talk to your provider about making the settings that have been discussed in this thread (include_path vs. open_basedir path) - his current setting seems to cause the trouble that PEAR is advocated on your server, but not usable.
If after setting use_PEAR=false the problem does not go away, as you've mentioned, this is because setting the include_path is forbidden by your provider. In that case, s9ys options are ineffectively, because they require include_path to be setable (because your provider set it wrong).
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi,
Regards,
matsch
Yes I understood what you said (I think). But there are two points I am making.garvinhicking wrote:Hi matsch!
Please talk to your provider about making the settings that have been discussed in this thread (include_path vs. open_basedir path) - his current setting seems to cause the trouble that PEAR is advocated on your server, but not usable.
If after setting use_PEAR=false the problem does not go away, as you've mentioned, this is because setting the include_path is forbidden by your provider. In that case, s9ys options are ineffectively, because they require include_path to be setable (because your provider set it wrong).
Best regards,
Garvin
- 1. The following little script gives me a local include path of ".:/" in the phpinfo. You can't change the master value with set_include_path(), can you?
Code: Select all
<?php
set_include_path('.:/');
phpinfo();
?>- 2. Other PEAR functions seem to be working (e.g. serendipity_event_spartacus, serendipity_event_backendrss, serendipity_plugin_zooomr). Only serendipity_event_weblogping doesn't. Or am I getting something wrong? What's the difference?
Regards,
matsch
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi matsch!
If you don't use set_include_path, what does the phpinfo() show you then?
Inside the serendipity_config.inc.php file you should see the methods where set_include_path is being used, if you want to trace that?
About why the weblogping plugin only emits an error: It might be that only the PEAR XML_RPC class is installed globally, and PEAR classes that other plugins use (like File_Request) are not installed globally, so there's no clash?
Best regards,
Garvin
If you don't use set_include_path, what does the phpinfo() show you then?
Inside the serendipity_config.inc.php file you should see the methods where set_include_path is being used, if you want to trace that?
About why the weblogping plugin only emits an error: It might be that only the PEAR XML_RPC class is installed globally, and PEAR classes that other plugins use (like File_Request) are not installed globally, so there's no clash?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi Garvin,
No matter what I set $serendipity['use_PEAR'] to, the s9y-include_path will always be appended to the end while I can force it by hand anywhere. You should check that. Seems like a bug to me...
Regards,
matsch
I think something is wrong with the logic of this part in serendipity_config.inc.php:garvinhicking wrote:Inside the serendipity_config.inc.php file you should see the methods where set_include_path is being used, if you want to trace that?
Code: Select all
$new_include = ($serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '')
. S9Y_INCLUDE_PATH . 'bundled-libs/' . PATH_SEPARATOR
. S9Y_INCLUDE_PATH . 'bundled-libs/Smarty/libs/' . PATH_SEPARATOR
. $serendipity['serendipityPath'] . PATH_SEPARATOR
. (!$serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '');Regards,
matsch
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi matsch!
If PEAR is enabled, s9y puts his own directories AFTER the server-side configured, thus putting a preference on the global installation. If use_PEAR is disabled, s9y puts his own directories as the first path, thus putting a preference to the local bundled-libs directory.
Since the include_path setting is evaluated from first to last, the first hit in the include_path will be used to include a library. The use_PEAR setting will only have effect it set_include_path or ini_set('include_path') properly work. Else, if those function calls return 'false', s9y defines a CONSTANT S9Y_IUNCLUDE_PATH that hard points to the bundled-libs directory.
HTH,
Garvin
That's by preference. The s9y includepath to bundled-libs must always be present to allow inclusion of PEAR libraries that are not installed globally.No matter what I set $serendipity['use_PEAR'] to, the s9y-include_path will always be appended to the end while I can force it by hand anywhere. You should check that. Seems like a bug to me...Code: Select all
$new_include = ($serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '') . S9Y_INCLUDE_PATH . 'bundled-libs/' . PATH_SEPARATOR . S9Y_INCLUDE_PATH . 'bundled-libs/Smarty/libs/' . PATH_SEPARATOR . $serendipity['serendipityPath'] . PATH_SEPARATOR . (!$serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '');
If PEAR is enabled, s9y puts his own directories AFTER the server-side configured, thus putting a preference on the global installation. If use_PEAR is disabled, s9y puts his own directories as the first path, thus putting a preference to the local bundled-libs directory.
Since the include_path setting is evaluated from first to last, the first hit in the include_path will be used to include a library. The use_PEAR setting will only have effect it set_include_path or ini_set('include_path') properly work. Else, if those function calls return 'false', s9y defines a CONSTANT S9Y_IUNCLUDE_PATH that hard points to the bundled-libs directory.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Sorry, ich glaube wir reden aneinander vorbei.garvinhicking wrote:If PEAR is enabled, s9y puts his own directories AFTER the server-side configured, thus putting a preference on the global installation. If use_PEAR is disabled, s9y puts his own directories as the first path, thus putting a preference to the local bundled-libs directory.
S9y macht seinen eigenen include_path eben immer an das Ende, egal wie use_PEAR gesetzt ist. Daher funktioniert es nicht.
Ich habe es bei mir getestet, wie der include_path danach gesetzt ist. Du kannst es nochmal überprüfen. Warum das so ist verstehe ich im Moment auch nicht, da die Syntax oben eigentlich was anderes sagt. Ist aber so - bitte überprüfen!
(For English readers: I just repeated what I said before - hopefully more clear now.)
Best regards,
matsch
Hi,
to make it even more clear.
1. The result of get_include_path() with $serendipity['use_PEAR'] = false;
2. The result of get_include_path() with $serendipity['use_PEAR'] = true;
HTH,
matsch
to make it even more clear.
1. The result of get_include_path() with $serendipity['use_PEAR'] = false;
Code: Select all
.:/usr/share/php:/usr/share/pear:/home/chroot/home/matsch/public_html/blog/bundled-libs/:/home/chroot/home/matsch/public_html/blog/bundled-libs/Smarty/libs/:/home/chroot/home/matsch/public_html/blog/:Code: Select all
.:/usr/share/php:/usr/share/pear:/home/chroot/home/matsch/public_html/blog/bundled-libs/:/home/chroot/home/matsch/public_html/blog/bundled-libs/Smarty/libs/:/home/chroot/home/matsch/public_html/blog/:matsch
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Setze $new_include auf folgenden Wert: Falls use_PEAR aktiviert ist, packe den jetzigen include_path an den Anfang. Wenn use_PEAR nicht aktiviert ist, packe den alten include_path nicht an den Anfang. Jetzt kommen die s9y Pfade. Und am Ende prüfst Du, ob use_PEAR nicht aktiv ist, damit der alte include_pfad angehangen wird.
Seien wir mal konkret, gehen wir von folgenden Werten aus:
Dann würde $new_include so aussehen:
Wenn wir aber von diesen Werten ausgehen:
Dann würde $new_include so aussehen:
Lass Dir also mal $new_include ausgeben, das müsste eine korrekte Pfadsyntax aufweisen. Die einzige Möglichkeit die ich das sehe ist wenn du
gesetzt hättest, denn wenn man das mit !$serendipity['use_PEAR'] vergleicht evaluiert es zu true. Oder wenn Du $serendipity['use_PEAR'] an einer anderen Stelle als in der serendipity_config.inc.php gesetzt hast und er irgendwo immer überschrieben wird.
Ansonsten, für eine Änderung die in Serendipity 1.2 drin ist, die Dir eventuell helfen könnte: http://board.s9y.org/viewtopic.php?t=9067
Grüße,
Garvin
Das kann aber nicht sein. Der Code sagt ja:S9y macht seinen eigenen include_path eben immer an das Ende, egal wie use_PEAR gesetzt ist. Daher funktioniert es nicht.
Setze $new_include auf folgenden Wert: Falls use_PEAR aktiviert ist, packe den jetzigen include_path an den Anfang. Wenn use_PEAR nicht aktiviert ist, packe den alten include_path nicht an den Anfang. Jetzt kommen die s9y Pfade. Und am Ende prüfst Du, ob use_PEAR nicht aktiv ist, damit der alte include_pfad angehangen wird.
Seien wir mal konkret, gehen wir von folgenden Werten aus:
Code: Select all
$old_include = '.:/usr/share/php';
$serendipity['use_PEAR'] = true;
S9Y_INCLUDE_PATH = '/www/serendipity';
Code: Select all
$new_include = '.:/usr/share/php:/www/serendipity/bundled-libs/:/www/serendipity/bundled-libs/Smarty/libs/:/www/serendipity/:';
Code: Select all
$old_include = '.:/usr/share/php';
$serendipity['use_PEAR'] = false; // NOT 'false'!!!!!
S9Y_INCLUDE_PATH = '/www/serendipity';
Code: Select all
$new_include = '/www/serendipity/bundled-libs/:/www/serendipity/bundled-libs/Smarty/libs/:/www/serendipity/:.:/usr/share/php:';
Code: Select all
$serendipity['use_PEAR'] = 'false';
Ansonsten, für eine Änderung die in Serendipity 1.2 drin ist, die Dir eventuell helfen könnte: http://board.s9y.org/viewtopic.php?t=9067
Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I found the bug! (Yes, there is one...).
In serendipity_config.inc.php on Line 82 you check whether the Var is set:
But only on line 230 you include the actual config file serendipity_config_local.inc.php:
Thus, $serendipity['use_PEAR'] = true; will always be set to true and this statement will always have the same outcome.
HTH,
matsch
In serendipity_config.inc.php on Line 82 you check whether the Var is set:
Code: Select all
if (!isset($serendipity['use_PEAR'])) {
$serendipity['use_PEAR'] = true;
}Code: Select all
include($local_config);Code: Select all
$new_include = ($serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '')
. S9Y_INCLUDE_PATH . 'bundled-libs/' . PATH_SEPARATOR
. S9Y_INCLUDE_PATH . 'bundled-libs/Smarty/libs/' . PATH_SEPARATOR
. $serendipity['serendipityPath'] . PATH_SEPARATOR
. (!$serendipity['use_PEAR'] ? $old_include . PATH_SEPARATOR : '');matsch
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Ah, that's good. I didn't notice I suggested to edit the _local file. I even knew about that this file was not read before the option was checked, so usually when I recommend to toggle use_PEAR I refer to the config.inc.php file.
I'm afraid the current logic doesn't allow to include the local config file earlier as it might have a possible impact on the rest of the workflow of that file, but I agree that this setting should be set within the local file, not the global one.
However, you could use that 'feature' of later inclusion to set the include_path again in the _local fine
Best regards,
Garvin
Ah, that's good. I didn't notice I suggested to edit the _local file. I even knew about that this file was not read before the option was checked, so usually when I recommend to toggle use_PEAR I refer to the config.inc.php file.
I'm afraid the current logic doesn't allow to include the local config file earlier as it might have a possible impact on the rest of the workflow of that file, but I agree that this setting should be set within the local file, not the global one.
However, you could use that 'feature' of later inclusion to set the include_path again in the _local fine
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/