Link to home
Create AccountLog in
Avatar of IdlersDream

asked on

Dynamic image wont show up on site, even though on server

I am fairly new to php, so you may find this one really simple.
My error is very similar to the one found here :

My page can be found at:

However, the file type is not in higher case, so I don't know where or why it is going wrong. Any help would be appreciated!

My source code is identical to that in the previous problem, but I attempted the lower-case transformation that HIELO suggested, and it brought up the following error:

Fatal error: Call to undefined function: str_to_lower() in /mnt/gs01/herd02/32364/domains/ on line 18
Like i said, any help would be gratefully received, as it is driving me insane!
Avatar of bansidhar
Flag of India image

the function is strtolower() not str_to_lower()
Avatar of IdlersDream


I see that it should be strtolower() not str_to_lower().

However, I am still getting no images, although they are on the server.

What else could I be doing wrong?
After I add the album, the list-album page has this as the source code for the album thumbnail.

<img src="../viewImage.php?type=album&name=75ddef87701b1e77433beaf35eebffbc.jpg" border="0" />

Should this be something different?
I did a checking on your site. The images are stored in /35/gallery/images/album/ and your script is referring the images in 35/images/album/ folder.

You have 2 options, move the images or remove the first ../ from the image path
Thanks, that has solved part of it!

I can see the pics at

However, I can't see any new ones that I add, nor can I see any within the admin panel.
check if you have the images in the folder.
the error message copied from your server:
Warning: filesize() [function.filesize]: Stat failed for images/album/2b3b747c17d91ee1e0bc8bb972b128d6.jpg (errno=2 - No such file or directory) in /mnt/gs01/herd02/32364/domains/ on line 31

this means that /35/gallery/images/album/2b3b747c17d91ee1e0bc8bb972b128d6.jpg does not exist.

Check if you have all the images
Im not really sure where you got that from, if im honest.

Now there are just four images on my server, and there are four 'albums' in my admin panel.
I can see them if I open the album, but cant see them on the 'list-album' page in the admin sction.
When I try to add new albums, the image doesn't go into the server.
sorry for late reply, was traveling on the weekend.

Here is how to debug such scripts. the links are from your site.

first get the url of the image which is not working. here is the url of the image tes.

copy this url and paste to the browser's address bar and you will get the exact errors. In this the first error is the real error
Warning: filesize() [function.filesize]: Stat failed for images/album/93949cbe62a58b7aa5dbe296f2589ad4.jpg (errno=2 - No such file or directory) in /mnt/gs01/herd02/32364/domains/ on line 31

the next 3 errors are due to this error.

I know what you mean, and i can see that. But what am I supposed to do?
I can see the album thumbnails that i uploaded the other day, but not any recent ones. Why is that?
The file directory for my images hasnt changed, so what am i supposed to do?
Im sorry for bugging you, but i feel no closer to knowing what i should do.
What I don't get is: when I upload an image, it goes onto the server, in the file directory specified- because i can see it. When it comes to displaying it, it cannot find it.

I realy don't get this because all of the scripts are working from the same config.php file, so they should upload to and download from the same directory, should they not?
I have managed to get a working gallery, at long last! I am unsure as to if it is perfect, but it works.

It was because the page for uploading images and the page for viewing the images were within different folders, so the image directory was different for both of them.

for adding images, the directory needs to be: ../images/album/
while for viewing images, it has to be: images/album/

I know it is very simple, and I am very grateful for your help, bansidhar.

Now i know why i could see the images that i had uploaded before i altered the image directory, but only until i changed it back again!
Avatar of bansidhar
Flag of India image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks very much! You were a great help! Glad I joined the Experts Exhange, was the best solution!