php-windows Digest 25 Nov 2002 10:57:28 -0000 Issue 1456

Topics (messages 17099 through 17108):

Re: Help required... Simple File Upload
        17099 by: Dash McElroy
        17102 by: Raheel Hussain
        17104 by: Raheel Hussain
        17105 by: Raheel Hussain

Re: Unable to upload.. :(
        17100 by: Dash McElroy

Another Newb PHP question
        17101 by: Joe Finlinson

PHP time in header
        17103 by: Onion

File Upload Problem (Permission Denied)( I Got the solve )
        17106 by: Raheel Hussain

Sending Attachment through Email
        17107 by: Raheel Hussain

Download file
        17108 by: Radovan Radic

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 haven't done but one file upload, but it seems from the error message
that maybe PHP is trying to write the file to
d:\raheel\w3sites\txtfiledemo\uploads\ (as a file?). Perhaps you should
include the $_FILES['userfile']['name'] to the ending statement (which I
believe is what the file's original name was).

Worth a try at least. (I may be wrong on the $_FILES['userfile']['name'] -
try print_r($_FILES); and see what is in that array).

-Dash

Fashion is a form of ugliness so intolerable that we have to alter it
every six months.
                -- Oscar Wilde

On Sat, 23 Nov 2002, Raheel Hussain wrote:

>
> hi,
> I got a problem in a simple file upload in a php file , i have two pages  and i m 
>writing the code here as bellow
>
> ::page1.php::
> <html>
>  <head>
>  </head>
>  <body>
>  <form name="f" method="post" enctype="multipart/form-data"  action="default2.php">
>  <input type="hidden" name="MAX_FILE_SIZE" value="78728">
>  Send this file: <input name="userfile" type="file">
>  <input type="submit" value="Send File">
>  </form>
>  <body>
> <html>
>
> ::default2.php::
> move_uploaded_file($_FILES['userfile']['tmp_name'], 
>"D:\\Raheel\\W3sites\\txtfiledemo\\uploads\\");
> print($_FILES['userfile']['error']);
>
>
> :: on default2.php i have the following error, which i can't figure out ::
>
> Warning: Unable to create 'D:\W3sites\txtfiledemo\uploads\': Permission denied in 
>D:\W3sites\txtfiledemo\default2.php on line 9
>
> Warning: Unable to move 'c:\php\uploads\php76.tmp' to 
>'D:\W3sites\txtfiledemo\uploads\' in D:\W3sites\txtfiledemo\default2.php on line 9
> 0
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now

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

/*
i m now using the following script to upload the file but
still it is not working..
I there would've been some permission problem , i have given 
"full control" permission to the whold directory even the drive there
the site is hosted.
now the script is generating the following out put
which means that the file is uploaded successfully. as the error code is
zero, but when i see the uploads directory it is still empty
*/
$file = $_FILES['userfile']['tmp_name'];
print_r($file . "<Br>");
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
 print("[" . $_FILES['userfile']['error'] . "] : is the error code");
    copy($file, "/uploads"); //a directory whose name is Uploads on the site root
} else {
    echo "Possible file upload attack. Filename: " . $_FILES['userfile']['name'];
}



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
$file = $_FILES['userfile']['tmp_name'];
print_r($file . "<Br>");
print($_FILES['userfile']['size'] . "<br>");
move_uploaded_file($file, "/Uploads");
/*
gives the following output
d:\raheel\w3sites\phpDE.tmp
73699
*/

/*
$file = $_FILES['userfile']['tmp_name'];
print_r($file . "<Br>");
print($_FILES['userfile']['size'] . "<br>");
move_uploaded_file($file, "d:\\raheel\\w3sites\\txtfiledemo\\uploads\\");

give the following output
d:\raheel\w3sites\phpE3.tmp
73699
Warning: Unable to create 'd:\raheel\w3sites\txtfiledemo\uploads\': Permission denied 
in D:\Raheel\W3sites\txtfiledemo\default2.php on line 25
Warning: Unable to move 'd:\raheel\w3sites\phpE3.tmp' to 
'd:\raheel\w3sites\txtfiledemo\uploads\' in D:\Raheel\W3sites\txtfiledemo\default2.php 
on line 25
*/
 "J.Veenhuijsen" <[EMAIL PROTECTED]> wrote:Try move_uploaded_file() with full 
pathname.

Jochem


Raheel Hussain wrote:
> 
> /*
> i m now using the following script to upload the file but
> still it is not working..
> I there would've been some permission problem , i have given 
> "full control" permission to the whold directory even the drive there
> the site is hosted.
> now the script is generating the following out put
> which means that the file is uploaded successfully. as the error code is
> zero, but when i see the uploads directory it is still empty
> */
> $file = $_FILES['userfile']['tmp_name'];
> print_r($file . "
");
> if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
> print("[" . $_FILES['userfile']['error'] . "] : is the error code");
> copy($file, "/uploads"); //a directory whose name is Uploads on the site root
> } else {
> echo "Possible file upload attack. Filename: " . $_FILES['userfile']['name'];
> }
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now






---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
$file = $_FILES['userfile']['tmp_name'];
print_r($file . "<Br>");
print($_FILES['userfile']['size'] . "<br>");
move_uploaded_file($file, "/Uploads");
/*
gives the following output
d:\raheel\w3sites\phpDE.tmp
73699
*/

/*
$file = $_FILES['userfile']['tmp_name'];
print_r($file . "<Br>");
print($_FILES['userfile']['size'] . "<br>");
move_uploaded_file($file, "d:\\raheel\\w3sites\\txtfiledemo\\uploads\\");

give the following output
d:\raheel\w3sites\phpE3.tmp
73699
Warning: Unable to create 'd:\raheel\w3sites\txtfiledemo\uploads\': Permission denied 
in D:\Raheel\W3sites\txtfiledemo\default2.php on line 25
Warning: Unable to move 'd:\raheel\w3sites\phpE3.tmp' to 
'd:\raheel\w3sites\txtfiledemo\uploads\' in D:\Raheel\W3sites\txtfiledemo\default2.php 
on line 25
*/
 Dash McElroy <[EMAIL PROTECTED]> wrote:I haven't done but one file upload, but it seems 
from the error message
that maybe PHP is trying to write the file to
d:\raheel\w3sites\txtfiledemo\uploads\ (as a file?). Perhaps you should
include the $_FILES['userfile']['name'] to the ending statement (which I
believe is what the file's original name was).

Worth a try at least. (I may be wrong on the $_FILES['userfile']['name'] -
try print_r($_FILES); and see what is in that array).

-Dash

Fashion is a form of ugliness so intolerable that we have to alter it
every six months.
-- Oscar Wilde

On Sat, 23 Nov 2002, Raheel Hussain wrote:

>
> hi,
> I got a problem in a simple file upload in a php file , i have two pages and i m 
>writing the code here as bellow
>
> ::page1.php::
> 
> 
> 
> 
> 
>  [input] 
> Send this file:  [input] 
>  [input] 
> 
> 
> 
>
> ::default2.php::
> move_uploaded_file($_FILES['userfile']['tmp_name'], 
>"D:\\Raheel\\W3sites\\txtfiledemo\\uploads\\");
> print($_FILES['userfile']['error']);
>
>
> :: on default2.php i have the following error, which i can't figure out ::
>
> Warning: Unable to create 'D:\W3sites\txtfiledemo\uploads\': Permission denied in 
>D:\W3sites\txtfiledemo\default2.php on line 9
>
> Warning: Unable to move 'c:\php\uploads\php76.tmp' to 
>'D:\W3sites\txtfiledemo\uploads\' in D:\W3sites\txtfiledemo\default2.php on line 9
> 0
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
Toby,

Your ISP may be using 'safe_mode'. Try the move_uploaded_file function()
instead of copy(). This is taken off php.net/move_uploaded_file:

  Note:  move_uploaded_file() is not affected by the normal safe-mode
  UID-restrictions. This is not unsafe because move_uploaded_file() only
  operates on files uploaded via PHP.

Hope this helps...

-Dash

                        *** NEWSFLASH ***
Russian tanks steamrolling through New Jersey!!!!  Details at eleven!

On Sun, 24 Nov 2002, [iso-8859-1] toby z wrote:

> Hi all
> I am trying to upload a file. It works fine on my local Apache, but
> gives me "Permission denied to create file" error on my online host..
> Any clue???
>
> $file = $_FILES['userfile']['tmp_name'];
> if (is_uploaded_file($file))
>    print_r("Copying ".$file);
>      if (copy($file, "./files/". $_FILES['userfile']['name']))
>               echo("Success");
>
>      else
>               echo("Failure");
>
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
ok... so last weeks struggle was getting my computer set up as a php mysql
server for testing.  I guess it was also a struggle learning how to install
my first "precoded" program.  With that being said, I am very grateful for
all for the help that you here in this forum gave me.

I have now given myself a new problem.  The site I am trying to build has
frames, all is fine and dandy until I hit my PHP calendar, if all I do is
look at the calendar there is no problem however, if I do anything that runs
a script within the calendar when I go to my navbar and then try to go to
somewhere else in the site, rather than opening the page in my main frame
(where the calendar currently is) it ends up opening the page in a new
window.  This a rather troublesome side effect.  Any suggestions?  I will
include the link to the calendar maybe one of you smart people can tell me
what is going on in the code... I would post the site up but I don't want to
hand out my IP address, and the organization for which I am doing the site
hasn't upgraded their account to support php and myself.  I am trying to
give a presentation to my school class about the site tomorrow... so I would
like to fix this... any suggestions?

The zip file with the calendar code/instructions is attached  here is their
website: http://calendar.codewalkers.com/

any quick solutions would be very appreciated!
~Joe


begin 666 ltw_calendar.zip
M4$L#!!0````(`&!7K2R1!DJ/RP$``&($```.````;'1W7VAE861E<BYP:'"=
MDV&OTC 4AC_#KS@V)H-D8]^YP W"!'1<;[@SACA#RG9@,Z6=;2?W:OSOMAO<
M@!I$ORS;>YZU)T][>K?-AL0O92YQ)7B"+8?I_2IA5"E4G2(KG/9-L]%L9$A3
ME"TRHDF&7B*XEH)U@0LOL0FQU)$)'@NSG.H"@0YL=RG5V")C%U*8PQ*FW;RK
M2-N4"$SF4?4G)ID`TIM&\W 0<W*2!,/Q>1+-HC 8A-$'\&!$&?*4RIY?IS7X
MC#Z,%K/[",+AW>3]<!+T8_*&?J4/B<P+'1/03P6:3..C]C^;@CH4SO=[X7FG
MWYN2)SH7'!@U;YG:4<9:I61M^'Z*[7.>BGV'TQU"'QQ1($?IW%0('!B).Z%M
MV5;M&B[$)";V:>SEW^B:H:LTU:5R36^"L365RMWGJ<[Z5NW+ZJ@$W^3;CTXA
MBK)85?VL*L3Y9!6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A>74:"JKR9&O,Q1E-9K)&6:72T:M/&=K.^FCOALT/,NM,"OCD>/P'4$L#
M!!0````(`&"@:2S-,9O&@ ```*0````.````;'1W7V9O;W1E<BYP:'"SL>?B
M3$W.R%=0LG%V]0MQ#;)S3LQ)S4M)+%(H*,HORTQ)35%(JE2P253(*$I-LXU1
MRB@I*;#2UT_.3TDM3\S)3BTJUDO.S]6/45(H22Q*3RT!*HE/RDG,RXY1LG-&
M*++13[33L]&'VA&3IV0-MU??R=\E$DW((\37!R)D;\<%`%!+`0(4"Q0````(
M`&!7K2R1!DJ/RP$``&($```.``````````$`( ````````!L='=?:&5A9&5R
M+G!H<%!+`0(4"Q0````(`&!SK2P-+^<#@P$``+ &```-``````````$`( ``
M`/<!``!L='=?<W1Y;&4N8W-S4$L!`A0`% ````@`2J75+#X`^*"1`@``304`
M``8``````````0`@`+:!I0,``%)%041-15!+`0(4"Q0````(`*QDMRR.DX?Z
M*@0```$1```,``````````$`( ```%H&``!C86QE;F1A<BYP:'!02P$"% L4
M````" ! I70L&6:'AR4!``#O`0``!P`````````!`" ```"N"@``24Y35$%,
M3%!+`0(4"Q0````(`!-BMRQS>R[!^00``(,/```+``````````$`( ```/@+
M``!I;G-T86QL+G!H<%!+`0(4`!0````(`)2DU2P.\-OS]! ``(]7```/````
M``````$`( "V@1H1``!L='=?8VQA<W-E<RYP:'!02P$"% L4````" `8:[<L
MP3KPUZT"```R!P``#@`````````!`" ````[(@``;'1W7V-O;F9I9RYP:'!0
M2P$"% L4````" !@H&DLS3&;QH ```"D````#@`````````!`" ````4)0``
D;'1W7V9O;W1E<BYP:'!02P4&``````D`"0`(`@``P"4`````
`
end

--- End Message ---
--- Begin Message ---
This thread is from alt.comp.lang.php
Anyone have a definitave answer for this, and not a work-around ?

Mark...




Update,

    Have got a work-around happening... I insert this in the headers:

\nDate: ".date("D, d M Y H:i:s O")

This seems to work. There are quite a few instances of this type of thing at
bugs.php.net... I couldn't find any real fixes though...

Mark...

"Onion" <[EMAIL PROTECTED]> wrote in message
news:x1gC9.12$[EMAIL PROTECTED]...
> Update -
>
> This is the output from the following php:
>
> $curloc = setlocale( "LC_ALL", "" );
> echo "Current Locale = $curloc\n";
> echo  "Date: ".date("r");
>
> Current Locale = English_Australia.1252 Date: Tue, 19 Nov 2002 11:50:11
> +1100
>
> Therefore the locale time offset is set incorrectly ? How do I change this
?
> Is is php itself and not the webserver ?
> Note - the time as given is itself correct, just the offset is +11:00
> instead of +10:00.
>
> Thanks again,
> Mark...
>
> "Onion" <[EMAIL PROTECTED]> wrote in message
> news:HEfC9.10$[EMAIL PROTECTED]...
> >
> >
> > Thanks, PHP is ver 4.2.2
> >
> > Using the mail() function.
> >
> > Email header follows:
> >
> > Received: from BORIS ([172.16.200.243]) by bananamail.bananacoast with
> SMTP
> > (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
> >  id 436K2QWC; Tue, 12 Nov 2002 16:23:19 +1100
> > Date: Tue, 12 Nov 2002 16:20:30 +1000
> > Subject: PLC Referral - Unwin
> > To: [EMAIL PROTECTED]
> > From: PLC Housing Referral <[EMAIL PROTECTED]>
> >
> > A couple of addresses changed (receiver & sender) to protect the
> innocent...
> > BORIS is the IIS / PHP box, BANANAMAIL is the email server. It looks
like
> > the time offset is incorrect in the header - but on which machine
(checked
> > both boxes & they are correct - GMT +10:00 - AUS Eastern Daylight Time -
> > Auto adjust time for daylight savings.). Can this be in the PHP config
> > somewhere ? Sending an email using ASP produces the correct result.
> >
> > Mark...
> >
> >
> > "Waitman C. Gobble, II" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > Hello onion,
> > >
> > > What version of PHP are you running? I recall a recent bug having to
do
> > > with the time that shows on the email. Basically if you look at the
GMT
> > > offset in the header, it would be incorrect.
> > >
> > > Take care
> > >
> > > Waitman Gobble
> > > EMK Design
> > > Buena Park, California
> > > +1.7145222528
> > > http://emkdesign.com
> > >
> > >
> > >
> > > Onion wrote:
> > >
> > > I have a page that sends an email, that when viewed on the receipents
end,
> > > says that it was sent 1 hour ahead of time. The time on the web
server,
> > > email server, and client are all correct. I have run the following in
the
> > > page (testing)
> > >
> > >
> > > $curloc = setlocale( "LC_ALL", "" );
> > > echo "Current Locale = $curloc\n";
> > > echo  "Date: ".date("r");
> > >
> > > and get the following line:
> > >
> > > Current Locale = English_Australia.1252 Date: Tue, 12 Nov 2002
17:52:55
> > > +1100
> > >
> > > all seems OK. This time is correct (17:52), but the offset is wrong
(should
> > > be +1000)
> > > Any help much appreciated
> > > Mark...


--- End Message ---
--- Begin Message ---
Well after a bit of struggle i got the solve to the problem
Now whether there was my misinterpretation, or the incmplete documentation of the php 
manual that I was using it with the following example


<?php // In PHP earlier then 4.1.0, $HTTP_POST_FILES  should be used instead of 
$_FILES.if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {    
copy($_FILES['userfile']['tmp_name'], "/place/to/put/uploaded/file");} else {    echo 
"Possible file upload attack. Filename: " . $_FILES['userfile']['name'];}/* ...or... 
*/move_uploaded_file($_FILES['userfile']['tmp_name'], "/place/to/put/uploaded/file");?>


here I tried 

/Uploads/
d:\\raheel\\w3sites\\txtfiledemo\\uploads\\
\uploads
./uploads


inplace of 
"/place/to/put/uploaded/file" in the example,

which gave "permisson denied prob" and "unable to create prob" etc.




but the actuall problem is that 
the "/place/to/put/uploaded/file" should include the file name with it.


so 



it should be like as follows
"uploads/newfilename.pdf" (suppose)
and uploads is a directory in the site root


thankx all the guys for being part of conversation
raheel








---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
hi,

can any body tell that what directive or headers should be used in the mail function 
if i want to send an attachment via email,

i have simple email composer form with SendTo, SendFrom,Subject , Body and 
Attachment(input type=file) Fields

and server side form, where i get all the fields. and then send the email.

thanx in advance



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--- End Message ---
--- Begin Message ---
Hi

I have problems with downloading files from my web application in php.
Here is the code from download.php

<?
if (isset($dload))
{
if ($dload=="cdrs") //
{
$filename="./dload_files/temp.txt";
// now create file, and load some data from mssql in it - it is ok
$fp=fopen($filename,"w");
write_data($fp);
fclose($fp);
}
$len=filesize($filename);
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header("Content-type: application/download");
header("Content-Length: $len");
header("Content-Disposition: attachment; filename=\"$filename\"");
$fp=fopen($filename, "r");
fpassthru($fp);
exit;
}
?>

download.php is called from another page
I get the save as dialog box , but filename is not temp.txt but download
with no extension. I have heard this is bug in IE about content-disposition
headers.
Anyone can help here?

Radovan


--- End Message ---

Reply via email to