Current time: 04-21-2014, 02:54 AM Hello There, Guest! (LoginRegister)

Post Reply 
PuTTY No such file or directory
10-28-2007, 06:41 PM
Post: #1
PuTTY No such file or directory
OK, I have been trying to setup a custom php.ini through putty, but I am having issues.
maybe I am not set up correct, maybe I am. anyways...

I have been following this wiki article: http://wiki.dreamhost.com/PHP.ini,
and when I get to the point of the article where it says:
Prepare for script execution, and I run this line In the shell:
chmod +x php-copy.sh

I get this error:
chmod: cannot access `php-copy.sh': No such file or directory

I have the file saved here:
ftp://tzfiles.com/tzfiles.com/cgi-bin/php-copy.sh

Could It be that I saved it in the wrong spot?

Thanks For all the help!

----------------

TzFiles.com
Visit this user's website Find all posts by this user
Quote this message in a reply
10-28-2007, 06:55 PM
Post: #2
PuTTY No such file or directory
The second tzfiles.com directory is redundant. It should be in /home/USER/tzfiles.com/cgi-bin/

Actually, the wiki states that it should be in your home directory, which would just be /home/USER/php-copy.sh

And you can always use fullpath for shell commands:
chmod +x ~/php-copy.sh

-Scott
Find all posts by this user
Quote this message in a reply
10-28-2007, 07:02 PM
Post: #3
PuTTY No such file or directory
Quote:The second tzfiles.com directory is redundant.
not if you look at it in an ftp window (windows)

anyways I moved it to the root dir:
/home/USER/php-copy.sh

I also tried the full path commands, and it didn't work either.

----------------

TzFiles.com
Visit this user's website Find all posts by this user
Quote this message in a reply
10-28-2007, 07:16 PM
Post: #4
PuTTY No such file or directory
Quote:not if you look at it in an ftp window (windows) ... anyways I moved it to the root dir:
/home/USER/php-copy.sh ... I also tried the full path commands, and it didn't work either.
If you do not understand how and/or why this process works, hacking about with it by moving things around is only going to pretty much guarantee that it *won't* work.

If you want it to work, I suggest you :

1) Start over

2) Follow the instructions precisely to the letter (including what goes where in the directory structure).

If you follow the instructions correctly, it *will* work as advertised.

If you want to configure it differently, that can work too, but only if you actually understand what you are doing, what has to go where, why you put things in various locations, and how to construct the appropriate commands in the shell.

Unless you do understand, or can learn enough to understand, those things, you are most likely to get it to work by following the instructions in the Wiki exactly.

--rlparker
Find all posts by this user
Quote this message in a reply
10-28-2007, 07:22 PM
Post: #5
PuTTY No such file or directory
Why when I do this:

~/

it says:
-bash: /home/ryanssh/: is a directory

but if I do this:
~/tzfiles.com

it says this:
-bash: /home/ryanssh/tzfiles.com: No such file or directory

???

----------------

TzFiles.com
Visit this user's website Find all posts by this user
Quote this message in a reply
10-28-2007, 07:38 PM
Post: #6
PuTTY No such file or directory
Quote:Why when I do this: ...
When you do *what?* It looks as though those responses are the result of some command that you did not have in your post.

Again: Your best chance of getting this to work is to just return your directories back to the way they were before you started, read and re-read the instructions until you understand exactly what to do in each step, and then follow the instructions *one step* at a time.

There are *many, many* threads in these forums about this subject, and I can't believe that every possible way this can be screwed up has not already been discussed. You may find some information that will help you understand what you are doing if your review some of those discussions.

In every case, the *end result* has been the same : follow the instructions precisely and it will work.

If you start over (from the *very beginning*) and post back with the exact circumstance (details of what files are where, what you type at the command line, what directory you are in when you typed it, etc.), someone can likely help you with it - but I can't make enough sense out of where you are in the process and what you have where to try to figure it out from the information you have given.

--rlparker
Find all posts by this user
Quote this message in a reply
10-28-2007, 07:41 PM
Post: #7
PuTTY No such file or directory
I firgured it out... almost.

First off, I was using a user who didn't have any access to the tzfiles.com directory.

the sh files now does what it is supposed to, except for this:

Can't open /home/ryannaddy/tzfiles.com/cgi-bin/php.ini: No such file or directory.

Is it supposed to create a file or something? It did for php.cgi

File I am using btw:

#!/bin/sh
CGIFILE="$HOME/tzfiles.com/cgi-bin/php.cgi"
INIFILE="$HOME/tzfiles.com/cgi-bin/php.ini"
rsync -a /dh/cgi-system/php5.cgi "$CGIFILE"
# REMOVE THE FOLLOWING LINE TO CREATE THE UPDATE-ONLY SCRIPT:
#cp /etc/php5/cgi/php.ini "$INIFILE"

perl -p -i -e '
s/.*post_max_size.*/post_max_size = 100M/;
s/.*upload_max_filesize.*/upload_max_filesize = 100M/;
' "$INIFILE"

----------------

TzFiles.com
Visit this user's website Find all posts by this user
Quote this message in a reply
10-28-2007, 07:50 PM
Post: #8
PuTTY No such file or directory
You need to actually change to the directory that file is in.
You do that by using the "cd" command, which stands for "Change Directory".

So let's say you're in ~/ which also means the root of your home directory (ie. /home/username). You need to change to whatever directory you created the php-copy.sh file in, like this: cd ~/mywebsite.com/

If you aren't sure where you are, you can type "pwd" (Present Working Directory), which will show you which directory you're in. If you want to make sure the php-copy.sh file is in the directory you're currently inside, type "ls" (list) and it'll give you a listing of the directory's contents that you're in.

Good Luck.

--------------------------
Chips N Cheese - Custom PHP installs and the like!
Visit this user's website Find all posts by this user
Quote this message in a reply
10-28-2007, 08:04 PM
Post: #9
PuTTY No such file or directory
I GOT IT TO UPDATE!!

Im sorry for everything...

Now time to test it!

----------------

TzFiles.com
Visit this user's website Find all posts by this user
Quote this message in a reply
10-28-2007, 09:11 PM
Post: #10
PuTTY No such file or directory
Hooray for Mousee! I just *knew* you could help get this sorted. Wink

--rlparker
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: