Re: upload problems
| From: | Yanglong Zhu | Date: | Mon, 07 Apr 2003 19:28:02 +0000 |
| Subject: | Re: upload problems | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142738@lists.php.net to get a copy of this message | ||
Yanglong Zhu wrote:
Hi there, My uploading page worked fine untill I upgraded the PHP from 4.1.0 to 4.2.2 on a RH 8.0. I looked at the code which is intact. the same code works just fine on another machine, running php 4.1.2 on RH 7.3. Since I have been messing with many different ways now, there are two main themes of complaits from the server. One is "the document contains no data". The other is that I could upload test files, but not images, or images will get choped at different position of the image. I got quite confused as to not knowing which is due to my coding error, which is due to the upgrading. I'm quite sure it is related to upgrading. Or am I sure? I tried everything I know, including turning the register_globals on in the php.ini, using get_defined_vars(). Do you have any idea? Help please. Yanglong Hey,I found a solution / circumvention. But a bit more about the investigation first. I checked all POST uploading related parameters in the php.ini file. There are vastly aboundant room for my upload. However, I could never get it through. Now I know the constant complaint from the server (when the upload is done on a Mozilla 1.3 on RH 8.0 box) is:
The document contains no data.
That's obviously not true. Or (on Konqueror 3.0.3-14 using KDE 3.0.3-8.3 RedHat on RH 8.0 box) the complaint is:
An error occured while loading https://123.45.67.89/uploading.php:
The process for the https://123.45.67.89 protocol died unexpectedly.
Or (on a Mozilla 1.3 on Windows ME box) the uploading goes through. But the uploaded file cannot be viewed because it contains errors.
I found a way to circumvent the problem. I asked the httpd (apache server) to send files with extension .xyz to PHP processor. Like this: (notice everything is a native setting except the .xyz)
*******************************************
#<IfModule mod_php4.c>
AddType application/x-httpd-php .php4 .php3 .xyz
AddType application/x-httpd-php-source .phps
#</IfModule>
*******************************************
Then renamed the uploading page uploading.xyz. PHP engine processes my PHP uploading page (with .xyz extension) normally, without all the other limitations / restrictions on .php extension set by whoever when the installation / upgrade is done.
Although this is a nice trick, and works fine, I still want to know from where in the upgraded PHP 4.2.2 on RH8.0 box the trouble comes. And best yet (a bit off track here), if you guys can help me find out what are the differences in the browsers that make them seemingly see the same problem as quite different things and handle the same problem quite differently.
Thanks.
Yanglong