Bonsoir
J'ai installé (enfin!) un wampserver2 local: PHP: 5.2.5 et MySQL: 5.0.45-community-nt
J'installe les plugins UpToDate et LocalFiles Editor, je les active.
Lorsque je clique sur le lien, j'ai une erreur Invalid URL - plugin X not active
Flûte, fis-je!
En regardant, bien je vois que le X ne correspond pas à la réalité:
ocalFilesEditor au lieu de LocalFilesEditor
Et pareil dans le lien de l'admin.
Je remonte à la source et j'arrive à la fonction get_admin_plugin_menu_link dans admin/include/functions_plugins.inc.php, qui dit, lignes 98-99:
$real_plugin_path = realpath(PHPWG_PLUGINS_PATH); $file = substr($real_file, strlen($real_plugin_path)+1);
Le $file sert ensuite à générer la section finale de l'url.
Or, un commentaire de la doc PHP sur realpath dit:
eric at themepark dot com noted that realpath() strips off the trailing directory separator. This is only correct for PHP4!
PHP5 seems to have silently "corrected" this behaviour, now leaving the trailing separator. This can result in incorrect behaviour if your path isn't meant to contain a trailing separator.
eg:
PHP4: realpath("some/path/with/a/trailing/slash/") => "[root]/some/path/with/a/trailing/slash"
PHP5: realpath("some/path/with/a/trailing/slash/") => "[root]/some/path/with/a/trailing/slash/"
Et chez nous, define('PHPWG_PLUGINS_PATH', PHPWG_ROOT_PATH.'plugins/');, ce qui conduit au "trailing slash".
Si je vire le +1 de la ligne 99, ça marche.
Je m'étonne cependant d'être le 1er en php5 avec des plugins... Donc ma piste devrait être fausse ? Qu'ai-je raté ?
Hors ligne
Visiblement ce n'est qu'avec les serveur wamp et un problème connu du forum...
::
http://forum.phpwebgallery.net/viewtopi … 413#p72413
et ::
http://forum.phpwebgallery.net/viewtopi … 588#p73588
8-)
Hors ligne
VDigital a écrit:
Visiblement ce n'est qu'avec les serveur wamp et un problème connu du forum...
::
http://forum.phpwebgallery.net/viewtopi … 413#p72413
et ::
http://forum.phpwebgallery.net/viewtopi … 588#p73588
8-)
ah oui, je me rappelle du 2e.OK, noté.
Hors ligne