View Full Version : PHP Photo abum script error - xxx is undefined

03-14-2012, 12:29 PM
1) Script Title: PHP Photo Album script v2.11

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm

3) Describe problem:

Hi Guys

I am not a code junkie so my skills with html, js etc are very limited.

I tried the script but I get an error. I am pretty sure I followed the intsruction correctly and I think I got the PHP working preoperly on my IIS (w2k3) server.

Initially I had an 403 error and a message saying I could not execute scripts, but I fixed that.

I followed the instrucitons here for installing and setting up php

The php.ini file was oroginally called php.ini-production which I copied and renamed. ( I hope this was right).

Webpage error details (from ie7)

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET4.0C; .NET4.0E)
Timestamp: Thu, 15 Mar 2012 00:01:20 UTC

Message: Syntax error
Line: 1
Char: 1
Code: 0

Message: 'Cam1' is undefined
Line: 29
Char: 1
Code: 0

This is the file Camera1.php. Its pretty much just what is given on the page - just want to see it working before I try spicing it up.

<script type="text/javascript" src=""></script>

<script type="text/javascript">

//Optional, manual description for particular pictures inside album
//Syntax: albumid.desc[index]="Picture description here"
//eg: myvacation.desc[2]="This is description for the 3rd picture in the album"
//eg: myvacation.desc[6]="This is description for the 7th picture in the album"


<script type="text/javascript" src="ddphpalbum.js">

* PHP Photo Album script v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more


<link rel="stylesheet" type="text/css" href="ddphpalbum.css" />
<script type="text/javascript">

new phpimagealbum({
albumvar: Cam1, //ID of photo album to display (based on getpics.php?id=xxx)
dimensions: [3,2],
sortby: ["file", "asc"], //["file" or "date", "asc" or "desc"]
autodesc: "Photo %i", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
showsourceorder: true, //Show source order of each picture? (helpful during set up stage)
onphotoclick:function(thumbref, thumbindex, thumbfilename){
thumbnailviewer.loadimage(thumbref.src, "fit2screen")



Thanks for any help