photos will not upload

Ok, I got the installation to the point where I can create albums in the albums directory, and see themwhen I goto www.mydomain.com/gallery, but, when I add photos, it creates an album and puts the description in, but will not display the photo or the thumbnail. I have tried for hours and can't get it, I need some help, please.

Here are my .htaccess and config files:

HTACCESS:::::::::::

# 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

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]

</IfModule>

ZP CONFIG.PHP

<?php /* PUT NOTHING BEFORE THIS LINE, not even a line break! */
$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'] = "dbuser";
$conf['mysql_pass'] = "dbpwd";
$conf['mysql_host'] = "mysql.mysite.com"; // Won't need to change this 90% of the time.
$conf['mysql_database'] = "gallery";

// If you're sharing the database with other tables, use a prefix to be safe.
$conf['mysql_prefix'] = "zp";

////////////////////////////////////////////////////////////////////////////////
// General Gallery Configuration
////////////////////////////////////////////////////////////////////////////////

// What you want to call your photo gallery.
$conf['gallery_title'] = "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'] = "<i><b>



";

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

// Admin interface username (also required for running setup).
$conf['adminuser'] = "admin";
// 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'] = "admin_pass";

// The email for the admin user. Used to send notification emails.
$conf['admin_email'] = "webmaster@mysite.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', '/');
// define('SERVERPATH', '');

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

$_zp_conf_vars = $conf;

?>



Comments

  • never mind, found the problem, it was in my php.ini file, the "upload_max_filesize" was set to 10 not 10M.

    I noticed this when I was trying to upload files to an album, it created the album but would not display or create a thumbnail or picture, on the upload page, it seemed like it completed, I didn't get any errors, it looks like the code for checking if the picture exists when uploaded needs to be fixed, but I did notice that under the upload tab it said;

    The maximum size for any one file is 10B. Don't forget, you can also use FTP!

    Then I looked for this and found this in admin.php and found that it looked for this in php.ini, I checked my php.ini file and found that I must have accidently left out the M after the 10 in the upload_max_filesize entry. once I corrected that, when I went to the upload tab it now looked like this;

    The maximum size for any one file is 10MB

    and everything worked!!!

    Hope this helps someone.
  • trisweb Administrator
    Very helpful, thanks!

    In the next version, and currently in SVN, Zenphoto will try to set the `upload_max_filesize` and `memory_limit` to a reasonable size with an `ini_set` call, which might work on some systems and avoid problems like this.
  • you're welcome, great to see a usefull and simple script not loaded with a bunch of features you don't need.
  • Howdy,

    I tried altering these:

    * .htaccess --> did not work
    * zp-config.php --> did not work.

    To make the upload size increase work, do this:

    Make a php.ini file. And, put in the /zp-core directory. The php.ini only needs these two lines and nothing else.

    post_max_size = 128M;
    upload_max_filesize = 128M;

    I made the upload size huge, but I'm the only one posting, so am not worried about others abusing the upload size.
Sign In or Register to comment.