Installation
From Relay
[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 SSH:
chown apache relay/ chmod 755 relay/
[edit] Upload.pl
This will help with problems with upload.pl and the whole upload process. Go to "http://YOURSITE.COM/RELAY FOLDER/upload.pl?test". If you get "ok" then upload.pl should be working fine.
If you get an error of some description, you should CHMOD the upload.pl file to something with more rights like 777.
[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
---OR---
Short tags are off and you simply need to replace the opening <? tag in conf.inc.php with <?php
[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.
- First check, if http://yourserver/yourrelaydir/upload.pl?test returns "ok". After this: the path of your "uploads" folder in conf.inc.php and conf.uploads must end with an "/". This solved 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.
[ 12 March 2009 ]
- I just made relay worked for me last nite ; try these steps.
1) Delete conf.inc.php and conf.uploader if they are already in your directory.
2) Set your root dir chmod for relay to 777.
3) Run installation script , make sure conf.inc.php and conf.uploader successfully created. Ignore the upload.pl error for awhile.
4) Change back your root dir chmod of relay to 755 , and chmod dir uploads and filestore to 777.
5) Try run the upload.pl [ http://www.yourserver.com/relay/upload.pl?test ] , it should trace "ok".
6) Try login and run your relay. It should work now. At least it worked for me. :)
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....
