I can't find any info on this version. Can anyone help as this isthe version that my stupid web space provider has upgraded there Linux server to and they can't even help.
PHP Version 4.3.11-dev
Hi,
I wonder if it is a good idea to upgrade to a development version of php (but they might have had reasons to upgrade).
Have a look at http://snaps.php.net/
The php 4 archive contains a file named NEWS which contains information about the changes in the development version.
Thomas
well, i know there was that security exploit bug in unserialize() prior to 4.3.10
but in 4.3.10, the unserialize bug was fixed, but it made unserialize() very slow supposedly. the slow performance was said to be fixed in the latest dev version, which must be 4.3.11
i dont know what else is different though.
my hosting company only update there linux server
There's no real 4.3.11-dev version: what they would be using is whatever was available from snaps.php.net when they downloaded it (and that would have been built from whatever was in cvs.php.net at the time. Your hosting company can't even tell you why they upgraded - let alone why they upgraded to that version? You say they only upgraded their Linux host: what version is the Windows host running, and why didn't they upgrade that? If they can't give their customers sensible answers about why they're doing what they're doing to their customers' sites, then you've got to start wondering.
Here are the two examples:
Working version on a Windows server:
http://www.yourfitnesstrainer.co.uk/testupload/upload2.php
Not working version on Linux:
http://www.silverstarsound.co.uk/testupload/upload2.php
I own both these sites and they are both hosted with www.fasthost.co.uk
Here is the phpinfo page for both sites
The main difference is that register_globals is set to off on the Windows host and set to on on the Linux host.
How does the php code look like ? What exactly doesn't work ?
Thomas
I tried using:
pathinfo($upload_dir.$filename);
echo $path_parts['basename'], "\n";
and I get this on the Linux:
C:\Documents and Settings\trevorj\Desktop\image.jpg
Here is the code
<?php
//Chmod it (777)
$upload_dir = "images/"; //change to whatever you want.
// files less than 1MB
$size_bytes = 1048576; //bytes will be uploaded
//check if the directory exist or not.
if (!is_dir("$upload_dir")) {
die ("The directory <b>($upload_dir)</b> doesn't exist");
}
//check if the directory is writable.
if (!is_writeable("$upload_dir")){
die ("The directory <b>($upload_dir)</b> is NOT writable, Please Chmod (777)");
}
//Check first if a file has been selected
//is_filetoupload_file('filename') returns true if
//a file was filetoupload via HTTP POST. Returns false otherwise.
if (is_uploaded_file($_FILES['filetoupload']['tmp_name']))
{
//Get the Size of the File
$size = $_FILES['filetoupload']['size'];
//Make sure that $size is less than 1MB (1000000 bytes)
if ($size > $size_bytes)
{
echo "File Too Large. Please try again.";
exit();
}
// $filename will hold the value of the file name submetted from the form.
$filename = $FILES['filetoupload']['name'];
$tmp_filename = $FILES['filetoupload']['tmp_name'];
// Check if file is Already EXISTS.
if(file_exists($upload_dir.$filename)){
echo "Oops! The file named <b>$filename </b>already exists";
exit();
}
//Move the File to the Directory of your choice
//move_filetoupload_file('filename','destination') Moves an filetoupload file to a new location.
if (move_uploaded_file($_FILES['filetoupload']['tmp_name'],$upload_dir.$filename)) {
//tell the user that the file has been filetoupload
echo "File (<a href=$upload_dir$filename>$filename</a>) uploaded!<br>";
$path_parts = pathinfo($upload_dir.$filename);
echo $path_parts['dirname'], "\n";
echo $path_parts['basename'], "\n";
echo $path_parts['extension'], "\n";
}
else
{
//Print error
echo "There was a problem moving your file";
exit();
}
}
?>
and I get this on the Linux:
C:\Documents and Settings\trevorj\Desktop\image.jpg
Well, that can't be right, because that's a Windows filepath - referring to a file sitting on trevorj's desktop as it happens.
Try uploading a image file using this script on my Linux account of my web hosting company and tell me if you get a local path where the image name should be
Hi,
I tested your form with Firefox 1.0 (Windows) and it worked without any problems.
Thomas
Thanks for all you help.
I'll check in other browsers and see if I get the same problem.
Thanks:o