473,569 Members | 2,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to upload media file?

Hello friends,

I need a help for upload media file. I had tried for that but getting
following result after uploading wmv file in $_FILE variable.

[MediaLink1] => Array
(
[name] => bada_gosht.wmv
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)

So Please help me how to upload different kind of media file (audio and
video)?

Need your help as soon as possible.

Any suggestion always welcome.

Mitul Patel.

Mar 2 '06 #1
4 3450
Here's one thought. Read the php manual. Chapter 38 will explain
clearly what your problem is.

Mar 2 '06 #2
Mitul wrote:
Hello friends,

I need a help for upload media file. I had tried for that but getting
following result after uploading wmv file in $_FILE variable.

[MediaLink1] => Array
(
[name] => bada_gosht.wmv
[type] =>
[tmp_name] =>
[error] => 1
[size] => 0
)

So Please help me how to upload different kind of media file (audio
and video)?

Need your help as soon as possible.

Any suggestion always welcome.


As you see, $_FILE[MediaLink1][error] = 1. According to the PHP manual
on file upload errors:

UPLOAD_ERR_INI_ SIZE
Value: 1; The uploaded file exceeds the upload_max_file size directive
in php.ini.

http://php.net/features.file-upload.errors

Generally meaning, the file is too big. Either upload a smaller file or
change the upload_max_file size in php.ini.
http://php.net/ini.core#ini.upload-max-filesize

--
Kim André Akerĝ
- ki******@NOSPAM betadome.com
(remove NOSPAM to contact me directly)
Mar 2 '06 #3

Thank you Mr. Kim for your kind help.

Mar 2 '06 #4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mitul wrote:
[MediaLink1] => Array
(
[name] => bada_gosht.wmv
[type] =>
[tmp_name] =>
[error] => 1


Do you see that $_FILE['MediaLink1']['error'] = 1 ?? It means that something
has gone wrong...

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEBrZQ3jc Q2mg3Pc8RAmvFAJ 4xmLkC17BOHR/oS09CA3h0sHVlkQ CcDxsT
jbIrnxGNU9KIr2o yGa3TZB4=
=hii9
-----END PGP SIGNATURE-----
Mar 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3366
by: John | last post by:
I am using Excel to save a spreadsheet in .csv format. This creates a text file with extension .csv But when I try to upload the file to the server by checking for its MIME type using $_FILE I get my own error message that the file is not text file. If I change the extension to .txt I am able to upload the file. This is not reliable as it is...
3
11747
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a table in MySQL with the path & filename to the image. I have successfully uploaded and performed an update query on the database, but the problem...
5
5439
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. I want to develop a webpage where people can send attachments that are stored on their local PC.
2
1791
by: Christian Giordano | last post by:
Hi guys, I've an hosting in media temple (appliance-server) with plesk 7.5.1. I'm trying to bring make a CMS I did in another server to work there. The issues is related the file uploading, in fact a dummy script like that: $newname="ciro.jpg"; $uploaddir="test_folder/"; copy($file, $uploaddir.$newname); unlink($file);
1
1340
by: NinJA999 | last post by:
I have the following code to handle file uploads. There is a database called "media". The errors I keep getting will follow the code. The upload data gets into the database fine; it seems to be storing the file that causes a problem. Please help! <?php $link = mysql_connect ( "localhost", "ninja999_tsql", "MYPASS") or die("Can't...
1
4360
by: NinJA999 | last post by:
I have the following code to handle file uploads. There is a database called "media". The error I keep getting will follow the code. The upload data gets into the database fine; it seems to be storing the file that causes a problem. Please help! <?php $link = mysql_connect ( "localhost", "ninja999_tsql", "MYPASS") or die("Can't connect...
2
1929
by: Reggie | last post by:
Hi am trying to create a script for users to upload small size video clips of themselves and for it to be able to play on the media player ive created on there user a/c. So users to upload there video and to see it playing on there user page.Now am a beginner to php am really trying to learn the coding but it so difficult sometimes, but am...
5
3270
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is _uploadedfiles_xxxx) (php must be allowed to move uploaded files to this folder' - uploadedfiles_xxxx. I typed <?php chmod ('_uploadedfiles_xxxx',640);...
0
2024
by: cw808 | last post by:
Hi all. I'm new here but hoping I can get some help for my problem. My situation is that I need to upload files through a C# .NET web application to a file server. I done a search and followed some advice on how to set it up. My environment is Windows 2003 file server, Windows 2000 web service (IIS) and .NET v1.1.4. So far I've done this....
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.