Welcome to Geeklog, Anonymous Wednesday, January 01 2025 @ 08:25 am EST

Geeklog Forums

Do backup --> www.admin.com?


Status: offline

tingo

Forum User
Chatty
Registered: 06/05/02
Posts: 57
Location:Oslo, Norway
Here is a new one, which I haven't seen before. I have a fresh installation of Geeklog 1.3.7sr1, and it works fine. Except for one thing. When I try to do backups, I get to the backup page, but when I press the "Do Backup" button, my browser tries to get the page
Text Formatted Code

http://www.admin.com/database.php
 
Why does it go to www.admin.com? I haven't been able to find this in any script. Before you ask, yes the path to mysqldump is correctly configured:
Text Formatted Code

$_DB_mysqldump_path = '/usr/local/bin/mysqldump';
 
So, what'ss wrong here?
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
When you press the button, the page is suppose to reload itself and pass via the post method that you want to do a backup. It uses $PHP_SELF for the reload. It looks like your server is having problems recognizing that built-in variable.
 Quote

Status: offline

tingo

Forum User
Chatty
Registered: 06/05/02
Posts: 57
Location:Oslo, Norway
Duh!
Well, of course it has problems with PHP_SELF, and I should have thought of that. As for why it has problems, se my comment about endless loop. The question is, is there an easy way to modify Geeklog so that it doesn''t depend on PHP_SELF, but always uses the site name?
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Just do a search across the files then replace that variable. You probably should look for $HTTP_SERVER_VARS too because the section of code causing your looping problem uses $HTTP_SERVER_VARS['HTTP_HOST'] not $PHP_SELF. There isn't that many GL core files which use these. Excluding the language files, I would say maybe half a dozen.

The database.php one is easy to fix. Just change this line replacing $PHP_SELF with the name of the URL to that file.
Text Formatted Code

$display .= '<form name="dobackup" method="post" action="' . $PHP_SELF . '">';
 
Why don't you add this to the bug list so it doesn't get lost.
 Quote

Status: offline

tingo

Forum User
Chatty
Registered: 06/05/02
Posts: 57
Location:Oslo, Norway
Ok, i sybmitted a bug request. The fix is: $display .= '<form name="dobackup" method="post" action="' . $_CONF['site_admin_url'] . '/database.php' . '">'; I hope this helps somebody.
 Quote

All times are EST. The time is now 08:25 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content