php-general Digest 11 Nov 2007 14:44:01 -0000 Issue 5122

Topics (messages 264309 through 264317):

Re: Cannot send a hyperlink
        264309 by: Brad
        264310 by: Stut
        264312 by: admin.buskirkgraphics.com
        264313 by: M. Sokolewicz
        264314 by: admin.buskirkgraphics.com

Re: PHP ide?
        264311 by: Mario Guenterberg

What to do when flush() doesn't?
        264315 by: Jon Westcot
        264316 by: admin.buskirkgraphics.com

Re: chrooted php5-cgi in a non chrooted apache
        264317 by: Joerg Schoppet

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 ---
Explanation of code

$email = $_REQUEST['email'] ;
(generated by dreamweaver that pulls in the database functions)

$message = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';
(my nemesis, I can not figure out this puppy. If it works at all, php will
generate it at text and not html. Taken from example I find on the web.)

$headers  = 'MIME-Version: 1.0' . "\r\n";  $headers .= 'Content-type:
text/html; charset=iso-8859-1' . "\r\n";
(found on the web to solve my html problem???)

mail( $email, "Your FREE book from Zone of Success Club .com", $headers,
$message, "From: $email" ); ?>
(Send the mail, when I put $headers in, the function quits working all
together.)

I hope this helps explain where my head is!

Brad


