Installation of the gallery is fairly simple and if you follow the following steps, you should be up and running in less than 10 minutes.
Step 1: Extract the contents of the zip file of your script.
You should find the following content:
- photo-gallery folder: This includes all the folders, php codes and files that you will need to upload to your server/host to run the script. Don't upload it just yet, just make sure it is there.
- gallery.sql file: This is the file that contains the sql commands that will set up your database tables and settings. See step 2.
- license.html: This is explains what you can do and can not do with the script. Please read it.
Step 2: Create a MySQL database on your server and note the server, database name, database username, and the database password.
Step 3: Execute the gallery.sql file included in your zip file against your database.
This step will depend on how you manage your databases. You can either import the gallery.sql file or open it through an editor such as notepad, copy the MySQL commands in it and run it in your database.
Step 4: Open the "configuration.php" file included in the photo-gallery folder using any text or php editor. Lines 2 to 6 contains variables that you will change. Only change the values between the quotes (in red below) and ignore everything else.
- $dbhost = 'Your MySql Server'; /* your database server - */
- $dbname = 'Database Name'; /* your database name - */
- $dbuser = 'Database Username'; /* your database username - */
- $dbpass = 'Database Password'; /* your database password - */
- $manager_password = 'admin'; /* manager password */
Note: make sure to leave the quotes surrounding the variables intact otherwise you will start receiving errors!
Save the configuration.php file and now you are ready to upload.
Step 5: If you want to run the gallery from your root folder; that is, if you want to access the gallery through http://www.yourdomainname.com, upload the contents of the photo-gallery folder to the root folder of your hosting account. If you want to add the gallery as an extension to your website, you then can upload the folder photo-gallery as is to your hosting account. The link to your gallery in that case will be http://www.yourdomainname.com/photo-gallery/ . You can also create your own folder and upload the contents of the photo-gallery folder into that folder. In that case the link to your gallery will be http://www.yourdomainname.com/your-folder/.
Step 6: chmod the photos directory to 777 and the thumps under photos directory to 777
Step 7: You can now test your gallery installation by going to the link in step 5, but for the gallery to work fine you will need to set the website url in the managers setting. You do that by going to the manager's page of the gallery at: http://www.yourdomainname.com/your-inastallation-folder/manager/
- Login using the password that you have set in step 4 above.
- Click on the Settings link in the header.
- Enter the url from step 5 in the Gallery URL field. Don't forget to enter the slash at the end.
- Click the update settings button
For security reasons, you might want to change the name of the folder 'manager' to a name that only you know. You can name it any thing that is hard to guess but easy to remember. Renaming the manager folder will not effect the functionality of the manager's pages.
You are now ready to start uploading images by clicking the Albums link from the managers header, click Create New Album, create the album and then click the upload images to that album.
If you still did not get your copy of the php/mysql photo gallery... Get It Now
Attachments & Downloads
No attachments were found.Would you like to...
Subscribe me (Subscribe to receive notification when this article is updated.)

