Very Very strange problem in opensuse 11.1, file uploading reports"not an image file"
Very Very strange problem in opensuse 11.1, file uploading reports"not an image file"
am 16.01.2010 17:18:15 von joydeep
Dear list,
I am banging my head with a strange problem I have never never and never
seen before. A site is functional and running on a debian lenny server.
The site provides a file upload section and files are uploaded
successfully even with 10MB size. I have migrated the site to an
opensuse 11.1 server. The sites is running there BUT the big hitch is
with file uploading part. I can see the files are transferred but after
that it simply reports "Not an Image file". And this is happening with
all files even with image ( jpg, bmp etc..) and with as small as 1KB
and as big as 500KB. I have checked the log with "Loglevel debug" and
there is nothing in the error log which can give any hints.
I am really clueless :-( I know it is difficult to say something with
the above information but is any of you by any luck has a single
hint ? Let me confirm again that the same site is running fine in
debian lenny. The opensuse 11.1 (64 bit ) packages are
apache2 - 2.2.10-2.5
apache2-worker - 2.2.10-2.5
apache2-utils - 2.2.10-2.5
apache2-prefork - 2.2.10-2.5
apache2-mod_php5 - 5.2.6-49.13
php5 - 5.2.6-49.13
mysql -5.0.67-12.15
---- with other php5 module
a2enmod lists
` ` `
#a2enmod -l
actions alias auth_basic authn_file authz_host authz_groupfile
authz_default authz_user authn_dbm autoindex cgi dir env expires
include log_config mime negotiation setenvif ssl suexec userdir php5
rewrite unique_id security2 headers
` ` `
If someone needs more info then please ask me, Please. Kindly help
me to find out which causing this problem.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 16.01.2010 17:31:28 von rambo
On Sat, 16 Jan 2010 21:48:15 +0530
"J. Bakshi" wrote:
> Dear list,
> that it simply reports "Not an Image file". And this is happening with
> all files even with image ( jpg, bmp etc..) and with as small as 1KB
> and as big as 500KB. I have checked the log with "Loglevel debug" and
> there is nothing in the error log which can give any hints.
Can you check if the files are actually uploaded and are viewable with
ordinary image viewer? This looks like problem with PHP or CGI script you use
to upload than apache. Enable error reporting in php.ini if it's not on.
Analyze the script that serves as upload gateway.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 16.01.2010 18:12:17 von joydeep
On Sat, 16 Jan 2010 17:31:28 +0100
Marcin 'Rambo' Roguski wrote:
> On Sat, 16 Jan 2010 21:48:15 +0530
> "J. Bakshi" wrote:
>
> > Dear list,
>
> > that it simply reports "Not an Image file". And this is happening
> > with all files even with image ( jpg, bmp etc..) and with as small
> > as 1KB and as big as 500KB. I have checked the log with "Loglevel
> > debug" and there is nothing in the error log which can give any
> > hints.
>
> Can you check if the files are actually uploaded and are viewable with
> ordinary image viewer? This looks like problem with PHP or CGI script
> you use to upload than apache. Enable error reporting in php.ini if
> it's not on. Analyze the script that serves as upload gateway.
Many thanks for your kind attention. I have already checked in the suse server and the files are not uploaded in the folder where they suppose to be. Though in debian server the folders do have all the uploaded files. Regarding the script, I have found codes which are actually doing the upload (though I am not a php coder)
` ` `
function fileUploder(){
$upload_file_path = 'fileadmin/user_upload/images/profile/';
$file_size = 1000000;
$file_type_list= Array('image/png','image/jpeg','image/gif','application/octe t-stream','image>
$upload_flag = false;
$msg = '';
$target_path = '';
// Check the file parameters
$upload_file_type = $GLOBALS['HTTP_POST_FILES']['profile_image']['type'];
if(in_array($upload_file_type, $file_type_list))
{
// file type is ok
if($GLOBALS['HTTP_POST_FILES']['profile_image']['size'] < $file_size)
$upload_flag = true;
else
$msg = 'Over size file';
}
else
$msg = 'Not an Image file';
` ` `
Error reporting is already enabled in vhost configuration
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
Kindly suggest me what else to do.
Thanks
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 16.01.2010 18:26:18 von rambo
> the files are not uploaded in the folder where they suppose
> to be.
Please explain. So they ARE uploaded but in the wrong path?
Or there's no folder? In latter case, the script should
create the said folder by itself, or you need to create it
manually.
--
No guest is so welcome in a friend's house that he will not become a
nuisance after three days.
-- Titus Maccius Plautus
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 16.01.2010 18:31:49 von joydeep
On Sat, 16 Jan 2010 18:26:18 +0100
Marcin 'Rambo' Roguski wrote:
> > the files are not uploaded in the folder where they suppose
> > to be.
>
> Please explain. So they ARE uploaded but in the wrong path?
> Or there's no folder? In latter case, the script should
> create the said folder by itself, or you need to create it
> manually.
>
As the code which I have posted files will be stored at
fileadmin/user_upload/images/profile/
But no files are uploaded there at all. The directory structure do exists. The error which are shown in the frontend are actually coming from
// file type is ok
if($GLOBALS['HTTP_POST_FILES']['profile_image']['size'] < $file_size)
$upload_flag = true;
else
$msg = 'Over size file';
}
else
$msg = 'Not an Image file';
Not only that, the file size checking is also not working in this server. Do I need to install any php module to check all these ?
Thanks
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, file
am 16.01.2010 19:35:37 von John Iliffe
There are a couple of choices to debug here.
First, the code you supplied is comparing the mime-type parameters
obtained from the call to:
$upload_file_type = $GLOBALS
['HTTP_POST_FILES']['profile_image']['type'];
So, first I would echo $upload_file_type and see what it is actually
getting.
Second, in_array() is case sensitive - see if the mime-type is somehow
getting upper case; the $file_type_list function may be converting to
upper.
Third, what is the client doing to set the mime-type? This is probably
OK (why mentioned it last) but maybe the type of the upload files is
not being set correctly/at all?
Also, I checked and $GLOBALS simply lists ALL variables in global scope.
So, somewhere you should have a function extracting 'HTTP_POST_FILES'
from the POST data. (global variable $HTTP_RAW_POST_DATA). You might
want to check that. Try printing out the $GLOBALS array and see if
there is a variable in it called HTTP_POST_FILES using print_r(). This
will print the array member name => array member value which should
help.
You will have to do more but at least knowing where the problem is is a
good start!
=====================================================
On Sat, 2010-16-01 at 22:42 +0530, J. Bakshi wrote:
> On Sat, 16 Jan 2010 17:31:28 +0100
> Marcin 'Rambo' Roguski wrote:
>
> > On Sat, 16 Jan 2010 21:48:15 +0530
> > "J. Bakshi" wrote:
> >
> > > Dear list,
> >
> > > that it simply reports "Not an Image file". And this is happening
> > > with all files even with image ( jpg, bmp etc..) and with as small
> > > as 1KB and as big as 500KB. I have checked the log with "Loglevel
> > > debug" and there is nothing in the error log which can give any
> > > hints.
> >
> > Can you check if the files are actually uploaded and are viewable with
> > ordinary image viewer? This looks like problem with PHP or CGI script
> > you use to upload than apache. Enable error reporting in php.ini if
> > it's not on. Analyze the script that serves as upload gateway.
>
> Many thanks for your kind attention. I have already checked in the suse server and the files are not uploaded in the folder where they suppose to be. Though in debian server the folders do have all the uploaded files. Regarding the script, I have found codes which are actually doing the upload (though I am not a php coder)
>
> ` ` `
> function fileUploder(){
> $upload_file_path = 'fileadmin/user_upload/images/profile/';
> $file_size = 1000000;
> $file_type_list= Array('image/png','image/jpeg','image/gif','application/octe t-stream','image>
> $upload_flag = false;
> $msg = '';
> $target_path = '';
>
> // Check the file parameters
> $upload_file_type = $GLOBALS['HTTP_POST_FILES']['profile_image']['type'];
> if(in_array($upload_file_type, $file_type_list))
> {
> // file type is ok
> if($GLOBALS['HTTP_POST_FILES']['profile_image']['size'] < $file_size)
> $upload_flag = true;
> else
> $msg = 'Over size file';
> }
> else
> $msg = 'Not an Image file';
>
> ` ` `
>
> Error reporting is already enabled in vhost configuration
>
> php_flag display_startup_errors on
> php_flag display_errors on
> php_flag html_errors on
>
> Kindly suggest me what else to do.
>
> Thanks
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 16.01.2010 19:37:36 von rambo
> But no files are uploaded there at all.
What about temporary files? Are they uploaded or not?
From what you're writing, neither size or type are
identified (should be set after a successful completion
of POST request).
Can you add
print_r($GLOBALS['HTTP_POST_FILES']['profile_image'])
in the function?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 17.01.2010 06:45:19 von joydeep
On Sat, 16 Jan 2010 19:37:36 +0100
Marcin 'Rambo' Roguski wrote:
> > But no files are uploaded there at all.
>
> What about temporary files? Are they uploaded or not?
> From what you're writing, neither size or type are
> identified (should be set after a successful completion
> of POST request).
Yes, that is actually happening here. I can see in the browser progress-bar the file is uploading. This is identified more well if I upload a big file. But when the file is uploaded fully (100%) then the front end reports "Not an image file" which is set at the code. I have manually checked the folder and no file is there. So the file is uploaded but where the file is gone and why the check says "Not an ..." ? I am not a php coder but I can do all debug if I get the clue. Where can I add ( after which line ) the code you have provided ?
>
> Can you add
>
> print_r($GLOBALS['HTTP_POST_FILES']['profile_image'])
>
> in the function?
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 17.01.2010 07:00:04 von joydeep
On Sat, 16 Jan 2010 13:35:37 -0500
John Iliffe wrote:
> There are a couple of choices to debug here.
>
> First, the code you supplied is comparing the mime-type parameters
> obtained from the call to:
>
> $upload_file_type = $GLOBALS
> ['HTTP_POST_FILES']['profile_image']['type'];
>
> So, first I would echo $upload_file_type and see what it is actually
> getting.
>
> Second, in_array() is case sensitive - see if the mime-type is somehow
> getting upper case; the $file_type_list function may be converting to
> upper.
>
> Third, what is the client doing to set the mime-type? This is
> probably OK (why mentioned it last) but maybe the type of the upload
> files is not being set correctly/at all?
>
> Also, I checked and $GLOBALS simply lists ALL variables in global
> scope. So, somewhere you should have a function extracting
> 'HTTP_POST_FILES' from the POST data. (global variable
> $HTTP_RAW_POST_DATA). You might want to check that. Try printing
> out the $GLOBALS array and see if there is a variable in it called
> HTTP_POST_FILES using print_r(). This will print the array member
> name => array member value which should help.
>
> You will have to do more but at least knowing where the problem is is
> a good start!
Hello,
Thanks for your kind response and clarification. Regarding debug I have
a good idea rather than flipping through the code written by some one
else because I am not a php coder and hope you will also like it.
I have only and only one option. Check with a php code that file can be
uploaded with the same filetype check used in the previous code and if
it fails then find out why so. Can I get a simple image uploader php
code with the file type checking and some good echo to see what is
actually happening in the net ? And if the code can do its job
successfully then it might be not a server side problem. Can you
suggest me any link which provides such a code ? In the mean time I am
also looking for it through google but getting a direction from the
experienced one is always great.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, file
am 17.01.2010 18:59:40 von John Iliffe
On Sun, 2010-17-01 at 11:30 +0530, J. Bakshi wrote:
> On Sat, 16 Jan 2010 13:35:37 -0500
> John Iliffe wrote:
>
> > There are a couple of choices to debug here.
> >
> > First, the code you supplied is comparing the mime-type parameters
> > obtained from the call to:
> >
> > $upload_file_type = $GLOBALS
> > ['HTTP_POST_FILES']['profile_image']['type'];
> >
> > So, first I would echo $upload_file_type and see what it is actually
> > getting.
> >
> > Second, in_array() is case sensitive - see if the mime-type is somehow
> > getting upper case; the $file_type_list function may be converting to
> > upper.
> >
> > Third, what is the client doing to set the mime-type? This is
> > probably OK (why mentioned it last) but maybe the type of the upload
> > files is not being set correctly/at all?
> >
> > Also, I checked and $GLOBALS simply lists ALL variables in global
> > scope. So, somewhere you should have a function extracting
> > 'HTTP_POST_FILES' from the POST data. (global variable
> > $HTTP_RAW_POST_DATA). You might want to check that. Try printing
> > out the $GLOBALS array and see if there is a variable in it called
> > HTTP_POST_FILES using print_r(). This will print the array member
> > name => array member value which should help.
> >
> > You will have to do more but at least knowing where the problem is is
> > a good start!
>
>
> Hello,
>
> Thanks for your kind response and clarification. Regarding debug I have
> a good idea rather than flipping through the code written by some one
> else because I am not a php coder and hope you will also like it.
> I have only and only one option. Check with a php code that file can be
> uploaded with the same filetype check used in the previous code and if
> it fails then find out why so. Can I get a simple image uploader php
> code with the file type checking and some good echo to see what is
> actually happening in the net ? And if the code can do its job
> successfully then it might be not a server side problem. Can you
> suggest me any link which provides such a code ? In the mean time I am
> also looking for it through google but getting a direction from the
> experienced one is always great.
>
> ------------------------------------------------------------ ---------
No, sorry I can't help you there unfortunately. I'm not a very
experienced PHP coder either; I just used it to create a basic web
server. I don't do uploads so no samples available.
I noticed certain items in your code the linked it to the mime-type and
figured that if you can echo what is actually happening so you can see
it, then you can fix it.
You might be able to get some help at:
http://ca3.php.net/manual/en/index.php
the PHP online manual. It has a lot of sample code contributed by users.
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, file
am 18.01.2010 10:51:39 von Krist van Besien
On Sat, Jan 16, 2010 at 5:18 PM, J. Bakshi wrote:
> I can see the files are transferred but after
> that it simply reports "Not an Image file".
What is "it" here. Is this error message logged in a logfile
somewhere, or is it displayed in your webbrowser?
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, file uploading reports "not an image file"
am 18.01.2010 12:03:36 von rambo
Dnia 18 Stycznia 2010, 10:51, Pn, Krist van Besien napisa³(a):
> On Sat, Jan 16, 2010 at 5:18 PM, J. Bakshi
> wrote:
>
>> I can see the files are transferred but after
>> that it simply reports "Not an Image file".
>
> What is "it" here. Is this error message logged in a logfile
> somewhere, or is it displayed in your webbrowser?
OP posted the script that "checks" MIME type of POST attachment, but I
have a hunch the web server doesn't have write access to the temporary
upload directory specified in php.ini. Hints to that are that php isn't
setting the size of uploaded file in HTTP_POST_FILES.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, fileuploading reports "not an image file"
am 18.01.2010 15:43:58 von joydeep
On Sat, 16 Jan 2010 19:37:36 +0100
Marcin 'Rambo' Roguski wrote:
> What about temporary files? Are they uploaded or not?
> From what you're writing, neither size or type are
> identified (should be set after a successful completion
> of POST request).
>
> Can you add
>
> print_r($GLOBALS['HTTP_POST_FILES']['profile_image'])
>
> in the function?
Dear all,
I know it is offtopic to discuss php in apache list, but I might be
permitted to share my findings with you all which is very interesting.
I know nothing about php but I tried to upload file in the same server
with a different code collected from net. And this time the upload is
working !!! Not only in debian server but in the suse server too :-)
Still the question is why the previous code works on debian and not on
suse. both the codes are given at button
debian serevr
--------------
Apache/2.2.9 (Debian)
PHP 5.2.6-1+lenny4 with Suhosin-Patch 0.9.6.2
suse server
-------------------
apache2-2.2.10-2.5
PHP 5.2.6 with Suhosin-Patch 0.9.6.2
new php code for uploading ( collected from net ) ( running on both debian & suse server )
` ` `
// Configuration - Your Options
$allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These
will be the types of file that will pass the validation.
$max_filesize = 524288; // Maximum filesize in BYTES (currently
0.5MB). $upload_path = './upload/'; // The place the files will be
uploaded to (currently a 'files' di rectory).
$filename = $_FILES['userfile']['name']; // Get the name of the file
(including file extension). $ext = substr($filename,
strpos($filename,'.'), strlen($filename)-1); // Get the extension from
t he filename.
// Check if the filetype is allowed, if not DIE and inform the user.
if(!in_array($ext,$allowed_filetypes))
die('The file you attempted to upload is not allowed.');
// Now check the filesize, if it is too large then DIE and inform
the user. if(filesize($_FILES['userfile']['tmp_name']) > $max_filesize)
die('The file you attempted to upload is too large.');
// Check if we can upload to the specified path, if not DIE and
inform the user. if(!is_writable($upload_path))
die('You cannot upload to the specified directory, please CHMOD
it to 777.');
// Upload the file to your specified path.
if(move_uploaded_file($_FILES['userfile']['tmp_name'],$uploa d_path .
$filename)) echo 'Your file upload was successful, view the file
href="' . $upload_path . $filename . '" title="Your File">here'; //
It worked. else
echo 'There was an error during the file upload. Please try
again.'; // It failed :(.
?>
` ` `
and here is the old one ( running on debian lenny server only )
` ` `
function fileUploder(){
$upload_file_path = 'fileadmin/user_upload/images/profile/';
$file_size = 1000000;
$file_type_list= Array('image/png','image/jpeg','image/gif','application/octe t-stream')
$upload_flag = false;
$msg = '';
$target_path = '';
// Check the file parameters
$upload_file_type = $GLOBALS['HTTP_POST_FILES']['profile_image']['type'];
if(in_array($upload_file_type, $file_type_list))
{
// file type is ok
if($GLOBALS['HTTP_POST_FILES']['profile_image']['size'] < $file_size)
$upload_flag = true;
else
$msg = 'Over size file';
}
else
$msg = 'Not an Image file';
` ` `
Thanks
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, file uploading reports "not an image file"
am 18.01.2010 15:45:37 von joydeep
On Mon, 18 Jan 2010 10:51:39 +0100
Krist van Besien wrote:
> On Sat, Jan 16, 2010 at 5:18 PM, J. Bakshi
> wrote:
> > I can see the files are transferred but after
> > that it simply reports "Not an Image file".
>
> What is "it" here. Is this error message logged in a logfile
> somewhere, or is it displayed in your webbrowser?
>
> Krist
>
It is coming from the php code itself, displayed in the browser.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1, file uploading reports "not an image file"
am 18.01.2010 15:57:48 von joydeep
On Mon, 18 Jan 2010 12:03:36 +0100
"Marcin 'Rambo' Roguski" wrote:
>
> OP posted the script that "checks" MIME type of POST attachment, but I
> have a hunch the web server doesn't have write access to the temporary
> upload directory specified in php.ini. Hints to that are that php
> isn't setting the size of uploaded file in HTTP_POST_FILES.
php.ini
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = "/tmp"
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
--------------------------------------
and the permission setting is
drwxrwxrwt 42 root root 2256 2010-01-18 16:21 /tmp
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Very Very strange problem in opensuse 11.1,file uploading reports "not an image file"
am 18.01.2010 16:13:28 von Frank Gingras
J. Bakshi wrote:
> On Mon, 18 Jan 2010 12:03:36 +0100
> "Marcin 'Rambo' Roguski" wrote:
>
>
>> OP posted the script that "checks" MIME type of POST attachment, but I
>> have a hunch the web server doesn't have write access to the temporary
>> upload directory specified in php.ini. Hints to that are that php
>> isn't setting the size of uploaded file in HTTP_POST_FILES.
>>
>
> php.ini
>
> ;;;;;;;;;;;;;;;;
> ; File Uploads ;
> ;;;;;;;;;;;;;;;;
>
> ; Whether to allow HTTP file uploads.
> file_uploads = On
>
> ; Temporary directory for HTTP uploaded files (will use system default if not
> ; specified).
> upload_tmp_dir = "/tmp"
>
> ; Maximum allowed size for uploaded files.
> upload_max_filesize = 2M
> --------------------------------------
> and the permission setting is
>
> drwxrwxrwt 42 root root 2256 2010-01-18 16:21 /tmp
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
This is not the appropriate support list for php. Please move this
discussion elsewhere.
Frank.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org