Page 1 of 1

Bug (5.75)?: Changes in Admin Settings wreck path includes

Posted: 2019-06-19 07:32
by onoehring
Hi,
I changed something in the Admin settings (Admin Area -> Utilities -> Admin settings).
This seems to recreate the config.php in root.
When I tried to edit a member after wards, I received this error
Not Found
The requested URL /admin/admin/pageEditMember.php was not found on this server.
Strangs. So I looked for it. Finally I noticed, that in config.php (fortunately there is a config.bak.php).

So in this config.php in line 6 $appURI is now defined: My editing (and I did not change any setting that could have forced changes to this variable) was suddenly 'admin' instead of '' (nothing). I removed the admin and set nothing again - and it works.

Maybe someone else should check on that to confirm.

Left: New, right: old (I messed up the extensions I noticed)
ec16.png
ec16.png (21.41 KiB) Viewed 2785 times
Olaf

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Posted: 2019-07-03 12:19
by a.gneady
Hmm ... I'm inspecting this issue now but unable to reproduce it. Is it possible to specify the URL of your admin settings page? I don't need to access the page itself so please feel free to obfuscate the domain name .. I just need to test how the URL is getting parsed to extract the $appURI value.

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Posted: 2019-07-03 13:14
by onoehring
Hi Ahmed,

it's something like
https://www.my-page.de/admin/pageSettings.php

I should note, that I added two lines of code to the bottom of the file (as I suggested here viewtopic.php?f=4&t=1369#p10162 ), after the closing bracket of $adminConfig = array( ); HERE MY CODE

Code: Select all

	//Auditor
	if (!(isset($_SESSION ['dbase']) && $_SESSION ['dbase'] != '')) {$_SESSION ['dbase'] = $dbDatabase;};
	include("$currDir/auditLog_functions.php");
Olaf

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Posted: 2019-07-03 21:55
by a.gneady
Thanks, Olaf. It seems this could occur if you're running your AppGini app on the domain root directly ... Please try this and if it works fixing this issue, kindly let me know to apply it in a hotfix release: Please open the generated admin/pageSettings.php file in a text/code editor, and find this line:

Code: Select all

'appURI' => preg_replace('/\/admin$/', '', trim(dirname($_SERVER['SCRIPT_NAME']), '/')),
Now replace it with this one:

Code: Select all

'appURI' => trim(preg_replace('/admin$/', '', dirname($_SERVER['SCRIPT_NAME'])), '/'),
EDIT: I forgot to mention one additional step: Please go to Admin area > Utilities menu > Admin Settings … Scroll down to 'Save changes' and click it (no need to make any actual changes though before clicking it). This is intended to update the config.php file to the correct app path. Afterwards, kindly check if the issue is fixed or not.

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Posted: 2019-07-04 04:12
by onoehring
Hi Ahmed,

yes, this works.
Of course it removes my additional code.
FYI: The application runs on the root of a subdomain.

Olaf

Re: Bug (5.75)?: Changes in Admin Settings wreck path includes

Posted: 2019-07-17 10:33
by onoehring
Hi,

I want to close this report as it is fixed in AppGini 5.76

Thanks
Olaf