3.3 Upload fail, multiserver

ericttse1682

New Member
YetiShare User
Aug 2, 2012
10
0
0
Alright.

So I was really excited that 3.3 gave the ability to do direct upload/download

I tried it out, and when I upload it spit out
ERROR: There was a server problem when attempting the upload, please try again later.

However, the file does exist in the folder and I can download it.. it just wont spit out the "success/link" for the user
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi,

What's your site so I can test it?

Thanks,
Adam.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Ok. Can someone send me a way to replicate it on your site? i.e. an example of it not working. droidsrc.com is working fine for uploads at the moment.

If you can send it via the contact form I'll take a look.
 

xaver19862687

New Member
YetiShare User
Jun 27, 2013
35
0
0
ok files are going to the Server but there are some other Problems

1. The Error shows there was an Error with the Server (File is still going up to the FIleServer)
2. The File can´t be removed
3. when you are going to download the File (Link in the AdminCP) you are going (in my case) to s1.example.com and you are no longer logged in your account.. when you are going to login it doesnt go.

Lg.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
xaver19862687 said:
ok files are going to the Server but there are some other Problems

1. The Error shows there was an Error with the Server (File is still going up to the FIleServer)
2. The File can´t be removed
3. when you are going to download the File (Link in the AdminCP) you are going (in my case) to s1.example.com and you are no longer logged in your account.. when you are going to login it doesnt go.

Lg.
Can you send me temp ftp access aswell and I'll run some tests.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Yes file server. Or SSH SCP etc. Whatever is easier.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Ok your upload issue should be sorted. It was due to the port not being submitted in the referrer which caused an error in some validation checks when uploading. For other users, the fix is to replace the entire function called 'getReffererDomainOnly()' in includes/functions.inc.php with this:

Code:
function getReffererDomainOnly()
{
    // the referer isn't always available
    if (!isset($_SERVER['HTTP_REFERER']))
    {
        return false;
    }

    $fullRefererUrl = strtolower(trim($_SERVER['HTTP_REFERER']));
    $urlData        = parse_url($fullRefererUrl);
    $host           = $urlData['host'];
    if (($urlData['port'] != 80) && ((int)$urlData['port'] != 0))
    {
        $host .= ':' . $urlData['port'];
    }

    return $host;
}
Looking at your cross site session issue now...
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
The session issue is also fixed. It related to a difference between your PHP and MySQL time settings. I've reworked the function to use only MySQL so it'll work ok.

If anyone else has this issue, replace clearCrossSiteTokens() in includes/dbsession.class.php with:

Code:
public static function clearCrossSiteTokens()
{
	// allow only 60 seconds for the cross site transfers
	$db = Database::getDatabase(true);
	$db->query('DELETE FROM `session_transfer` WHERE UNIX_TIMESTAMP(date_added) < (now() - INTERVAL 30 SECOND)');
}
 

xaver19862687

New Member
YetiShare User
Jun 27, 2013
35
0
0
The session issue appeard here again

Can´t delete files on FileServer either
Upload = File is from FreeUser (IP Stand in ACP)
Download = Only as FreeUser not as Premium (Premium works fine when its on the local FileServer)
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Can you try again, ensuring you logout and back in first?
 

xaver19862687

New Member
YetiShare User
Jun 27, 2013
35
0
0
My Way:

Logout = Works Fine
Login = He keeps telling me (at "account_home.php") "Processing..."
Cookies Delete = /
Login = Works Fine (Not Anymore i can´t Login it says the same as in the Login before)
The Problem Appears
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
xaver19862687 said:
My Way:

Logout = Works Fine
Login = He keeps telling me (at "account_home.php") "Processing..."
Cookies Delete = /
Login = Works Fine (Not Anymore i can´t Login it says the same as in the Login before)
The Problem Appears
Which server is this on, is it the file server? The account_home.php script will probably only work on the main script server.

If it's the main site and still failing, can you send me valid script admin details again via PM.
 

xaver19862687

New Member
YetiShare User
Jun 27, 2013
35
0
0
This is on Main Server

Login is on both Sites impossible
FTP Data is in your inbox
i´ll try Script Admin Rights