relay

relay

Posted by: pooyall
Posted on: 2007-07-04 05:09:00

a script for uploading files.

the official site http://ecosmear.com/relay/

the dh wiki entry http://wiki.dreamhost.com/Relay

now my problems;

I have installed relay using the dh wiki article.

the article states that,

"You should now see a "log" where the last line is

Verifying Perl Installation... for the upload script @ http://yourdomain.com/relay/upload.pl?test ...done..."


when i follow the instructions i end up with this,

"Verifying Perl Installation... for the upload script @ http://www.hoofitbreaks.com/relay/upload.pl?test ...the upload.pl script seems to be having problems. Try chmod 755 to upload. You may also need to change the 1st line to reflect the path to your perl installation, or in iis map the .pl extension to the perl executable. You may need to enable mod_cgi for .pl files. Look at the Relay Wiki on this topic for more troupshooting."

upload.pl is executable already (755), and the first line of the script is "#!/usr/bin/perl" which is what it should be, im unsure what enabling mod_cgi means/does.


also when i run this command,

"perl ./mysite.com/relaydir/upload.pl" (as suggested on the relay wiki)


i am given this error

""Can't locate conf.uploader in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./mysite.com/relaydir/upload.pl line 8."


if i browse to my site using ftp commander, i can see that the file conf.uploader is infact sitting in the relay folder...



can anybody help me diagnose and fix these problems?


thanks. tom.

Re: relay

Posted by: Atropos7
Posted on: 2007-07-04 08:33:00

Edit upload.pl, and change line 8:

require "$path";

should be

require "/path/to/conf.uploader"


cool openvein.org -//-

Re: relay

Posted by: pooyall
Posted on: 2007-07-04 10:46:00

so change line 8 to read...

require "/mysite.com/relay/conf.uploader"?

Re: relay

Posted by: Atropos7
Posted on: 2007-07-04 20:28:00

There are two types of paths - absolute and relative. By relative, we mean relative to the "current working directory." And an absolute path will specify a specific starting point called the root directory.

Absolute paths will start with a /.

Relative paths may start with anything but a /. You might see paths start with a period, where the period stands for "current working directory" or two periods that stand for "parent directory."

On DreamHost each users files are stored in a home directory. The absolute path to this home directory is /home/.glob/username, but you can use /home/username for short in most cases.

Thus when using an absolute path in a Perl script for a file in a web directory, the path would look like

/home/username/domain/filename

Though in PHP you might have to do

realpath('/home/username/domain/filename')

- I don't code in PHP hardly so at the moment have forgotten the reasons this may be necessary.


cool openvein.org -//-

Tags: perl 5share perlusrpl scriptdreamhostwikilibmysiteupload scriptchmod 755dhexecutableuploading filesftp commanderinfactline 8