ID: 40537
Comment by: pallenzine12 at gmail dot com
Reported By: stloukal at programator dot cz
Status: No Feedback
Bug Type: Filesystem function related
Operating System: FC4, 2.6.17
PHP Version: 5.2.1
New Comment:
hello
m using his code to move a file from temp folder to targe folder
its running successfully on local host but not working on free
hosting server can any one help me in giving a valid path for moving
file.
if(!move_uploaded_file($_FILES["file"]["tmp_name"],"/upload/".$_FILES["file"]["name"]
))
{
echo "file can not be moved";
}
else
{
echo "file moved";
}
}
Previous Comments:
------------------------------------------------------------------------
[2007-05-04 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2007-04-26 09:24:09] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2007-03-08 18:27:28] stloukal at programator dot cz
And next computer with described behaviour:
[EMAIL PROTECTED] tmp]# id -Z
Sorry, --context (-Z) can be used only on a selinux-enabled kernel.
[EMAIL PROTECTED] tmp]# uname -a
Linux krtek 2.6.19-1.2911.fc6 #1 SMP Sat Feb 10 15:51:47 EST 2007 i686
athlon i386 GNU/Linux
------------------------------------------------------------------------
[2007-03-08 11:49:09] stloukal at programator dot cz
The same behaviour on another computer:
[EMAIL PROTECTED] web]# id -Z
Sorry, --context (-Z) can be used only on a selinux-enabled kernel.
[EMAIL PROTECTED] web]# uname -a
Linux colonel 2.6.18-1.2200.fc5smp #1 SMP Sat Oct 14 17:15:35 EDT 2006
i686 i686 i386 GNU/Linux
------------------------------------------------------------------------
[2007-03-07 08:31:21] stloukal at programator dot cz
So I compiled PHP with options:
[EMAIL PROTECTED] php-5.2.1]$ cat config.nice
#! /bin/sh
#
# Created by configure
'./configure' \
'--prefix=/usr/local/php5' \
'--with-config-file-path=/etc/' \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--disable-all' \
"$@"
and Apache:
[EMAIL PROTECTED] httpd-2.2.4]$ cat config.nice
#! /bin/sh
#
# Created by configure
"./configure" \
"--enable-ssl" \
"--enable-static-htpasswd" \
"--disable-cgi" \
"--enable-so" \
"--enable-rewrite" \
"--with-included-apr" \
"--with-ssl=/usr/local" \
"--with-mpm=worker" \
"$@"
...and still the same behaviour. But with "--with-mpm=prefork" instead
of "--with-mpm=worker" it works fine.
When I start Apache (with worker module) with "-X" option (e.g.
[EMAIL PROTECTED] bin]# ./apachectl -X -f /etc/httpd/conf/httpd.conf -k
start), upload works fine too.
I can read files from the "tmp" when I access via URL (e.g.
http://my.address.com/tmp/myfile.jpg).
------------------------------------------------------------------------
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/40537
--
Edit this bug report at http://bugs.php.net/?id=40537&edit=1