Hi everybody,
I'm trying to install this wonderful gallery, but I've some problems.
My blog is on a Windows 2003 server
http://www.nighted.com but I have also space on a linux server
http://lnx.nighted.comI uploaded the content of "zenphoto" directory in this path:
http://lnx.nighted.com/galleryand I gave chmod 777 to albums and cache directories.
After having modified the zp-config.php with mysql database name, password and username, I tried to keep the mod_rewrite turned on and I modified the .htaccess file like this:
#### !!! Change this to the web path (eg:
http://www.example.com/photos --> /photos) !!! ####
RewriteBase /gallery
I got an "Internal server error" on a linux-apache based server with working php, gd libraries and everything needed.
So I tried to turn off the mod_rewrite setting it to "false" in the zp-config.php file.
Nothing... just the "internal server error" every time! I tried to change the "localhost" setting to my host ip, but didn't work.
Then I tried everything on the Win2003 server, and It works without thumbnails and pictures preview because of the lack of GD libraries. (take a look at
http://www.nighted.com/gallery/)So...
Where is the problem? The Linux server? Something wrong?
Any suggestion?
Thanks in advance for any support!!
Comments
Let's start with your Linux/Apache server first. It will be helpful for us to see:
1. Output of phpinfo on your web server. Here's how:
Here's what you can place in the file (and save it as phpinfo.php):
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
2. Show us a copy of your zp_config.php file, and your .htaccess files, and make sure to remove your admin/password information from the zp_config.php before posting it.
3. Make sure you have everything properly linked and installed for PHP, MySQL, Apache, etc. (just double check, sometimes you can miss something...)
4. Also try removing the htaccess file altogether. You may even have mod_rewrite support, and the file itself may be causing issues.
Post here once you've done that, and we'll be happy to help get it straightened out for you.
I know about mod_rewrite on IIS, it was just a test to see if I made mistakes. I want to use zenphoto on the Linux/Apache server.
1. I don't know php and I don't know why pasting the code you send me in a php file doesn't work on the server, it gaves me the internal server error. Anyway there is another php test provided by the service provider that works.
I don't paste the result here 'cause it's too long, but you can check it here:
http://lnx.nighted.com/phpinfo.php (your script)
http://lnx.nighted.com/phptest.php (provider's script)
The script of the provider is this one:
<?php
ob_start();
phpinfo();
$php_info=ob_get_contents();
ob_end_clean();
$php_info=ereg_replace("<img border=\"0\" (.*) alt=\"PHP Logo\" />","",$php_info);
$php_info=ereg_replace("<img border=\"0\" (.*) alt=\"Zend logo\" />","",$php_info);
echo $php_info;
unlink($_SERVER["SCRIPT_FILENAME"]);
?>
2. Here is just what I modified from zp-config.php:
$conf['mysql_user'] = "<username>";
$conf['mysql_pass'] = "<password>";
$conf['mysql_host'] = "62.149.150.61"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "Sql155xxx_1";
// If you're sharing the database with other tables, use a prefix to be safe.
$conf['mysql_prefix'] = "zp_";
$conf['mod_rewrite'] = false;
// define('WEBPATH', '/gallery');
// define('SERVERPATH', '/full/server/path/to/gallery');
I tried also
define('WEBPATH', '/gallery');
define('SERVERPATH', '/web/htdocs/www.nighted.com/home/gallery');
and I tried "localhost" on the mysql-host and "true" on the mod_rewrite.
Here is the .htaccess file:
# htaccess file for zenphoto
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.
<IfModule mod_rewrite.c>
RewriteEngine On
#### !!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!! ####
RewriteBase /gallery
RewriteRule ^admin/?$ zen/admin.php [R,L]
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^.*$ - [R,L]
RewriteRule index\.php$ index.php [L,QSA]
RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
RewriteRule ^page/([A-Za-z0-9\-_]+)/?$ index.php?p=$1 [L,QSA]
RewriteRule ^(.*)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
RewriteRule ^(.*)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zen/i.php?a=$1&i=$3&s=$2 [L,QSA]
RewriteRule ^(.*)/image/([^/\\]+)$ zen/i.php?a=$1&i=$2 [L,QSA]
# Catch-all - everything else gets handled in PHP for compatibility.
RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA]
</IfModule>
3. Apache works, php seems to work (from the test, even if I honestly I don't understand why doesn't work with your script), MySQL works otherwise I couldn't use zenphoto on the ISS server, right?
4. I removed the .htaccess file, keeping the mod-rewrite set to false and then to true, but nothing happened.
Thanks again!
<?php
ob_start();
phpinfo();
$php_info=ob_get_contents();
ob_end_clean();
$php_info=ereg_replace("<img border=\"0\" (.*) alt=\"PHP Logo\" />","",$php_info);
$php_info=ereg_replace("<img border=\"0\" (.*) alt=\"Zend logo\" />","",$php_info);
echo $php_info;
unlink($_SERVER["SCRIPT_FILENAME"]);
?>
I'll try to find something else regarding my host (www.aruba.it) and zenphoto. Then, eventually, if I can't find any solution I'll try to contact my webhost.
Thanks a lot for the support
Now I need just to create a new theme! :-)
Thanks a lot for your help!