Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH - Pear Commands Failing - Any Advice/Suggestions? 1

Status
Not open for further replies.

kjv1611

New member
Jul 9, 2003
10,758
US
Hopefully, I'm asking this in the correct forum. I'm not sure, just figured this was the closest to what I'm asking about.

So the background: I've set up a few sites, and particularly have been using Drupal over the past few years. In that time, I've never really used SSH for anything, but wanted to learn. And in particular, I want to learn to use drush, a command-line utility for drupal sites.

So, here I go trying to follow instructions to install it with pear, and all I get are errors.

I think I have an idea as to the problem, but have no idea where/how to fix it.

I noticed that most examples/instructions for ssh commands are telling me to do things like:
Code:
mkdir /mynewdirectoryname

Well, on my web server, I get an error, permission denied. But if I instead do:
Code:
mkdir mynewdirectoryname
Then it works flawlessly, creating the new directory.

Well, when I try the command:
Code:
pear upgrade
and I'm getting this error:
Error getting channel info from pear.php.net: The value of config option cache_dir (/tmp/pear/cache) is not a directory and attempts to create the directory failed.

In case it helps any, I'm attempting this via Putty on Windows 7, connecting to a linux/apache web server.

I tried contacting tech support for the hosting company, but was told they (folks handling instant chat support) knew nothing of the pear/drush commands, so couldn't help... so I figured next best spot might be asking on a forum board.

Thanks for anything anyone can tell me.

And let me know if I need to provide anymore information.


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Well, I think if I could just figure out how to configure pear to drop the whole leading slash in all its commands, that'd take care of it. So far no go, as far as me knowing how to do that.. but I'm looking..

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Well... I may be making some progress.

I found the online pear manual here:

And so far I'm trying to change some configuration options... Was able to change the cache folder, so maybe I can fix it that way.


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
And... I don't have it working perfectly yet, but I did change those settings.... and I'm using a diff method than pear to get drush... found another video tutorial and so far so good.. [smile].

Anyway, if anybody can tell me anything on the pear side, that'd be great.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
the main issue is that the credentials you are using do not have sufficient permission to make changes to a directory structure outside of the home directory for those credentials.

this can be worked around, with a 'local' copy of pear, but the better method is if you can use sudo.

 
Yeah, sudo, I guess, won't work, since I'm not the head admin... using in a shared environment.

But I was able to get around (at least get drush working right) by creating a new path in the paths section of my home directory. So that's good.

I may piddle with the pear stuff later, and see if I can use sudo to do what I need.

Thanks for the suggestion.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
remember you do not actually to 'install' pear. (not the case with pecl). pear scripts are just collections of php scripts. you can always 'install' them on a box to which you have control and then copy across the library. the folder organisation is important.

 
Hmm... I had no idea.. I'll have to look into that myself. Now I need to do another Linux box at home just for this. [smile] Well, I guess I could just do a WAMP setup on Windows, but maybe.. maybe I'll just do a whole box. I guess the hardware wouldn't be terribly important, since it won't be used for anything else...

Chances are, that may not happen until Christmas or next year... so yeah, I guess I'm as slow as Christmas. [wink] I've got some time off coming up - some at thanksgiving, some at Christmas... but I don't know how much extra I'll have around Thanksgiving... and already have a "to do" list from various other items for those days.

I did get drush installed on the web server, without pear, but it would not work correctly still. It was saying something about the permissions being incorrect or something. And I saw mention of a drush.ini file or the php.ini file, but wasn't sure if I would just use the same php.ini file for the whole site, or whether I needed another. For that, I'll have to dig in more later on the drush side of things.

There I go blabbering. that's been me all day today. [spineyes]

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
consider taking advantage of an amazon ec2 server (free for the first year on certain products).
or perhaps a rackspace US server (around USD10 per month).

or even create a vm instance on your own computer?
 
Thanks for the suggestions... I've got extra hardware laying around the house anyway, so that's why I figure maybe just throw one together... maybe. I have stuff better than P4 just laying around, or at least in same category... at least an Athlon XP 3200, at least one Athlon 64... maybe an Athlon 64 X2... and oodles of various sticks of RAM, hard drives, etc. [smile]

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Oh.. and I did get around to submitting a ticket to the shared support where the sites are listed, and the support personel that responded stated that they think I'll just need to do a custom PHP.ini file for the Drush part of the problem... since it's no really working, don't know whether I posted that back here yet or not.. head's spinning with totally unrelated stuff at work. [spineyes]

But on the pear thing, definitely something I want to piddle with and figure out... eventually... hopefully sooner rather than later..

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
As an update... I think I got Pear installed/updated correctly the other day by messing around with some CPanel estensions. I had never paid much attention to the installers there, but once I got one piece setup (I forget what it was), was then presented with loads of possibilities. So I tried to install/upgrade pear from there, and it says it worked. However, i did not take the time, yet to look at it.

If that did work, I'll see if I can now get drush to install via the pear method, and perhaps that'll get me going with that... again. I was hoping to attempt a full drupal setup via drush, but gave up, and went with the old manual setup. I can always setup another test site, no big deal though..

Anyway, thought I'd share another update.. I'll post back later if I get to try and test to see if pear seems to be actually working now..

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top