php-general Digest 14 Feb 2006 04:51:51 -0000 Issue 3962

Topics (messages 230318 through 230345):

Re: Converting piped data to values from html to phpcgi
        230318 by: Jochem Maas
        230323 by: Ford, Mike

Re: unsupported binary characters in database,
        230319 by: Mark Steudel

doubt in mail() in php
        230320 by: suresh kumar
        230322 by: Jochem Maas

Re: doubt in mail function
        230321 by: Jochem Maas

Problems with IIS6
        230324 by: Anders Norrbring

[HS] IDE PHP on Linux...
        230325 by: David BERCOT
        230326 by: Shaunak Kashyap
        230327 by: Richard Lynch
        230331 by: Jay Blanchard
        230335 by: David BERCOT
        230340 by: Björn Bartels
        230344 by: Steve Brown

testing text body emails
        230328 by: Mark Steudel
        230329 by: Brady Mitchell
        230330 by: Kevin Kinsey

What's a Blog?
        230332 by: Sam Smith
        230333 by: Jay Blanchard
        230334 by: Dan McCullough

Downloading very large files
        230336 by: Jonathan Duncan
        230337 by: Rory Browne
        230341 by: Jonathan Duncan
        230342 by: Joe Wollard

Re: safe_mode + move_upload_file
        230338 by: Chris

Re: Class/functions question
        230339 by: Paul Goepfert

Re: PHP multi-threading ?
        230343 by: Oliver Grätz

Complications when sending HTML email
        230345 by: Peter Lauri

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 ---
also check out these 2 funcs:

http://php.net/parse_str
http://php.net/parse_url

Dan Parry wrote:
This works for me:

<? $temp = 'sender_name=zedleon&[EMAIL PROTECTED]&
sender_msg=This+is+a+test&Submit=Submit';
$arr = array();
foreach (explode('&', $temp) as $v) {
        $split = explode('=', $v);
        // urldecode content for readability
        $arr[$split[0]] = urldecode($split[1]); // create assoc. array
        ${$split[0]} = urldecode($split[1]); // form the variables
}

echo $sender_name . '<br/>' . $arr['sender_name']; ?>

That routine should create variables with the names of the arguments as well
as an associative array of the string

HTH

Dan

