0

I have a local install of a Drupal 7 site that will only display admin pages over https such as login and admin type pages. I was unable to disable them before downloading the database. In settings.php I have set secure pages to 0. However when i attempt to login the page simply refreshes and the form is displayed again and i am unable to visit any admin pages. Is there a way to login using mysql instead of having to go through Drupal?

EDIT:

finally got drush running correctly and used drush cc all after attempting to sign in i got the error message: Warning: Cannot modify header information - headers already sent in _drupal_bootstrap_page_cache() Warning: Cannot modify header information - headers already sent in drupal_send_headers()

the latter is repeated 7 times, the page simply refreshed again.

I ended up creating a temporary sign-in using drush command: drush user-login

1

Sounds like you need to do the following:

  1. Set the securepages_enable to 0 in settings.php
  2. Open a MySQL Client, like HeidiSQL or SQL Pro
  3. Truncate the cache_ tables
  4. Reload local site in browser

This should rebuild the variables and then your runtime value will be respected.

Also, check the .htaccess file to see that you are not being redirected to HTTPS.

  • i ran drupal_clear_all_caches() from html.tpl.php and was still unable to login. the page simply refreshes. I did notice that the site stayed at localhost rather than switching to https localhost/. I commented out the following lines from .htaccess also #RewriteRule ^ - [E=protossl] #RewriteCond %{HTTPS} off #RewriteRule ^ - [E=protossl:s] – blu Sep 26 '16 at 20:56
  • Wait, what? You should be using drush or a mysql client. – Kevin Sep 26 '16 at 20:57
  • i'll try that also it just takes a while to clear them one by one, also installing drush now – blu Sep 26 '16 at 21:00
  • In a MySQL client you can just highlight the tables, right click, truncate - or equivalent command. – Kevin Sep 26 '16 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.