Topic: Subdomain installation error, like others....

I want to use this nice script in my subdomain. But I'm getting an error, just like other people.

And I know, I should use the right path of my server. I've read all topics here, but still, don't know why this won't work...

I want to use it on   http://upload.schoollife.nl/

I've edited the

$DOM_SCRIPT
$PATH_SERVER

still won't work...

Currently, I've uploaded all the files in my own site:

/subdomains/upload/httpdocs/

or better

/var/www/vhosts/schoollife.nl/subdomains/upload/httpdocs/

I've tryed all possible edits with these. What am I doing wrong?

$DOM_SCRIPT = $_SERVER['Could you help me please?']; // --> mysite.com
$PATH_SERVER = $_SERVER['Could you help me please?']; // --> /public_html (pssst.. NO ENDING SLASH!)

Thumbs up

Re: Subdomain installation error, like others....

read instruccions again in config.php

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: Subdomain installation error, like others....

I did, that's why I started with this topic....

Thumbs up

Re: Subdomain installation error, like others....

Now I changed it to another dir with these in my config

$DOM_SCRIPT = $_SERVER['http://upload.schoollife.nl/up']; // --> mysite.com
$PATH_SERVER = $_SERVER['/var/www/vhosts/schoollife.nl/subdomains/upload/httpdocs/up']; // --> /public_html (pssst.. NO ENDING SLASH!)

still not working...

Last edited by Nawid (2009-12-06 14:42:44)

Thumbs up

Re: Subdomain installation error, like others....

when you open config.php it says something like this:

///////////////////////////////////////////////////////////////////
///// DO NOT EDIT BELOW THIS - (do it if the script can't run) ////
///////////////////////////////////////////////////////////////////
 
// SERVER ///
/* We get this values with $_SERVER. If your server doesn't resolve this values The script will not work.
   If the script doesn't work, you must change this values to be like values in the comments (see the exaple below) */

 
$DOM_SCRIPT = $_SERVER['SERVER_NAME']; // --> mysite.com
$PATH_SERVER = $_SERVER['DOCUMENT_ROOT']; // --> /public_html (pssst.. NO ENDING SLASH!)
 
    // example:
    # $DOM_SCRIPT = 'mysite.com';
    # $PATH_SERVER = '/public_html';
    /* Btw, you can check this values by uncommenting this: */
    // echo 'DOM: '.$DOM_SCRIPT.' - PATH: '.$PATH_SERVER;

Look in the example...
Does it says "edit the $_SERVER[''] value"?

$_SERVER['http://upload.schoollife.nl/up'] is ridiculus and has no sense. $_SERVER is an array that contains information about the server. Please read http://php.net/manual/en/reserved.variables.server.php

So pretty please... Read the instructions carefully. I have seen this error a lot of times... You are too lazy to get this.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: Subdomain installation error, like others....

you're totally right, sorry....

I changed the dir again and still it's not working, I've read the whole config...

it looks like this at the moment

///////////////////////////////////////////////////////////////////
///// DO NOT EDIT BELOW THIS - (do it if the script can't run) ////
///////////////////////////////////////////////////////////////////
 
// SERVER ///
/* We get this values with $_SERVER. If your server doesn't resolve this values The script will not work.
   If the script doesn't work, you must change this values to be like values in the comments (see the exaple below) */

 
$DOM_SCRIPT = 'upload.schoollife.nl'; // --> mysite.com
$PATH_SERVER = '/var/www/vhosts/schoollife.nl/subdomains/upload/httpdocs'; // --> /public_html (pssst.. NO ENDING SLASH!)
 
    // example:
    # $DOM_SCRIPT = 'mysite.com';
    # $PATH_SERVER = '/public_html';
    /* Btw, you can check this values by uncommenting this: */
    // echo 'DOM: '.$DOM_SCRIPT.' - PATH: '.$PATH_SERVER;
 
// FTP MODE //
/* Use this if you want to upload the files through ftp php (http://php.net/ftp). This is handly when your server config don't
   allow to upload files without CHMOD 777, like almost all the cPanel. Using this, you can forget the CHMOD wink */

$use_ftp = false; // true: Uses ftp to upload files - false: Upload without ftp.
$ftp_host = $DOM_SCRIPT; // Change this if your ftp host is not the same as your mysite.com -- example: $ftp_host = 'ftp.mysite.com';
$ftp_user = ''; // valid username.
$ftp_pass = ''; // Valid password.
// NOTICE: FTP user must have access to the script folder.
 
 
///////////////////////////////
/// DO NOT TOUCH BELOW THIS ///
///////////////////////////////
 
// PATH //
/* Uhhh.. Can't touch this!. */
$path = dirname($_SERVER['PHP_SELF']);
if (strlen($path)>1) {
    define('PATH_SCRIPT', $path.'/');
} else {
    define('PATH_SCRIPT', $path);
}
 
// URL //
/* Uhhh... Uhhh.. Can't touch this!. */
define('URL_SCRIPT', 'http://'.$DOM_SCRIPT.PATH_SCRIPT);
 
?>

Last edited by Nawid (2009-12-07 13:46:28)

Thumbs up

Re: Subdomain installation error, like others....

hmmm.... I don't know why it just won't work... So I installed in http://www.schoollife.nl/upload/ and now it works.
I think I'm going to redirect upload.schoollife.nl to http://www.schoollife.nl/upload/

Thumbs up