-----Original Message-----
From: Stut [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 10, 2007 4:55 PM
To: Brad
Cc: 'Jochem Maas'; [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
> I am not sure that would help.
> Just another can of worms.
> The $_REQUEST is tied into a whole bunch of database functions.

I have no idea what you mean by this. It makes no sense to me.

> My present code....
> 
> 
> <?
>   $email = $_REQUEST['email'] ;
>   $message = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';
>  $headers  = 'MIME-Version: 1.0' . "\r\n";
>  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
>   mail( $email, "Your FREE book from Zone of Success Club .com",
>     $headers, $message, "From: $email" );
> ?>

You *really* need to read the manual page for function before you use 
them. For example a quick glance at http://php.net/function.mail reveals 
that you have the parameters in an almost completely wrong order.

And please tell me you're not really setting the to address directly 
from an external variable with verifying that it's just an email address 
and nothing else. Really bad idea.

-Stut

-- 
http://stut.net/

> -----Original Message-----
> From: Jochem Maas [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, November 10, 2007 3:44 PM
> To: Brad
> Subject: Re: [PHP] Cannot send a hyperlink
> 
> this will help: http://phpmailer.sourceforge.net/
> 
> Brad wrote:
>> I am having trouble send an email with a hyperlink
>>
>> Php is parsing html as text????
>>
>> If I add the proper header information to ?make it work? The email no
> longer
>> goes through?
>>
>>  
>>
>> Here is the code
>>
>>  
>>
>> <?
>>
>>   $email = $_REQUEST['email'] ;
>>
>> $body = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';
>>
>> $headers  = 'MIME-Version: 1.0' . "\r\n";
>>
>>  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
>>
>>   mail( $email, "Your FREE book from Zone of Success Club .com",
>>
>>     $headers, $message, "From: $email" );
>>
>> ?>
>>
>>  
>>
>> Thanks
>>
>> Brad
>>
>>
>> No virus found in this outgoing message.
>> Checked by AVG Free Edition. 
>> Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
> 11/10/2007
>> 10:41 AM
>>  
>>
> 
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
> 10:41 AM
>  
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
> 10:41 AM

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

--- End Message ---
--- Begin Message ---
Brad wrote:
Explanation of code

$email = $_REQUEST['email'] ;
(generated by dreamweaver that pulls in the database functions)

No database involved here. None. Nadda. Niet!

$message = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';
(my nemesis, I can not figure out this puppy. If it works at all, php will
generate it at text and not html. Taken from example I find on the web.)

That's because it's not valid PHP. This is probably what you're after...

$message = '<a href="http://www.zoneofsuccessclub.com";>link</a>';

$headers  = 'MIME-Version: 1.0' . "\r\n";  $headers .= 'Content-type:
text/html; charset=iso-8859-1' . "\r\n";
(found on the web to solve my html problem???)

That looks reasonable.

mail( $email, "Your FREE book from Zone of Success Club .com", $headers,
$message, "From: $email" ); ?>
(Send the mail, when I put $headers in, the function quits working all
together.)

That's because it's in the wrong place. Did you even look at the manual like I suggested in my previous message?

I hope this helps explain where my head is!

My advice to you is to get a beginners book on basic PHP. If you can't see what's wrong with the above then you are lacking some foundation knowledge of PHP.

-Stut

--
http://stut.net/

-----Original Message-----
From: Stut [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 4:55 PM
To: Brad
Cc: 'Jochem Maas'; [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot send a hyperlink

Brad wrote:
I am not sure that would help.
Just another can of worms.
The $_REQUEST is tied into a whole bunch of database functions.

I have no idea what you mean by this. It makes no sense to me.

My present code....


<?
  $email = $_REQUEST['email'] ;
  $message = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';
 $headers  = 'MIME-Version: 1.0' . "\r\n";
 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  mail( $email, "Your FREE book from Zone of Success Club .com",
    $headers, $message, "From: $email" );
?>

You *really* need to read the manual page for function before you use them. For example a quick glance at http://php.net/function.mail reveals that you have the parameters in an almost completely wrong order.

And please tell me you're not really setting the to address directly from an external variable with verifying that it's just an email address and nothing else. Really bad idea.

-Stut

--- End Message ---
--- Begin Message ---
The Answer is quiet simple.


$E_MAIL = "[EMAIL PROTECTED]";
$to  = "[EMAIL PROTECTED]";
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n";
$headers .= "From: your email <[EMAIL PROTECTED]>\r\n";
$link = "http://www.zoneofsuccessclub.com";;
$mailmsg = "BLAH BLAH BLAH link:<a href=$link>zoneofsuccessclub</a>";
$mailsubject = "what ever you want to say";
mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers");



You can use the database to generate the $E_MAIL address and the $to
Never Ever had this to not work.
Your problem is the Headers are missing which allows the html content to
embed into the email.

Try that I think you will be happy.




-----Original Message-----
From: Brad [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 10, 2007 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot send a hyperlink

I am having trouble send an email with a hyperlink

Php is parsing html as text????

If I add the proper header information to ?make it work? The email no longer
goes through?

 

Here is the code

 

<?

  $email = $_REQUEST['email'] ;

$body = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';

$headers  = 'MIME-Version: 1.0' . "\r\n";

 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

  mail( $email, "Your FREE book from Zone of Success Club .com",

    $headers, $message, "From: $email" );

?>

 

Thanks

Brad


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM
 

--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
The Answer is quiet simple.


$E_MAIL = "[EMAIL PROTECTED]";
$to  = "[EMAIL PROTECTED]";
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n";
$headers .= "From: your email <[EMAIL PROTECTED]>\r\n";
$link = "http://www.zoneofsuccessclub.com";;
$mailmsg = "BLAH BLAH BLAH link:<a href=$link>zoneofsuccessclub</a>";
$mailsubject = "what ever you want to say";

Well, anyone doing this:
mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers");
makes ME very unhappy. I don't get it, what's so hard to understand about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of string-like values here? no. Then you don't need quotes, right? no, you don't. SO DON'T USE THEM HERE THEN. You're defining a $to and an $E_MAIL, you're not using $to anywhere, and only using $E_MAIL in one place (out of two), thus creating a mismatch between your headers and the To parameter for mail (which is used in SMTP traffic). [iz bad (tm)]

- Tul




You can use the database to generate the $E_MAIL address and the $to
Never Ever had this to not work.
Your problem is the Headers are missing which allows the html content to
embed into the email.

Try that I think you will be happy.




-----Original Message-----
From: Brad [mailto:[EMAIL PROTECTED] Sent: Saturday, November 10, 2007 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot send a hyperlink

I am having trouble send an email with a hyperlink

Php is parsing html as text????

If I add the proper header information to ?make it work? The email no longer
goes through?

Here is the code

<?

  $email = $_REQUEST['email'] ;

$body = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';

$headers  = 'MIME-Version: 1.0' . "\r\n";

 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

  mail( $email, "Your FREE book from Zone of Success Club .com",

    $headers, $message, "From: $email" );

?>

Thanks

Brad


No virus found in this outgoing message.
Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM

--- End Message ---
--- Begin Message ---
Brad I'm sorry.

Instead of insulting you and telling you to go read a book I simply
explained an option. 

Yes you do not need quotes in the mail() function.

As for the declared variables I was trying to show you an example. 

You will find many explanations for how or what is best practice.
Remember that some people like to toot a horn that can be reputed in many
ways. These are the same people who again and again are not the ones who
answer the questions, yet try to take credit by belittling the answer with
gibberish. 
The answer was intended to take you in a better direction when constructing
a email application in php.
 
  $eol="\r\n";
  $headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
  $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
  $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;    
  $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
  $headers .= "X-Mailer: PHP v".phpversion().$eol;            
  $msg .= "--".$htmlalt_mime_boundary.$eol;
  $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol;
  $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
  $msg .= $body.$eol.$eol;
  mail($to, $subject, $msg, $headers);





-----Original Message-----
From: M. Sokolewicz [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 11, 2007 4:07 AM
To: [EMAIL PROTECTED]
Cc: 'Brad'; [EMAIL PROTECTED]
Subject: Re: [PHP] Cannot send a hyperlink

[EMAIL PROTECTED] wrote:
> The Answer is quiet simple.
> 
> 
> $E_MAIL = "[EMAIL PROTECTED]";
> $to  = "[EMAIL PROTECTED]";
> $headers  = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= "To: Their Name<[EMAIL PROTECTED]> \r\n";
> $headers .= "From: your email <[EMAIL PROTECTED]>\r\n";
> $link = "http://www.zoneofsuccessclub.com";;
> $mailmsg = "BLAH BLAH BLAH link:<a href=$link>zoneofsuccessclub</a>";
> $mailsubject = "what ever you want to say";

Well, anyone doing this:
> mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers");
makes ME very unhappy. I don't get it, what's so hard to understand 
about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of 
string-like values here? no. Then you don't need quotes, right? no, you 
don't. SO DON'T USE THEM HERE THEN.
You're defining a $to and an $E_MAIL, you're not using $to anywhere, and 
only using $E_MAIL in one place (out of two), thus creating a mismatch 
between your headers and the To parameter for mail (which is used in 
SMTP traffic). [iz bad (tm)]

- Tul

> 
> 
> 
> You can use the database to generate the $E_MAIL address and the $to
> Never Ever had this to not work.
> Your problem is the Headers are missing which allows the html content to
> embed into the email.
> 
> Try that I think you will be happy.
> 
> 
> 
> 
> -----Original Message-----
> From: Brad [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, November 10, 2007 2:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Cannot send a hyperlink
> 
> I am having trouble send an email with a hyperlink
> 
> Php is parsing html as text????
> 
> If I add the proper header information to ?make it work? The email no
longer
> goes through?
> 
>  
> 
> Here is the code
> 
>  
> 
> <?
> 
>   $email = $_REQUEST['email'] ;
> 
> $body = '<a href="'.www.zoneofsuccessclub.com.'">link </a>';
> 
> $headers  = 'MIME-Version: 1.0' . "\r\n";
> 
>  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
> 
>   mail( $email, "Your FREE book from Zone of Success Club .com",
> 
>     $headers, $message, "From: $email" );
> 
> ?>
> 
>  
> 
> Thanks
> 
> Brad
> 
> 
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date:
11/10/2007
> 10:41 AM
>  

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

--- End Message ---
--- Begin Message ---
On Fri, Nov 09, 2007 at 01:44:19PM +0000, Lester Caine wrote:
> Tiago Silva wrote:
>> Lester Caine escreveu:
>>> Robert Cummings wrote:
>>>> Ubuntu = Debian + New Life
>>>
>>> Mandriva has Eclipse and PHPEclipse 'out of the box' along with Apache 
>>> and PHP
>>> I can build a fully functional development machine from a pile of bits in 
>>> under an hour ;)
>>> And currently that includes downloading the latest updates :)
>>>
>> I use an OS called Windows Vista :-P
>> hahahha crap(I use openSuse... ;-) )
>> Guys, talking about features of distributions is a looping question...it's 
>> a vicious endless thing...
>> let's talk about PHP ide's ok?
>> I use eclipse, with PHPEclipse it's fullfeatured for PHP, look, FOR PHP!
>> The good programmer don't need a full featured IDE, like Delphi for PHP 
>> and anyothers that wrap you behind the scenes...
>
> Not had to bother with vista yet - in fact a lot of my hardware intensive 
> stuff simply will not run on it :(
> BUT the best thing about Eclipse is that it runs the same on windows as 
> Linux, so I don't have to have different environments on each. I just run a 
> local CSV server and sync things between the two environments. And now I 
> can move stuff that was originally developed on Windows over to Linux
> - or replace it with PHP powered stuff :)

Hi all...

in the past i'd worked for a web development company. We had some
Windows, some MacOSX and some Linux workstations and a central
Dedian development server. The best solution to work with an IDE 
was the use of Eclipse with the needed plugins. On every machine the
same environment for development and the individual stuff for
design/grafix and more. No problems with a central subversion/CVS
repo and a NFS/Samba share for the apache document root on the devel
server.

regards
Mario

-- 
 -----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966                                 |
| Notruf: 0173-277 33 60                              |
| http://www.havelsoft.com                            |
|                                                     |
| Inhaber: Mario Günterberg                           |
| Mützlitzer Strasse 19                               |
| 14715 Märkisch Luch                                 |
 -----------------------------------------------------

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Hi all:

    I am trying to get information from a rather long-running PHP script to 
send out messages to the client as things are being processed.  In reading the 
manual, it seemed that using flush() was the ideal command for this.  Well, it 
doesn't seem to be working for me.  I've even tried sending over a large number 
of blanks (like 4096 of 'em) before doing anything, but still no go.

    The flush() activity is supposed to occur on a page that has POSTed back to 
itself, so perhaps that's causing the heartburn?

    Any suggestions on how I can accomplish this type of user mollification?

    Thanks,

        Jon

--- End Message ---
--- Begin Message ---
ob_flush();Flush(); works for me.



-----Original Message-----
From: Jon Westcot [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 11, 2007 5:31 AM
To: PHP General
Subject: [PHP] What to do when flush() doesn't?

Hi all:

    I am trying to get information from a rather long-running PHP script to
send out messages to the client as things are being processed.  In reading
the manual, it seemed that using flush() was the ideal command for this.
Well, it doesn't seem to be working for me.  I've even tried sending over a
large number of blanks (like 4096 of 'em) before doing anything, but still
no go.

    The flush() activity is supposed to occur on a page that has POSTed back
to itself, so perhaps that's causing the heartburn?

    Any suggestions on how I can accomplish this type of user mollification?

    Thanks,

        Jon

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

yes, you are right. But as you wrote, it is only a work around and won't
 give me the security I want to have.

Joerg


Jochem Maas wrote:
> hi Joerg,
>
> not a solution but the open_basedir ini setting on a per Vhost
> setting may offer a [partial] work around
>

--- End Message ---

Reply via email to