Unable to log in to admin

My site has inexplicably locked me out of admin, saying the user-id / password was incorrect (I copy these from my password database).

The action which preceded this was an attempt via the host's cPanel to stop the activity log and stats tracking. I have gone through the reset password routine several times but it has not helped. I now keep getting a challenge question which I've not set and can't answer.

I have followed the "Login and password problems" advice and dropped the administrators table in my database and then run setup.php. This results in the message “You must restore the setup files from the 1.4.6 [bbddab7675] release.”

I'm now completely stumped. Any help or suggestions would be very much appreciated.

I have a back-up of the site from immediately before discovering this problem and an export of the database made shortly after.

Comments

  • acrylian Administrator, Developer
    Re-download the 1.4.6 package from our archive and re-upload the setup files. That is in `zp-core/setup` of the package.

    Normally you can restore them from the backend to re-run it but since you cannot access that you have to do that manually.
  • Bob03 Member
    Have done this. I re-uploaded the setup files – those in zp-core/setup of the 1.4.6 package.

    I then ran <site>/ZenGallery/zp-core/setup.php which in turn ran <site>/ZenGallery/zp-core/setup/index.php

    This generated an error message:
    .htaccess file [wrong version] The .htaccess file in your root folder is not the same version as the one distributed with this version of Zenphoto. If you have made changes to .htaccess, merge those changes with the zp-core/htaccess file to produce a new .htaccess file.

    ZenPhoto is installed in folder /ZenGallery but my home page is a static html page in the root directory. I took copies of the .htaccess files in the root directory and in folder /ZenGallery and then clicked the button "Replace the existing .htaccess file with the current version".

    The setup attempt had issued a number of warning messages including one about Zenphoto core files "Some files are missing or seem wrong" with a big long list including:
    index.php
    zp-core/admin-thumbcrop.php
    zp-core/functions-image.php
    zp-core/template-functions.php

    I ignored this and pressed “Go” to re-run the setup, then clicked the link in “You need to set your admin user and password”.

    When I applied these changes (also setting the challenge question), at <site>/ZenGallery/zp-core/admin-upload.php it said:
    “The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies.”

    All I can think of now is to re-instate my previous .htaccess files.
  • acrylian Administrator, Developer
    The file warnings are just that and can be ignored if you are sure about these files.
    I took copies of the .htaccess files in the root directory and in folder /ZenGallery and then clicked the button "Replace the existing .htaccess file with the current version".
    That warning only affects Zenphoto's own htaccess file, it does not care or know about any in parent folders if installed in a folder. Best you look via FTP if the htaccess file really has been updated. It should be quite short and note version 1.4.5.

    I have no idea about the upload issue. You should review the Zenphoto debug log and the server PHP log for issues. Wrong permissions for example could cause all sorts of problems.
  • Bob03 Member
    The htaccess file has been updated.
    I can't access the Zenphoto debug log because I'm locked out from admin.
    I can't find any reference to the server PHP log on my host's cPanel.

    Many thanks for your help but I think I have to give up on this. I had planned to switch host anyway, so I reckon it will be quicker to re-build the site from scratch. Having said that, I don't seem to be able to install the latest version of ZenPhoto on my new host. But if I can't solve that problem, it will have to be a subject for a separate forum posting.
  • acrylian Administrator, Developer
    The debug log is within `/zp-data` which you should be able to access via FTP.

    I can't find any reference to the server PHP log on my host's cPanel.
    You really should contact your host about that. If selfhosting it is really mandatory to have access to that somehow. Sadly all host do it differently and the naming is not always consistent (via their backend, as files via FTP etc.) so only your host can tell you were to find it.

    It probably comes down to permissions. Some hosts have separate users for FTP upload and the actual scripts. You should also ask your host for help.
Sign In or Register to comment.