php-windows Digest 19 Feb 2003 12:30:48 -0000 Issue 1595

Topics (messages 18587 through 18603):

Re: Problem with file upload!!
        18587 by: Matt Babineau
        18588 by: Palli
        18589 by: Matt Babineau
        18590 by: Palli
        18593 by: Matt Babineau
        18595 by: Neil Smith
        18601 by: Palli
        18603 by: Palli

Information not being correctly parsed
        18591 by: Andrew Ferguson
        18592 by: Andrew Ferguson

Using W32api functions in PHP
        18594 by: Andrew Thomas

test
        18596 by: Is98

Best way to sort a multidimentional array....
        18597 by: Roland Tarver

DOM installation
        18598 by: Heikki Pulliainen

CGI installation problem
        18599 by: Vincent Robert
        18600 by: Vincent Robert

PHP and MySQL
        18602 by: Veselina Jecheva

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I have also gotten the same exact error, it has to do with the
permissions on the server and the IUSR_x having WRITE permissions to the
folder you want to move the file to and to the PHP TEMP folder (I
think).

--> -----Original Message-----
--> From: Palli [mailto:[EMAIL PROTECTED]] 
--> Sent: Tuesday, February 18, 2003 7:23 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] Problem with file upload!!
--> 
--> 
--> Hello again!
--> 
--> now I get another error;
--> 
--> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg)
--> [function.move-uploaded-file]: failed to create stream: No 
--> such file or directory in C:\riddarinn\Process.php on line 16
--> 
--> Warning: move_uploaded_file() 
--> [function.move-uploaded-file]: Unable to move 
--> 'C:\PHP\uploadtemp\php98.tmp' to 
--> '/frettamyndir/fastfood.jpg' in C:\riddarinn\Process.php on line 16
--> 
--> Can anyone tell me what this means?
--> 
--> thx
--> Palli
--> 
--> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message 
--> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast...
--> You need to write:
--> 
--> <form enctype="multipart/form-data" action="Process.php" 
--> method=post>
--> 
--> Matt
--> 
--> |-----Original Message-----
--> |From: Palli [mailto:[EMAIL PROTECTED]]
--> |Sent: Tuesday, February 18, 2003 3:21 PM
--> |To: [EMAIL PROTECTED]
--> |Subject: [PHP-WIN] Problem with file upload!!
--> |
--> |
--> |Hello I'm wondering what is wrong whit my code.  I´m 
--> trying to upload 
--> |an image but I keep getting this error message??
--> |
--> |Notice: Undefined index: NewsPicture in 
--> C:\riddarinn\Process.php on 
--> |line 17
--> |
--> |This is my code :
--> |
--> |<form name="New" action="Process.php" method="post">
--> |...
--> |<input type=file name="NewsPicture" size=43>
--> |<input type=hidden name=MAX_FILE_SIZE value=10240>
--> |<input type=Submit value=Skrá-frétt>
--> |...
--> |</form>
--> |
--> |// my process site
--> |...
--> |if (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir .
--> |$_FILES['NewsPicture']['name']))
--> |...
--> |
--> |THX
--> |Palli
--> |
--> |
--> |
--> |
--> |
--> |--
--> |PHP Windows Mailing List (http://www.php.net/)
--> |To unsubscribe, visit: http://www.php.net/unsub.php
--> |
--> |
--> |
--> 
--> 
--> 
--> 
--> 
--> -- 
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
--> 
--> 

--- End Message ---
--- Begin Message ---
Hi .... again!!! and thanx matt!

This didnt solve my problem....

Im running on XP and im using IIS 5.1. I've change the server user to
Administrator but I still cant upload a file.

Can anybody help me

"Matt Babineau" <[EMAIL PROTECTED]> wrote in message
000401c2d7ad$66febdc0$6610a8c0@webdevx">news:000401c2d7ad$66febdc0$6610a8c0@webdevx...
I have also gotten the same exact error, it has to do with the
permissions on the server and the IUSR_x having WRITE permissions to the
folder you want to move the file to and to the PHP TEMP folder (I
think).

--> -----Original Message-----
--> From: Palli [mailto:[EMAIL PROTECTED]]
--> Sent: Tuesday, February 18, 2003 7:23 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] Problem with file upload!!
-->
-->
--> Hello again!
-->
--> now I get another error;
-->
--> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg)
--> [function.move-uploaded-file]: failed to create stream: No
--> such file or directory in C:\riddarinn\Process.php on line 16
-->
--> Warning: move_uploaded_file()
--> [function.move-uploaded-file]: Unable to move
--> 'C:\PHP\uploadtemp\php98.tmp' to
--> '/frettamyndir/fastfood.jpg' in C:\riddarinn\Process.php on line 16
-->
--> Can anyone tell me what this means?
-->
--> thx
--> Palli
-->
--> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message
--> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast...
--> You need to write:
-->
--> <form enctype="multipart/form-data" action="Process.php"
--> method=post>
-->
--> Matt
-->
--> |-----Original Message-----
--> |From: Palli [mailto:[EMAIL PROTECTED]]
--> |Sent: Tuesday, February 18, 2003 3:21 PM
--> |To: [EMAIL PROTECTED]
--> |Subject: [PHP-WIN] Problem with file upload!!
--> |
--> |
--> |Hello I'm wondering what is wrong whit my code.  I´m
--> trying to upload
--> |an image but I keep getting this error message??
--> |
--> |Notice: Undefined index: NewsPicture in
--> C:\riddarinn\Process.php on
--> |line 17
--> |
--> |This is my code :
--> |
--> |<form name="New" action="Process.php" method="post">
--> |...
--> |<input type=file name="NewsPicture" size=43>
--> |<input type=hidden name=MAX_FILE_SIZE value=10240>
--> |<input type=Submit value=Skrá-frétt>
--> |...
--> |</form>
--> |
--> |// my process site
--> |...
--> |if (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir .
--> |$_FILES['NewsPicture']['name']))
--> |...
--> |
--> |THX
--> |Palli
--> |
--> |
--> |
--> |
--> |
--> |--
--> |PHP Windows Mailing List (http://www.php.net/)
--> |To unsubscribe, visit: http://www.php.net/unsub.php
--> |
--> |
--> |
-->
-->
-->
-->
-->
--> --
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
-->
-->



--- End Message ---
--- Begin Message ---
You need to goto the folder permissions and add permission for the user
"IUSR_<computername>" and give that user write permissions specifically
to the folders that are envolved. I had the exact same error message you
got and I did this and it worked. So whatever user your webserver is
running on needs to have permission. You may want to even try giving
full permissions and then tighten the security nuse once you get the
upload working.

-Matt

--> -----Original Message-----
--> From: Palli [mailto:[EMAIL PROTECTED]] 
--> Sent: Tuesday, February 18, 2003 8:34 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] Problem with file upload!!
--> 
--> 
--> Hi .... again!!! and thanx matt!
--> 
--> This didnt solve my problem....
--> 
--> Im running on XP and im using IIS 5.1. I've change the 
--> server user to Administrator but I still cant upload a file.
--> 
--> Can anybody help me
--> 
--> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message 
--> 000401c2d7ad$66febdc0$6610a8c0@webdevx">news:000401c2d7ad$66febdc0$6610a8c0@webdevx...
--> I have also gotten the same exact error, it has to do with 
--> the permissions on the server and the IUSR_x having WRITE 
--> permissions to the folder you want to move the file to and 
--> to the PHP TEMP folder (I think).
--> 
--> --> -----Original Message-----
--> --> From: Palli [mailto:[EMAIL PROTECTED]]
--> --> Sent: Tuesday, February 18, 2003 7:23 PM
--> --> To: [EMAIL PROTECTED]
--> --> Subject: Re: [PHP-WIN] Problem with file upload!!
--> -->
--> -->
--> --> Hello again!
--> -->
--> --> now I get another error;
--> -->
--> --> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg)
--> --> [function.move-uploaded-file]: failed to create stream: 
--> No such file 
--> --> or directory in C:\riddarinn\Process.php on line 16
--> -->
--> --> Warning: move_uploaded_file()
--> --> [function.move-uploaded-file]: Unable to move 
--> --> 'C:\PHP\uploadtemp\php98.tmp' to 
--> '/frettamyndir/fastfood.jpg' in 
--> --> C:\riddarinn\Process.php on line 16
--> -->
--> --> Can anyone tell me what this means?
--> -->
--> --> thx
--> --> Palli
--> -->
--> --> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message 
--> --> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast...
--> --> You need to write:
--> -->
--> --> <form enctype="multipart/form-data" action="Process.php" 
--> --> method=post>
--> -->
--> --> Matt
--> -->
--> --> |-----Original Message-----
--> --> |From: Palli [mailto:[EMAIL PROTECTED]]
--> --> |Sent: Tuesday, February 18, 2003 3:21 PM
--> --> |To: [EMAIL PROTECTED]
--> --> |Subject: [PHP-WIN] Problem with file upload!!
--> --> |
--> --> |
--> --> |Hello I'm wondering what is wrong whit my code.  I´m
--> --> trying to upload
--> --> |an image but I keep getting this error message??
--> --> |
--> --> |Notice: Undefined index: NewsPicture in
--> --> C:\riddarinn\Process.php on
--> --> |line 17
--> --> |
--> --> |This is my code :
--> --> |
--> --> |<form name="New" action="Process.php" method="post">
--> --> |...
--> --> |<input type=file name="NewsPicture" size=43>
--> --> |<input type=hidden name=MAX_FILE_SIZE value=10240>
--> --> |<input type=Submit value=Skrá-frétt>
--> --> |...
--> --> |</form>
--> --> |
--> --> |// my process site
--> --> |...
--> --> |if 
--> (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir .
--> --> |$_FILES['NewsPicture']['name']))
--> --> |...
--> --> |
--> --> |THX
--> --> |Palli
--> --> |
--> --> |
--> --> |
--> --> |
--> --> |
--> --> |--
--> --> |PHP Windows Mailing List (http://www.php.net/)
--> --> |To unsubscribe, visit: http://www.php.net/unsub.php
--> --> |
--> --> |
--> --> |
--> -->
--> -->
--> -->
--> -->
--> -->
--> --> --
--> --> PHP Windows Mailing List (http://www.php.net/)
--> --> To unsubscribe, visit: http://www.php.net/unsub.php
--> -->
--> -->
--> 
--> 
--> 
--> 
--> -- 
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
--> 
--> 

--- End Message ---
--- Begin Message ---
Hello

This is what I've done sofar...

1. the I_usr account on your server must have rights to the temp folder that
php stores its temporary files, and also to the destination folder that you
wish to copy a 'good' file.

2. the syntax for the path of the move command requires both a folder and
the actual name of the posted file that is to exist on the server.  eg,
'g:\\tmp\\'.$userfile_name  unless, of course, you mean to save all of your
files in the root of the drive!

3. you will need to make your path with two slashes like this --
g:\\tmp\\filename -- because a single slash from php escapes the next
character, and that will make NT fretful.

....but im still getting this error

Warning: move_uploaded_file(//frettamyndir//logo_final.jpg)
[function.move-uploaded-file]: failed to create stream: No such file or
directory in C:\riddarinn\Process.php on line 20

Could anyone tell my what seems to be the problem!

thx
palli


"Matt Babineau" <[EMAIL PROTECTED]> wrote in message
001201c2d7b7$d3a30b20$6610a8c0@webdevx">news:001201c2d7b7$d3a30b20$6610a8c0@webdevx...
You need to goto the folder permissions and add permission for the user
"IUSR_<computername>" and give that user write permissions specifically
to the folders that are envolved. I had the exact same error message you
got and I did this and it worked. So whatever user your webserver is
running on needs to have permission. You may want to even try giving
full permissions and then tighten the security nuse once you get the
upload working.

-Matt

--> -----Original Message-----
--> From: Palli [mailto:[EMAIL PROTECTED]]
--> Sent: Tuesday, February 18, 2003 8:34 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] Problem with file upload!!
-->
-->
--> Hi .... again!!! and thanx matt!
-->
--> This didnt solve my problem....
-->
--> Im running on XP and im using IIS 5.1. I've change the
--> server user to Administrator but I still cant upload a file.
-->
--> Can anybody help me
-->
--> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message
--> 000401c2d7ad$66febdc0$6610a8c0@webdevx">news:000401c2d7ad$66febdc0$6610a8c0@webdevx...
--> I have also gotten the same exact error, it has to do with
--> the permissions on the server and the IUSR_x having WRITE
--> permissions to the folder you want to move the file to and
--> to the PHP TEMP folder (I think).
-->
--> --> -----Original Message-----
--> --> From: Palli [mailto:[EMAIL PROTECTED]]
--> --> Sent: Tuesday, February 18, 2003 7:23 PM
--> --> To: [EMAIL PROTECTED]
--> --> Subject: Re: [PHP-WIN] Problem with file upload!!
--> -->
--> -->
--> --> Hello again!
--> -->
--> --> now I get another error;
--> -->
--> --> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg)
--> --> [function.move-uploaded-file]: failed to create stream:
--> No such file
--> --> or directory in C:\riddarinn\Process.php on line 16
--> -->
--> --> Warning: move_uploaded_file()
--> --> [function.move-uploaded-file]: Unable to move
--> --> 'C:\PHP\uploadtemp\php98.tmp' to
--> '/frettamyndir/fastfood.jpg' in
--> --> C:\riddarinn\Process.php on line 16
--> -->
--> --> Can anyone tell me what this means?
--> -->
--> --> thx
--> --> Palli
--> -->
--> --> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message
--> --> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast...
--> --> You need to write:
--> -->
--> --> <form enctype="multipart/form-data" action="Process.php"
--> --> method=post>
--> -->
--> --> Matt
--> -->
--> --> |-----Original Message-----
--> --> |From: Palli [mailto:[EMAIL PROTECTED]]
--> --> |Sent: Tuesday, February 18, 2003 3:21 PM
--> --> |To: [EMAIL PROTECTED]
--> --> |Subject: [PHP-WIN] Problem with file upload!!
--> --> |
--> --> |
--> --> |Hello I'm wondering what is wrong whit my code.  I´m
--> --> trying to upload
--> --> |an image but I keep getting this error message??
--> --> |
--> --> |Notice: Undefined index: NewsPicture in
--> --> C:\riddarinn\Process.php on
--> --> |line 17
--> --> |
--> --> |This is my code :
--> --> |
--> --> |<form name="New" action="Process.php" method="post">
--> --> |...
--> --> |<input type=file name="NewsPicture" size=43>
--> --> |<input type=hidden name=MAX_FILE_SIZE value=10240>
--> --> |<input type=Submit value=Skrá-frétt>
--> --> |...
--> --> |</form>
--> --> |
--> --> |// my process site
--> --> |...
--> --> |if
--> (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir .
--> --> |$_FILES['NewsPicture']['name']))
--> --> |...
--> --> |
--> --> |THX
--> --> |Palli
--> --> |
--> --> |
--> --> |
--> --> |
--> --> |
--> --> |--
--> --> |PHP Windows Mailing List (http://www.php.net/)
--> --> |To unsubscribe, visit: http://www.php.net/unsub.php
--> --> |
--> --> |
--> --> |
--> -->
--> -->
--> -->
--> -->
--> -->
--> --> --
--> --> PHP Windows Mailing List (http://www.php.net/)
--> --> To unsubscribe, visit: http://www.php.net/unsub.php
--> -->
--> -->
-->
-->
-->
-->
--> --
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
-->
-->



--- End Message ---
--- Begin Message ---
Can you post the code?

--> -----Original Message-----
--> From: Palli [mailto:[EMAIL PROTECTED]] 
--> Sent: Tuesday, February 18, 2003 11:14 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] Problem with file upload!!
--> 
--> 
--> Hello
--> 
--> This is what I've done sofar...
--> 
--> 1. the I_usr account on your server must have rights to the 
--> temp folder that php stores its temporary files, and also 
--> to the destination folder that you wish to copy a 'good' file.
--> 
--> 2. the syntax for the path of the move command requires 
--> both a folder and the actual name of the posted file that 
--> is to exist on the server.  eg, 'g:\\tmp\\'.$userfile_name  
--> unless, of course, you mean to save all of your files in 
--> the root of the drive!
--> 
--> 3. you will need to make your path with two slashes like 
--> this -- g:\\tmp\\filename -- because a single slash from 
--> php escapes the next character, and that will make NT fretful.
--> 
--> ....but im still getting this error
--> 
--> Warning: move_uploaded_file(//frettamyndir//logo_final.jpg)
--> [function.move-uploaded-file]: failed to create stream: No 
--> such file or directory in C:\riddarinn\Process.php on line 20
--> 
--> Could anyone tell my what seems to be the problem!
--> 
--> thx
--> palli
--> 
--> 
--> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message 
--> 001201c2d7b7$d3a30b20$6610a8c0@webdevx">news:001201c2d7b7$d3a30b20$6610a8c0@webdevx...
--> You need to goto the folder permissions and add permission 
--> for the user "IUSR_<computername>" and give that user write 
--> permissions specifically to the folders that are envolved. 
--> I had the exact same error message you got and I did this 
--> and it worked. So whatever user your webserver is running 
--> on needs to have permission. You may want to even try 
--> giving full permissions and then tighten the security nuse 
--> once you get the upload working.
--> 
--> -Matt
--> 
--> --> -----Original Message-----
--> --> From: Palli [mailto:[EMAIL PROTECTED]]
--> --> Sent: Tuesday, February 18, 2003 8:34 PM
--> --> To: [EMAIL PROTECTED]
--> --> Subject: Re: [PHP-WIN] Problem with file upload!!
--> -->
--> -->
--> --> Hi .... again!!! and thanx matt!
--> -->
--> --> This didnt solve my problem....
--> -->
--> --> Im running on XP and im using IIS 5.1. I've change the 
--> server user 
--> --> to Administrator but I still cant upload a file.
--> -->
--> --> Can anybody help me
--> -->
--> --> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message 
--> --> 000401c2d7ad$66febdc0$6610a8c0@webdevx">news:000401c2d7ad$66febdc0$6610a8c0@webdevx...
--> --> I have also gotten the same exact error, it has to do with the 
--> --> permissions on the server and the IUSR_x having WRITE 
--> permissions to 
--> --> the folder you want to move the file to and to the PHP 
--> TEMP folder 
--> --> (I think).
--> -->
--> --> --> -----Original Message-----
--> --> --> From: Palli [mailto:[EMAIL PROTECTED]]
--> --> --> Sent: Tuesday, February 18, 2003 7:23 PM
--> --> --> To: [EMAIL PROTECTED]
--> --> --> Subject: Re: [PHP-WIN] Problem with file upload!!
--> --> -->
--> --> -->
--> --> --> Hello again!
--> --> -->
--> --> --> now I get another error;
--> --> -->
--> --> --> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg)
--> --> --> [function.move-uploaded-file]: failed to create stream:
--> --> No such file
--> --> --> or directory in C:\riddarinn\Process.php on line 16
--> --> -->
--> --> --> Warning: move_uploaded_file()
--> --> --> [function.move-uploaded-file]: Unable to move 
--> --> --> 'C:\PHP\uploadtemp\php98.tmp' to
--> --> '/frettamyndir/fastfood.jpg' in
--> --> --> C:\riddarinn\Process.php on line 16
--> --> -->
--> --> --> Can anyone tell me what this means?
--> --> -->
--> --> --> thx
--> --> --> Palli
--> --> -->
--> --> --> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message 
--> --> --> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast...
--> --> --> You need to write:
--> --> -->
--> --> --> <form enctype="multipart/form-data" action="Process.php" 
--> --> --> method=post>
--> --> -->
--> --> --> Matt
--> --> -->
--> --> --> |-----Original Message-----
--> --> --> |From: Palli [mailto:[EMAIL PROTECTED]]
--> --> --> |Sent: Tuesday, February 18, 2003 3:21 PM
--> --> --> |To: [EMAIL PROTECTED]
--> --> --> |Subject: [PHP-WIN] Problem with file upload!!
--> --> --> |
--> --> --> |
--> --> --> |Hello I'm wondering what is wrong whit my code.  I´m
--> --> --> trying to upload
--> --> --> |an image but I keep getting this error message??
--> --> --> |
--> --> --> |Notice: Undefined index: NewsPicture in
--> --> --> C:\riddarinn\Process.php on
--> --> --> |line 17
--> --> --> |
--> --> --> |This is my code :
--> --> --> |
--> --> --> |<form name="New" action="Process.php" method="post"> ...
--> --> --> |<input type=file name="NewsPicture" size=43>
--> --> --> |<input type=hidden name=MAX_FILE_SIZE value=10240>
--> --> --> |<input type=Submit value=Skrá-frétt>
--> --> --> |...
--> --> --> |</form>
--> --> --> |
--> --> --> |// my process site
--> --> --> |...
--> --> --> |if
--> --> (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir .
--> --> --> |$_FILES['NewsPicture']['name']))
--> --> --> |...
--> --> --> |
--> --> --> |THX
--> --> --> |Palli
--> --> --> |
--> --> --> |
--> --> --> |
--> --> --> |
--> --> --> |
--> --> --> |--
--> --> --> |PHP Windows Mailing List (http://www.php.net/)
--> --> --> |To unsubscribe, visit: http://www.php.net/unsub.php
--> --> --> |
--> --> --> |
--> --> --> |
--> --> -->
--> --> -->
--> --> -->
--> --> -->
--> --> -->
--> --> --> --
--> --> --> PHP Windows Mailing List (http://www.php.net/)
--> --> --> To unsubscribe, visit: http://www.php.net/unsub.php
--> --> -->
--> --> -->
--> -->
--> -->
--> -->
--> -->
--> --> --
--> --> PHP Windows Mailing List (http://www.php.net/)
--> --> To unsubscribe, visit: http://www.php.net/unsub.php
--> -->
--> -->
--> 
--> 
--> 
--> 
--> -- 
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
--> 
--> 

--- End Message ---
--- Begin Message ---
It means it is unable to move the file.

Sarcasm aside, look at the error message.

At 00:22 19/02/2003 +0000, you wrote:
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
'C:\PHP\uploadtemp\php98.tmp' to '/frettamyndir/fastfood.jpg' in
C:\riddarinn\Process.php on line 16

Can anyone tell me what this means?

thx
Palli
Whats it telling you ? Its saying unable to move the temporary file upload to its final destination. Now that detsination is /frettamyndir/fastfood.jpg : You are using windows. Does this look like a windows file path to you ?

Me neither, so supply the move_uploaded_file function with a real file path like you would for any filesystem function, because move_uploaded deals with your raw file system, not your web server's document. structure. Clear ? Cool.

BTW if you look in the C:\PHP\uploadtemp directory, you will be able to verify the file uploads taking place, when you see a number of files phpXX.tmp created during uploads. They may be deleted by garbage collection in normal operation.

Cheers,
Neil Smith.
--- End Message ---
--- Begin Message ---
No prob



<form enctype="multipart/form-data" name="New" action="ProcessNewNews.php"
method="post">

<table border=0 width=100% bgcolor=#828967>
  <tr>
  <td width=100%><font face=arial size=2><b>Titill fréttar :</b></font></td>
  </tr><tr>
  <td width=100%>&nbsp;&nbsp;<input type=text name=HeadText size=63></td>
  </tr><tr>
  <td width=100%><font face=arial size=2><b>Frétt :</b></font></td>
  </tr><tr>
  <td width=100%>&nbsp;&nbsp;<textarea name=MainText rows=6
cols=47></textarea></td></tr>
  <tr><td width=100%><font face=arial size=2><b>Mynd</b></font>&nbsp;&nbsp;

  <input type="file" name="NewsPicture" size="43"></td>

  </tr><tr>
  <td width=100% align=right>
  <input type=Hidden value=New name=ToDo>
  <input type=hidden name=MAX_FILE_SIZE value=102400>
  <input type=Submit value=Skrá-frétt></td></tr></table>
</form>

...

//process

 $uploaddir = "/frettamyndir/";

  echo(is_uploaded_file($_FILES['NewsPicture']['name']));

if (!empty($_REQUEST['ToDo']))
{
  if ($_REQUEST['ToDo'] == 'New')
  {


  if (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $uploaddir .
$_FILES['NewsPicture']['name']))
  {
         print "File is valid, and was successfully uploaded.  Here's some
more debugging info:\n";
         print_r($_FILES);
    } else {
         print "Possible file upload attack!  Here's some debugging
info:\n";
         print_r($_FILES);
    }
}
}

And this is what it prints out

C:\\php\\uploadtemp\
Warning: move_uploaded_file(/frettamyndir/cook.jpg)
[function.move-uploaded-file]: failed to create stream: No such file or
directory in C:\riddarinn\ProcessNewNews.php on line 21

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move
'C:\\php\\uploadtemp\php8E.tmp' to '/frettamyndir/cook.jpg' in
C:\riddarinn\ProcessNewNews.php on line 21
Possible file upload attack! Here's some debugging info: Array (
[NewsPicture] => Array ( [name] => cook.jpg [type] => image/pjpeg [tmp_name]
=> C:\\php\\uploadtemp\php8E.tmp [error] => 0 [size] => 40733 ) )


"Matt Babineau" <[EMAIL PROTECTED]> wrote in message
001301c2d7d8$7d0061c0$6610a8c0@webdevx">news:001301c2d7d8$7d0061c0$6610a8c0@webdevx...
Can you post the code?

--> -----Original Message-----
--> From: Palli [mailto:[EMAIL PROTECTED]]
--> Sent: Tuesday, February 18, 2003 11:14 PM
--> To: [EMAIL PROTECTED]
--> Subject: Re: [PHP-WIN] Problem with file upload!!
-->
-->
--> Hello
-->
--> This is what I've done sofar...
-->
--> 1. the I_usr account on your server must have rights to the
--> temp folder that php stores its temporary files, and also
--> to the destination folder that you wish to copy a 'good' file.
-->
--> 2. the syntax for the path of the move command requires
--> both a folder and the actual name of the posted file that
--> is to exist on the server.  eg, 'g:\\tmp\\'.$userfile_name
--> unless, of course, you mean to save all of your files in
--> the root of the drive!
-->
--> 3. you will need to make your path with two slashes like
--> this -- g:\\tmp\\filename -- because a single slash from
--> php escapes the next character, and that will make NT fretful.
-->
--> ....but im still getting this error
-->
--> Warning: move_uploaded_file(//frettamyndir//logo_final.jpg)
--> [function.move-uploaded-file]: failed to create stream: No
--> such file or directory in C:\riddarinn\Process.php on line 20
-->
--> Could anyone tell my what seems to be the problem!
-->
--> thx
--> palli
-->
-->
--> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message
--> 001201c2d7b7$d3a30b20$6610a8c0@webdevx">news:001201c2d7b7$d3a30b20$6610a8c0@webdevx...
--> You need to goto the folder permissions and add permission
--> for the user "IUSR_<computername>" and give that user write
--> permissions specifically to the folders that are envolved.
--> I had the exact same error message you got and I did this
--> and it worked. So whatever user your webserver is running
--> on needs to have permission. You may want to even try
--> giving full permissions and then tighten the security nuse
--> once you get the upload working.
-->
--> -Matt
-->
--> --> -----Original Message-----
--> --> From: Palli [mailto:[EMAIL PROTECTED]]
--> --> Sent: Tuesday, February 18, 2003 8:34 PM
--> --> To: [EMAIL PROTECTED]
--> --> Subject: Re: [PHP-WIN] Problem with file upload!!
--> -->
--> -->
--> --> Hi .... again!!! and thanx matt!
--> -->
--> --> This didnt solve my problem....
--> -->
--> --> Im running on XP and im using IIS 5.1. I've change the
--> server user
--> --> to Administrator but I still cant upload a file.
--> -->
--> --> Can anybody help me
--> -->
--> --> "Matt Babineau" <[EMAIL PROTECTED]> wrote in message
--> --> 000401c2d7ad$66febdc0$6610a8c0@webdevx">news:000401c2d7ad$66febdc0$6610a8c0@webdevx...
--> --> I have also gotten the same exact error, it has to do with the
--> --> permissions on the server and the IUSR_x having WRITE
--> permissions to
--> --> the folder you want to move the file to and to the PHP
--> TEMP folder
--> --> (I think).
--> -->
--> --> --> -----Original Message-----
--> --> --> From: Palli [mailto:[EMAIL PROTECTED]]
--> --> --> Sent: Tuesday, February 18, 2003 7:23 PM
--> --> --> To: [EMAIL PROTECTED]
--> --> --> Subject: Re: [PHP-WIN] Problem with file upload!!
--> --> -->
--> --> -->
--> --> --> Hello again!
--> --> -->
--> --> --> now I get another error;
--> --> -->
--> --> --> Warning: move_uploaded_file(/frettamyndir/fastfood.jpg)
--> --> --> [function.move-uploaded-file]: failed to create stream:
--> --> No such file
--> --> --> or directory in C:\riddarinn\Process.php on line 16
--> --> -->
--> --> --> Warning: move_uploaded_file()
--> --> --> [function.move-uploaded-file]: Unable to move
--> --> --> 'C:\PHP\uploadtemp\php98.tmp' to
--> --> '/frettamyndir/fastfood.jpg' in
--> --> --> C:\riddarinn\Process.php on line 16
--> --> -->
--> --> --> Can anyone tell me what this means?
--> --> -->
--> --> --> thx
--> --> --> Palli
--> --> -->
--> --> --> "Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message
--> --> --> 002501c2d794$1541a330$0100a8c0@beast">news:002501c2d794$1541a330$0100a8c0@beast...
--> --> --> You need to write:
--> --> -->
--> --> --> <form enctype="multipart/form-data" action="Process.php"
--> --> --> method=post>
--> --> -->
--> --> --> Matt
--> --> -->
--> --> --> |-----Original Message-----
--> --> --> |From: Palli [mailto:[EMAIL PROTECTED]]
--> --> --> |Sent: Tuesday, February 18, 2003 3:21 PM
--> --> --> |To: [EMAIL PROTECTED]
--> --> --> |Subject: [PHP-WIN] Problem with file upload!!
--> --> --> |
--> --> --> |
--> --> --> |Hello I'm wondering what is wrong whit my code.  I´m
--> --> --> trying to upload
--> --> --> |an image but I keep getting this error message??
--> --> --> |
--> --> --> |Notice: Undefined index: NewsPicture in
--> --> --> C:\riddarinn\Process.php on
--> --> --> |line 17
--> --> --> |
--> --> --> |This is my code :
--> --> --> |
--> --> --> |<form name="New" action="Process.php" method="post"> ...
--> --> --> |<input type=file name="NewsPicture" size=43>
--> --> --> |<input type=hidden name=MAX_FILE_SIZE value=10240>
--> --> --> |<input type=Submit value=Skrá-frétt>
--> --> --> |...
--> --> --> |</form>
--> --> --> |
--> --> --> |// my process site
--> --> --> |...
--> --> --> |if
--> --> (move_uploaded_file($_FILES['NewsPicture']['tmp_name'], $udir .
--> --> --> |$_FILES['NewsPicture']['name']))
--> --> --> |...
--> --> --> |
--> --> --> |THX
--> --> --> |Palli
--> --> --> |
--> --> --> |
--> --> --> |
--> --> --> |
--> --> --> |
--> --> --> |--
--> --> --> |PHP Windows Mailing List (http://www.php.net/)
--> --> --> |To unsubscribe, visit: http://www.php.net/unsub.php
--> --> --> |
--> --> --> |
--> --> --> |
--> --> -->
--> --> -->
--> --> -->
--> --> -->
--> --> -->
--> --> --> --
--> --> --> PHP Windows Mailing List (http://www.php.net/)
--> --> --> To unsubscribe, visit: http://www.php.net/unsub.php
--> --> -->
--> --> -->
--> -->
--> -->
--> -->
--> -->
--> --> --
--> --> PHP Windows Mailing List (http://www.php.net/)
--> --> To unsubscribe, visit: http://www.php.net/unsub.php
--> -->
--> -->
-->
-->
-->
-->
--> --
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
-->
-->



--- End Message ---
--- Begin Message ---
hi neil

thank u very much.  I uploaded it to the root directory and it worked.
I changed my upload dir to

$uploaddir = "frettamyndir\\";

and it worked.  I cant tell u how stupid I was not to try this but thanx,

Palli



"Neil Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> It means it is unable to move the file.
>
> Sarcasm aside, look at the error message.
>
> At 00:22 19/02/2003 +0000, you wrote:
> >Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move
> >'C:\PHP\uploadtemp\php98.tmp' to '/frettamyndir/fastfood.jpg' in
> >C:\riddarinn\Process.php on line 16
> >
> >Can anyone tell me what this means?
> >
> >thx
> >Palli
>
> Whats it telling you ? Its saying unable to move the temporary file upload
> to its final destination. Now that detsination is
> /frettamyndir/fastfood.jpg : You are using windows. Does this look like a
> windows file path to you ?
>
> Me neither, so supply the move_uploaded_file function with a real file
path
> like you would for any filesystem function, because move_uploaded deals
> with your raw file system, not your web server's document. structure.
Clear
> ? Cool.
>
> BTW if you look in the C:\PHP\uploadtemp directory, you will be able to
> verify the file uploads taking place, when you see a number of files
> phpXX.tmp created during uploads. They may be deleted by garbage
collection
> in normal operation.
>
> Cheers,
> Neil Smith.
>


--- End Message ---
--- Begin Message ---
I recently upgraded to PHP 4.3.1 from 4.2. I use the nusphere bundle, and
they had not yet incorporated the new version yet. Anyways, now my pages are
being parsed correctly. Basically, I'm trying to post information through
the url (i.e. randompage.php?male=y&age=43), and then have PHP retrieve it
from my mySQL database. I've tried just making a script that would echo the
POSTed information, but it doesn't echo it. I've looked through everything,
and double checked all my settings. Any ideas?


--- End Message ---
--- Begin Message ---
That should be:
"Anyways, now my pages are __not__ being parsed correctly."

"Andrew Ferguson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I recently upgraded to PHP 4.3.1 from 4.2. I use the nusphere bundle, and
> they had not yet incorporated the new version yet. Anyways, now my pages
are
> being parsed correctly. Basically, I'm trying to post information through
> the url (i.e. randompage.php?male=y&age=43), and then have PHP retrieve it
> from my mySQL database. I've tried just making a script that would echo
the
> POSTed information, but it doesn't echo it. I've looked through
everything,
> and double checked all my settings. Any ideas?
>
>


--- End Message ---
--- Begin Message ---
Hi,

I am trying to use some W32api functions in PHP (to do some Windows NT Domain login 
stuff).

Problems I am having:

I have looked at:

http://www.php.net/manual/en/ref.w32api.php

Which gives a simple example of using dl() to load the appropriate dll extension, then 
registering the functions I want to use and
running them.


The first problem I run into is:

Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use 
extension statements in your php.ini in c:\program
files\apache group\apache\htdocs\pm\login.php3 on line 39

So rather than use the dl() function, I used a line in my PHP.ini file:

extension="php_w32api.dll"

to load the extension as it says in the warning.

However, this does not seem to load this extension at all, because when I call 
w32api_register_function, I get:

Fatal error: Call to undefined function: w32api_register_function() in c:\program 
files\apache group\apache\htdocs\pm\login.php3 on
line 44

And when I run:

extension_loaded('php_w32api.dll')

It returns false and running php.exe -m on the command line does not list 
php_w32api.dll loaded.

However, if I change the line

extension="php_w32api.dll"

to

extension="php_w32api1.dll"

i.e. so that the dll does not exist - an error is listed in the log saying it cannot 
find the dll, so I figured it must be loading
it cause it does not list an error on the line when the name is correct.


Sorry for the Essay bordering on War and Peace.  Hope someone can help me out?

Cheers,

Andrew

--- End Message ---
--- Begin Message ---
testing if email goes thru,.. anyone?, i got a php mail() 530 problem from
my smtp server. what else do i set?

Charles

--- End Message ---
--- Begin Message --- Hello,

I need to manipulate, the following data in a number of diffierent ways (specifics follow).
Telephone extension number - 4 digits in the range 2000-2119
Total time on phone - seconds integer values
Total No. of calls - integer value
Name - A persons name

I'm purposely NOT using a database table for this data.

I'm storing the data in a multidemensional array, the stucture of which is below, and I need to sort it by "Total Time On Phone" in decending order, which is the first element of the 'embedded' array. I have got an idea of how to write a function to do this, I'm sure I can get it too work. But I figured someone must have had to do something like this b4 and so was after any advice/code and/or a more elegant way of achieving what I what?

Any ideas/comments would be well recieved.

Thanks A lot
Best Wishes
Roland Tarver


//just filled with some descriptive default values
$extensionsDetails = array('Total Time On Phone', 'Total Number of calls', 'name of person');

// a hash of extention numbers and the $extensionsDetails array (above)
$telData = array(
// management
'2000' => $extensionsDetails,
'2001' => $extensionsDetails,
'2002' => $extensionsDetails,
'2003' => $extensionsDetails,
'2004' => $extensionsDetails,
'2005' => $extensionsDetails,
// sales '2020' => $extensionsDetails,
'2021' => $extensionsDetails,
'2022' => $extensionsDetails,
'2023' => $extensionsDetails,
'2024' => $extensionsDetails,
'2025' => $extensionsDetails,
'2026' => $extensionsDetails,
'2027' => $extensionsDetails,
'2028' => $extensionsDetails,
'2029' => $extensionsDetails,
'2030' => $extensionsDetails,
'2031' => $extensionsDetails,
'2032' => $extensionsDetails,
'2033' => $extensionsDetails,
'2034' => $extensionsDetails,
'2035' => $extensionsDetails,
'2036' => $extensionsDetails,
'2037' => $extensionsDetails,
'2040' => $extensionsDetails,
'2041' => $extensionsDetails,
'2043' => $extensionsDetails,
'2044' => $extensionsDetails,
'2045' => $extensionsDetails,
'2046' => $extensionsDetails,
'2047' => $extensionsDetails,
'2048' => $extensionsDetails,
'2049' => $extensionsDetails,
'2050' => $extensionsDetails,
'2051' => $extensionsDetails,
'2052' => $extensionsDetails,
'2053' => $extensionsDetails,
'2054' => $extensionsDetails,
// media/production
'2101' => $extensionsDetails,
'2102' => $extensionsDetails,
'2103' => $extensionsDetails,
'2104' => $extensionsDetails,
'2105' => $extensionsDetails,
'2106' => $extensionsDetails,
'2107' => $extensionsDetails,
'2111' => $extensionsDetails,
'2112' => $extensionsDetails, ); // end TelData array

--- End Message ---
--- Begin Message ---
Could anyone tell how to install DOM-support to PHP 4.3? I'm using Apache
2.0.44 and Windows XP and PHP as a module. I have downloaded the
libxml2-2.5.3win32 package but where should I place the files?

The libxml2.dll file I have copied to \windows\system32 like it should.

The php_domxml.dll is in both \php\extensions and \windows\system32
directories and I have modified the php.ini file to take the extension in
use. But that'a not enough....

And what does it mean that PHP must be configured with --with-dom[=DIR].?

This the only problem, otherwise it works fine.

thanks in advance



--- End Message ---
--- Begin Message ---
I've installed yesterday the 4.3.1 on two system:
first: NT4 SP6a & IIS
second: Win XP Pro SP1 & IIS

In both cases the PHP functions normally in ISAPI but not in CGI.

In the first case, i've have multiple instances of php.exe in my task
manager and my browser (IE6) don't have result before I kill the
php.exe.

In the second case, i've an error with php interpretor, so i've nothing
in the browser.

I read that ISAPI is not as stable as cgi, so what can I do in order to
use CGI ???

---

My config for extensions is:
extension=php_iisfunc.dll
extension=php_mssql.dll
extension=php_sockets.dll

others are off.

When I put in comment extension=php_iisfunc.dll, all work fine in CGI.

NB: We use php in order to use phpbb forum.


--- End Message ---
--- Begin Message ---
I've installed yesterday the 4.3.1 on two system:
first: NT4 SP6a & IIS
second: Win XP Pro SP1 & IIS

In both cases the PHP functions normally in ISAPI but not in CGI.

In the first case, i've have multiple instances of php.exe in my task
manager and my browser (IE6) don't have result before I kill the
php.exe.

In the second case, i've an error with php interpretor, so i've nothing
in the browser.

I read that ISAPI is not as stable as cgi, so what can I do in order to
use CGI ???

---

My config for extensions is:
extension=php_iisfunc.dll
extension=php_mssql.dll
extension=php_sockets.dll

others are off.

When I put in comment extension=php_iisfunc.dll, all work fine in CGI.

NB: We use php in order to use phpbb forum.




--- End Message ---
--- Begin Message ---
Hello everybody,
I'm using PHP & MySQL running on Win2000 & IIS5 and I have the following
problem with MySQL: I've got text records with cyrrilic letters and MySQL
does not order the result records from a query in alphabetical order. (for
example when using "order by" in a query)
Any suggestions will be appreciated.
Regards, Veselina

--- End Message ---

Reply via email to