I am using the JAVA Applet known as Rad Upload – http://www.radinks.com/upload/ the APPLET crashes an generates an Internal Server Error.
We made all the adjustments both Apache and PHP to upload larger images. This is the issue. There seems to be an issue with PHP itself. We made an exact duplicate of the upload scripting on another server. One works and their other does not.
The one that works
PHP Version 5.2.5 running as Apache
The one that is not working
PHP Version 5.2.13 running as CGI
According to the hosting company there is no error logs say what is the issue. They can see that the images are being Posted, and when it comes time to run the Upload Scripting it crashes before it even accesses this.
Even though this isn’t the issue here is the upload script.
Please note this is not the final upload scripting being used. This is a strip down version for testing – even this stripped down does not work. We have gone to the point of using a blank upload script with no PHP at all. And still get the internal server error with logs being produced.
session_start();
$photo = $_FILES['userfile'];
$count = count($photo['name']);
if (!is_dir('./'.$_SESSION['order'])) {
mkdir('./'.$_SESSION['order']);
}
for ($i=0; $i < $count; $i++) {
move_uploaded_file($photo['tmp_name'][$i], './'.$_SESSION['order']/'.$photo['name'][$i]);
}
The web site has been moved to another newer server and the same issue. I believe it has something to do with PHP running as CGI. As this is the only difference between both scenarios.
Does this make any sense and has anyone seen this?
The problem has been solved. PHP was not compiled correctly. After moving me to a new server … bam! Uploading works.
For those concerned about the security, thank you for your comments. Yes it has all been put back.