Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 12:08 pm EST

Geeklog Forums

How to fix broken site_admin_url


Status: offline

Stu1879

Forum User
Newbie
Registered: 05/04/15
Posts: 5
I managed to make the admin pages (admin/configuration.php etc.) inaccessible by changing the site_admin_url setting through the configuration page (I was trying to set up admin access via a subdirectory of a separate domain so I could use an existing TLS cert). As the config pages were not working, I couldn't reset site_admin_url the normal way, so I changed it manually in the database by editing the corresponding row of gl_conf_values.

Unfortunately it doesn't work - if I set site_admin_url = 'http://my.domain.tld/admin' in the DB then my admin page links are generated as e.g. http://my.domain.tld/configuration.php

However, if I set site_admin_url = 'http://my.domain.tld/admin/' then the links are of the form http://my.domain.tld/admin//configuration.php

For some reason the /admin/ component of the path is being removed when I have the standard admin path set. Any ideas on how I can fix it? For the moment I have bodged it by directly setting $_CONF['site_admin_url'] in siteconfig.php, but I would like to be able to fix it properly. I have tried clearing geeklog template caches and browser caches, but this has not helped.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
If you change the config option manually from the database for the admin url you also have to change the length number of the string in the config as well. I forget how it exactly looks but one of the numbers is the length of the string so if you didn't change that to the new length number then your config will load incorrectly.

So http://my.domain.tld/admin would have length of 25 (if my counting is correct :-)

An easier way to fix this is to put back the install folder in the admin and run it. At the top of the install is the link to the Geeklog Emergency Rescue Tool. From here you can change a few of the major config options (including the admin url).

Here is a direct link

http://mw.domain.tld/admin/install/rescue.php

Tom
One of the Geeklog Core Developers.
 Quote

Status: offline

Stu1879

Forum User
Newbie
Registered: 05/04/15
Posts: 5
Thanks very much! I figured out the string length thing eventually after I saw deserialisation errors in the logs, but I had trouble posting a reply here earlier for some reason.
 Quote

All times are EST. The time is now 12:08 pm.

  • 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