Trouble with Zen and displaying pictures after an upload.

The install went pretty easy. After the honeymoon was over I had a few problems. I know it is something I am doing but I am not sure what. I know this has been asked a hundred times and I have read the posts and still have no found my answer. Sorry if this is a tired post.

1) ZP will allow me to upload photos, but it does not display the thumbs next to the gallery link.

2) ZP would not function unless I added a folder in the ZenPhoto dir called albums. I check the config and ht files and I do not understand what I am doing wrong.

3) The link in the Gallery that has no picture is directed to another folder that exists elsewhere on my server. If I move the folder to where the link points it shows me a directory view of the contents.

I am running Windows Enterprise Server 2003 SP1
Apache/2.0.59 (Win32)
PHP 5.2.0
MySQL 5.027

I have VNC installed and also a test file under http://www.laterza.net/zenphoto/test.php

*******************************************************
**************Here is the HTACCESS File:***************
*******************************************************

`

# 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 /zenphoto

RewriteCond %{REQUEST_FILENAME} -f [NC,OR]

RewriteCond %{REQUEST_FILENAME} -d [NC]

RewriteRule ^.*$ - [R,L]

RewriteRule ^admin/?$ zen/admin.php [R,L]

RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]

RewriteRule ^([^/]+)/?$ index.php?album=$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/([^/\]+)$ albums/$1/$2 [L]

RewriteRule ^([^/]+)/([^/\]+)$ index.php?album=$1&image=$2 [L,QSA]



`

*****************************************************
************Here is the ZP-Config.php File:**********
*****************************************************
`

<?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'] = "XXXXX";

$conf['mysql_pass'] = "XXXXX";

$conf['mysql_host'] = "localhost"; // Won't need to change this 90% of the time.

$conf['mysql_database'] = "mysql";

// If you're sharing the database with other tables, use a prefix to be safe.

$conf['mysql_prefix'] = "";

////////////////////////////////////////////////////////////////////////////////

// General Gallery Configuration

////////////////////////////////////////////////////////////////////////////////

// What you want to call your photo gallery.

$conf['gallery_title'] = "my photos";

// If you're in a different time zone from your server, set the offset in hours:

$conf['time_offset'] = 0;

// Tags allowed in comments

$conf['allowed_tags'] = "";

// 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'] = true;

// Admin interface username (also required for running setup).

$conf['adminuser'] = "XXXXX";

// 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'] = "XXXXX";

// The email for the admin user. Used to send notification emails.

$conf['admin_email'] = "blaterza@gmail.com";

// 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;

// 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'] = 5;

$conf['images_per_page'] = 15;

////////////////////////////////////////////////////////////////////////////////

// Path Overrides

////////////////////////////////////////////////////////////////////////////////

// Uncomment the following two lines ONLY IF YOU'RE HAVING PROBLEMS.

// These allow you to override Zenphoto's detection of the correct paths

// on your server, which might work better on some setups.

////////////////////////////////////////////////////////////////////////////////

//define('WEBPATH', '/zenphoto');

//define('SERVERPATH', '
http://www.laterza.net/zenphoto');

/** Do not edit below this line. **/

/**********************************/

$_zp_conf_vars = $conf;

?>

`
Thank you for your time.

Comments

  • If I change the mod_rewrite to false I get a new page but still no pictures. :-(
  • trisweb Administrator
    Well, since you had no `/albums` directory (that should have been included in the install file) you also need to create a `/cache` directory.

    It seems like your server isn't supporting mod_rewrite also, so turn that to off.

    Let me know if you need more help. :)
  • trisweb Administrator
    More: after manually loading the image processor, as follows:

    `http://www.laterza.net/zenphoto/zen/i.php?a=test2&i=Untitled-9.jpg&s=400`

    We get this error, which means the PHP GD Extensions are not installed on your server.

    `Fatal error: Call to undefined function imagecreatefromjpeg() in C:\wamp\www\zenphoto\zen\functions.php on line 57`

    In a WAMP installation, that usually means that you need to load the library in your php.ini and set the appropriate paths. Not too hard if you have control over that.
  • OK I added the folder Cache, turned off mod_rewrite and turn on the PHP GD Extensions.

    SNAP! I get thumbs now! Only problem is when I click a thumb I get "<a href=" I did read somewhere that this had to do with my theme, so I went from default to stop design. I was able to get into the page with photos but it did not look right, also I could not click the pictures and see a larger version (forbidden). I then went back to default and I get the "<a href=" error again.

    We have already proven that Zen is working fine and it is my setup the needs fixed, so what did I do wrong this time? LOL. Thank you for the help!
  • I am looking at my php.ini and I do not see where I should make the changes, here is the Pths section:

    ;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Paths and Directories ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;

    ; UNIX: "/path1:/path2"
    ;include_path = ".:/php/includes"
    ;
    ; Windows: "\path1;\path2"
    ;include_path = ".;c:\php\includes"

    ; The root of the PHP pages, used only if nonempty.
    ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
    ; if you are running php as a CGI under any web server (other than IIS)
    ; see documentation for security issues. The alternate is to use the
    ; cgi.force_redirect configuration below
    doc_root =

    ; The directory under which PHP opens the script using /~username used only
    ; if nonempty.
    user_dir =

    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "c:/wamp/php/ext/"

    ; Whether or not to enable the dl() function. The dl() function does NOT work
    ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
    ; disabled on them.
    enable_dl = On

    ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
    ; most web servers. Left undefined, PHP turns this on by default. You can
    ; turn it off here AT YOUR OWN RISK
    ; **You CAN safely turn this off for IIS, in fact, you MUST.**
    ; cgi.force_redirect = 1

    ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
    ; every request.
    ; cgi.nph = 1

    ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
    ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
    ; will look for to know it is OK to continue execution. Setting this variable MAY
    ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
    ; cgi.redirect_status_env = ;

    ; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
    ; security tokens of the calling client. This allows IIS to define the
    ; security context that the request runs under. mod_fastcgi under Apache
    ; does not currently support this feature (03/17/2002)
    ; Set to 1 if running under IIS. Default is zero.
    ; fastcgi.impersonate = 1;

    ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
    ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
    ; is supported by Apache. When this option is set to 1 PHP will send
    ; RFC2616 compliant header.
    ; Default is zero.
    ;cgi.rfc2616_headers = 0

    ;;;;;;;;;;;;;;;;
    ; File Uploads ;
    ;;;;;;;;;;;;;;;;

    ; Whether to allow HTTP file uploads.
    file_uploads = On

    ; Temporary directory for HTTP uploaded files (will use system default if not
    ; specified).
    upload_tmp_dir = "c:/wamp/tmp"

    ; Maximum allowed size for uploaded files.
    upload_max_filesize = 6M

    ^
    ----------------------| By changing this will I allow larger than 2MB files?
  • I know it is something I am missing, I just cannot seem to find it! I never was very good at programming.
  • I found a thread from another user:

    clam Member wrote:

    "I fixed it for my system!

    You will need to make the following change to the php.ini file on your server:

    Find the line "zend.ze1_compatibility_mode = off" and change it to "zend.ze1_compatibility_mode = on" (without the quotes).

    This seemed to fix the issue for my configuration... Hope that helps! "

    This worked for me. Thank you Clam and Thank you Tris for your help also. This program really is the best.
  • The only problem I am finding now is that users cannot comment pictures.
Sign In or Register to comment.