New to PHP - Photo Gallery

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jamkelvl
Forum Newbie
Posts: 9
Joined: Thu Jun 25, 2009 3:23 pm

New to PHP - Photo Gallery

Post by jamkelvl »

Hey

Here is my explanation of what I want to do, this is as simple as it gets. Actually, it can be even more simple..

- Search a directory of images

- Resize images to 600px wide (Can PHP actually resize the file or does it just shrink it for the browser?)

- Display the images

There is a lot more to this that I want to do but i'm leaving all of that out.

My main concern is I'm sick of manually resizing images and manually creating thumbs and I want to know if PHP can do this for me?

My first step would be to just iterate thru the a directory checking or even getting the image sizes for starters...

I have some code already but the getimagesize function isn't working for me I get this error: Warning: getimagesize(/newsite/impact/HPIM1816 thumb.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /mnt/w0002/d13/s02/b02d93c5/www/newsite/news.php on line 72

Any help?
ziggysquatch
Forum Newbie
Posts: 1
Joined: Thu Jun 25, 2009 4:01 pm

Re: New to PHP - Photo Gallery

Post by ziggysquatch »

I am learning php too and I also am doing a simple photo gallery to start with.

Whenever I get the stream error I either had the path wrong or the file permissions were wrong. I had to make sure that my web group or apache (which is part of my web group) has permissions to access the file.

Hope that helps.
User avatar
juma929
Forum Commoner
Posts: 72
Joined: Wed Jun 17, 2009 9:41 am

Re: New to PHP - Photo Gallery

Post by juma929 »

Hello,

At first glance it seems like an incorrect path, yes PHP can do all of the resizing for you and if you want everything to look nice once its done I would personally suggest a nice package called lightbox built in Javascript (Although it has been overused alot on the net its nice for small tasks).

Thanks.
Post Reply