More Photo Gallery Problems

Discussion and Questions about PHP.
camdes
Posts: 2
Joined: Mon Apr 28, 2008 3:10 pm

More Photo Gallery Problems

Postby camdes » Wed May 07, 2008 2:41 pm

I have got my photo gallery working on my test server which is running PHP version 5.2.5. When I try to run it on my remote server it will not run. My Host provider is running PHP version 4.4.6. I have set all the other parameters i.e. Post_Max_Size and File_Upload_Size on my test server to the same as my host (2M).
I have two sets of uploads. One of them is for a thumbnail depicting an album. Here the photograph is uploaded and the thumbnail created and stored in an album directory. The large file is then deleted. That upload works fine.
For the second upload, the photograph is uploaded, resized to 500 px wide and stored in an image directory. That image is then resized again to create the thumbnail and stored in a thumbnail directory. Even if I use the same photograph for the second upload as for the first I get an error back that uploaded file has zero length.
I know I am asking a lot from the server, but no matter how hard I try, I cannot get the staff at the school to resize the photographs before uploading them.

Can anyone suggest why I am having these problems on my host server.

User avatar
admin
Site Admin
Posts: 1303
Joined: Mon Oct 24, 2005 2:07 am
Location: Stuart, FL
Contact:

Re: More Photo Gallery Problems

Postby admin » Thu May 08, 2008 10:52 am

I have got my photo gallery working on my test server which is running PHP version 5.2.5. When I try to run it on my remote server it will not run. My Host provider is running PHP version 4.4.6. I have set all the other parameters i.e. Post_Max_Size and File_Upload_Size on my test server to the same as my host (2M).
I have two sets of uploads. One of them is for a thumbnail depicting an album. Here the photograph is uploaded and the thumbnail created and stored in an album directory. The large file is then deleted. That upload works fine.
For the second upload, the photograph is uploaded, resized to 500 px wide and stored in an image directory. That image is then resized again to create the thumbnail and stored in a thumbnail directory. Even if I use the same photograph for the second upload as for the first I get an error back that uploaded file has zero length.
I know I am asking a lot from the server, but no matter how hard I try, I cannot get the staff at the school to resize the photographs before uploading them.

Can anyone suggest why I am having these problems on my host server.
The quick and easy answer is that there are some major differences in file handling from PHP 4.xx to PHP 5.x.x.

You may be using one or more functions that changed. Could be something to do with a file handle or the temp files you use when resizing/renaming.

We don't have any servers here that still run any version of PHP 4, so I can't even offer to test the script for you.

I can take a look at it when I have a moment if you want to send me a copy attached to a PM.

Chuck


Return to “PHP Q&A”

Who is online

Users browsing this forum: No registered users and 1 guest

cron