I've gone through all the advice in the forum and the FAQ and haven't been able to find anything that works.
Here is my gallery:
http://www.housing.uwaterloo.ca/galleries/Here is my phpinfo:
http://www.housing.uwaterloo.ca/phpinfo.phpI have:
- truned mod_rewirte on/off
- checked my folder permissions
- changed my path overrides
- installed the latest version (recommended here:
http://www.zenphoto.org/support/topic.php?id=1635&replies=13)- checked my .htaccess when mod_rewrite was on
- checked my folder permissions again
Any idea of what could be going wrong here? I'm about ready to give up and go look for something else
Comments
Don't go away. We'll be glad to help sort it out for you as best we can.
Please post a copy of your zp-config.php file and your .htaccess file (make sure you blank out the username and password from your zp-config file). That way we can take a peek at what is going on a bit better.
http://www.housing.uwaterloo.ca/galleries/albums/test-album/frontdesk2.jpg
We've seen this before, just not sure exactly why it happens in some instances.
`
<?php /* PUT NOTHING BEFORE THIS LINE, not even a line break! */<br />
$conf = array();
define("DEBUG", false);
/** Do not edit above this line. **/
/**********************************/
/////////// zenPHOTO Configuration Variables //////////////////////////////
// After you're done editing this file, load
// http://www.yoursite.com/zenphotodir/zen/setup.php
// to run the setup (of course, replacing the paths where needed).
// NOTE: web_path and server_path are no longer needed! If you're having problems
// with the auto-detected paths, you can override them at the bottom of this file.
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// Database Information (the most important part!)
////////////////////////////////////////////////////////////////////////////////
$conf['mysql_user'] = "-----";
$conf['mysql_pass'] = "-----";
$conf['mysql_host'] = "-----"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "------";
// If you're sharing the database with other tables, use a prefix to be safe.
$conf['mysql_prefix'] = "zg_";
////////////////////////////////////////////////////////////////////////////////
// General Gallery Configuration
////////////////////////////////////////////////////////////////////////////////
// What you want to call your photo gallery.
$conf['gallery_title'] = "Housing Photos";
// Your web site title and address, if you have one. If not, leave blank.
// These are used to link back to your main site, but your theme must support it.
$conf['website_title'] = "Housing and Residences";
$conf['website_url'] = "http://www.housing.uwaterloo.ca";
// If you're in a different time zone from your server, set the offset in hours:
$conf['time_offset'] = 0;
// If you have Apache mod_rewrite, put true here, and you'll get nice cruft-free URLs.
// MAKE SURE TO EDIT THE .htaccess FILE with your path information.
$conf['mod_rewrite'] = false;
// If mod_rewrite is true above, zenphoto's image page URL's usually end in .jpg,
// set this if you want something else appended to the end (helps search engines).
// Examples: .html, .php, /view, etc.
$conf['mod_rewrite_image_suffix'] = '.php';
// Admin interface username (also required for running setup).
$conf['adminuser'] = "....";
// This isn't that secure, so don't put anything here you don't want anyone to see...
// (but make sure you change it to something other than 1234...)
$conf['adminpass'] = "....";
// The email for the admin user. Used to send notification emails.
$conf['admin_email'] = "mjjack@uwaterloo.ca";
// If you're running a secure server, change this to 'https' (Most people will leave this alone)
$conf['server_protocol'] = "http";
// The character encoding to use internally. Leave at UTF-8 if you're unsure.
$conf['charset'] = 'UTF-8';
////////////////////////////////////////////////////////////////////////////////
// Image Processing Configuration
////////////////////////////////////////////////////////////////////////////////
// JPEG Compression quality for all images and thumbnails (respectively):
$conf['image_quality'] = 85;
$conf['thumb_quality'] = 75;
// Default image display width (themes will be able to control this
// to an extent in the future, but for now you may have to adjust it to fit your theme).
$conf['image_size'] = 595;
// If this is set to true, then the longest side of the image will be $image_size.
// Otherwise, the *width* of the image will be $image_size.
$conf['image_use_longest_side'] = true;
// Allow images to be scaled up to the requested size? This could result in loss
// of quality, so it's off by default.
$conf['image_allow_upscale'] = false;
// Default thumbnail size and scale:
// If $thumb_crop is set to true, then the thumbnail will be a centered portion of the image
// with the given width and height after being resized to $thumb_size (by shortest side).
// Otherwise, it will be the full image resized to $thumb_size (by shortest side).
// NOTE: thumb_crop_width and height should always be less than or equal to thumb_size
$conf['thumb_size'] = 100;
$conf['thumb_crop'] = true;
$conf['thumb_crop_width'] = 85;
$conf['thumb_crop_height'] = 85;
// Add a small amount of unsharp mask to thumbnails? Slows thumbnail generation on slow servers.
$conf['thumb_sharpen'] = false;
// Paging options:
// Control of their display is done in the theme, so you might need to change these
// after switching themes to make it look better.
$conf['albums_per_page'] = 10;
$conf['images_per_page'] = 15;
////////////////////////////////////////////////////////////////////////////////
// Comment cleaning configuration
////////////////////////////////////////////////////////////////////////////////
// Tags and attributes allowed in comments
// Follow the array form array('tag' => array('attribute' => array()))
$conf['allowed_tags'] = array (
'a' => array ('href' => array (), 'title' => array ()),
'abbr' => array ('title' => array ()),
'acronym' => array ('title' => array ()),
'b' => array (),
'blockquote' => array ('cite' => array ()),
'code' => array (),
'em' => array (),
'i' => array (),
'strike' => array (),
'strong' => array (),
'ul' => array (),
'ol' => array (),
'li' => array (),
);
////////////////////////////////////////////////////////////////////////////////
// Path Overrides
////////////////////////////////////////////////////////////////////////////////
// Uncomment the following two lines ONLY IF YOU'RE HAVING PROBLEMS,
// like "file not found" or "not readable" errors.
// These allow you to override Zenphoto's detection of the correct paths
// on your server, which might work better on some setups.
////////////////////////////////////////////////////////////////////////////////
// define('WEBPATH', '/galleries');
//define('SERVERPATH', '/www/htdocs/infohous/galleries/');
/** Do not edit below this line. **/
/**********************************/
$_zp_conf_vars = $conf;
?>
`
.htaccess:
`
# htaccess file for zenphoto
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.
RewriteEngine On
#### !!! Change this to the web path (eg: http://www.example.com/photos --> /photos) !!!
RewriteBase /galleries
####
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]
`
Thanks for helping
And also, I blanked out the admin username/password for you on your post (anyone could get into your admin interface using that.)
Your PHPinfo looks OK, safe_mode is off, it was compiled with GD. Just for grins, comment out this line: `$conf['mod_rewrite_image_suffix'] = '.php';`
It shouldn't be used if mod_rewrite is off, but I just want to make sure.
I checked the database and there is data in there. I also commented out that mod_rewrite line.
`http://www.housing.uwaterloo.ca/galleries/zen/i.php?a=test-album&i=welcome.jpg&s=thumb`
I get:
`Fatal error: Call to undefined function: imagecreatefromjpeg() in /fsys3/www/htdocs/infohous/galleries/zen/functions.php on line 87`
which looks like something isn't able to get to the zen directory OR the functions.php isn't there.
Hmmm. Is the path above `/fsys3/www/htdocs/infohous/galleries/zen/functions.php`, does that look right?
Edit: I was having some problems with permissions last week but it seems to be sorted now. I'm in a bit of a weird situation because I access the site directly through the network rather than uploading anything. It's easier most of the time, but it means attempting to set permissions through explorer. The albums and cache directories look to be set to 777. I'm trying to get SSH access to check that again.
I found another article with a similar error:
http://www.zenphoto.org/support/topic.php?id=1022&replies=9#post-5588
Looking at your phpinfo, it states GD is installed, but that error may relate to GD either not working properly, or not configured correctly on the server you are on. It seems strange as phpinfo is reporting it is OK, but for some reason it can't access that imagecreatefromjpeg function.
Just for grins, could you check with your host (or whoever manages your server) and see if they can double-check whether GD is at issue? That will help me rule out that GD is OK. I also noted that jpeg support must be compiled with gd for this to work (after referencing the proper support articles.)
I looked at my phpinfo for comparison:
`'./configure' '--prefix=/usr/local/php5' '--enable-fastcgi' '--with-mysql=/usr' '--enable-calendar' '--enable-force-cgi-redirect' '--with-config-file-path=/etc/php5/cgi' '--enable-trans-sid' '--with-gd' '--with-xml' '--with-xsl' '--with-ttf=/usr' '--with-freetype-dir=/usr' '--enable-exif' '--with-xslt' '--with-xslt-sablot=/usr' '--with-dom-xslt=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-pdo-mysql' '--enable-ftp' '--with-curl=/usr' '--with-pspell=/usr' '--enable-mbstring' '--with-mcrypt' '--with-mysqli' '--with-openssl=/usr' '--with-gettext'`
Note the `--with-jpeg-dir=/usr` which does not exist in your implementation for some reason, which would account for the unknown function error.
So:
1. You can directly link to the images, which means they are there.
2. Your database is populated
3. You cannot process the images from within zenphoto, meaning that something is at odds with the functions that call the image processing functions.
Let me know what you find out from your host. I'd be interested to see, as this would answer many questions for people on the forum, this is a frequent problem.
1. Is GD compiled with JPG and PNG support? (PNG is not absolutely essential, but it should be there anyhow)
2. Is with-jpeg-dir compiled as well?
Here is the article I referenced in case they ask (from PHP.net):
http://us2.php.net/imagecreatefromjpeg
Note that they state the `with-jpeg-dir` needs to be compiled in the list before `with-gd` for it to recognize the compiled support correctly.
I think they are going to give me access to a different server to try to put this on. I'll let you know how it goes (I work for a university - they usually don't keep that many scripts like this on the main web server. It's annoying!)
As a network admin myself in my day job, I can understand why. Universities are always hit the hardest with people trying to exploit systems, and the less stuff you compile in your server to support these sorts of programs, etc. the better your security is.
Anyhow, let me know. I'll be glad to help further on the new server when you have it going.