ID: 21908 Comment by: php at memoclic dot com Reported By: fn at panix dot com Status: Bogus Bug Type: *General Issues Operating System: NetBSD-1.5.2 PHP Version: 4.3.0 New Comment:
Same pb for me. Upgraded from 4.1.2 (on a Slackware) to 4.3 and uploads won't work with file_uploads on Off in php.ini. I activated uploads via an .htaccess. Worked fine in 4.1.2 (php code was **not** modified). I also tried with ini_set() but didn t work either. Hope this will help resolving. Previous Comments: ------------------------------------------------------------------------ [2003-05-10 12:40:35] androbtech at monosalvaje dot com Me again , I forgot to add something, the function is_uploaded_file() does not work, I don;t know why and in older versions this script used to work 100% perfect and NOW -100% wrong ------------------------------------------------------------------------ [2003-05-10 12:36:37] androbtech at monosalvaje dot com I got the following code and Im running PHP 4.3.0 For MAC OS X, the last Version is not avilable... <?php /* funciones para fotos */ if($_GET["x"] == "despues") { ?> <form method="post" enctype="multipart/form-data" action="ja.php?x=ahora"> <table width="440" height="412" border="0" cellpadding="0" cellspacing="8"> <tr> <td height="187" valign="top"> <span class=submenu>Para poder subir imagenes a la base de datos le pedimos lo siguiente:</span><br><br> <table width="341" border="1" align="center" cellpadding="0" cellspacing="8" bordercolor="#FFFFFF" bgcolor="#003333" class="texto"> <tr> <td colspan="2">Datos:</td> </tr> <tr> <td width="45" align="right">Nombre:</td> <td width="125"><input name="nombre" type="text" class="textbox"></td> </tr> <tr> <td align="right">Juego:</td> <td><input name="juego" type="text" class="textbox"></td> </tr> <tr> <td align="right">Consola:</td> <td> <select name="consola" class="textbox"> <option value="GC">Nintendo GameCube</option> <option value="N64">Nintendo 64</option> <option value="PS2">Playstation 2</option> <option value="PS">Playstation</option> <option value="XBOX">XBOX</option> </select> </td> </tr> <tr> <td align="right">Imagen:</td> <td><input type="file" name="imagen" class="filebox"></td> </tr> </table> <center><input type=submit name=submit value="Subir imagen" class="subbox"></center> </td> </tr> </table> </form> <?php } elseif ($_GET["x"] == "ahora") { require("php-bin/seguridad/panel/configuracion.php"); $conn = mysql_connect($db_servidor,$db_usuario,$db_clave); if(is_uploaded_file($_FILES["imagen"])) { echo("imagen subida"); $imagen = fopen($_FILES["imagen"], "r"); $datos = fread($imagen, filesize($_FILES["imagen"])); $datos = addslashes($datos); } $query = "INSERT INTO thumbs VALUES ('','$_POST[juego]','$_POST[consola]','$_POST[nombre]','".$_FILES['imagen']['type']."','','$datos')"; if(mysql_db_query($db_nombre,$query,$conn)) { $err = "0"; } else { $err = "3"; } $conn = mysql_close($conn); ?> todo subido, todo bien. <?php } else { echo("ninguna opcion"); } ?> ------------------------------------------------------------------------ [2003-02-04 15:19:58] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. based on user comments the code works fine, the errors were due to configuration issues or misunderstanding of the docs. ------------------------------------------------------------------------ [2003-02-04 15:14:40] evatckovacs at netscape dot net thank you. i am dumb. i saw the FILES stuff and blew it off as being irrelevant, for whatever reason. thank you again. ------------------------------------------------------------------------ [2003-02-04 11:48:38] michael dot mauch at gmx dot de For file uploads it's $_FILES, not $_POST. Please read <http://www.php.net/manual/en/features.file-upload.php>. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/21908 -- Edit this bug report at http://bugs.php.net/?id=21908&edit=1