Response: 150 Connecting to port 3911
Response: 226-Sorry, we were unable to read [.]
Response: 226-Options: -a -l
Response: 226 0 matches total
Why does php create files, which the ftp account cannot delete, or chmod and in some cases unable to list directory at all? And as the hosting service doesn’t allow shell account, so does that mean PHP now have more permissions our control?
Could all these problems be caused by bad descriptors generated in a php script? And is there a way to solve the problems without writing a support ticket the server guys?
http://codewalkers.com/seecode/436.html shows how to do a recursive delete using php.
I modified it a little and managed to do a chmod instead.
< ?php function RECURSIVE_CHMOD($dirname, $mod) { // recursive function to chmod // all subdirectories and contents: echo chmod($dirname,$mod); if(is_dir($dirname))$dir_handle=opendir($dirname); while($file=readdir($dir_handle)) { if($file!="." && $file!="..") { if(!is_dir($dirname."/".$file)) echo chmod($dirname."/".$file,$mod); // if permission denies to the previous command // when using open_dir, you might want to set chmod permission 0777 else RECURSIVE_CHMOD($dirname."/".$file , $mod); } } closedir($dir_handle); return true; } RECURSIVE_CHMOD('path/dir', 0777); ?>
Above is one of the php scripts that I use for debugging why isn’t the Wordpress Plugin Manager v.1.8 working on my host. As seems many of the error arise because of permission errors, I created test php scripts, placed into the same directory, and tweak till the script can access, modify files in the different permission situations.
For the above script, I found ‘0755′ and 0755 (octal) will give different results. Chmod the whole faulty directory I cant delete in ftp or cpanel to 0755 or 0777, I can access and delete the whole directory in ftp again.
So back to hacking the wp-plugin-mgr.php script, search and replace all permission values with quotes to without quotes, something like “0777″ to 0777. Upload it again, and tata, it worked, no more errors or warning to do with permissions!
Another way for the above method would be do a cron job. set command to "chmod -777 /path/dir/ -R", as suggested by Teddy Blue.
To test I could really install plugins, I tried spell-check first, an important feature for me I think. Problem with the installation? “spell-plugin.php” not copied to “wp-content/plugins”. So, back to using the ftp client, uploading, chmod. Run configuration, activate, test spell. An error, back to configuring spell-check, changing “en_US” to “en”, tata, this time it really works. A thought for the spell-check future, AJAX spellcheck while typing this post, something you see in NVU or Microsoft Word or OpenOffice.
But testing more plugins, and most doesnt seem to work. Grr… In my case, I might save much more time installing plugins the manual way than enounter problems with one-click install. Am i using an old version of plugin manager or is there a need to change some settings on the host? I’m a little kepxim.
The amount of time I’m spending on my blog these days, I think I’m neglecting lots of other more important stuff in life. The usual typed me, I ready to drop anything, dropping one-click install, dropping plugin manager, dropping wordpress, and now I really accidently deleted all my images in my modblog gallery. But I do think life needs a little perseverance if not I give up on everything so lets see how it goes.
[update 12May2005]
I’m reading a post by Dr Dave, creator of WP Plugin Manager.
Quote:
(and all apologies to those who downloaded that very broken version I just uploaded a few days ago, in a misguided attempt at doing some sort of damage control).
Now, WPPM (the plugin manager) is removed from download links (and development is temporary break). If any frustrating for a user like me, I feel its even more for a developer (did we share some same feelings).
I’m sorry if what I had written seems unreasonable, but I hope things turn out better, and I must surely try out WPPM2 once it comes up. Till then, WPPM will not removed here, although One-Click install doesnt work, I’ll use it as a repository for plugins.


Hi,
Sorry, only saw your post now through the PB it sent to my entry…
Indeed, I had to put WPPM on hold as I don’t have anywhere near the time to offer proper support for it and it was only dragging more and more stupid bugs as I went through botched attempts at fixing it…
Many people have shown some interest in fixing parts of it or providing solutions for bugs in the last release (as you are doing in the post above).
If you (and/or other users of WPPM) can figure how to bring it back to a fairly bug-free level (essentially need to change the way permissions are handled, so that it no longer creates files unwritable by ftp users), I’ll be more than glad to at least re-open downloads on it until I can find the time to make WPPM2, sometime this summer…
Definitely do contact me if you are interested in tackling a part of this…
Cheers,
Hi Dr Dave,
Here’s the source to my modified wppm script http://www.lab4games.net/zz85/blog/wp-content/wp-plugin-mgr.phps
It does eliminate the problem of ftp unacessable files. However, i guess there are some major parts not working.
Do you have have a older, stable version? I could compare the files and try to make changes to make it work. If not, I could try asking others on the net who are using a more “stable” version of wppm.