Can"t Upload ram file

Can"t Upload ram file

am 18.11.2005 15:19:24 von Mohamed Yusuf

------=_Part_3224_7648511.1132323564911
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

the script I am using can upload images like, jpg, gif or png to the server=
,
but it can't upload music file to the server like ram and rm.
any help?

------=_Part_3224_7648511.1132323564911--

RE: Can"t Upload ram file

am 18.11.2005 15:22:05 von Bastien Koert

show code, maybe checks are being done to only allow images or certain
extensions...


Bastien


>From: Mohamed Yusuf
>To: php-db@lists.php.net
>Subject: [PHP-DB] Can't Upload ram file
>Date: Fri, 18 Nov 2005 06:19:24 -0800
>
>the script I am using can upload images like, jpg, gif or png to the
>server,
>but it can't upload music file to the server like ram and rm.
>any help?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Can"t Upload ram file

am 18.11.2005 15:33:51 von Mohamed Yusuf

------=_Part_3309_18569382.1132324431582
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

$uploadDir =3D 'media/';
if(isset($_POST['upload']))
{
$fileName =3D $_FILES['userfile']['name'];
$tmpName =3D $_FILES['userfile']['tmp_name'];
$fileSize =3D $_FILES['userfile']['size'];
$fileType =3D $_FILES['userfile']['type'];
// the files will be saved in filePath
$filePath =3D $uploadDir . $fileName;

$result =3D move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
if(!get_magic_quotes_gpc())
{
$fileName =3D addslashes($fileName);
$filePath =3D addslashes($filePath);
}

$username=3D"";
$password=3D"";
$database=3D"";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$query =3D "INSERT INTO upload2 (name, size, type, path ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$filePath')";

mysql_query($query) or die('Error, query failed : ' . mysql_error());

include 'library/closedb.php';

echo "
File uploaded
";
}
?>


On 11/18/05, Bastien Koert wrote:
>
> show code, maybe checks are being done to only allow images or certain
> extensions...
>
>
> Bastien
>
>
> >From: Mohamed Yusuf
> >To: php-db@lists.php.net
> >Subject: [PHP-DB] Can't Upload ram file
> >Date: Fri, 18 Nov 2005 06:19:24 -0800
> >
> >the script I am using can upload images like, jpg, gif or png to the
> >server,
> >but it can't upload music file to the server like ram and rm.
> >any help?
>
>
>

------=_Part_3309_18569382.1132324431582--

Re: Can"t Upload ram file

am 18.11.2005 15:41:53 von Mohamed Yusuf

------=_Part_3398_14494663.1132324913972
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

here is the code
$uploadDir =3D 'media/';
if(isset($_POST['upload']))
{
$fileName =3D $_FILES['userfile']['name'];
$tmpName =3D $_FILES['userfile']['tmp_name'];
$fileSize =3D $_FILES['userfile']['size'];
$fileType =3D $_FILES['userfile']['type'];
// the files will be saved in filePath
$filePath =3D $uploadDir . $fileName;

$result =3D move_uploaded_file($tmpName, $filePath);
if (!$result) {
echo "Error uploading file";
exit;
}
if(!get_magic_quotes_gpc())
{
$fileName =3D addslashes($fileName);
$filePath =3D addslashes($filePath);
}

$username=3D"";
$password=3D"";
$database=3D"";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$query =3D "INSERT INTO upload2 (name, size, type, path ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$filePath')";

mysql_query($query) or die('Error, query failed : ' . mysql_error());

include 'library/closedb.php';

echo "
File uploaded
";
}
?>

On 11/18/05, Bastien Koert wrote:
>
> show code, maybe checks are being done to only allow images or certain
> extensions...
>
>
> Bastien
>
>
> >From: Mohamed Yusuf
> >To: php-db@lists.php.net
> >Subject: [PHP-DB] Can't Upload ram file
> >Date: Fri, 18 Nov 2005 06:19:24 -0800
> >
> >the script I am using can upload images like, jpg, gif or png to the
> >server,
> >but it can't upload music file to the server like ram and rm.
> >any help?
>
>
>

------=_Part_3398_14494663.1132324913972--

Re: Can"t Upload ram file

am 18.11.2005 18:29:06 von Micah Stevens

Perhaps it's not file type that is the problem, but file size?

-Micah

On Friday 18 November 2005 6:19 am, Mohamed Yusuf wrote:
> the script I am using can upload images like, jpg, gif or png to the
> server, but it can't upload music file to the server like ram and rm.
> any help?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php