Zenphoto needs to run setup but the setup... Again?

I am having a recurrent and strange issue with the last gallery I have installed. Once setup is over, everything runs smooth. But suddenly the setup script comes up on a white page: "Zenphoto needs to run setup but the setup scripts are not present. Please reinstall the setup scripts."

After some time, it starts working again.

Here's the more interesting part: I have another gallery on the same server but never had any issue as such.

So thinking it might be the installation corrupted then I installed another one. Just finished now and same story occurs again. Frustration is back and I honestly can't think of anything wrong I did.
«1

Comments

  • acrylian Administrator, Developer
    Actually Setup tries to run when Zenphoto discoveres a change. There are other topics where people reported it as well that it does without a reason. I don't remember if there was a fix but it was somehow server related if I recall correctly. Please do a forum search as I don't have them at hand.
  • I tried to search but didn't find anything similar. Is there some particular words I need to search?
  • I have run the Database quick reference and here's the result:

    admintoobject
    MySQL Query ( SHOW FULL COLUMNS FROM `[prefix]admintoobject` ) failed. MySQL returned the error Table 'projecosteel._admintoobject' doesn't exist
  • acrylian Administrator, Developer
    I will have to pass this to my collegue who is the expert on this and will respond later.
  • I have some doubts. I have two galleries hosted on the same server. One works and the other gives this problem. But I have cross checked and found out the one that works is version 1.4.1.6 [8326] while the one that is giving this error is version 1.4.2.2 [9365]. My humble question is if this is just a coincidence.
  • Strange that I am the expert on the database reference which acrylian wrote. But the interesting thing there is that the way that routine works is that it asks for a list of tables from the database, then asks for the colum list of the tables that the database reported.

    So apparently the database is returning that it has a table named `admintoobject` but then denying it when we ask for the columns of that table. Note also that the real name of the table is `admin_to_object` so somewhere the underscores have been lost.

    Do you use "localost" as the server name for the database server? Maybe sometimes that does not work if requests are handled by a different server. See if there is a real server name for the database server.
  • acrylian Administrator, Developer
    Yes, the the database info tool has been written by me primarily and that is apparently a typo in a query.

    Nevertheless, I am not the expert on the setup stuff and why it runs automatically unneeded which this topic is actually about and I was referring to. This db tool surely has nothing to do with that...:-)
  • acrylian Administrator, Developer
    Update regarding the database info. It does not use any direct queries directly at all. It gets what is there using `$resource = db_show('tables');`. So I have no idea where this table name without underscores could come from.

    Best look at the database directly using a tool like phpmyadmin to see what is there.
  • This is the list of the tables i can se on MySQL admin:

    _administrators
    _admin_to_object
    _albums
    _captcha
    _comments
    _images
    _menu
    _news
    _news2cat
    _news_categories
    _obj_to_tag
    _options
    _pages
    _plugin_storage
    _search_cache
    _tags

    Should I look anything specific?
  • Reverting to previous version. Let's see if it becomes stable. If so then I must think there's something wrong in the new version. Strange I am the only one facing this issue if so.
  • Reverted to previous version and so far no issues. Database quick reference works without giving any error.

    By the way while I was trying to analyze the DB structure in MySQL I have noticed that in the last version the tables prefix is "-" while in the previous it was setup as "zp_". Don't know if this makes any difference.

    I hope my issue will open eyes on possible issues some other users might face. Thanks!
  • acrylian Administrator, Developer
    If you update your install the prefix is not changed at all and for sure not automatically (which would make you loose respectively not use all your data entered before). Zenphoto uses what is set as the prefix in the config file withn /zp-data. What is set there?
  • I have alreadi reverted to the previous version for which fortunately I had kept a copy. So far so good. No errors and "Database quick reference" responds also with no errors. At this stage I ignore what could have been the issue.

    In the old version the prefix was "zp_" while in the new one is only "_". Could this be the main cause of what has occurred?
  • acrylian Administrator, Developer
    See my first response please
  • In the old version there is "zp_" while in the new downloaded one is "_". But this was a new install with a new database.
  • acrylian Administrator, Developer
    Well, setup asks on first installation for the database credentials and also that prefix. Zenphoto - I am not sure if that is dev build only right now - uses by default now the folder name ZEnphoto is installed in if you don't enter your own to exactly avoid overwriting/reusing exisitng databases (before it was always "zp_" as a default" but you always could change it..

    So change the suffix in the config file and rerun setup to use the old one.
  • As I told you there was no old database to overwrite as it was a new install on a new MySQL database. So everything was left to the setup and in fact I reached the GO and it worked for a day but become immediately unstable.

    I have kept a copy of an old install and currently using that one which is stable and no issues so far.
  • acrylian Administrator, Developer
    Sure, I just explained where the prefix comes from. Nevertheless it remains sadly fact that we still don't encounter this issue so it is hard to do anything against it. This seems to be the needle and haystack thing...
  • Reading previous posts, I have two questions regarding the "new install" that didn't work:
    – What was the name of the folder you used to install the new Zenphoto? Is there a space or a (non US-ASCII) special character in the folder name or in your domain name?
    – I did a new install on an Apache server and it worked. Did you install it on a Windows server? Running Apache or not? MySQL or something different? If so, could that be the problem?
  • Johnb Member
    I'm having the same problem.......
    "Zenphoto needs to run setup but the setup scripts are not present. Please reinstall the setup scripts."
    I uploaded some more pictures 5 days ago and there didn't appear to be any problems, but yesterday when I went to the site I got this message. I tried re-introducing the setup files into the zp-core folder (in the Zenphoto folder located in httpdocs), and other places, but nothing seems to work..... ( it was recommended to remove the setup files after setting up).
    Where can I go from here please?
  • acrylian Administrator, Developer
    Well, reupload the setup scripts and let them run. As widely discussed we are not able to reproduce this odd behaviour so that so far there is no fix or explanation.
  • I am having the same problem since today. I have not changed anything since yesterday (both db and file wise). Running zenphoto 1.4.2.1.

    This is the first time I get this error. I hope it is not a security related issue again. I will try to install the new version and I will check my logs for any suspicious activity and let you know if I find something.
  • I got the same thing this morning - at first I thought it was caused by my provider moving my files to a different server, but their support guy just sent me a copy of the .htaccess file, and it's the network-teaser.ru hack again (extract from .htaccess):

    [...]
    ErrorDocument 404 http://network-teaser.ru/getup/index.php
    [...]

    Nothing is left from the original .htaccess file content. I can confirm I have upgraded my installation after being hacked previously, and I am sure I don't use TinyMCE (I never did).

    Currently I am not able to verify which version is installed - I am 99% sure it is 1.4.2.2 but I need to verify later this evening. Is there anything else I can do to help?

    Thank you for this great product.

    Kind regards,

    Robert
  • First, it is the Ajax Filemanager which had the vulnerability, not TinyMCE, so not using TinyMCE would have nothing to do with the issue. Ajax Filemanager would be disabled by default in the 1.4.2 release. In addition, the security issue was closed. So it is not likely that it is involved either.

    But, the original hack did leave lots of trojan files around. So if your site was not thoroughly cleaned up the hackers would have a back-door to re-infect it. By thoroughly, I mean all the files on the site need to be examined, not just the Zenphoto installation.

    Finally, check the file permissions you have. If they are not reasonably strict other attacks from within your hosting provider are possible.
  • Reinstalling zenphoto solved the problem, but I have no idea what caused the error. I have analyzed my logs but did not find anything suspicious except the usual comment spam attacks. htaccess was not modified by the way.
  • Same problem today, again... Once a month, maybe, i must reinstal/upgrade my zenphoto instalation. No idea why, files rather unchanged, edited only my theme variation, but not in last week.
  • The same happened to me today aswell. On the server it looks like noting has been modified, so this is really strange... Version 1.4.2.3
  • vpas Member
    Same thing here too (Version 1.4.2.2). I noticed the problem this morning. Going back through the Apache Server logs, I can see that the issue started about a week ago. I am deducing this by the size of the data returned for each request. The text stating that setup needs to run is small, so easy to spot in the logs.

    Additionally, I have my browser at work looking at the RSS feed of my site, so I can see roughly when it happened, but not really how.

    One minute the rss-comments.php returns normally, then 15 minutes later the server is returning the 102 bytes. There is no other access to the server in between the two log entries and from that point onwards, every request for something in the zenphoto area gets a 102 byte response.

    The only thing that stands out (for me) is a POST entry, but this might be down to how zenphoto works - I don't know enough about the system to say either way. Basically there's a direct request for a photo's php file, this is then immediately followed by a request to zp-core/c.php with a parameter of "i". Ten seconds later there's a POST request to the same photo's php file. Nobody but me should be POSTing anything to my site.

    Let me know if you need more info.
  • I recommend you install the development build. It should be quite stable as it will shortly go into beta. That release has improved handling of these tests, including description of why and dividing the handling between major and minor reasons. The latter only recommend re-running setup.
  • vpas Member
    Lacking time to grab an svn client, I went with an upgrade to 1.4.2.3 which has fixed the site for now. Would love to know why it started going wrong though.
Sign In or Register to comment.