"sh configure.sh" and "sh secure.sh" no

bakura82

Joined: 2002-09-28
Posts: 14
Posted: Wed, 2003-01-01 18:07

I upgraded from v1.3.1 to v1.3.3 and did everything the readme said. I have a problem though.

I ran "sh configure.sh" to begin the upgrade as it said to do. I copied the new files on top on the existing program. When I ran "sh secure.sh" it gave me the following error:

Quote:
$ sh secure.sh
chmod: getting attributes of `setupr': No such file or directory
: command not found
secure.sh: line 18: syntax error: unexpected end of file

I couldn't get it to work, so I just chmoded he setup dir to 0 and the config file and the htaccess file.

The gallery works and the album has been updated, but when i try to run "sh configure.sh" or "sh secure.sh", they no longer work after the upgrade.

When I run the configure.sh, I get the following:

Quote:
$ sh configure.sh
chmod: getting attributes of `setupr': No such file or dire
: command not found
configure.sh: line 22: syntax error: unexpected end of file

I have reuploaded the files a few times and I am just not sure why they won't work with the new version any longer.

Does anyone have any idea what happened?

Thanks.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Wed, 2003-01-01 21:10

Try uploading the files in ASCII mode (with your FTP client).

 
bakura82

Joined: 2002-09-28
Posts: 14
Posted: Wed, 2003-01-01 21:17

:lol: Thank you, but that isn't the problem. *grin*

I searched the forums and such and haven't found a problem like this, so I am not quite sure why these sh files aren't executing their batch routines correctly.

Any more ideas folks?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Wed, 2003-01-01 21:20

If you type something like this at the shell

$ pico configure.sh
or
$ nano configure.sh

Do you see little ^M or weird characters at the end of the lines?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2003-01-01 22:07
Quote:
Thank you, but that isn't the problem. *grin*

Actually, that is the problem. When you unzipped the files on your windows box, your unzip program (Winzip?) converted all unix style linefeeds characters to carriage-return/linefeed combos. Basically, it tries to do an intelligent conversion of the file format from unix-style to windows style. But then when you uploaded it back to a Unix box, you did it in binary mode, which tells ftp not to convert the characters back.

If you ftp configure.sh and secure.sh to your ftp server in ASCII mode, it will properly convert carriage-return/linefeed back to just linefeed and this problem will go away. Try it.

 
bakura82

Joined: 2002-09-28
Posts: 14
Posted: Fri, 2003-01-03 12:36

Thank you bharat. It still wasn't working actually, so what I did was simple recreate the files with my text editor, save them, and reupload them. (I have been doing it in ASCII the whole time.) For some reason that worked. I am not completely sure what was messed up where, but I suppose it happened during the WinZip decompression like you said.

Thank you all for your assistance. :smile: That is why this gallery rocks. Awesome script. Awesome support. Awesome community.