Jump to content

Imark

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Imark's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It gives the form back, without the confirmation message "file uploaded." The file and the server are on my local machine that I'm using to develop. It shouldn't be taking 60 sec to copy an 18 MB file from one directory to another. And it doesn't give a blank screen (like an unending loop). It shows the form right away. I shouldn't be? :-\
  2. I restarted Apache, but it didn't help either. It's obviously some restriction, and not a problem with the code. ???
  3. When I use the same code to upload a small file, it works fine. But when I select a big file (19 MB *.wmv video), the upload fails. There are no warnings or errors shown, even though I have the "or die" statement on the move_uploaded_file() and mysql_query() function calls. I tried increasing the "<input type="hidden" name="MAX_FILE_SIZE" value="2000000">" to 2000000000. I changed to "upload_max_filesize = 25M" in the 3 php.ini's that I found. Didn't help. What else can it be? <form method="post" enctype="multipart/form-data"> <table width="350" border="0" cellpadding="1" cellspacing="1" class="box"> <tr> <td>First name: <input name="fname" type="text"><br></td> <td>Last name: <input name="lname" type="text"><br></td> <td width="246"> <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> <input name="userfile" type="file" id="userfile"> </td> <td width="80"><input name="upload" type="submit" class="box" id="upload" value=" Upload "></td> </tr> </table> </form> <?php // Insert form values (fname, lname, userfile info) $uploadDir = "C:\\xampp\\xampp\htdocs\upload\\"; if (isset($_POST['upload']) && !empty($_POST['fname']) && !empty($_POST['lname']) && !empty($_FILES['userfile']['name'])) { $fname = $_POST['fname']; $lname = $_POST['lname']; $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; $filePath = $uploadDir . $fileName; $result = move_uploaded_file($tmpName, $filePath) or die ('File upload failed: ' . mysql_error()) ; if (!$result) { echo "Error uploading file"; exit; } include 'config.php'; include 'opendb.php'; if (!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); $filePath = addslashes($filePath); } $query = "INSERT INTO med_test (fname, lname, fileName, size, type, link, time) VALUES ('$fname', '$lname', '$fileName', '$fileSize', '$fileType', '$filePath', NOW())"; mysql_query($query) or die ('insert query failed: ' . mysql_error()); include 'closedb.php'; echo "<br> Files uploaded<br>"; } else { echo "Must fill in all fields "; } ?>
  4. When I embed a video file in a page, it plays fine. But only the Play and the Stop buttons work. I need to be able to FF and RW it, or at least, to be able to move the slider to a different location in the video. It's a *.wmv file, and it opens in Windows Media Player. I'm embedding it like this: <EMBED src="http://www.myurl.org/myfile.wmv" ShowStatusBar=true Autostart=true LOOP=false width="491" height="408" align="middle" style="border-style:double; border-color:#826331; "> What can I do to be able to go to a different location in the video? Also, is there an option to display playing time? TIA
  5. When I embed a video file in a page, it plays fine. But only the Play and the Stop buttons work. I need to be able to FF and RW it. It's not even letting me move the slider to FF and RW. What am I doing wrong? I'm embedding it like this: <EMBED src="http://www.myurl.org/myfile.wmv" ShowStatusBar=true Autostart=true LOOP=false width="491" height="408" align="middle" style="border-style:double; border-color:#826331; ">
  6. Thanks, guys. I figured out what the problem was. It has nothing to do with php or apache, and it's embarassing :-[ My Windows, by default, didn't show the extentions for known file types. When I saved my hello.php in Notepad, Windows saved it as hello.php.txt, without letting me know. That's how Apache didn't get to parse it -- because it didn't see it as a PHP file.
  7. Some dude, who recently signed up, sent me a PM with links to some porn sites and a photoshopped photo of someone's exedurated genitals. He has sent this to many other users, and he is spamming the boards. Is there a way to colplain about this to the mods? Are there mods on this board at all?
  8. I am on Windows. My httpd.conf is a binary file, and I can't even touch it. I heard the name Tomcat, and I'm wondering if it's an Apache version that can be used both for PHP and Java? [/wild guess]
  9. httpd.conf is a binary file -- you cant just paste a few lines into it. Is it easy to set everything up, if I'd be installing it manually? And will it be easy to configure the same Apache server to use with Java?
  10. What exactly do I have to do? Which files in the Apache directory do I need to edit, and how should I edit them? The package I installed should have had everything pre-configured -- it would be very strange if I had to instruct Apache to parse PHP.
  11. I installed the PHPDev5 package with PHP, Apache, MySQL and what not. I put a "Hello world!" in the www directory like this: [code]<html> <head>   <title>PHP Test</title> </head> <body> <?php echo '<p>Hello World</p>'; ?> </body> </html> [/code] Now, when I go to this file, "hello.php", it doesn't get parsed. In Firefox, I get the whole source like above, displayed back on the page. In IE, I just get an empty page, though the page title does get changed to "PHP Test." I can't figure oput what the problem is. Can anyone help?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.