Links to know aboutMusic The Chiara String Quartet Chiara Quartet (MySpace) Greenwood Music Camp UNL School of Music PHP PEAR Installer Manifesto phpDocumentor PEAR phar docblock PHP_Parser PHP_Parser_DocblockParser PHP_ParserGenerator PHP_LexerGenerator PEAR_PackageFileManager PHP_Archive Games_Chess Blogs Joshua Eichorn Paul M. Jones Davey Shafik Popular EntriesSetting up your own PEAR channel with Chiara_PEAR_Server - the official way
(26) Do you develop a website? It is infinitely better to synchronize live and development sites using the PEAR Installer(24) Using PEAR 1.4.0 to install PEAR packages on a remote host(19) doing the PEAR thing(19) PEAR now fits in a bottle: meet go-pear.phar(17) CategoriesPowered by |
Saturday, March 19. 2005Using PEAR 1.4.0 to install PEAR packages on a remote hostComments
Display comments as
(Linear | Threaded)
I recently install PEAR 1.3.5 in my shared host with go-pear.php. As my first experience with PEAR, I tried to install it into 2 locations: inside/outside of htdocs.
now, I just want to uninstall one of them. But I find no way to do it although I tried to use FTP to delete it but Apache said it is denied How could I resolve this problem? thanks Dinh
The issue you're experiencing is quite common for users of the web installer. Here is the reason you're experiencing this:
The files were created by apache, using user nobody, group nobody. Your user is not nobody (kinds of sounds like a bad psychologist, eh?), and you are not a member of the nobody group, so you are not allowed to delete these files. They can only be deleted by apache! The solution is to create a simple script that recursively traverses the directories containing pear, and deletes them. The best tack is to first create a script that prints the files in the order that they would be deleted, and then add the unlink() call in. Hope this helps!
I had the same problem. Here is a good recursive function to handle it:
(found this at http://us3.php.net/function.rmdir)- it worked great! itsdapead 28-Feb-2005 10:03 Warning! On Unix-type systems, most of the "delete directory tree" functions posted here will follow & delete symbolic links (which is not what you'd expect of, say, rm-rf) so you might find more than you bargained for getting wiped. Here's a quick kludge of an earlier submission (by tekangel) that avoids this by default. Make sure it does what you want before you uncomment the unlink and rmdir commands!
I've been struggling with this for a few days now and feel like I'm getting nowhere. I installed PEAR no prob on my local machine. I am able to use the CLI and ftp to my webserver. However, when I get to the config-create step I run into probs. Here's the error I receive:
C:\remote\pear> pear config-create -w C:\remote\pear remote.ini Configuration File "C:\remote\pear\remote.ini" is empty Any ideas what I'm doing wrong? I have checked and double checked all my environment variables and config files and everything seems to be pointing to the right directories. I can use the CLI to install pear packages and have not had any probs using anything. This is the only thorn in my side at the moment. Any help would be appreciated. Thanks.
I am experiencing the same now on both Unix and Windows while it worked like a charm weeks ago. Maybe something is broken or changed in the newest versions? Currently 0 byte files are created on both platforms.
This was indeed a bug in PEAR_Config. The problem was not caught by unit testing because the tests had mistakes in them.
This is http://pear.php.net/bugs/5676, and I just fixed it in cvs
Thanks! That definitely worked. But now I have another issue hehe. I'm able to get as far as setting the remote-config property in remote.ini. At that point no matter what I set it to it either throws an error or just creates a pear directory below the local directory I'm sitting in. If I type:
C:\remote\pear\> pear -c remote.ini config-set remote_config ftp://user:pass@myremotehost.com/.pearrc I get an error saying "config-set: only the layers "user" or "system" are supported". I have .pearrc in /home/user/pear on my webserver and yes, I am changing the user and password information in the string to my ftp connection information. Any ideas? Thanks
Hi,
Is your PHP by chance the CGI build rather than the CLI build? I've noticed all kinds of weird behavior from the CGI version of PHP with PEAR at different times, and it would be helpful to know this to find the problem.
I've followed these directions several times and I just can't seem to get it to work.
I'm using Fedora Core 3. I have done a pear upgrade-all. The process seems to work fine, but it never actually uploads anything to my ftp server. It doesn't even seem to try. Any ideas what could be wrong?
Yah. I have Net_FTP installed both system wide and with the local/remote config.
[james@delta pear]$ pwd /home/james/remote/pear [james@delta pear]$ pear -c remote.conf config-get remote_config ftp://user:host@myftpserver.net/.pearrc [james@delta pear]$ pear -c remote.conf install -f --alldeps HTML_Quickform downloading HTML_QuickForm-3.2.5.tgz ... Starting to download HTML_QuickForm-3.2.5.tgz (97,612 bytes) ......................done: 97,612 bytes install ok: channel://pear.php.net/HTML_QuickForm-3.2.5 that's basically all it outputs. I've tried a variety of packages. I've tried the whole process as root, and as a non-priv user. None of them seem to even try to do the upload.
I'm getting the same results. Does anyone have a possible solution for this?
Same results here as well.. Anyone knows how to fix this?
I have a website on shared unix host and I develop from a windows desktop. Do I follow the Unix instructions or Windows instructions?
Hi Blue Star,
I am in the same boat, developing on windows and trying to installed on a shared linux host. I have all of the problems on this page! If anyone knows if it is possible to install on windows while doing a remote install on linux let me know. I may just copy down every thing in the webinstaller, use the rmdir script to delete the files, and copy it back under my user id. Seems like a pain. What I would rather do is create a script that would run on the linux host that allows me to input CLI commands to install and uninstall, etc, using the nobody id. If WebInstaller can do it why can't it be done by me? Does such a simple script exist? thanks! WTF
You guys are writing in the programming stratosphere. I've read lots of low-level PHP books and can't make the least bit of sense of what you're talking about.
Is there yet another book I should read before trying to attempt this stuff?
Hi Stu,
Don't worry, you need not be overwhelmed by the complexity. Since you have already read many books, what I recommend you do now is log at least 100 hours of plain hacking. Just try to *do* something with PHP. Choose a basic thing to write, even if someone else has already done it, and try to write your own version. This way, you will learn (as I did) the basics in a way that is helpful. For instance, I was extremely confused by the dereferencing syntax of objects for about an hour when I was first learning PHP. Why? I was trying to do this: $this->$varname; instead of: $this->varname Also, make friends with the REST interface to php.net. If you are trying to figure out how to use strpos, simply type: php.net/strpos and voila - instant helpful documentation. Even if the function doesn't exist, php.net will suggest a bunch of functions that might be what you're looking for. At a certain point, all the CS/book learning/vitamins in the world will not help you one bit unless you start making your own mistakes and learning from them. Very early on, you need to develop a system for debugging that will allow you to easily and quickly track down the source of a problem. There are several ways to do this in php (var_dump() and company, using an echo followed by exit; to see which line is crashing, etc.), and this will be far more important than any patterns you choose to develop with initially. The first thing you develop will suck, no matter how many design patterns you've studied, no matter how much theory you think you understand. Until you work with a living, breathing machine (well, ok, it's a metaphor), and learn the idiosyncracies of the language, nothing is really all that helpful. So, go out and do! I'll be interested to hear your progress. As you do, of course, study the source code of others, it will give you ideas. The pear repository, zend framework, symfony, and a host of others all have public CVS repositories, you can study how people have done things. phpclasses.org sometimes has useful things, but beware using the site to learn PHP, as many classes are not coded well, and the site is designed to accept all submissions without quality control beyond user voting. Once you feel comfortable with the language, start integrating the well-tested code of PEAR and other repositories into your toolkit, and you'll understand completely the "stratospheric" stuff you're seeing
HI Greg
Thanks for your encouraging reply. I was writing out of frustration and didn't expect anything. I'll let you know about my progress eventually. Meantime, as a Mac user (I've been reading your blog) I never have problems with equipment and my computer hasn't crashed in months. Macs have a few network issues, but nothing like you're talking about. Again thanks Stu |
Links in this article
PEAR Installer ManifestoCalendar
QuicksearchMy Latest ReleasesTop Exitspear.php.net (268)
www.php.net (105) pecl.php.net (80) pear.chiaraquartet.net (57) cvs.php.net (32) Blog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||
The Pear Installer is my favorite feature of Pear, and I have often thought about ripping up the Xaraya installer and Modules section to do something similar. However, it always comes back to the usability of Xaraya that I can't seem to shake my mind from. Greg Beaver has a very nice small tutorial on how to install Pear Packages minus the command line interface. It takes you step by step when you are without the sbell access. Imagine Xaraya 2.0.0 with a simple click from the modules to load the new module or upgrade up from whereever. Imagine the includes sitting outside of the webroot in the include path where all you have is an index.php and var folder (prolly outside of the webroot as well) which can be updated as simply as well. For shared providers it would be easy to have multiple implementations on the box because Xaraya is in the same path as the rest of the Pear utilities. Not quite Nirvana, but man, I certainly think its an idea worth exploring for the next versions.
Tracked: Mar 20, 03:44
I agree with Sean (What's under YOUR hood?), it's very useful to discuss the tools we use for development. When I started PHP development 4-5 years ago, a simple texteditor and an FTP client was enough to achieve my goals. During the years I've quit my
Tracked: Jun 15, 03:09