Jump to content

Script redirecting to DOCUMENT_ROOT. How Do I stop it?


lifetalk

Recommended Posts

OK.. this seems to be a complex problem.. atleast.. for me !! :S

 

Here's how it goes...

 

I was trying to install a script.. and for some reason, it was redirecting me to a freaky URL everytime I clicked Begin..

 

After hunting around everywhere, etc... I found the following..

 

The script... the install.php file... has the following code in the end..

 

Function _TemporaryAutoConfig()
{
global $CNK;

$CNK->__aCfg = _LoadConfiguration();

$CNK->__aCfg['PATH_BASE'] = TOP_PATH;

$CNK->__aCfg['PATH_IMAGES'] = $CNK->__aCfg['PATH_BASE'].'cnk-img/';

$_sDcRoot = $CNK->__aSys['SERVER']['DOCUMENT_ROOT']."/";			
$CNK->__aCfg['URL_BASE'] = preg_replace( "#^".$_sDcRoot."#", "", $CNK->__aCfg['PATH_BASE'], 1 );
$CNK->__aCfg['URL_BASE'] = "http://".$CNK->__aSys['SERVER']['SERVER_NAME']."/".$CNK->__aCfg['URL_BASE'];

return True;
}

 

This.. from what I (a php n00b) understand.. is asking the script... to redirect to DOCUMENT_ROOT when the installation is started.. or ... when the user starts the installation..!!

 

Since my document root is something like

home/admin/domain.com

 

the script is redirecting it to

http://www.domain.com//home/admin/domain.com/subdir/install.php

 

Now.. the question here is...

 

How do I ask.. or configure this script.. or that above piece of code...

to not do ANYTHING...

instead of adding stuff, replacing it (preg_replace??).. etc

 

simply continue with

http://www.domain.com/installdir/install.php

 

etc etc??

 

Any help?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.