-----Original Message-----
From: zedleon [mailto:[EMAIL PROTECTED] Sent: 13 February 2006 14:38
To: [email protected]
Subject: [PHP] Converting piped data to values from html to phpcgi

I am using php as a cgi. The data from my html is piped through stdin using
this code:
<?
$fp=popen("cat","r");
$str=fgets($fp);
print $str;
?>

The result I am getting looks like this: (which is correct)
sender_name=zedleon&[EMAIL PROTECTED]&sender_msg=This+is+a
+test&Submit=Submit

What I need to do now is to convert the piped string into the individual
values $sender_name, $sender_email, $sender_msg.
Does anybody know a way to do this...any help is appreciated.


--- End Message ---
--- Begin Message ---
On 13 February 2006 14:38, zedleon wrote:

> I am using php as a cgi. The data from my html is piped through stdin
> using this code:
> <?
> $fp=popen("cat","r");
> $str=fgets($fp);
> print $str;
> > 
> 
> The result I am getting looks like this: (which is correct)
> sender_name=zedleon&[EMAIL PROTECTED]&sender
> _msg=This+is+a +test&Submit=Submit
> 
> What I need to do now is to convert the piped string into the
> individual values $sender_name, $sender_email, $sender_msg.
> Does anybody know a way to do this...any help is appreciated.

I should think http://www.php.net/parse_str is what you're looking for.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--- End Message ---
--- Begin Message ---
 I found another way to deal with this. And that's to run the encrypted
string through base64_encode before inserting into database and running
base64_decode when pulling it out of the database.

Mark

-----Original Message-----
From: Mark Steudel [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 12, 2006 11:18 AM
To: 'Webmaster'; [email protected]
Subject: RE: [PHP] unsupported binary characters in database,

Hmmm ... I guess that's an idea. Any other ways of dealing with this?  

-----Original Message-----
From: Webmaster [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 11, 2006 6:06 PM
To: Mark Steudel
Subject: Re: [PHP] unsupported binary characters in database,

Mark Steudel wrote:
> I have the following encryption function:
>  
>
> function RC4( $data) { //ecncrypt $data with the key in $keyfile with 
> an rc4 algorithm
>     $pwd = implode('', file(/key.php'));
>         $pwd_length = strlen($pwd);
>     for ($i = 0; $i < 255; $i++) {
>           $key[$i] = ord(substr($pwd, ($i % $pwd_length)+1, 1));
>             $counter[$i] = $i;
>         }
>         for ($i = 0; $i < 255; $i++) {
>             $x = ($x + $counter[$i] + $key[$i]) % 256;
>             $temp_swap = $counter[$i];
>             $counter[$i] = $counter[$x];
>             $counter[$x] = $temp_swap;
>  
>         }
>         for ($i = 0; $i < strlen($data); $i++) {
>                         $a = ($a + 1) % 256;
>             $j = ($j + $counter[$a]) % 256;
>             $temp = $counter[$a];
>             $counter[$a] = $counter[$j];
>             $counter[$j] = $temp;
>             $k = $counter[(($counter[$a] + $counter[$j]) % 256)];
>             $Zcipher = ord(substr($data, $i, 1)) ^ $k;
>             $Zcrypt .= chr($Zcipher);
>         }
>         return $Zcrypt;
> }
> source: zend code gallery
>  
> When I encrypt a string that ends in e it shows up as a space in the 
> database, when I pull it back out of the database, the string is 
> missing the e. I tried converting the field in the database to a blob 
> and that didn't work either. My next idea is to add a bin2hex and then 
> a
hex2bin:
>  
> function hex2bin($hexdata) { 
>   $bindata="";
>   
>   for ($i=0;$i<strlen($hexdata);$i+=2) { 
>    $bindata.=chr(hexdec(substr($hexdata,$i,2))); 
>   }
>
>   return $bindata;
> }
> source: phil at internetprojectmanagers dot com
>  
> I was hoping to get some feedback if this is a good way to go about this.
>
> Thanks, Mark
>
>   
Just add a different letter to the end of the string.  So long as it isn't
"e" it should be ok yeah?

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
this is my code

       if(@mail('[EMAIL PROTECTED]','subject','hai this is
the test','[EMAIL PROTECTED]')):
          print "mail sent succesfully";
       else:
            print "mail can send";
endif;
          i dont know whether there is any problem
with my coding or server problem.both from and two
addresses are valid one.

                                   A.suresh





                
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

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

suresh kumar wrote:
this is my code

       if(@mail('[EMAIL PROTECTED]','subject','hai this is
the test','[EMAIL PROTECTED]')):
          print "mail sent succesfully";
       else:
            print "mail can send";
endif;
          i dont know whether there is any problem
with my coding or server problem.both from and two
addresses are valid one.

IS THIS EVEN A QUESTION (ANYMORE)?

(I don't recommend leaving it upto the reader to infer the question)

AND WHY CAN'T YOU ASK A QUESTION ONCE?

(you have posted about your 'mail doubt' at least once
already today!)


                                   A.suresh





                
__________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com


--- End Message ---
--- Begin Message ---
suresh kumar wrote:
hello everybody,
                i am having one doubt in  sending mail

the way I read it you don't have a 'doubt' but a 'problem' ...
(an example of the proper use of the word would be:

        "I doubt whether you bothered to  research your
         problem at all before mailing your question to this list"

in php.in my company our mail server is in windows,but
my php code for mail function in linux,i set the code
as

if(@mail('[EMAIL PROTECTED]','hi suresh','this is
     ^
      \
       \ do you know what this does? try removing it.

test','From:[EMAIL PROTECTED]')):

        both from and to address are valid  but mail
is not receiving to [EMAIL PROTECTED],

  whether i have 2 configure any settings in php.ini,i

<sidenote>
it 'to' not '2' (or 'too') - [granted the english language
can be a pain in the butt!]
</sidenote>

since version 5.3 php is capable of smelling which mail
server you want to use. if you are using an older version you
have to tell php which mail server to use (default is 'localhost')

oh look it's the manual page for the mail function:

        http://php.net/mail

...listing the relevant ini settings right at the top of the
freaking page - the only way you could have missed those is
if you have a 640*480 screen and you don't know what scrolling is
OR you never even bothered to open the manual - at a guess I'd
say you are capable of scrolling a webpage so ...

        READ THE F***ING MANUAL IN FUTURE.


am looking for reply from any one.



A.suresh


                
__________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com


--- End Message ---
--- Begin Message ---
Hiya all!

I'm trying to set up PHP 5.1 with a Win 2003 server running IIS6, but all I can out of it is a page saying:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

I doubt this is anything new, but I can't find any decent solution for it.. Any ideas, please?

--
Anders Norrbring
Norrbring Consulting

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

I'm looking for a good IDE on Linux to code my php files... I'd like
auto-completion (in php and html) and a file explorer...
I've tested Eclipse (with PHP Eclipse) and Komodo but I couldn't have
auto-completion on php commands !!!
Do you have any idea ?

Thank you very much.

David.

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


--- End Message ---
--- Begin Message ---
Assuming you are open to commercial (non-freeware) IDEs and are looking
for a GUI IDE, I would strongly suggest Zend Studio. It's JAVA-based so
it works across multiple OSes, including Linux. 

It supports auto-completion and has a file explorer in addition to other
nifty features.

Shaunak Kashyap
 
Senior Web Developer
WPT Enterprises, Inc.
5700 Wilshire Blvd., Suite 350
Los Angeles, CA 90036
 
Main: 323.330.9900
 
www.worldpokertour.com
 
Confidentiality Notice:  This e-mail transmission (and/or the 
attachments accompanying) it may contain confidential information 
belonging to the sender which is protected.  The information is 
intended only for the use of the intended recipient.  If your are not 
the intended recipient, you are hereby notified that any disclosure, 
copying, distribution or taking of any action in reliance on the 
contents of this information is prohibited. If you have received this 
transmission in error, please notify the sender by reply e-mail and 
destroy all copies of this transmission.

-----Original Message-----
From: David BERCOT [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 13, 2006 12:26 PM
To: [email protected]
Subject: [PHP] [HS] IDE PHP on Linux...

Hi,

I'm looking for a good IDE on Linux to code my php files... I'd like
auto-completion (in php and html) and a file explorer...
I've tested Eclipse (with PHP Eclipse) and Komodo but I couldn't have
auto-completion on php commands !!!
Do you have any idea ?

Thank you very much.

David.

--- End Message ---
--- Begin Message ---
On Mon, February 13, 2006 2:33 pm, Shaunak Kashyap wrote:
> I've tested Eclipse (with PHP Eclipse) and Komodo but I couldn't have
> auto-completion on php commands !!!

When I saw Komodo demo-ed years and years ago, it had PHP
auto-completion...

It's difficult to believe that there isn't some kind of plug-in still
available for it to auto-complete PHP...

YMMV
NAIAA
IANAL

-- 
Like Music?
http://l-i-e.com/artists.htm

--- End Message ---
--- Begin Message ---
[snip]
I'm looking for a good IDE on Linux to code my php files... I'd like
auto-completion (in php and html) and a file explorer...
I've tested Eclipse (with PHP Eclipse) and Komodo but I couldn't have
auto-completion on php commands !!!
Do you have any idea ?
[/snip]

Are you sure that you have Eclipese set up properly...it auto-completes for
me on Linux.

--- End Message ---
--- Begin Message ---
Finally, I discovered that I need to have PHP and Apache on my computer
in order than Eclipse may give me auto-complete...
I'll install them tomorrow !!!

Thank you.

David.

Le lundi 13 février 2006 à 15:42 -0600, Jay Blanchard a écrit :
> [snip]
> I'm looking for a good IDE on Linux to code my php files... I'd like
> auto-completion (in php and html) and a file explorer...
> I've tested Eclipse (with PHP Eclipse) and Komodo but I couldn't have
> auto-completion on php commands !!!
> Do you have any idea ?
> [/snip]
> 
> Are you sure that you have Eclipese set up properly...it auto-completes for
> me on Linux.
> 

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


--- End Message ---
--- Begin Message ---
Hi there...

i simply prefer using kde's quanta ... it even got some "dynamic"
autocompletion...

cheers

bb

>Finally, I discovered that I need to have PHP and Apache on my computer
>in order than Eclipse may give me auto-complete...
>I'll install them tomorrow !!!
>
>Thank you.
>
>David.
>
>Le lundi 13 février 2006 à 15:42 -0600, Jay Blanchard a écrit :
>>[snip]
>>I'm looking for a good IDE on Linux to code my php files... I'd like
>>auto-completion (in php and html) and a file explorer...
>>I've tested Eclipse (with PHP Eclipse) and Komodo but I couldn't have
>>auto-completion on php commands !!!
>>Do you have any idea ?
>>[/snip]
>>
>>Are you sure that you have Eclipese set up properly...it
>>auto-completes for
>>me on Linux.
>>


Björn Bartels
-Development/IT-Services-

----------------------------------------------
dbusiness.de gmbh
digital business & printing gmbh

Greifswalder Str. 152
D-10409 Berlin

Fon: [0.30] 4.21.19.95
Fax: [0.30] 4.21.19.74

www.dbusiness.de
[EMAIL PROTECTED]
ftp://dbusiness.dyndns.org

--- End Message ---
--- Begin Message ---
> Finally, I discovered that I need to have PHP and Apache on my computer
> in order than Eclipse may give me auto-complete...

No you don't.  Eclipse does code completion out-of-the-box w/out
installing additional software.  Check your Preferences.

--- End Message ---
--- Begin Message ---
Im using phpmailer to send emails, with htmlbody and an alternate textbody.
Any suggestions on how to test the text only body?
 
Thanks, Mark

--- End Message ---
--- Begin Message ---
If you have a linux box, use mutt or pine.  Also, most Windows mail
clients allow you to turn off HTML mail.  Check your client
documentation / help files.

Brady

> -----Original Message-----
> From: Mark Steudel [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 13, 2006 1:40 PM
> To: [email protected]
> Subject: [PHP] testing text body emails
> 
> Im using phpmailer to send emails, with htmlbody and an 
> alternate textbody.
> Any suggestions on how to test the text only body?
>  
> Thanks, Mark
> 

--- End Message ---
--- Begin Message ---
Mark Steudel wrote:

Im using phpmailer to send emails, with htmlbody and an alternate textbody.
Any suggestions on how to test the text only body?

Thanks, Mark

Sure.  Use a text-only MUA?*  </rimshot>

But, seriously, most 'Nix gurus have access to text
only mail if they care to.  If you've a friend who's
always preaching about "open sores", you might
call him up.

Also, several web-mail solutions are text-only,
or have that option, IIRC.  Although it's been a
while since I used hotmail or excite, etc., you
might take a look.

HTH,

Kevin Kinsey

*I'm not joking too much about the MUA, just
the answer.  I actually like mutt a good deal...

--
The most winning woman I ever knew was hanged for poisoning three little
children for their insurance money.
                -- Sherlock Holmes

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

I have a client who wants to blog or he wants a blog on his website. I don't
know anything about these blogs except it's sort of a fad I think.

Isn't a blog just a simple web form with a big textarea on the blogger's
side writing to a database and then the data is displayed in chronological
order on the readers side of a website? I could create that in under an
hour.

What don't I know? I searched up some scripts, some were free some were
$500!

Somebody like to point me at a good script that would enlighten me?

Thanks

--- End Message ---
--- Begin Message ---
[snip]
I have a client who wants to blog or he wants a blog on his website. I don't
know anything about these blogs except it's sort of a fad I think.

Isn't a blog just a simple web form with a big textarea on the blogger's
side writing to a database and then the data is displayed in chronological
order on the readers side of a website? I could create that in under an
hour.

What don't I know? I searched up some scripts, some were free some were
$500!

Somebody like to point me at a good script that would enlighten me?
[/snip]

Try out some of the open source scripts you have looked at. Install them.
Play with them. Blogs usually allow commentary on an author's article. You
could probably write one in under an hour.

--- End Message ---
--- Begin Message ---
Wordpress is free and easy to setup.

On 2/13/06, Sam Smith <[EMAIL PROTECTED]> wrote:
>
>
> I have a client who wants to blog or he wants a blog on his website. I don't
> know anything about these blogs except it's sort of a fad I think.
>
> Isn't a blog just a simple web form with a big textarea on the blogger's
> side writing to a database and then the data is displayed in chronological
> order on the readers side of a website? I could create that in under an
> hour.
>
> What don't I know? I searched up some scripts, some were free some were
> $500!
>
> Somebody like to point me at a good script that would enlighten me?
>
> Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message --- I have an application that delivers files to the client browser. These files a very large video files. 250mb+ each. I have two options: 1) I could have PHP deliver the file with "fread", or 2) I could have PHP present a link to the file. However, for security purposes, I would rather not have the actual files available. I suppose I could have PHP create temporary symbolic links on the file system that link to the files in question and then remove the links, thus requiring the users to go through an authentication process to retrieve files that are assigned to them.

Anyway, downloading such large files causes PHP to balk with size limitation errors. I could increase the size limit and memory limit settings in "php.ini", but for file sizes that large, is it recommended? Are there "best practice" limits on these settings: max_input_time, memory_limit, max_execution_time, etc.?

Thanks,
Jonathan

--- End Message ---
--- Begin Message ---
I've seen this problem many times before, but I'm not sure what solution was
found.

Possible solutions:

Encrypt the file, make it publicly available, and then give the right people
the encryption key.

Put it behind a .htaccess file allowing only the IP of the correct person -
remove the .htaccess entry after a certain lengh of time.

Why are the videos secure? Copyright? Privacy? Bandwidth?


On 2/13/06, Jonathan Duncan <[EMAIL PROTECTED]> wrote:

> I have an application that delivers files to the client browser.  These
> files a very large video files.  250mb+ each.  I have two options:  1) I
> could have PHP deliver the file with "fread", or 2) I could have PHP
> present a link to the file.  However, for security purposes, I would
> rather not have the actual files available.  I suppose I could have PHP
> create temporary symbolic links on the file system that link to the files
> in question and then remove the links, thus requiring the users to go
> through an authentication process to retrieve files that are assigned to
> them.
>
> Anyway, downloading such large files causes PHP to balk with size
> limitation errors.  I could increase the size limit and memory limit
> settings in "php.ini", but for file sizes that large, is it recommended?
> Are there "best practice" limits on these settings:  max_input_time,
> memory_limit, max_execution_time, etc.?
>
> Thanks,
> Jonathan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message --- Thank you for the input. For now we are just using PHP to create symbolic links to the video files and the links are removed when they are done viewing the video. We are open to other suggest still, but for now, this fills our needs and bypasses putting so much stress on PHP as to put hundreds of mb of files through it.

Why secure?  A combination of all those reason.

Thanks,
Jonathan


On Mon, 13 Feb 2006, Rory Browne wrote:

I've seen this problem many times before, but I'm not sure what solution was
found.

Possible solutions:

Encrypt the file, make it publicly available, and then give the right people
the encryption key.

Put it behind a .htaccess file allowing only the IP of the correct person -
remove the .htaccess entry after a certain lengh of time.

Why are the videos secure? Copyright? Privacy? Bandwidth?


On 2/13/06, Jonathan Duncan <[EMAIL PROTECTED]> wrote:

I have an application that delivers files to the client browser.  These
files a very large video files.  250mb+ each.  I have two options:  1) I
could have PHP deliver the file with "fread", or 2) I could have PHP
present a link to the file.  However, for security purposes, I would
rather not have the actual files available.  I suppose I could have PHP
create temporary symbolic links on the file system that link to the files
in question and then remove the links, thus requiring the users to go
through an authentication process to retrieve files that are assigned to
them.

Anyway, downloading such large files causes PHP to balk with size
limitation errors.  I could increase the size limit and memory limit
settings in "php.ini", but for file sizes that large, is it recommended?
Are there "best practice" limits on these settings:  max_input_time,
memory_limit, max_execution_time, etc.?

Thanks,
Jonathan


--- End Message ---
--- Begin Message ---
Jonathan,

Not sure how you're using fread, but here's a slightly modified version of
what's in the manual that might help:
<?php
$handle = fopen("/var/dump/vids/test.mpg", "rb");
while (!feof($handle)) {
  print fread($handle, 8192);
}
fclose($handle);
?>

 If my understanding of this code is correct you won't be trying to load the
entire file into memory and you're not trying to store the file in a
variable. All that this should do is give the client the file in 8KB chunks
- which is much easier on the overall load your script will add to the
system and will probably run faster since it's not as taxing.

Again I've never had to write a script that matches your conditions but I
hope this helps.

-Joe W.
www.joewollard.com - theCore


On 2/13/06, Jonathan Duncan <[EMAIL PROTECTED]> wrote:
>
> Thank you for the input.  For now we are just using PHP to create symbolic
> links to the video files and the links are removed when they are done
> viewing the video.  We are open to other suggest still, but for now, this
> fills our needs and bypasses putting so much stress on PHP as to put
> hundreds of mb of files through it.
>
> Why secure?  A combination of all those reason.
>
> Thanks,
> Jonathan
>
>
> On Mon, 13 Feb 2006, Rory Browne wrote:
>
> > I've seen this problem many times before, but I'm not sure what solution
> was
> > found.
> >
> > Possible solutions:
> >
> > Encrypt the file, make it publicly available, and then give the right
> people
> > the encryption key.
> >
> > Put it behind a .htaccess file allowing only the IP of the correct
> person -
> > remove the .htaccess entry after a certain lengh of time.
> >
> > Why are the videos secure? Copyright? Privacy? Bandwidth?
> >
> >
> > On 2/13/06, Jonathan Duncan <[EMAIL PROTECTED]> wrote:
> >
> >> I have an application that delivers files to the client browser.  These
> >> files a very large video files.  250mb+ each.  I have two options:  1)
> I
> >> could have PHP deliver the file with "fread", or 2) I could have PHP
> >> present a link to the file.  However, for security purposes, I would
> >> rather not have the actual files available.  I suppose I could have PHP
> >> create temporary symbolic links on the file system that link to the
> files
> >> in question and then remove the links, thus requiring the users to go
> >> through an authentication process to retrieve files that are assigned
> to
> >> them.
> >>
> >> Anyway, downloading such large files causes PHP to balk with size
> >> limitation errors.  I could increase the size limit and memory limit
> >> settings in "php.ini", but for file sizes that large, is it
> recommended?
> >> Are there "best practice" limits on these settings:  max_input_time,
> >> memory_limit, max_execution_time, etc.?
> >>
> >> Thanks,
> >> Jonathan
> >>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

http://us2.php.net/manual/en/function.move-uploaded-file.php

"Note: move_uploaded_file() is both safe mode and open_basedir aware.
However, restrictions are placed only on the destination path as to allow
the moving of uploaded files in which filename may conflict with such
restrictions. move_uploaded_file() ensures the safety of this operation by
allowing only those files uploaded through PHP to be moved."


Thanks for your answer. I had seen this note before, but I don't
understand it (I also looked at the french translation but I also don't
understand it).

move_uploaded_file is "safe-mode aware" - it doesn't care whether safe-mode is on or off.

You can only use move_uploaded_file like:

move_uploaded_file($_FILE['blah']['tmp_name'], $destination);

Check that your destination directory is writable.

--- End Message ---
--- Begin Message ---
I was able to get part of my page to load when I created the
Validation class and put a call to the validation class within my
table.  When I did that the  page loaded up until the php code to call
the method and then it does not load the rest of the page.    Can
anyone help me with this?  By the way I am calling $_POST["name"] as
the parameter to be passed into the function

so my php code looks like:
<?php

$a = new Validation;
$a->checkEmpty($_POST["name"]);
?>

Paul
On 2/12/06, Chris Shiflett <[EMAIL PROTECTED]> wrote:
> Paul Goepfert wrote:
> > I know how to call functlions, I just just don't know how to
> > do it in PHP.
>
> Based on the rest of your question, I think you mean methods, not
> functlions. :-)
>
> If you're struggling with syntax, you should take one step at a time.
> Try this:
>
> <?php
>
> class myClass
> {
>      function myMethod()
>      {
>          echo '<p>myMethod()</p>';
>      }
> }
>
> $myObject = new myClass;
>
> $myObject->myMethod();
>
> ?>
>
> That should help you with any syntax problems, but I suspect your
> problem has more to do with logic than with syntax.
>
> > if (isset($submit))
> > {
> >    class Validation
> >    {
>
> /* ... */
>
> >    }
> > }
> > else
> > {
>
> /* ... */
>
> >    $v = new Validation;
> >    $v->checkEmpty($_POST["name"]);
>
> If the form is submitted, define the class, else use the class. That
> doesn't sound right...
>
> Hope that helps.
>
> Chris
>
> --
> Chris Shiflett
> Brain Bulb, The PHP Consultancy
> http://brainbulb.com/
>

--- End Message ---
--- Begin Message ---
Eli schrieb:
> Is PHP gonna support multi-threading (not multi-processing) capabilities 
> in the future?

Not in the near future, sorry. Depending on what you are trying to
implement: Ruby has multithreading.

OLLi

--- End Message ---
--- Begin Message ---
Best group member,

I am sending HTML email with PHP. I use the example code in the manual to
try, and the email is sent. However, it is not decoded correctly in my
Outlook. I checked thru webmail clients, and then it work. I thought it was
my Outlook that was not correct, but I am receiving HTML emails from other
sources that are displayed correctly. In the bottom I have the email that is
sent to me, it is displayed like this in Outlook.

Is there maybe something I have to add in the header to get it to work with
Outlook?

Cheers,
Peter



-----Original Message-----
From: 
Sent: Tuesday, February 14, 2006 11:31 AM
Subject: Birthday Reminders for August

Content-type: text/html; charset=iso-8859-1

To: Peter <[EMAIL PROTECTED]>
From: Testserver <[EMAIL PROTECTED]>



                        <html>
                        <head>
                        <title>Birthday Reminders for August</title>
                        </head>
                        <body>
                        <p>Here are the birthdays upcoming in August!</p>
                        <table>
                        <tr>
        
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
                        </tr>
                        <tr>
        
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
                        </tr>
                        <tr>
        
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
                        </tr>
                        </table>
                        </body>
                        </html>
                        

--- End Message ---

Reply via email to