tags 597714 + patch
thanks

On Wed, Sep 22, 2010 at 02:51:40PM +0200, Olivier Berger wrote:
> 
> Without gforge-plugin- packages installed, if one admin accesses the Plugin 
> Manager, there are tons of errors produced.
> 
> /var/log/apache2/error.log contains :
> PHP Warning:  opendir(/usr/share/gforge/plugins/): failed to open dir: No 
> such file or directory in /usr/share/gforge/www/admin/pluginman.php on line 
> 208, referer: https://testforge.int-evry.fr/fusionforge/admin/
> PHP Warning:  readdir() expects parameter 1 to be resource, boolean given in 
> /usr/share/gforge/www/admin/pluginman.php on line 210, referer: 
> https://testforge.int-evry.fr/fusionforge/admin/
> PHP Warning:  readdir() expects parameter 1 to be resource, boolean given in 
> /usr/share/gforge/www/admin/pluginman.php on line 210, referer: 
> https://testforge.int-evry.fr/fusionforge/admin/
> [ad lib]
> 
> FYI : # # grep pluginman.php /var/log/apache2/error.log | wc -l
> 520482
> 
> 

A workaround is to create /usr/share/gforge/plugins/ so that apache can read 
its content or apply the following patch :

--- /usr/share/gforge/www/admin/pluginman.php~  2010-03-01 21:15:27.000000000 
+0100
+++ /usr/share/gforge/www/admin/pluginman.php   2010-09-22 14:54:56.000000000 
+0200
@@ -205,8 +205,8 @@
 
 //get the directories from the plugins dir
 
-$handle = opendir($sys_plugins_path);
 $filelist = array();
+if($handle = opendir($sys_plugins_path)) {
 while (($filename = readdir($handle)) !== false) {
        if ($filename!='..' && $filename!='.' && $filename!=".svn" && 
$filename!="CVS" &&
                is_dir($sys_plugins_path.'/'.$filename) &&
@@ -216,6 +216,7 @@
        }
 }
 closedir($handle);
+}
 
 sort($filelist);

I committed a fix upstream in 5.0.x branch.

Still, the gforge-web-apache2 package should ship an empty 
/usr/share/gforge/plugins/ placeholder maybe.

Best regards,




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to