Installation

From Relay

Jump to: navigation, search

Contents

[edit] Full Installation Guides

[edit] conf.inc.php

If you have error messages associated with creating conf.inc.php while installing that is probably attributed to file permissions. Try these commands. Where apache is the name of the username your server uses. Under SUse the webserver's name is wwwrun

chown apache relay/
chmod 755 relay/

g

[edit] Upload.pl

This will help with problems with upload.pl and the whole upload process

First lets identify the problem, with a web browser browser to your website and /relay/upload.pl?test. If you get "ok" then upload.pl should be working fine.

[edit] 500 internal server error

If the problem says something like 500 internal server error try the following, or premature end of script headers

First try changing the 1st line of upload.pl to point to you perl installation, something like this:

#!/usr/bin/perl

For installation on a windows server (especially DeveloperSide Net's Web Developer Suite), you will need to change this to point directly to perl.exe, using forward slashes to separate directories. For example:

#!c:/www/perl/bin/perl.exe

Devside.net has a good tutorial on configuring perl scripts that helped me get Relay running here.

I had the internal server error / premature end of script case. Solved with CR/LF conversion of the upload.pl file (win/unix).

[edit] Upload Hangs and halts

Every time I try to upload a big file (10MB+) it sticks at 0% for about 10sec which isnt much of a problem, but sometimes it stops at 100% and dosent do anything. If I cancel the files dont show up. I have talked to my ISP and they have set everything how it should be. Also everytime I install it tells me "Warning: file_get_contents(http://kttv.co.uk/relay/upload.pl?test) [function.file-get-contents]: failed to open stream: Connection refused in /home/sites/kttv.co.uk/public_html/relay/install/index.php on line 401" The CHMOD is correct. Help is really appreciated. Thank You.


  • UPDATE

Problem resolved, my server did not support 777 CHMOD, so i CHMODed it to 755.

Installation error was due to a command that is denied by my ISP and is on alot of ISPs. Installation is still fine.

[edit] You see source code

Apache isn't configured to execute cgis in your relay directory. You must manually enter the following into your webserver directive.

 Options +ExecCGI
 AddHandler cgi-script cgi pl

This is done via modifying the httpd.conf or in later distributions the default-server.conf (RedHat,SUse). Add the following lines there:

<Directory "/the/path/to/relay">
 Options +ExecCGI -Includes
 AddHandler cgi-script cgi pl
</Directory>

Then restart apache with:

/etc/init.d/apache2 restart

Note: If you are not using apache2 then use:

/etc/init.d/apache restart

[edit] File type always "text/plain"

On my default installation of Ubuntu 6.06, the MIME-type is constantly being given as "text/plain". This appears to be Apache's fallback for when it can't figure out the file type, but I'm having problems finding where to fix it - anyone care to shine a light? steve - twindx.com .

[edit] Re: File type always text/plain

I am having the same problem. I edited line 933-953 of "relay.php" as the following:

//    if(function_exists('finfo')){
//        $finfo = new finfo( FILEINFO_MIME,"$rootpath/inc/magic" );
//        $type = $finfo->file( "$folderpath/$filename" );
//    }else if(function_exists('mime_content_type') && mime_content_type("relay.php") != ""){
//        $type = mime_content_type("$folderpath/$filename");
//    }else{
    if (true) {
        if(!$GLOBALS['mime']){
            include_once("inc/mimetypehandler.class.php");
            $GLOBALS['mime'] = new MimetypeHandler();
        }
        $type =  $GLOBALS['mime']->getMimetype("$filename");
    }

Then, when I upload an MP3 file, the program records the file type as "audio/mpeg." This is good. But, when I try to download it, I see a blank page. There might be some trouble in getFile() function.

Junji, junyx.net

[edit] Problem is conf.php.inc

In the server error_log, there are conspicuous complaints about not being able to change headers, with a

Output started at conf.php.inc 21

Line 21 is the last of the file, BUT the file itself misses a php tag at the start. Adding that fixes the file type snafu.

OTOH, fileinfo appears not to be working at all (CentOS4). Without changing finfo references to finfo_open etc, the extension is not even recognized - and same goes for GD2, no icons here.

alf, www.forghieri.net

[edit] File Access Errors

Whatever the user is for the web server, it needs access to execute upload.pl and it needs access to write in the uploads folder, and where ever your virtual directory is. Here are some commands to get you started. Where apache is the name of the user account your server is using.

chown apache uploads/
chown apache filestore/
chmod 755 upload.pl
chmod 755 uploads/
chmod 755 filestore/


By setting the open_basedir in the vhost.conf file on linux with the path to relay solves all issues with permissions

[edit] LIBMAGIC ERROR

On a Debian system, I received an error when installing PEAR fileinfo. The error I received was:

checking for magic files in default path... not found configure: error: Please reinstall the libmagic distribution ERROR: `/tmp/tmpV6O8oa/Fileinfo-1.0.3/configure' failed

you need to run:

apt-get install libmagic-dev

then run the pear installation of fileinfo

[edit] Nothing happens when you click Upload

If http://YourServer/YourRelayDir/upload.pl?test returns 'ok' but nothing happens when you click on the 'Upload' button try selecting a file or directory first.

You need to select the directory you want to upload in first. Click a virtual directory or a folder within a virtual directory then try.

[edit] When Clicking Upload You See Zeros in the Upload Status, but nothing happens

God knows why this happens; there's no help for you.

- This might be to do with setting the upload.pl permissions, as this was the fix for me -
- Same for me. testing upload.pl gave OK, changing the permission fixed the upload status (755) -
- It took me 2 days 'till i made relay run, so here we go: chmod "uploads" to 777, "upload" to 777, "filestore" to 755 and "dump-inc" to 755 - this worked for me

  • IDEAS

- Check your "uploads" folder. For some reason, it wasn't a directory. if you look at conf.inc.php you see the Uploads path. Make sure it's a directory and make sure you chmod 755. This fixed it for me.

- Do not forget to upload the upload.pl file as an ASCII file and not binary.

- If all else fails, try chmod 777 both the filestore and uploads dir. Not the most secure way, but gets it to work sometimes.

Please note: these hints don't seem to help all users. There maybe other reasons for these zero's showing up.

[edit] Uploads out of directory

If have relay installed in a folder called admin (var/www/vhosts/site.co.uk/httpdocs/site/admin/relay What do i need to do to set my filestore out of this section to var/www/vhosts/site.co.uk/httpdocs/site/myfiles

I cant get it to work, i changed dbtable relay_clients to id=myfiles name=My files path to /var/www/vhosts/site.co.uk/httpdocs/myfiles

[edit] Upload Hangs With Large Files And Browser Tries To Download upload.pl file

Make sure in your http.conf or in your file in the sites-enabled/ directory for apache2 that you have the "-Includes."

<Directory /Path/to/files>
AllowOverride All
Options +ExecCGI -Includes
AddHandler cgi-script cgi pl
</Directory>

Also, make sure you have the libapache2-mod-perl2 package installed(at least for Ubuntu installs).

sudo apt-get install libapache2-mod-perl2

Then make sure you have the mod enabled.. In debian based systems you can do,

sudo a2enmod perl

This problem still occurs occasionally....

Personal tools
support