Log in and.php error

Discussion in 'WordPress' started by scotsmarc, Jun 28, 2010.

  1. #1
    Hi,

    I was changing some setting in my wordpress settings (stupid i know!) and added a .php exptension at the end of the settings as WP was not appearing in my template. Now i am unable to log into my worpress and cant get back to the admin to resolve it. I know that removing the .php from the admin will remove it but i cant get back into the admin.

    my site is greatfoodplaces.com
    the blog address is http://www.greatfoodplaces.com/blog.php

    i can get to the user log in here http://www.greatfoodplaces.com/blog/wp-login.php but when i log in it does not log in correctly

    Any help appreciated

    Thanks

    Marc
     
    scotsmarc, Jun 28, 2010 IP
  2. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    OK, I hope I have understood this correctly *fingers crossed*. You changed either the Wordpress Address or Site Address on the general settings page in admin? Is that correct, if not could you be more specific about where you added the .php extension (or was it somewhere in the template settings)?
    Stuart
     
    StuartCRyan, Jun 28, 2010 IP
  3. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, I have done some more analysis... and here is what I have come up with it does look like my suspicions were confirmed your blog URL appears to append the .php extension to the blog folder (i.e. http://www.greatfoodplaces.com/blog.php/wp-login.php?redirect_to=http://www.greatfoodplaces.com/blog/wp-admin/)

    So what you need to do is the below:
    1. Go to http://www.greatfoodplaces.com:2082 (I took a punt that the server is running cPanel and it is so this should be easy).
    2. Log in with your FTP username and password.
    2.a if you havent backed up your database in a while do so now with the backup option (just run a full backup)
    3. In the cPanel interface find the Databases section and click phpMyAdmin.
    4. On the left hand menu in PHP My Admin select your wordpress database
    5. click on the SQL tab up the top and paste the following into the box and click go:
    UPDATE wp_options SET option_value = 'http://www.greatfoodplaces.com/blog/' WHERE option_name = 'site_url';

    (click GO once you have pasted that in). You should see A green box with a tick and it should say 1 row(s) affected.

    Once you have done that you will be able to get into your admin panel... go back to that page and make sure both options have the .php removed (depends on if you set it on the two fields on that screen or just one).

    Cheers
    Stuart
     
    StuartCRyan, Jun 28, 2010 IP
  4. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK... one other thing you may want to try first if that sounds too scary... tho not sure if this will work in its entirety... OK go to http://www.greatfoodplaces.com/blog/wp-login.php?redirect_to=http://www.greatfoodplaces.com/blog/wp-admin/options-general.php and log in (copy that link in its entirety).

    Once you log in you will probably get an error, that is OK (if you are really lucky it might take you straight to the options page). If it doesnt though Keep the window open then paste in the following URL instead in the address bar of the window you just logged in paste the following URL http://www.greatfoodplaces.com/blog/wp-admin/options-general.php ... if my thinking is correct it SHOULD in theory let you access the page and change the url and click submit... might be easier to try this first if you are not comfortable going down the database changes path.

    Good to give a try anyway.
    Let me know how you go.
    Stuart
     
    StuartCRyan, Jun 28, 2010 IP
  5. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    OK one final thing you can try (out of my above three posts the first one is the hardest but is guaranteed to work, the second is the easiest and *may* work (no harm in trying) and this one is a bit of work but will fix the issue as well. I would like to note that I am not aiming to increase my post count by posting these as separate posts... each time I try to edit a post it errors out saying I am not allowed URLs in the post as I am a new member so mods if you are able to merge the three I have posted here into one that would be appreciated.

    OK... the final solution
    Log in via FTP to your webserver and rename the "blog" folder to "blog.php" then log into your admin panel by going to http://www.greatfoodplaces.com/blog.php/wp-admin/
    Change the setting back to have a URL without the .php extension (this will break again the moment it saves the URL but don't worry.

    Then go back to your FTP program and rename the "blog.php" folder back to "blog" and your website will be working again.

    As I said, let me know how you go.
    Stuart
     
    StuartCRyan, Jun 28, 2010 IP
  6. scotsmarc

    scotsmarc Member

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #6
    Stuart,

    First of all a million thanks for the assistance.

    Yes you are correct. i changed my setting in the wp settings folder

    I had already tried the 2nd post option but to no avail. i cant get access to my cpanel in the office but i get home in 5 hours and ill try the 1st and 3rd fix.

    It is great to get such assistence as my developers cant / and or wont fix!
     
    scotsmarc, Jun 28, 2010 IP
  7. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    No worries at all. If you want to do it now (and the reason you cant access cPanel is due to firewall issues) you can also use http://cpanel.greatfoodplaces.com/ which you should be able to access pretty much anywhere. Just thought I would add that tidbit in. Hope it goes well, I am heading to bed now but will check in when I get up.
     
    StuartCRyan, Jun 28, 2010 IP
  8. scotsmarc

    scotsmarc Member

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #8
    Ok thanks,

    I tried option 1 and this did not resolve. Ill try option 3 in a couple oh hours as ill need to set up an FTP account
     
    scotsmarc, Jun 28, 2010 IP
  9. KimiGermany

    KimiGermany Peon

    Messages:
    1,117
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I recommend that you do database backup first, it's a good idea to always backup. It can be done under 2 minutes.
    And if you change your URL settings in dashboard then this video might help.

    Good luck.
     
    KimiGermany, Jun 28, 2010 IP
  10. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi Scotsmarc,
    What happened when you tried option one as that definitely should have fixed the problem (i.e. what output did you get).

    Stuart
     
    StuartCRyan, Jun 28, 2010 IP
  11. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    W00t, OK on my lunchbreak now. I have instead PMd you a small (rather insecure) script that will fix it up for you please check your PMs. I am going to put together a somewhat less quick and nasty (i.e. slightly more secure way of doing this) tonight then will post the solution here.
    Stuart
     
    StuartCRyan, Jun 28, 2010 IP
  12. scotsmarc

    scotsmarc Member

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #12
    Hi guys,

    Thanks for the help.

    I tried all the fixes with no luck (including the the one on PM Stuart) the first fix caused a server error that i had to get my hosting provider to fix.

    Now banging my head against a wall and gonna have to farm this out to someone to fix as the blog has been screwed for the last several days. It is really good for you guys to try and help though.
     
    scotsmarc, Jun 29, 2010 IP
  13. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Hi Scotsmarc,
    I have put together a proper (tested) version of that script. Basically it will prompt you for the URL to update and you can update it quickly and easily (the same way wordpress does).

    You can get it from here http://www.opensourcebattlefield.com/display/wprecover/Home

    However I am wondering what actually happened to need your host to intervene? I am curious as that is a simple (targeted) sql update.

    Anyway the above script should work, have tested it on various test installs I have.

    I wish you luck.
    Regards
    Stuart
     
    StuartCRyan, Jun 29, 2010 IP
  14. scotsmarc

    scotsmarc Member

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #14
    Hi Stuart,

    I got a 500 server error on the blog page. they had to go in to resolve this. not quite sute what they dont but they had it reverted back within 20 minutes
     
    scotsmarc, Jun 29, 2010 IP
  15. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Hmm very weird good to hear they were able to fix it though.
    Stuart
     
    StuartCRyan, Jun 29, 2010 IP
  16. scotsmarc

    scotsmarc Member

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #16
    yeah shame i still cant get the blog running!
     
    scotsmarc, Jun 30, 2010 IP
  17. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    If you want to PM me I am happy to take a look directly. I understand if you wouldn't want to as I would need FTP access but thought I would offer nonetheless.
    Stuart
     
    StuartCRyan, Jun 30, 2010 IP
  18. StuartCRyan

    StuartCRyan Peon

    Messages:
    68
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Hmm or I could help you out with a crossloop session, that could work better as then I wouldnt need passwords.
    Stuart
     
    StuartCRyan, Jun 30, 2010 IP
    teamnirvana likes this.
  19. romika

    romika Member

    Messages:
    264
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #19


    if you're getting 500 server error

    do try this thing make change in the permission of all folder to 755 and all php file to 644
    I hope this information will help you!
     
    romika, Jul 3, 2010 IP
  20. scotsmarc

    scotsmarc Member

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #20
    Thanks Stuart for fixing this for me you are a star!
     
    scotsmarc, Jul 19, 2010 IP