Access Denied on all Admin Pages in Drupal 7 - .htaccess

I have installed Drupal 7 on a sub domain caihr.sieaegroup.com. I closed the browser and now am unable to log in to any of the admin pages. I get no login form and I am not using the default theme.
I have cleared cookies, tried different browsers but nothing works. Am I missing something? Do I need to update the .htaccess file?
This is the second time I have been down this road. The first was to reinstall drupal and start from scratch without logging out or closing the browser but I feel this is not the right solution.
Any Help is welcomed.

If you logged out and default theme can't provide proper login form you have to change to some functional theme and then login:
https://www.drupal.org/node/200774
It says:
activate a trusted theme
UPDATE system SET status=1 WHERE name = 'garland';
change the default setting
UPDATE variable SET value='s:7:"garland"' WHERE name = 'theme_default';
clear the cache tables
TRUNCATE cache;
TRUNCATE cache_bootstrap;
TRUNCATE cache_block;
Use phpMyAdmin or some similar tool to execute queries.

Related

Google chrome 84.0 does not show HTTP Auth popup dialog on Ubuntu 18.04

It simply shows:
{"error":"unauthorized","reason":"Authentication required."}
Same with Firefox 78.0.2
Is there a setting that will show this again?
How am I supposed to login to sites that require this (such as Couchdb/Fauxton)?
Any help appreciated.
As it turns out, it is a Couchdb setting that needed to be changed. Look in the httpd section of the local.ini file for the following lines and do what it says:
; Uncomment next line to trigger basic-auth popup on unauthorized requests.
;WWW-Authenticate = Basic realm="administrator"
For some reason it was working fine even without this up until a few months ago. One of my regular system updates, borked it.

UseLegacyUI Setting Not Working

I have ran a SQL script to update the UserPreferences.UseLegacyUI to 0 for all of the users in our 2018 R1 system but, the users are still getting the classic UI when they log into the system. Any thoughts on why this might be? We're trying to avoid every user having to change their setting in their profile.
EDIT: Users are having to switch to the modern UI every time they log in. Is there a cookie involved?
Try using the UserPreference graph to change that value, that's how it's used in 'Main.aspx.cs'. Sometimes there's code in event handlers that needs to be executed too:
PX.SM.SMAccessPersonalMaint prefGraph = PX.Data.PXGraph.CreateInstance<PX.SM.SMAccessPersonalMaint>();
PX.SM.UserPreferences prefs = prefGraph.UserPrefs.SelectSingle() ?? prefGraph.UserPrefs.Insert();
prefs.UseLegacyUI = false;
prefGraph.UserPrefs.Update(prefs);
prefGraph.Persist();
There was an HTTP redirect set in IIS on both the web site and the web application that was causing this. I suspect this was a hold over from the 5.3 installation but, not sure. Removing the redirect from the web application and removing the "/main.aspx" from the web site redirect cured this issue.

How to disable users to go to folders in my directory via the url bar on my website? Is it safe for users to look into my directory like that?

Ive made a website, but anyone can get into the files in the directory of my website. For example if you type "www.mysite/css/stylesheet.css" you get to see all my css code. Now its not a problem that a user can see my css.
I was wondering if it is safe that users can see into my directory like that?
Do you have a login system because if so you can use the session to check if they are logged in. if not you can always just make a session using Session_start();
and then check if they if(!$_SESSION['login_user']){
header("location:../index.php");
exit;} for example. i suggest using a login system for it though this isn't really a css related question. more a php html question.

Kentico Forcing New Website

I have backed up the Kentico Database and website from one of our Live servers and placed it within our Dev server and configured the website in IIS.
When I navigate to the website, it currently asks for New installation.. Whereas it should just show me the current website.
How do I get it to show the website?
EDIT
The following error occurs when going ahead and creating a new instance with the restored Database:
Restore the backed up database and add database connection string to the web.config of the application. Simple as that :)
Who or what is set as the DB objects owner/schema in the DB? Does this match the setting in Site Manager (or, CMS_SettingsKey table)? I would make sure these two match.
Another option is that the connection string was not initialized by .Net - I would do a dummy change in the web.config file to force the app restart and/or also clearing the .Net cache.

How to open new window's from XUL Browser?

I'm wondering, is it even possible to treat the request for the Xul Browser component to open a new window? I tried changing the window.open function, but looks like it's never called.
All links that open in a new window are not opening in my application.
I found this page on the subject, but the provided solution is showing no different behavior.
Any hint on this?
(by the way, I'm developing a stand alone application, not a Firefox's extension)
I'm assuming you are in a XULRunner application, and that you are trying to load a chrome URL from a non-chrome source in a browser (e.g. HTTP or local file). While enabling UniversalXPConnect and UniversalBrowserWrite can be helpful, they are also a security risk (since any arbitrary script on the web could use them), so they tend to be disabled in browsers (for example, running that line in Firebug will give you an exception):
>>> netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
Error: A script from "http://stackoverflow.com" was denied UniversalXPConnect UniversalBrowserWrite privileges.
How about you try using codebase security principals and see if that makes a difference? (http://www.mozilla.org/projects/security/components/signed-scripts.html#codebase). For me in Firebug it does allow me to get the additional permissions after I OK it with a big, nasty looking dialog), but still doesn't allow me to open a Chrome URL with window.open. The next step is probably to try changing your conf file to use contentaccessible so that the relevant parts of your content are accessible (see https://developer.mozilla.org/en/Chrome_Registration#contentaccessible).
To avoid the nasty message when elevating permissions, you could try setting permissions for the right files automatically as described at http://forums.mozillazine.org/viewtopic.php?f=38&t=1769555.
Also, make sure you check the browser type (https://developer.mozilla.org/en/XUL/Attribute/browser.type). If the browser type is not chrome, then it might be worth trying making it chrome and seeing if that makes a difference.
If any of my assumptions are wrong get back to me and I will try something else.
does normal js not work?
window.open(url,windowname,flags);
There are two ways that I know of.
The first is to set the browser.chromeURL preference to a chrome URL that contains a <browser type="content-primary">. The page that the content window tried to open will load into the given browser.
The second is to set the property window.browserDOMWindow with an object that you define to implement the nsIBrowserDOMWindow interface. This allows you to divert the open call into a tab, if you are using a tabbed interface. Note: the tabbed browsing preferences must be set to allow windows to be diverted into tabs, otherwise XULrunner will fall back on browser.chromeURL.

Resources