[geeklog-devel] Web Installer and integrated online config testing

Blaine Lang devel at portalparts.com
Sat Sep 1 18:17:31 EDT 2007


Dirk Haun wrote:

> There's a bit of a chicken-and-egg problem here, since you don't have $_CONF['site_url'] yet and therefore can't safely do the redirect.


For admin/install.php  - a simple file with the following appears to 
work fine:
    header("Location: index.php");

Now for index.php could we not use (if we detect GL has not yet been 
installed).
    header("Location: admin/install/index.php");

How to tell if GL has been installed with no DB access yet - well we 
could create a lock file at the end of the install process is one way. 
This would work for the 1.5 GL upgrade as well since this local file 
would not exist yet.

Blaine

Dirk Haun wrote:
> Blaine Lang wrote:
>
>   
>> Maybe even have public/index.php redirect to the admin/install/index.php 
>> if the site has not been installed yet.
>>     
>
> Heh, I had the same idea earlier today. There's a bit of a chicken-and-
> egg problem here, since you don't have $_CONF['site_url'] yet and
> therefore can't safely do the redirect.
>
> I tried this (in lib-common.php):
>
> require_once 'siteconfig.php' ;
> if ($_CONF['path'] == '/path/to/geeklog/') {
>     echo COM_refresh("admin/install/");
>     exit;
> }
> require_once $_CONF['path_system'] . 'classes/config.class.php';
>
> That works for the index.php but not if you come in through, say, the
> staticpages directory. We can't use "/admin/install" since the site may
> be in a subdirectory. And figuring out the correct current URL and go
> from there is a bit nasty (see COM_getCurrentURL).
>
> bye, Dirk
>
>
>   



More information about the geeklog-devel mailing list