|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-06 20:25 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 11:00:01 2025 UTC |
I made a simple script to upload files but File upload works only locally, i.e. on the same computer where the web server is. This is the script: <?php if ($HTTP_POST_FILES[upload][tmp_name]!="" ){ move_uploaded_file($HTTP_POST_FILES[upload][tmp_name],$HTTP_POST_FILES[upload][name]); }else echo"File lost!"; phpinfo(); ?> And this is the html code for the form: <form action="prendi_file.php" enctype="mutipart/form-data" method="post"> file <input type="file" name="upload" > <input type="submit" value="send" > </form> Uploading a file from the same computer where the web server is everything goes right and the uploaded file is copied in the same directory of the php script. Connecting from another computer the $HTTP_POST_FILES variable is not set, as also shown by phpinfo(). Default temporary directory is /tmp and the privileges are ok (777) I try to disable safe_mode but nothing changed. Thank you Vincent Brown PS my configure line given by phpinfo() is './configure' '--prefix=/usr' '--bindir=/usr/bin' '--libdir=/usr/lib' '--with-config-file-path=/etc' '--with-exec-dir=%{libdir}/php/bin' '--with-pgsql=/usr' '--with-mysql=/usr' '--with-gd=yes' '--with-tiff-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-pdflib=/usr' '--with-ldap=yes' '--with-zlib=yes' '--with-bz2' '--with-ttf' '--with-xml=no' '--with-t1lib' '--with-sablot' '--with-readline' '--with-ftp' '--with-ndbm' '--with-gdbm' '--with-mcrypt' '--with-gettext' '--with-mm' '--with-gd=yes' '--with-qtdom=/usr/lib/qt-2.2.1/' '--enable-versioning' '--enable-yp' '--enable-bcmath' '--enable-trans-sid' '--enable-inline-optimization' '--enable-track-vars' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-shmop' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-memory-limit' '--enable-filepro' '--enable-dbase' '--enable-ctype' '--disable-debug' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-sigchild' '--enable-gd-imgstrttf' '--with-openssl' '--with-swf=./dist/' '--with-apxs=/usr/sbin/apxs' 'i386-suse-linux'