I have installed ZP 1.2.7 on my localhost (xamp), did some testing and a custom template, all worked fine.
Now I'm trying to do the same stuff on the hosting server. After copying the files, the installation page gaved me a few errors (couldn't create files and couldn't change permissions on folders). I did all the settings by hand: changed permissions and created robots.txt and setup.php. Now all errors have gone leaving behind only warnings.
The problem is that when I try to save the auto completed form with the database data, the script, after loading, brings me back to the setup page and no GO button appears (endless loop). What should I do to move forward?
I've found this topic with a similar issue and have followed the advice to check out the error log. Unfortunately it beats me. I can't understand what are the errors meaning.
http://www.zenphoto.org/support/topic.php?id=6131Thanks for help!
Comments
(Here's the actual text from the setup page right now)
Welcome to Zenphoto! This page will set up Zenphoto on your web server.
Systems Check:
* PHP version 5.2.9
* PHP Safe Mode
* PHP magic_quotes_gpc [is enabled]
Warning!
You should consider disabling magic_quotes_gpc. For more information See #25 of the Zenphoto troubleshooting guide.
* PHP gettext() support
* PHP mbstring package [Your internal characater set is ISO-8859-1]
Warning!
Setting mbstring.internal_encoding to UTF-8 in your php.ini file is recommended to insure accented and multi-byte characters function properly.
* PHP MySQL support
* zp-config.php file
* File/Folder Permissions [are strict (0755)] Notice! click for details
Notice!
If file and folder permissions are not set to strict there could be a security risk. However, on some servers Zenphoto does not function correctly with strict file/folder permissions. If Zenphoto has permission errors, run setup again and select a more relaxed permission.
Change file/folder permissions mask:
* MySQL setup in zp-config.php
Fill in the information below and setup will attempt to update your zp-config.php file.
MySQL admin user *
MySQL admin password *
MySQL host
MySQL database *
Database table prefix (they are all autocompleted)
* required
* Zenphoto core files
* Zenphoto core file permissions
* .htaccess file [is empty or does not exist]
Warning!
If you have the mod_rewrite module enabled an .htaccess file is required the root zenphoto folder to create cruft-free URLs.
You can ignore this warning if you do not intend to set the mod_rewrite option. Click here to have setup create the file.
* robots.txt file [Not created]
Warning!
Setup could not create a robots.txt file.
* albums folder [permissions failure]
Warning!
Setup could not set the folder to the selected permissions level. You will have to set the permissions manually. See the Troubleshooting guide for details on Zenphoto permissions requirements.
* cache folder [permissions failure]
Warning!
Setup could not set the folder to the selected permissions level. You will have to set the permissions manually. See the Troubleshooting guide for details on Zenphoto permissions requirements.
* locale folders
* uploaded folder [permissions failure]
Warning!
Setup could not set the folder to the selected permissions level. You will have to set the permissions manually. See the Troubleshooting guide for details on Zenphoto permissions requirements.
* zp-data folder [permissions failure]
Warning!
Setup could not set the folder to the selected permissions level. You will have to set the permissions manually. See the Troubleshooting guide for details on Zenphoto permissions requirements.
* HTML cache folder (cache_html) [permissions failure]
Warning!
Setup could not set the folder to the selected permissions level. You will have to set the permissions manually. See the Troubleshooting guide for details on Zenphoto permissions requirements.
* Third party plugins folder (plugins) [permissions failure]
Warning!
Setup could not set the folder to the selected permissions level. You will have to set the permissions manually. See the Troubleshooting guide for details on Zenphoto permissions requirements.
You need to address the problems indicated above then run setup.php again.
Zenphoto really won't work if it cannot use the file system.
EDIT:
I've forgot to mention one thing, maybe it matters.
All the files are uploadet directly in the web root folder (public html). There is no subfolder such as /gallery or /zenphoto.
In zp-core there is a .htaccess file wich has the first line :
RewriteBase /zenphoto
Should I change it?
Everything was fine except the database data wasn't good. Username and database had an prefix added by the hosting server. I had to check in cpanel to see that.
I want to thank you for your promt responses. Thank you very much!
Sorry for wasting your time once again with such a simple problem.
Cheers!
Any help would be greatly appreciated.
Thanks
Most common is when setup has identified errors in the installation that need correction. (These are the red error indications, not the orange warnings.)
The other reason is if the script has encountered a script error.
If the former, you need to correct what setup has indicated is wrong. If the latter you will need to find what the error is (normally found in the CGI log) and report it back to us.
Acrylian writes above that "Setup would do that if it could access the file system. You have first to set the rights on the files manually using an ftp client as Zenphoto is apparently not allowed to do that for you." What kinds of things would keep it from accessing the file system? Is this something a web host (I use Laughing Squid) would do, or is this some setting that I might have in error.
In my case, I set the 777s manually and I still get the orange warnings that Zenphoto could not set the folder to the selected permissions. I've installed and upgraded ZP several times over the last few years and I've never had ZP create a robots.txt or the htaccess. I've always had to do this myself, cursing the installation process at the time.
The warnings are just warnings. They represent things you MIGHT need t deal with. They may give you an indication of why some other thing does not work correctly. In your case, the creation of the `.htaccess` and `robots.txt` files.
Of course you can still do these things manually yourself. The template for the htaccess file is in the zp-core folder.
"Second it may have made it so that Zenphoto does not "own" its own files and folders. This could also prevent the chmod() function from working."
That seems to be the one. The Apache default something something owns it.
I changed all the folders to 777 but still get the warnings, which have the same wording as the errors. The database tables were created however. But I still don't know whether the folders should be 755 or 777. My web host folks tell me that I should move my site to a cloud-hosting service they offer that frees up a lot of ownership issues and is far more secure. I'm told that your various scripts will work fine if I do this.
So I am. Saves money anyway.
A suggestion? Maybe in your nice installation instructions you should have a little bit that talks about this. Maybe assumes that the installation won't work so seamlessly. I eventually made my way to the troubleshooting page which helped a little, but I still had to accidentally find the file called "htaccess" hidden in the zp-core folder, copied it, added the point to the name and moved it to the root. That was all guessing. The assumption that the .htaccess file will be automatically be created cost me, who knows zip about web hosts and SQL and permissions and scripts, three hours. I tried creating my own at one point which created as many problems as it solved, obviously.
thanks
We really cannot anticipate all the variations of server setup that may be encountered. For instance, I have no way of knowing whether you should use 0755 or 0777 on your server. 0755 is preferable, but it may not work.
IMHO if your service provider insists on doing things out of the ordinary, they should be providing you the support to overcome what they have done. Setup tries to tell you what it has found. Somone who knows the server configuration is necessary to figure out how to deal with that.