By MishelM on
I have read everything I can find but am still having a problem. I am trying to run update.php and keep getting access denied. It asks me to log in as first user, however, there are only two admins and I think the original first user was deleted. I tried altering the settings.php file but it will not give me write access ( I host through GoDaddy if that makes any difference). I am not sure how to rectify this. I need a solution in which I do not have to mess around with databases as I am lost there. Is there anyone that can help?
Comments
Go to the database using
Go to the database using phpmyadmin and check the users table to see if the user with uid=1 is really missing. If it is missing, create a new one (See http://drupal.org/node/186256)
What to do (on drupal 5)
On Drupal 5:
A) if you just need to run update.php you can easily do that by disabling access check in update.php:
Remember to restore it to true when finished;
B) if you also need user 1, follow the instructions posted by cog.rusty
I am running drupal 6 can I
I am running drupal 6 can I still just change the update.php?- also I am not able to change the file becuase no matter what I do it will not give me write access-
Yes, the same thing. The
Yes, the same thing.
The only difference is that Drupal 6 tries to make it difficult. It write-protects the
sites/default directoryand thesites/default/settings.phpfile, and you may need to change their permissions first to 755 and 644 respectively, using your FTP program.That worked
Thank you that worked- DUH - I was changing the permissions on the file but not on the overall folder- once I did that it let me change the setting.php file temporarily and it worked like a charm- thanks so much!!!
Still Lost
I am sorry - paint me stupid- but I have no idea how to use this PHPmyadmin- is there any other way?
If you are missing user 1
If you are missing user 1 you need to find a way to access your database directly to fix it, either with phpmyadmin or with some other program. User 1 is the only one who can administer the site with full permissions, and there is no other way besides accessing the database if user 1 is really missing.
=-=
The only other way would be to use a back up however, if you aren't familiar with phpmyadmin than I'm guessing you don't create backups of your database which isn't good practice.
working with a database management script is a good thing to learn. Many panic unnecessarily when things go wrong simply because they never took the time to learn how to work with their own databases.