setup scripts missing

2

Comments

  • OK I thought this.

    My hoster just says me :

    If you study the source code about your error message (available here : http://www.zenphoto.org/trac/attachment/ticket/1776/index.php), you can see that this message is due to the absence of some files that Zenphoto needs to run properly
    You should check your installation.

    Are we agree he's wrong ? No files are missing.
    That also why I thing it's more a bad interaction in beetwen the hoster and a Zenphto (as other sripts runs on these hoster and as i run other zenphoto on other hoster).
    Anyway, if files were really missing I thing that it should works or NOT but not works time to time. Am I right ?

    Thanks again and if I can't find solution I will move my zenphoto to another hoster.

    But finally this is something that could be interresting to underdant because it suppose that Zenphoto needs to checks some points to be sure it will run on an hoster (once again other scripts like Wordpress runs with no problem on this hoster with the same database).
  • acrylian Administrator, Developer
    So what is the actual issue now? You got an error about setup files missing, uploaded them and then got a warning about the file times which is okay in this case.

    So what happens if you proceed with setup?
  • No, I still have the same error "setup scripts missing" after I install Zenphoto and even if I re-install from scratch or just re-upload the setup files and run the script : the site runs but sometimes not.

    I'm stuck.
  • Do I understand correctly? You make a complete upload of the Zenphoto files and then run the install. Then without your deleting the files you get the setup scripts missing error?

    That indeed would be a strange situation. Have you used FTP to check if the scripts are there after this message? If not, then someone has deleted them. If they are present, then there is some issue on your site with PHP scripts being able to read files and folders. That is a reasonable possibility because sometimes the Security Police of a site are over zealous.

    Applications such as Wordpress are not filesystem based so they would not notice such a server defect.
  • Hi.

    Actually I think something went wrong during the installation even if I have no critical error message during this process.

    1-I restart from scratch :
    2-On the install information page, it says that I have to fill the information databade.
    3-I do this and I save then the page refreshes and I click on the "Go" button at the buttom of the page.
    4-After that, another window suggests me to delete setup files (button). In the same window a link says to me to define administrator login and password and nothing else (there is no input fields to define login and password).
    5-So I clicked on the button to delete setup files.
    I checked on my server with FTP and the files are effectively deleted.
    6-Then an almost blanck page with just Zenphoto logo, a drop list with language and all the links to zenphoto website at the bottom and just a link which says again "you have to define administrator login and password". No input fields here.
    7-I clicked on the link to setup my administrator login and password.
    8-Problems begins here 2 options : error message or I land on the galerie index page.
    9-From the galerie page I can see the Admin Toolbox (at the top right) and if I click on it (Administrate) I land on a backofffice page which says in red : "ask for resting of the password. You have to specify now the login and password of administrator".
    10-I do this and then I have the erratic running zenphoto : sometimes OK sometines not.

    Sorry for my translations and my english.
  • Ok. I still think this is a problem with your database. Most likely it is not responding back within the timelimits of the server script timeout.
  • I had the same problem, i was not able to verify where it happenend or how. how ever everthing seems to work fine when I change functions.php checkInstall() to just return false
  • So it means that you skip the test function to avoid the message.
    How do you do ? And doesn't it bring some trouble when you'll update your Zenphoto ?
  • I just changed the code to

    function checkInstall() {
    return false;
    .....

    and yes it will not work when upgrading.

    However I do suspect that this is a bug in the upgrade process and next time i upgrade the bug won't be there (or I play by the rules and only upgrade one version at the time)
  • I have another may clue for this :

    I installed zenphoto to my other hoster (1&1) in a directoy and the I "pointed" one of my name domain on this directory : no problem
    But if I point the me "generic 1&1" name domain on the same directory I've got the famous "setup scripts missing.
    If I upload again the setup files and run the update from the "generic 1&1", it works with it.
    So it means that zenphoto insert somewhere the information about the domain name.

    In conclusion, it means that the problem with Celeonet is that the install scripts doesn't run at it should ?
  • acrylian Administrator, Developer
    If you use modrewrite Zenphoto needs to set a base directory in the htaccess file. On a url like www.yourdomain.com that is just /. If it is a folder like www.yourdomain.com/zenphoto it would be /zenphoto. You can't have both.
  • This has been reported before. In that case the issue was that the "server admin' was different for the two links. Thus the installation seemed to have changed.

    The biggest problem you will have with disabling the checkInstall() is that Setup will not automatically run if you upgrade. Very likely this will cause some strange Zenphoto failure as the database will not match the new installation's expectations. If you are sure to run Setup each time you do any upgrade this will not be an issue.

    Of course, you will also have to make the above change each time as well.
  • Thanks for you answers.
    I use the modewrite of Zenphoto.
    And I've seen that the htaccess was correctly created with
    `RewriteBase /galeries`
    (Site is at : http://www.atelierscales.net and zenphoto gallery at the "galeries" menu).

    So to resume and if I forget the last idea that was appear because of 2 domain name.

    What is the issue for this erractic behavior on some hosters ?
    Because for now I've disable the checkinstall() on my install at my actual hoster and I've prepared to move to another hoster. So I have and I will have my site running but I still don't know why it works fine with some hoster and don't with others.

    Thanks.
  • acrylian Administrator, Developer
    If you run setup on upgrade/installations setup will create the htaccess file. If it is not the right one or does not exist it will notify you.

    The checkinstall issue I will leave to my collegue to answer.
  • Well, we really do not know why your installation seems to keep changing. Zenphoto does make a check (as you have noted) that there has been no change in the install. If there has been one it runs setup to insure that all things are set properly for the new installation.

    You can look at the function `installSignature()` to see the exact computations that are made. Then ask yourself which of those keep changing on your site. All should be static unless there has been a change in the installation.
  • OK thanks everyboby.

    I've use the tips by Pedersen and I'm waiting to move py site to my other hoster.
  • Just for the record, I had a similar problem that after setting secure admin mode, each time I switched between http and https I was redirected to the setup screen.

    After inserting a var_dump($t1) into installSignature, it turned out that the server admin was different for the https and http virtualhost. This error thus could happen if a gallery is shown on multiple virtualhosts (with possibly different admins).

    I don't know what would be a really good way way to recognise a reinstall, but I am not sure this is it (i.e. the SERVER_ADMIN variable).

    I hope this information will be useful for someone, I spent at least an hour figuring this out...
  • The admin really should be the same for the site no matter how it is accessed. The admin changing is a good indication that something is different.
  • petera Member
    I ran into this problem when trying to setup a dev site. I have an SVN repository from which I push onto the live site, and I have a separate development site on my local machine. Since I only had changes to the PHP files that interested me, I set up my local machine to use (share) the remote/live DB. The first time I tried to run zenphoto on my local machine I got the missing script error, since it turned out `getOption('zenphoto_install')` and `installSignature()` obviously didn't match, since the install sig is made using $_SERVER['SERVER_ADMIN'] and $_SERVER['DOCUMENT_ROOT']....... but I guess this would also affect you whenever you moved servers. I guess you can just manually print out your installSignature and reset it in the DB if it's a permanent move.

    http://php.net/manual/en/reserved.variables.server.php

    It's definitely something that stops you from simply being able to move / duplicate your entire ZenPhoto install w/o tracking down how the installSignature works.... not quite sure if that's a bug or a feature ;)
  • It is a feature. You should always do a new install if you have moved your installation. Maybe you think everything is the same....
  • if you want change the installSignature

    you can paste this line

    setOption('zenphoto_install', installSignature());

    in index.php and remove after work
  • I had the same problem and could solve it like this:

    1 - Access the database and backing up the database actual

    2 - Delete the database

    3 - Reinstall the application with the version that is in the directory with a new database

    4 - Access the database

    5 - Enter the table ZP_options

    6 - Taking the field values ​​and zenphoto_release
    zenphoto_install

    7 - Delete the database installed and import the old

    8 - Change the values ​​of the fields and zenphoto_release zenphoto_install the new basis that formerly had been installed with the values ​​obtained.
  • This is almost comically complex.

    Why does zenphoto make it so difficult to move an installation? In my experience it's impossible without mucking about in MySQL as the previous poster suggests.

    I don't know why the complex install signature is necessary. It's a photo album, for pity's sake, not the CIA archives.
  • If it is too difficult for you, don't do it. Beleive me, everything we have done is to prevent downstream problems for botched sites. Besides, it really is not so difficult to move an installation. Just use zenphoto to backup the old install, make a new (same version) zenphoto install. Move the albums folder, move the backup, then do a restore.
  • I worked this out

    I renamed my directory on 1and1 and this caused the message to come up

    changed it back and it works ok now

    :D

    Website: [not relevant]
  • Well, yes, that would cause the need to re-run setup. You can change the directory, but then setup needs to be re-run to make the needed changes to reflect the different directory.
  • This is an old post, but still I'd like to point put my non-understanding of this installSignature-thing. I've recently upgraded my v-server and made backups of everything (database and files). After the new install I put everything back (document root path changed) and got the message to run the installer again (which is not present). After some searching I've found this thread.

    Being a PHP programmer myself I'm quite surprised of this install signature thing. If I backup my files and copy them back, where's the need for the installer to run again. (And by the way I wasn't prepared that a mysqldump seems not sufficient to dump a zenphoto database. Instead I should have used some zenphoto internal backup thing. Did read that after upgrading the server, which was much too late.)

    It took me a while and a little bit of coding to find the installSignature() function. Finding it didn't make me feel better. Eval is evil - as far as php is concerned.

    Removing the line that calls reconfigure worked for me.
  • acrylian Administrator, Developer
    You are not on the current release which tells you more about why setup likes to run. Please see also:
    http://www.zenphoto.org/news/installation-and-upgrading#re-running-and-re-uploading-setup-files
    It was introduced after quite a bit Zenphoto powered sites were hacked last November, although not due to Zenphoto's fault. You can read about that on our news section.

    eval() is not per se evil (as nothing is), just wrong usage. If you feel it is used wrong, feel free to investigate that (be sure to read on the contributor guidelines first) and create a ticket.
  • eval() is not even wrong useage. There are many good reasons to use it.
  • I do want to add one more note to this thread incase someone without so much knowledge reads it. The prime reason for the install signature is because one version of Zenphoto is not exactly like the next.

    When you upgrade, setup will migrate your database to be consistent with the current version of Zenphoto. If you do some thing like restoring your database to what existed for a previous version of Zenphoto as apparently SebastianKleine did then you have potentially compromised everything in your installation.

    For this reason, and because we run into install scripts that do not do this migration, Zenphoto tests the signature of the install and if it finds anything suspicious suggests a running of Setup to straighten things out.

    Perhaps there are occasions where nothing actually got migrated so the re-install would not be necessary, but testing that specifically would certainly be too expensive to perform each time a page gets loaded.

    So, bottom line, if you use MySQL to backup and restore your database, be sure you do so with the same version of Zenphoto running. (I would have thought that would be obvious to someone with programming skills, but then....)

    Zenphoto does provide a backup/restore facility that is able to deal with many of the migration issues. But it is still recommended that you do your restore on the same version of Zenphoto that created the backup because you will not know if it can handle the migration until the restore.
Sign In or Register to comment.