{"id":1132,"date":"2009-05-12T19:45:57","date_gmt":"2009-05-13T01:45:57","guid":{"rendered":"http:\/\/www.cyberward.net\/blog\/?p=1132"},"modified":"2009-05-12T19:55:24","modified_gmt":"2009-05-13T01:55:24","slug":"installing-zenphoto-on-1and1","status":"publish","type":"post","link":"https:\/\/www.cyberward.net\/blog\/2009\/05\/installing-zenphoto-on-1and1\/","title":{"rendered":"Installing Zenphoto on 1and1"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1133\" data-permalink=\"https:\/\/www.cyberward.net\/blog\/2009\/05\/installing-zenphoto-on-1and1\/zen-logo\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.cyberward.net\/blog\/wp-content\/uploads\/zen-logo.gif?fit=200%2C47&amp;ssl=1\" data-orig-size=\"200,47\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"zen-logo\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.cyberward.net\/blog\/wp-content\/uploads\/zen-logo.gif?fit=200%2C47&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.cyberward.net\/blog\/wp-content\/uploads\/zen-logo.gif?fit=200%2C47&amp;ssl=1\" class=\"alignnone size-full wp-image-1133\" title=\"zen-logo\" src=\"https:\/\/i0.wp.com\/www.cyberward.net\/blog\/wp-content\/uploads\/zen-logo.gif?resize=200%2C47\" alt=\"zen-logo\" width=\"200\" height=\"47\" data-recalc-dims=\"1\" \/><\/p>\n<p>I had all kinds of trouble getting <a href=\"http:\/\/www.zenphoto.org\">Zenphoto<\/a> to install on 1and1. None of which I believe are the fault of the Zenphoto project. I am blaming the difficulties on how you need to configure php on 1and1.<\/p>\n<p>What problems did I have. It appears that there were tables that were not created correctly. The way I figured this out was that I was trying to save a \u00ac\u2020guest user and password to\u00ac\u2020and album. The name wouldn&#8217;t stick. When I went in and look under the MySql admin\u00ac\u2020tool (phpMyAdmin), there was no user field in the albums table. Something was wrong right from setup.<\/p>\n<p>So here are the steps that I came up with to get zenphoto installed properly. I can&#8217;t say that all of the steps I took were necessary, and some might even be suspect, but in total it works.<\/p>\n<p><!--more--><\/p>\n<p>First of all, I am on a linux hosted shared server on 1and1. That is important, because of how php must be configured. The commands here need to be entered at the command line. You can ssh here, or use putty from windows, but this is not an explanation on how to do that.<\/p>\n<p>I downloaded the current version which at this point is zenphoto-1.2.4.tar.gz.\u00ac\u2020To do this I used wget so I don&#8217;t need to transfer it after downloading. Then I expanded the archive and installed the files.<\/p>\n<pre>wget http:\/\/zenphoto.googlecode.com\/files\/zenphoto-1.2.4.tar.gz\r\ntar -xvzf zenphoto-1.2.4.tar.gz<\/pre>\n<p>Don&#8217;t do the setup yet.<\/p>\n<p>I then went to the 1and1 web site, logged in and went to the MySQL Administration control panel. I selected to create a new database, and picked version 6. You can choose between 5 and 6. I picked 6. 1and1 will tell you the user name, password, host, and database name you will need to enter into setup, but don&#8217;t run setup yet.<\/p>\n<p>We want to tell apache to use PHP5 instead of 4. To do this we want to modify the .htaccess file that comes with zenphoto. In that file are some rules for rewriteing. We don&#8217;t want to change those. Just add a couple of lines. To edit this file I typed<\/p>\n<pre>nano -w .htaccess<\/pre>\n<p>You need to add these two lines after the comment lines (with #&#8217;s) and before the &lt;IfModule mod_rewrite.c&gt; line<\/p>\n<pre>AddType xmapp-php5 .php\r\nAddHandler x-mapp-php5 .php<\/pre>\n<p>Now that is done press ctrl-X to exit, and say yes to saving. Don&#8217;t run set up yet. We have a couple more things to do.<\/p>\n<p>Now we need to tell php to turn off magic quotes, and to use UTF character encoding. We do this by creating a php.ini file in the directory where the code is. This is the dumb part. You need this in every directory you have php code. I put it in the root of my zenphoto install, and in the zp-core folder. This is what I put there.<\/p>\n<pre>[PHP]\r\nmagic_quotes_gpc = Off\r\nmbstring.internal_encoding = UTF-8<\/pre>\n<p>If you want to create this file, type<\/p>\n<pre>nano -w php.ini<\/pre>\n<p>Now copy the code above and press shift-insert in the terminal window. Then you can press ctrl-X and say yes to save.<\/p>\n<p>I also copied this file to the zp-core folder<\/p>\n<pre>cp php.ini zp-core\/<\/pre>\n<blockquote><p>Just a note: There are instructions on the web that you can add these directives to your .htaccess file, but that will not work on 1and1 linux shared hosting. You will get a 500 server error. See <a href=\"http:\/\/faq.1and1.com\/scripting_languages_supported\/php\/14.html\">here<\/a>.<\/p><\/blockquote>\n<p>Ok, now you can run setup. Go to your browser and head to http:\/\/www.yourwebsite\/zenphoto\/ This will in turn tack the zp-core\/setup.php to the end and start the setup. There will be a couple of warnings left. First one is about strict permissions. I clicked on the link, and zenphoto set things up how it wanted. Next is the .htaccess file. Ignore this one, because we modified the file. The time stamp should be different.<\/p>\n<p>Now you can go ahead and enter you database information. Press OK, and zenphoto should tell you that everything is A OK. You will then set up an Admin user and password, then you are given the opportunity to log in.<\/p>\n<p>If you want to check out the issue I had, upload some files to a new album. Then edit the album and put in a guest user and password and save. Log out, then click on the album you created and locked. Enter the name and password you entered for the guest user. If when you login you can see the album, you are good to go. When I did this process before this procedure, I would try to save the album with the guest user. The name would disappear once I pressed save. Then when I tried to log in I was given an error.<\/p>\n<p>I hope that saves someone some hassles. Good luck.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had all kinds of trouble getting Zenphoto to install on 1and1. None of which I believe are the fault of the Zenphoto project. I am blaming the difficulties on how you need to configure php on 1and1. What problems &hellip; <a href=\"https:\/\/www.cyberward.net\/blog\/2009\/05\/installing-zenphoto-on-1and1\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[101,29,103],"tags":[195,109,194,110],"series":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pffAy-ig","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/posts\/1132"}],"collection":[{"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/comments?post=1132"}],"version-history":[{"count":0,"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/posts\/1132\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/media?parent=1132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/categories?post=1132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/tags?post=1132"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.cyberward.net\/blog\/wp-json\/wp\/v2\/series?post=1132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}