Support»Separate Admin

Separating admin.php From the Gallery Tree:

For some server installations it's necessary to put admin.php in a separate directory to get password protection working. This is a Quick-Step Guide for doing that.

Once you place admin.php in a separate directory, all you need to do is tell each of the scripts where the other script is located.

The directory structure for my test installation looks like this:

 test/
 |-- qdig/
 |   |-- P4133635-b.jpg
 |   |-- index.php
 |   `-- qdig-files
 |       |-- captions
 |       |   `-- P4133635-b.jpg.txt
 |       `-- converted-images
 |           `-- med_P4133635-b.jpg
 `-- admin/
     |-- .htaccess
     |-- admin.php
     `-- qdig-admin.ico

Note that in this example I'm using .htaccess for authentication instead of using the built-in authentication.

Five lines were changed to get this working.

Lines 67, 96, and 100 of admin.php v20041223:

 //$this->login_auth = array( => );

 $this->base_dir = '/home/haganfox/public_html/test/qdig';

 $this->web_dir  = '/haganfox/test/qdig';

Lines 67 and 68 of the Qdig 1.2.5 script (index.php):

 $admin['script_file'] = '/home/haganfox/public_html/test/admin/admin.php';
 $admin['full_url']    = '/haganfox/test/admin/admin.php';