Problem: Want to upload demos from HLTV and WOW to my site.
Though PHP refuses to take larger files than 20M even if I tries to increase in /etc/php.ini or/and in /etc/e-smith/templates/etc/php.ini/60FileUploads
probably bacause i don,t know how the new value would get into effect or it maybe should be done in an other way.
I decided to test an simple CGI-script i thought...
Running SME 6.5
I think the line: print <<END_HTML; causes the error witout it i still dont get the file uploaded
The directory /myibay/html/downloads are chmodded to 777.
Is ther a friendly soul out ther with some help to teach me?
Regards:
The Noob with ideas /Ice.
==================================================
Error message in browser:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@kicks-ass.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
- I cant find anything as i understand related to this error in the log.
==================================================
Installed modules:
CGI -- 3.00
CGI::FormMagick -- 0.89
CGI::Persistent -- 0.22
==================================================
The html script:
<HTML>
<HEAD></HEAD>
<BODY>
<FORM ACTION="/myibay/cgi-bin/test2.pl" METHOD="post" ENCTYPE="multipart/form-data">
Photo to Upload: <INPUT TYPE="file" NAME="photo">
<br><br>
Your Email Address: <INPUT TYPE="text" NAME="email_address">
<br><br>
<INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
</FORM>
</BODY>
</HTML>
==================================================
The perl script test2.pl:
#!/usr/bin/perl
use CGI;
$query = new CGI;
$upload_dir = "/myibay/html/downloads";
$filename = $query->param("photo");
$filename =~ s/.*[\/\\](.*)/$1/;
$email_address = $query->param("email_address");
$upload_filehandle = $query->upload("photo");
open UPLOADFILE, ">$upload_dir/$filename";
binmode UPLOADFILE;
while ( <$upload_filehandle> )
{
print UPLOADFILE;
}
close UPLOADFILE;
print $query->header ( );
print <<END_HTML;
==================================================