I am a newbie working on a site in 5.1. Things have been going along okay for some weeks now. I'm installing modules, administering the site, etc.
Yesterday I downloaded a few new modules in my sites/all/modules directory to try them out, but did not actually install them. I noticed there was no sites/alll/themes folder, which seemed odd because, though I have not used it, I seemed to recall one there previously. So I created the themes folder on my server without adding anything to it.
The next time I logged into my site, I saw that the initial install menu--the one that gives first-time directions on doing the initial administration of a drupal site--now came up instead of my homepage screen.
I had to leave, so decided to set up the "site offline" option and fix it the next day.
Now today when I try to access my site using the admin login, I am redirected to a "site offline" screen--so though I can log in, I have no access to the tools I need to administer the site.
Any clue how this might happen or what one might do to investigate or solve the problem?
Thanks.
Comments
yourdomain.com/admin
AFAIK, after u log in, even if u dont see any links or seem not to have access to stuff, if u write - ie - yourdomain.com/admin/themes in the url field, u should get to the theme administration page?
That way, u would get the admin-links, thus enabling u to check for theme-settings, to make sure the right themes are set to active /default and such...
Just a quick idea...
I am very new at this though, so...
Good luck!
A.S.
Thanks, but no go
Thanks for the suggestion, but that also takes me to a "site offline" page, as does the login method described here: http://drupal.org/node/56995 whether for a 'clean urls' link or not. I am perpetually redirected to a "page offline" notice.
I am now wondering whether I will have to try the method described here: http://drupal.org/comment/reply/116053/196944 of modifying the index.php file as follows:
Sounds easy (heh!). But this would mean relying on these instructions as infallible, as I have no php experience except modifying a few small lines of code according to clear instructions.
Any tips? Other ideas for alternative approaches? Suggestions on a good, bracing drink before I actually try this?
Thanks
Access to db?
Yeah, if u have access to the db, I would definately go that way - #2 in posting above.
Also, if all your changes yesterday where on the file level - remove the folder you made, and also the module folders - then add one by one, and test site to find out where the culprit is.
You say you didn't activate any of the modules, so this should be possible.
No Guts, No Glory
So I decided to take a "no guts, no glory" approach and go ahead and try the method above, sans liquid courage, to get into my site. It seems to work fine, up to a point. I edited the index.php file and was able to login with my admin password. But a new problem comes up when I get to this instruction:
"(T)urn the site status option to online again."
Because there seems to be no way to accomplish this. I see a green line of text on my admin page that says: "Operating in off-line mode." But the text is not a link to toggle the on/off-line options. And although I see my admin menu in the sidebar and can click down to the 'Site Maintenance' menu item, clicking that item, or anything else, still brings me back to the same line: "Operating in off-line mode."
Any ideas for next steps?
Thanks!
The table
The table is the table in the database, it now holds the value saying to keep your site in offline-modus. Do u have access to the database - through phpMyAdmin or direct access to the server where it is located?
Because, changing the field directly in the database would/should set your site to online again - thus enabling you access - but, like I also suggested, undo the folder/file-changes made in the file structure yesterday, just to make sure things aren't so cluttered, then try adding one at a time, to be sure things work as they should :-)
Let me know how goes!
A.S.
Offline to Online
as i know, there are 2 ways to make your site online again:
1. open www.yourdomain.com/user then login using administrator user (user with ID = 1)
2. open Drupal table: variable. Then find this line:
site_offline,
change the value to:
s:1:"0";
I guess you have install a module that alter/add/edit Drupal access control, this kind module can bring your site back to virgin Drupal page, look like you do new Drupal installation!
Drupal table?
Thanks for the suggestions. I tried the first approach you suggest previously and it did not work. I am still at the mid-point in the edit index.php method described further above. But I am curious about the second method you suggest. What is "Drupal table: variable" and where would I find it? If it seems workable I may give that a try.
database query
Okay, getting closer (I hope). I see at this page http://drupal.org/node/56995 a suggestion similar to your suggestion about the Drupal table. It is described as follows:
I don't know if I am "truly desperate" yet, although I may be soon. But I sure don't know how to run a database query. Any tips? I do have access to my server, so I'm guessing that it is manageable if I can only find out how to do it.
Thanks.
Access Database
Hi,
Access to Database is very easy, at least there are 2 ways to access your table in your database:
1. use PHPMyadmin
2. use SQLyog (www.webyog.com), this my favorit tool. freeware!
What you must do then:
1. access your Drupal database, find "variable" table.
2. on the "name" field, find "site_offline"
3. change the value to: s:1:"0";
Here are the detail:
SQLyog
- if you use SQlyog then you can directly change a value by click on that row.
PHPMyadmin
1. open your database
2. open "variable" table
3. click browse (on the upper-left)
4. find the "site_offline" row then click the edit icon
5. on the value box, just enter: s:1:"0";
6. make sure the operation is "Save" (not "Insert as new row") then click "Go"
HTH
Still closer...
i think I am getting closer to resolving this (with all the suggestions provided), but not quite there yet. I have managed to locate the variable table in PHP my admin and to change the value of "site_offline" to 's:1;"0";' and to save. But still when I login to my site I get the same site off-line message.
I see in the Drupal documentation cited above that after the suggested database query matching the instructions above, there is also something that says:
DELETE FROM cache WHERE cid = 'variables';
I don't know what that means; could this fact (and my inability to execute the action) be preventing my site from finally letting go of the off-line command?
Sorry for sounding like a newbie, but I am pretty happy having gotten this far. Though I have heard of PHPMy Admin, this is the first I've used it. Thanks again for the help.
DELETE from cache
You should definately do that as well, that part of the query from the post you referred to, is in fact a second query that empties the cache table of any variables that might have your site "stuck" in offline mode.
Run the second query through phpMyAdmin and see if that helps.
BTW - Welcome to the world of phpMyAdmin, you now have serious backend access to your drupal site :-)
Good luck with all!
A.S.
Success!
I never did figure out how to execute this line:
DELETE FROM cache WHERE cid = 'variables';
But I did "refresh" my database in PHP MyAdmin, and now I can login to my site normally. I re-edited the index.php file to put it back to its previous state. And now, though the opening page on my site is still the intitial login page, at least I can log in myself and edit material.
So thanks to all of you who offered suggestions. Now I will turn to figuring out what's causing that admin page problem.
Oh, and I learned a lot in the past few hours. Partly I wanted to document my steps here to "give back" to the community a bit, but at this rate it won't be too long before I can offer other people solutions to their drupal issues, I hope.
Thanks again!
Good going!
Great to see you resolved your issue.
I just registered at this forum a few hours ago (with another current problem I have), so I am glad to at least be trying to help someone out.
Hopefully, in the future, I can pinpoint problems right away, thus helping ppl faster...
Anyways - hope to be "seeing" you around in the forum!
Have a nice day!
A.S.
Hi I have just also resolved
Hi
I have just also resolved the same issue, but setting site_offline variable and removing 'variables' in cache was not enough.
I removed all entries in 'cache_page' - this cured the problem - please do it if you still face the site offline mode.
br
przemek