php-general Digest 28 May 2002 09:02:52 -0000 Issue 1371

Topics (messages 99399 through 99454):

Logout
        99399 by: Jonas Hörnblad
        99400 by: Sagie Maoz
        99401 by: Thalis A. Kalfigopoulos

php's variables & javascript
        99402 by: burak delice
        99407 by: Sagie Maoz
        99408 by: Jason Wong
        99410 by: Boyan Nedkov
        99411 by: burak delice
        99437 by: Brad McCrorey

javascript and php
        99403 by: burak delice

PHP Include directory
        99404 by: Tim Thorburn

Newbie question about PHP and Oracle
        99405 by: Michael Sweeney
        99447 by: DrouetL.ldnegoce.com
        99448 by: Markus Mirsberger

Re: fread and session vars
        99406 by: Zac Hillier

OT - 1u linux web servers...
        99409 by: Kelly Meeks

at least right code is here :)
        99412 by: burak delice

A bit confused
        99413 by: r
        99414 by: Peter
        99418 by: Justin French

A bit confused PART 2
        99415 by: r
        99429 by: Evan Nemerson

Include load question (newbie)
        99416 by: r
        99417 by: David Freeman

Re: newbie bigtime
        99419 by: Justin French

Regex Assistance
        99420 by: Scott Reismanis
        99421 by: Martin Towell

Is this a bug?
        99422 by: zhaoxd
        99423 by: Jule
        99424 by: Jule
        99426 by: Jule

Re: PhP, mysql and pictures
        99425 by: Greg Wright

Re: PHP script and external C program
        99427 by: Evan Nemerson

Re: Session's is slowing the page ??
        99428 by: Dima Dubin
        99443 by: Tom Mikulecky

Re: Parse Error(Newbie)
        99430 by: Matt Giddings
        99431 by: Matt Giddings

Setting PHP Authentication  manually?
        99432 by: Laura Harley
        99433 by: Martin Towell
        99435 by: Rasmus Lerdorf

Variable vs Constant
        99434 by: Billy
        99445 by: Billy
        99449 by: hugh danaher
        99452 by: Billy

Missing functions??
        99436 by: Weston Houghton

Re: PHP 4.1.2 ignores ini-set on max_upload_filesize
        99438 by: DevilKin
        99439 by: DevilKin

Mailing Archieve
        99440 by: Uma Shankari T.

Re: Full-Duplex communication
        99441 by: Vinod Panicker

mod_rewrite & open_basedir & pear
        99442 by: Alexei Tenitski

File not getting created
        99444 by: Manisha

function return
        99446 by: W. Enserink
        99450 by: RIVES Sergio
        99451 by: David Freeman

onchange read file, php & JS
        99453 by: Mihaela Dupret

newsletter wordwrapping for Outlook?
        99454 by: m u i n a r

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 ---
Hi there,
I've only been PHPing for some week and ofcours I've ran into my first two 
problems.

1. I'm building this community thing and I have a text file with the users 
that is currently logged in. When they press logout there name is deleted 
from the textfile, but if they just close there browser or surf to another 
site there name is still in the text-file until they log out next time. Any 
ideas how to avoid this?

2. How do I sort an array? I've tried array_multisort(); but I can only 
"ascci-sort" my array which makes R come before j and so on. How do I sort 
alphabeticly and not case sencetive ascci?

Thanks
/Jonas


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

--- End Message ---
--- Begin Message ---
Jonas ? wrote:

> 1. I'm building this community thing and I have a text file with the 
> users that is currently logged in. When they press logout there name 
> is deleted from the textfile, but if they just close there browser or 
> surf to another site there name is still in the text-file until they 
> log out next time. Any ideas how to avoid this? 

What you should do is save for each user the last time he was "seen" in 
the site: the value of this time is updated for each page he or she 
loads. Then, when checking to see if a user is currently logged in, you 
check how long ago was he last seen. If it was more than X 
seconds/minutes/etc. (this is for you to set), she is considered 
"offline" and you can remove him from the file.

Best Regards,
Sagie Maoz
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
On Mon, 27 May 2002, Jonas Hörnblad wrote:

> Hi there,
> I've only been PHPing for some week and ofcours I've ran into my first two 
> problems.
> 
> 1. I'm building this community thing and I have a text file with the users 
> that is currently logged in. When they press logout there name is deleted 
> from the textfile, but if they just close there browser or surf to another 
> site there name is still in the text-file until they log out next time. Any 
> ideas how to avoid this?

Dump the text file and use sessions. Will make your life easier and they provide easy 
solutions to problems like "logout".


> 2. How do I sort an array? I've tried array_multisort(); but I can only 
> "ascci-sort" my array which makes R come before j and so on. How do I sort 
> alphabeticly and not case sencetive ascci?

There are plenty of XXsort() functions in the manual (hint!hint!). Your case needs 
natcasesort().
Or you can do it manually with usort() and implement your own comparision function.


cheers,
thalis

> 
> Thanks
> /Jonas
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
hi everyone,

I want to make a php that include javascript that use a php variable. Code
is below:

<?
$size = GetImageSize ("images/$resim");
echo "<script language=\"JavaScript\">
  wdth=";$size;echo";";
  echo "</script>";
?>

(I am calling that php file as below)
http://localhost/Aksu/web/getimage.php?resim=K00.jpg

But explore gives me an javascript error that syntax error. Why? and how can
do my purpose?

thanks
burak delice




--- End Message ---
--- Begin Message ---
burak delice wrote:

>hi everyone,
>
>I want to make a php that include javascript that use a php variable. Code
>is below:
>
><?
>$size = GetImageSize ("images/$resim");
>echo "<script language=\"JavaScript\">
>  wdth=";$size;echo";";
>  echo "</script>";
>?>
>  
>
I didn't get the third line.. That's no JavaScript..
Isn't this supposed to be something like:

<?
$size = GetImageSize ("images/$resim");
echo "<script language=\"JavaScript\">
echo "document.writeln('width=\"$size\"');";
echo "</script>";
?>

-- 

Best Regards,
Sagie Maoz
[EMAIL PROTECTED]




--- End Message ---
--- Begin Message ---
On Tuesday 28 May 2002 05:59, burak delice wrote:
> I want to make a php that include javascript that use a php variable. Code
> is below:

No need to post twice.

> <?
> $size = GetImageSize ("images/$resim");
> echo "<script language=\"JavaScript\">
>   wdth=";$size;echo";";
>   echo "</script>";
> ?>

That code looks broken to me.

> (I am calling that php file as below)
> http://localhost/Aksu/web/getimage.php?resim=K00.jpg
>
> But explore gives me an javascript error that syntax error. Why? and how
> can do my purpose?

Did you use view source (ALT-V, C) to see what is actually in the "<script 
...> ... </script>" ? 

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
"The lymbic system in my brain is so electrically active, it qualifies
 as a third brain.  Normal humans have two brains, left and right.

        - Jeff Merkey 
*/

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

Try something like that:

<?
//$size = GetImageSize ("images/$resim");
$size = 222;
echo "<script language=\"JavaScript\">";
  echo "width="; echo $size; echo ";";  
echo "</script>";
?>

Cheers, boyan

--
Boyan Nedkov
[EMAIL PROTECTED]


> -----Original Message-----
> From: burak delice [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, May 27, 2002 11:59 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php's variables & javascript
> 
> 
> hi everyone,
> 
> I want to make a php that include javascript that use a php 
> variable. Code is below:
> 
> <?
> $size = GetImageSize ("images/$resim");
> echo "<script language=\"JavaScript\">
>   wdth=";$size;echo";";
>   echo "</script>";
> ?>
> 
> (I am calling that php file as below) 
> http://localhost/Aksu/web/getimage.php?> resim=K00.jpg
> 
> But 
> explore gives me an javascript error that 
> syntax error. Why? and how can do my purpose?
> 
> thanks
> burak delice
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Thanyou very much guys,
I is working boyan, but your suggestion seems like a long way? he?



--- End Message ---
--- Begin Message ---
Or something easier...

<?
$size = 222;
print <<<HTML
<script language="JavaScript">
  width = $size;
</script>
HTML;
?>

Just make sure the "HTML;" bit is all the way on the left margin, 
regardless of tabstops in your code.

cheers,

Brad

Boyan Nedkov wrote:

>Try something like that:
>
><?
>//$size = GetImageSize ("images/$resim");
>$size = 222;
>echo "<script language=\"JavaScript\">";
>  echo "width="; echo $size; echo ";";  
>echo "</script>";
>?>
>
>Cheers, boyan
>
>--
>Boyan Nedkov
>[EMAIL PROTECTED]
>
>
>  
>
>>-----Original Message-----
>>From: burak delice [mailto:[EMAIL PROTECTED]] 
>>Sent: Monday, May 27, 2002 11:59 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] php's variables & javascript
>>
>>
>>hi everyone,
>>
>>I want to make a php that include javascript that use a php 
>>variable. Code is below:
>>
>><?
>>$size = GetImageSize ("images/$resim");
>>echo "<script language=\"JavaScript\">
>>  wdth=";$size;echo";";
>>  echo "</script>";
>>?>
>>
>>(I am calling that php file as below) 
>>http://localhost/Aksu/web/getimage.php?> resim=K00.jpg
>>
>>But 
>>explore gives me an javascript error that 
>>syntax error. Why? and how can do my purpose?
>>
>>thanks
>>burak delice
>>
>>
>>
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>    
>>
>
>
>
>  
>



--- End Message ---
--- Begin Message ---
hi everyone,

I want to make a php that include javascript that use a php variable. Code
is below:

<?
$size = GetImageSize ("images/$resim");
echo "<script language=\"JavaScript\">
  wdth=";$size;echo";";
  echo "</script>";
?>

(I am calling that php file as below)
http://localhost/Aksu/web/getimage.php?resim=K00.jpg

But explore gives me an javascript error that syntax error. Why? and how can
do my purpose?

thanks
burak delice


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

I'm trying to setup an include directory for my site using .htaccess but 
I'm having some difficulties.

The command I'm typing is as follows:
php_value include_dir ".:/path/to/my/site/includes"

When I try this, I get an error 500 with Apache.  Have I typed something wrong?

Here's my setup:
Apache 1.3.12
PHP 3.0.18
Sun Solaris

Thanks
-Tim


--- End Message ---
--- Begin Message ---
a VERY newbie question, just how do I get data into a listbox? In mysql it
was pretty easy with mysql_fetch_row, but for oracle I am totally lost.


Thanks!




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

I don't know how it works in my sql.

I've written some functions to help me construct these sort of things.


It might help you

PS : Sorry but the comments are in French.

Laurent Drouet

/*********************************************************
** Cette fonction retourne toutes les lignes d'une
**
** requette dans un tableau multidimensionnel. Une
**
** variable globale $db_selectall2_nrows2 est
**
** definie pour pouvoir transmettre le nombre
**
** de ligne de la requette
**
**********************************************************/
function db_selectall2($id_connect,$query)
 {
 global $db_selectall2_nrows2;
 $stmt = ociparse($id_connect,$query);
 ociexecute($stmt);
 $db_selectall2_nrows2 = ociFetchStatement($stmt,$results);
 return $results;
 }


/*********************************************************
** Creation d'une liste d'options (SELECT) a partir d'un**
** tableau bidimensionnel. Les parametres a fournir a   **
** cette fonction sont le tableau et le nombre de lignes**
** de la requette. Le premier parametre du tableau
**
** contient la valeur de la liste deroulante. Les
**
** autres colonnes du tableau sont concatenees avec                 **
** la premiere et sont affichees. Cette fonction
**
** peut etre appelee apres db_selectall2
**
**********************************************************/
function creat_select($resquery,$totlines, $action)
 {
 $nbre=sizeof($resquery);
 $colres=array_keys($resquery);
 print "<SELECT $action>\n";
 for ($row=0; $row<$totlines; $row++ )
                {
                print "<OPTION value=\"".$resquery[$colres[0]][$row]."\">";
                for ($x=0; $x<$nbre; $x++)
                                {
                                if ($x<>0)
                                         {
                                         print ", ".$resquery[$colres[$x]]
[$row];
                                         }
                                else
                                         {
                                         print $resquery[$colres[$x]]
[$row];
                                         }
                                }
                print "</OPTION>\n";
                }
 print "</SELECT>";
 }

/*********************************************************
** Creation d'une liste d'options (SELECT) a partir     **
** d'un tableau bidimensionnel. Les parametres a fournir**
** a cette fonction sont le tableau et le nombre de     **
** ligne de la requette. la valeur de la liste
**
** deroulante sera la concatenation de toutes
**
** les valeurs. Cette fonction peut etre appelee
**
** apres db_selectall2
**
**********************************************************/
function creat_select1value($resquery,$totlines, $action)
 {
 $nbre=sizeof($resquery);
 $colres=array_keys($resquery);
 print "<SELECT $action>\n";
 print "<OPTION><--SELECT--></OPTION>\n";
 for ($row=0; $row<$totlines; $row++ )
                {
                print "<OPTION value=\"";
                for ($x=0; $x<$nbre; $x++)
                                {
                                if ($x<>0)
                                         {
                                         $texte.=", ".$resquery[$colres
[$x]][$row];

                                         }
                                else
                                         {
                                         $texte=$resquery[$colres[$x]]
[$row];
                                         }
                                }
                print $texte."\">".$texte."</OPTION>\n";
                }
 print "</SELECT>";
 }

/*********************************************************
** Creation d'une liste d'options (SELECT) a partir     **
** d'un tableau bidimensionnel. Les parametres a fournir**
** a cette fonction sont le tableau et le nombre de     **
** ligne de la requette. la valeur de la liste
**
** deroulante sera la concatenation de toutes
**
** les valeurs. Cette fonction peut etre appelee
**
** apres db_selectall2
**
**********************************************************/
function creat_selectcomplex($resquery,$headervalue, $headerdisplay,
$totlines, $action)
 {
 $nbrevalue=sizeof($headervalue);
 $nbredisplay=sizeof($headerdisplay);
 //$colres=array_keys($resquery);
 print "<SELECT $action>\n";
 print "<OPTION><--SELECT--></OPTION>\n";
 for ($row=0; $row<$totlines; $row++ )
                {
                print "<OPTION value=\"";
                for ($y=0; $y<$nbrevalue; $y++)
                                {
                                if ($y<>0)
                                         {
                                         $textevalue.=", ".$resquery
[$headervalue[$y]][$row];

                                         }
                                else
                                         {
                                         $textevalue=$resquery[$headervalue
[$y]][$row];
                                         }
                                }
                for ($x=0; $x<$nbredisplay; $x++)
                                {
                                if ($x<>0)
                                         {
                                         $textedisplay.=", ".$resquery
[$headerdisplay[$x]][$row];

                                         }
                                else
                                         {
                                         $textedisplay=$resquery
[$headerdisplay[$x]][$row];
                                         }
                                }

                print $textevalue."\">".$textedisplay."</OPTION>\n";
                }
 print "</SELECT>";
 }





                                                                                       
                               
                    "Michael Sweeney"                                                  
                               
                    <mike_sweeney@vid       To:     [EMAIL PROTECTED]          
                               
                    eotron.ca>              cc:                                        
                               
                                            Subject:     [PHP] Newbie question about 
PHP and Oracle                   
                    28/05/02 00:08                                                     
                               
                                                                                       
                               
                                                                                       
                               




a VERY newbie question, just how do I get data into a listbox? In mysql it
was pretty easy with mysql_fetch_row, but for oracle I am totally lost.


Thanks!





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





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

I think you mean hwo u can get the data into an array
well here is an example :

$query = "select .......";
$stmt = ociparse( $connectionhandle, $query );

if( ociexecute( $stmt, OCI_DEFAULT ) ){
    ocifetchinto( $stmt, $row, OCI_ASSOC+OCI_RETURN_NULLS );
}

and now you got 1 resultset in an associative array called $row.
take a look at the oci-functions in the manual for the different flags u can
set.



regards
markus mirsberger


"Michael Sweeney" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> a VERY newbie question, just how do I get data into a listbox? In mysql it
> was pretty easy with mysql_fetch_row, but for oracle I am totally lost.
>
>
> Thanks!
>
>
>
>


--- End Message ---
--- Begin Message ---
John,

Thanks, the code does actually read this but I'm afraid I removed it so the
servers ip is not exposed to the mail list.

The script runs correctly and opens and creates the page, however it cannot
find the include files I have in the page as the variable
$SITE_DOCUMENT_ROOT requires a session variable.

Zac
----- Original Message -----
From: "John Holmes" <[EMAIL PROTECTED]>
To: "'Zac Hillier'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, May 27, 2002 7:12 PM
Subject: RE: [PHP] fread and session vars


> Hi.
>
> > Code:
> >
> > generate page script:
> >
> > $pge = create-page.php
> > $pd = $HTTP_GET_VARS['pd'];
> >
> > # Set the files
> > $crtPge = "/". $pge ."?pd=". $pd; # the url of the dynamic page to
> write
> > the
> > output page
> > $targetfilename = $SITE_ DOCUMENT_ROOT . $outPge; # the output page
> >
> > # delete previous version of temp file if it exists
> > @unlink('temp.html');
> >
> > # open the dynamic page into dynpage
> > $dynpage = fopen($crtPge, 'r');
>
> Here it looks like $crtPge is going to be equal to something like
> "/create-page.php?pd=xx". If you want to open it via a URL, you need to
> add the HTTP:// and server name to it.
>
> $crtPge = http:// . $HTTP_SERVER_VARS['SERVER_NAME'] . "/" . $pge .
> "?pd=" . $pd;
>
> Something like that...then fopen() will work.
>
> ---John Holmes...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--- End Message ---
--- Begin Message ---
Hi folks, sorry for the off topic post.

I'm a semi frustrated cobalt xtr user, and I'm thinking about another 1u rack mount 
server.

Does anyone have any experience building them? Any good vendors for parts?  Any how-to 
websites/books?  Any other brands you'd recommend?

The cobalts seem to work ok, but I'm running into some real limitations with their 
interface and not being able to update php, mysql, etc.

Thanks,

Kelly
--- End Message ---
--- Begin Message ---
thanks again

echo "<script language=\"JavaScript\">
  width="; echo $size[0]; echo ";</script>";

I mean, problem's solution is "echo"  :)


--- End Message ---
--- Begin Message ---
Hey guys,
I just got this code (from "PHP BlackBook" pg:213") to make a table in MySql
via a PHP script, I though I knew SQL till I saw this....

CREATE TABLE sh_indexPages (
  ID int(11) NOT NULL auto_increment,
  Page varchar(255) NOT NULL default '',
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

What the heck is the "TYPE=MyISAM;" mean?
And to top it all it seems to be running in PHPMyAdmin!

Any ideas?

Kindly reply,
-Ryan

--- End Message ---
--- Begin Message ---
have a look on the mysql list for this :)..

-----Original Message-----
From: r [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 28 May 2002 10:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] A bit confused


Hey guys,
I just got this code (from "PHP BlackBook" pg:213") to make a table in MySql
via a PHP script, I though I knew SQL till I saw this....

CREATE TABLE sh_indexPages (
  ID int(11) NOT NULL auto_increment,
  Page varchar(255) NOT NULL default '',
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

What the heck is the "TYPE=MyISAM;" mean?
And to top it all it seems to be running in PHPMyAdmin!

Any ideas?

Kindly reply,
-Ryan


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


--- End Message ---
--- Begin Message ---
Okay,

You REALLY need to read the manual(s) before posting.  A quick search for
MyISAM on the MySQL site would have told you what you need to know.

a) it's mysql
b) it's easy to find the answer yourself

So don't ask here.

Justin


on 28/05/02 10:22 PM, r ([EMAIL PROTECTED]) wrote:

> Hey guys,
> I just got this code (from "PHP BlackBook" pg:213") to make a table in MySql
> via a PHP script, I though I knew SQL till I saw this....
> 
> CREATE TABLE sh_indexPages (
> ID int(11) NOT NULL auto_increment,
> Page varchar(255) NOT NULL default '',
> PRIMARY KEY  (ID)
> ) TYPE=MyISAM;
> 
> What the heck is the "TYPE=MyISAM;" mean?
> And to top it all it seems to be running in PHPMyAdmin!
> 
> Any ideas?
> 
> Kindly reply,
> -Ryan
> 

--- End Message ---
--- Begin Message ---
Greetings All,
Thank you for guiding me in the last doubt and special thanks to Juan Pablo
for the link.

Just one question, since I have taken out that MyISAM bit when i made the
table/s, so will it be missing anything?

Com on guys, just on this list I get a load of emails I cant join the MySql
list too, my mailbox will DIEEEE, and anyway this code was in a PHP book....

Cheers,
-Ryan.

--- End Message ---
--- Begin Message ---
No, you should be fine with leaving off the MyISAM. It is the default in 3.23 
anyways.


On Tuesday 28 May 2002 06:04 am, r wrote:
> Greetings All,
> Thank you for guiding me in the last doubt and special thanks to Juan Pablo
> for the link.
>
> Just one question, since I have taken out that MyISAM bit when i made the
> table/s, so will it be missing anything?
>
> Com on guys, just on this list I get a load of emails I cant join the MySql
> list too, my mailbox will DIEEEE, and anyway this code was in a PHP
> book....
>
> Cheers,
> -Ryan.

-- 
Employ your time in improving yourself by other men's writings, so that you 
shall gain easily what others have labored hard for.

Socrates

--- End Message ---
--- Begin Message ---
Hey all,

I have a file that is totally  filled with PHP functions, its around 15 k.
(func.php)

I have two files (f1.php,f2.php) that each take about 90% and 90% of
differient functions from the first file(func.php),
would my files (f1.php,f2.php) load faster if I defined the functions in
each file instead of including it or is this helping?

Any help appreciated.
-Ryan.

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

 > I have two files (f1.php,f2.php) that each take about 90% 
 > and 90% of differient functions from the first 
 > file(func.php), would my files (f1.php,f2.php) load faster 
 > if I defined the functions in each file instead of including 
 > it or is this helping?

It might, but the difference isn't likely to be significant.  If speed
is a problem then you need to figure out where your bottle neck is -
unless they are huge files the problem is unlikely to be in loading of
individual file themselves.

CYA, Dave


--- End Message ---
--- Begin Message ---
on 16/05/02 12:24 PM, k spellman ([EMAIL PROTECTED]) wrote:

> The code for form.html is
<snip>
>
> and the code for the HandleForm.php is
> 
> <HTML>
> <HEAD>
> <TITLE>Form Results</TITLE>
> </HEAD>
> <BODY>
> <?php
> 
> /* This page receives and handles the data generated
> by "form.html". */
> print "Your first name is $FirstName.<BR>\n";
> print "Your last name is $LastName.<BR>\n";
> print "Your E-mail Address is $Email.<BR>\n";
> print "This is what you had to say:<BR>\n
> $Comments<BR>\n";
> 
> ?>
> </BODY>
> </HTML>

If you're running PHP4.2 on a new server (1st install), $FirstName will not
work, because register_globals is probably set to Off in your php.ini file.

Try this:

<HTML>
<HEAD>
<TITLE>Form Results</TITLE>
</HEAD>
<BODY>
<?php

/* This page receives and handles the data generated
by "form.html". */
print "Your first name is {$_POST['FirstName']}.<BR>\n";
print "Your last name is {$_POST['$LastName']}.<BR>\n";
print "Your E-mail Address is {$_POST['$Email']}.<BR>\n";
print "This is what you had to say:<BR>\n
{$_POST['$Comments']}<BR>\n";

?>
</BODY>
</HTML>

You have to get the vars out of the $_POST array, not straight out of the
vars like $FirstName.

It may seem like more work, but since you're new to PHP, now would be the
perfect time to get used to the new method, since it's more secure.

If you find it a little messy though, you could also try:

<?php

$FirstName = $_POST['FirstName'];
$LastName = $_POST['LastName'];
$Email = $_POST['Email'];
$Comments = $_POST['Comments'];

/* This page receives and handles the data generated
by "form.html". */
print "Your first name is {$FirstName}.<BR>\n";
print "Your last name is {$LastName}.<BR>\n";
print "Your E-mail Address is {$Email}.<BR>\n";
print "This is what you had to say:<BR>\n
{$Comments}<BR>\n";

?>

Which is a little closer to what you had, with 4 lines added to the top.  I
wrap $vars within "strings" in {these brackets}, because it makes complex
stuff later on easier & clearer.  It's a good habbit to get into.


The above code should work now.  If it doesn't, email me and i'll run some
tests on it.


Justin French
--------------------
Creative Director
http://Indent.com.au
--------------------








> 
> And the book suggested POST instead of GET because it
> is stated that Post is secure and GET is not.
> 
> Thanks,
> spellman
> 
> --- Justin French <[EMAIL PROTECTED]> wrote:
>> Show us the code for processing the form!
>> 
>> My guess is your book uses code with $firstname
>> rather than
>> $_POST['firstname']... given that your version of
>> PHP is probably new
>> (4.2.x), register_globals is prolly OFF in your
>> php.ini config file.
>> 
>> Justin
>> 
>> 
>> 
>> on 16/05/02 12:13 PM, k spellman
>> ([EMAIL PROTECTED]) wrote:
>> 
>>> Just opened a "How to" book today on PHP. Already
>>> having problems and wouldn't mind an extra set of
>>> eyes. My basic form does not produce results.Any
>>> thoughts on this one?
>>> 
>>> http://www.hermengoode.com/php/form.html
>>> 
>>> Thanks!
>>> spellman
>>> 
>>> __________________________________________________
>>> Do You Yahoo!?
>>> LAUNCH - Your Yahoo! Music Experience
>>> http://launch.yahoo.com
>> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com

--- End Message ---
--- Begin Message ---
Hey All,

I am just begining to learn regex functions in PHP. Anyhow I am trying 
to code a preg_replace function which basically cleans a URL.

What I mean is say a url is index.php?page=hello&list=10&start=4 you 
pass that URL and say 'list' to the function (shown below) Anyhow I 
want that to then return index.php?page=hello&start=4 (see how the 
entire list reference is now gone)

Here is what I have come up with so far, though I am yet to test it as 
I am coding this at work :)

function stripUrl($url, $url_strip)
{
        // Check that $url_strip is in the URL
        if(strpos($url,'?') && strpos($url, $url_strip.'='))
        {
                // Lets clean up the url
                $url = preg_replace("/\?|&$url_strip=/", "", $url);
        }
        return $url;
}

My problem is that, how do I make the preg_replace stop when it 
encounters a & in the URL? If anyone could shed some light on this it 
would be appreciated,

 - Regards, Scott
 

--- End Message ---
--- Begin Message ---
this is what I use to get rid of "line" from the url

$qs = ereg_replace("&$", "", ereg_replace("line=[^&]*&?", "",
$QUERY_STRING));

HTH
MArtin


-----Original Message-----
From: Scott Reismanis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Regex Assistance


Hey All,

I am just begining to learn regex functions in PHP. Anyhow I am trying 
to code a preg_replace function which basically cleans a URL.

What I mean is say a url is index.php?page=hello&list=10&start=4 you 
pass that URL and say 'list' to the function (shown below) Anyhow I 
want that to then return index.php?page=hello&start=4 (see how the 
entire list reference is now gone)

Here is what I have come up with so far, though I am yet to test it as 
I am coding this at work :)

function stripUrl($url, $url_strip)
{
        // Check that $url_strip is in the URL
        if(strpos($url,'?') && strpos($url, $url_strip.'='))
        {
                // Lets clean up the url
                $url = preg_replace("/\?|&$url_strip=/", "", $url);
        }
        return $url;
}

My problem is that, how do I make the preg_replace stop when it 
encounters a & in the URL? If anyone could shed some light on this it 
would be appreciated,

 - Regards, Scott
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello all:
            
    Not long ago I wrote some php code in my computer which had a apache server,and my 
php version is 4.0.5.The code as followed:
    
    $num = 2886732778;
    settype($num, integer);
    echo $num;
    
    And I found the num is -2147483648.attention,please:the version of php is 4.0.5.
    
    When I installed php-4.2.0 in my computer,however,I found the output of result is 
-1408234499.

    Why did the difference between the two version php happen?Is this a bug???

Any help is appreciated!
                                                        zhaoxd


--- End Message ---
--- Begin Message ---
Dunno if it's a bug, but it's 2147483648 to max for an integer? doesn't 
bigint support higher numbers than that?
i'm not sure but i think that's why your number gor cut down.

Jule 
On Monday 27 May 2002 22:36, zhaoxd wrote:
> Hello all:
>             
>     Not long ago I wrote some php code in my computer which had a apache
> server,and my php version is 4.0.5.The code as followed:
>     
>     $num = 2886732778;
>     settype($num, integer);
>     echo $num;
>     
>     And I found the num is -2147483648.attention,please:the version of
> php is 4.0.5.
>     
>     When I installed php-4.2.0 in my computer,however,I found the output
> of result is -1408234499.
> 
>     Why did the difference between the two version php happen?Is this a
> bug???
> 
> Any help is appreciated!
>                                                         zhaoxd
> 
> 

-- 
|\/\__________________________/\/|
|   Jule Slootbeek               |
|   [EMAIL PROTECTED]        |
|   http://blindtheory.cjb.net   |
|   __________________________   |
|/\/                          \/\|
--- End Message ---
--- Begin Message ---
ps: sorry for all the typos...

Jule
On Monday 27 May 2002 22:51, Jule wrote:
> Dunno if it's a bug, but it's 2147483648 to max for an integer? doesn't
> bigint support higher numbers than that?
> i'm not sure but i think that's why your number gor cut down.
>
> Jule
>
> On Monday 27 May 2002 22:36, zhaoxd wrote:
> > Hello all:
> >
> >
> >
> >     Not long ago I wrote some php code in my computer which had a apache
> >
> > server,and my php version is 4.0.5.The code as followed:
> >
> >
> >
> >     $num = 2886732778;
> >
> >     settype($num, integer);
> >
> >     echo $num;
> >
> >
> >
> >     And I found the num is -2147483648.attention,please:the version of
> >
> > php is 4.0.5.
> >
> >
> >
> >     When I installed php-4.2.0 in my computer,however,I found the output
> >
> > of result is -1408234499.
> >
> >
> >
> >     Why did the difference between the two version php happen?Is this a
> >
> > bug???
> >
> >
> >
> > Any help is appreciated!
> >
> >                                                         zhaoxd

-- 
|\/\__________________________/\/|
|   Jule Slootbeek               |
|   [EMAIL PROTECTED]        |
|   http://blindtheory.cjb.net   |
|   __________________________   |
|/\/                          \/\|
--- End Message ---
--- Begin Message ---
see this page:

http://www.php.net/manual/en/language.types.integer.php

Jule

On Monday 27 May 2002 22:52, Jule wrote:
> ps: sorry for all the typos...
>
> Jule
>
> On Monday 27 May 2002 22:51, Jule wrote:
> > Dunno if it's a bug, but it's 2147483648 to max for an integer? doesn't
> > bigint support higher numbers than that?
> > i'm not sure but i think that's why your number gor cut down.
> >
> > Jule
> >
> > On Monday 27 May 2002 22:36, zhaoxd wrote:
> > > Hello all:
> > >
> > >
> > >
> > >     Not long ago I wrote some php code in my computer which had a
> > > apache
> > >
> > > server,and my php version is 4.0.5.The code as followed:
> > >
> > >
> > >
> > >     $num = 2886732778;
> > >
> > >     settype($num, integer);
> > >
> > >     echo $num;
> > >
> > >
> > >
> > >     And I found the num is -2147483648.attention,please:the version of
> > >
> > > php is 4.0.5.
> > >
> > >
> > >
> > >     When I installed php-4.2.0 in my computer,however,I found the
> > > output
> > >
> > > of result is -1408234499.
> > >
> > >
> > >
> > >     Why did the difference between the two version php happen?Is this a
> > >
> > > bug???
> > >
> > >
> > >
> > > Any help is appreciated!
> > >
> > >                                                         zhaoxd

-- 
|\/\__________________________/\/|
|   Jule Slootbeek               |
|   [EMAIL PROTECTED]        |
|   http://blindtheory.cjb.net   |
|   __________________________   |
|/\/                          \/\|
--- End Message ---
--- Begin Message ---


*********** REPLY SEPARATOR  ***********

On 27/05/2002 at 9:00 PM Ragnar [EMAIL PROTECTED] [gregausit/phplist] wrote:

>Is it possible to display images in a browser that are stored as a blob
>column in a mysql table? Or is it better to store images in a direcotory
>and
>display them "from" there?
>

I am no expert, but why load the SQL server up if not required ? i.e serve
from a directory :)

Regards

Greg Wright
-- 

IT Consultant Sydney Australia     PH 0418 292020 -- Int. +61 418 292020
Available for Global Contracts      US Fax -- 801 740 2874
Web  http://www.ausit.com    E-mail Greg  AT  AusIT.com
Trading As -   AAA Computers -- providers of IT services.

--- End Message ---
--- Begin Message ---
exec wont work if you need to use stdin and read from stdout. You can try 
php.net/pcntl but that is disabled by default, and probably wont be enabled 
oun your host. I don't even know if it existed in 4.0.6...


-- 
If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life.

Leo Nikolaevich Tolstoy

--- End Message ---
--- Begin Message ---
Hello J,
I try to change the gc probability in the .htaccess (php_value
session.gc_probability = 10) but it didnt work :-(

Is there any other ideas ? maybe it a bug in PHP ?


THANKS,
Dima.
"J Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> It might have something to do with the way the session extension in PHP
> performs garbage collection. There's a setting in php.ini that basically
> controls how often garbage collection is performed. The value is a
> percentage, and determines how often the GC should be done over a random
> number of session_start() requests.
>
> If GC is invoked, the garbage collector will start to delete all of the
> expired session files in your session directory. If there's a lot of them,
> it might take longer to load the page that the garbage collection was
> started on. Since the garbage collector is called at random based on the
> aforementioned setting, not every page will be affected.
>
> The problem could probably be cut down by increasing the value of the GC
> setting, as fewer files would need to be deleted with each GC sweep, as
> more GC sweeps will be called overall.
>
> That's just a guess, though.
>
> J
>
>
> Dima Dubin wrote:
>
> > Hello,
> > I have very wierd problem :
> > I use session to manage users and I have this structure of the page :
> > -----
> > include("db.php");
> > include("header.php");
> > bla bla
> > include("footer.php");
> > -----
> >
> > in the db.php I have :
> >
> > ----
> > session_start();
> > #some mysql connect stuff
> > ----
> >
> > I use session with the $_SESSION array (cheking if
> > registered[isset($_S...)] and registering...)
> > and all work fine....
> > but sometimes the page loading is very very very slow (and its a really
> > really fast host) and when I removing session_start(); from the top of
the
> > page, the page load normaly.
> >
> > the PHP version is 4.1.1, someone have an idea ?
> > thanks in advance,
> > Dima.
>


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

PHP's sessions are blocking, i.e. until a session is closed, all other calls to
session_start() are pending. If you don't close a session explicitely, it
remains opened until the script is terminated.
The solution is to close a session as soon as possible (session_write_close) or
use non-blocking read-only sessions (session_readonly instead of session_start)
in case you don't need to modify registered variables.

Tom


Dima Dubin wrote:

> Hello,
> I have very wierd problem :
> I use session to manage users and I have this structure of the page :
> -----
> include("db.php");
> include("header.php");
> bla bla
> include("footer.php");
> -----
>
> in the db.php I have :
>
> ----
> session_start();
> #some mysql connect stuff
> ----
>
> I use session with the $_SESSION array (cheking if registered[isset($_S...)]
> and registering...)
> and all work fine....
> but sometimes the page loading is very very very slow (and its a really
> really fast host) and when I removing session_start(); from the top of the
> page, the page load normaly.
>
> the PHP version is 4.1.1, someone have an idea ?
> thanks in advance,
> Dima.

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

try this:

$query = "select * from news WHERE id = '$_get['id']'";

the double quote right before the $ is ending the string, from that point 
on everything is an error.

Matt

On Mon, 27 May 2002 [EMAIL PROTECTED] wrote:

> I know it is probably something obvious but the following gives me a parse error and 
>as a newbie I am having trouble locating it.
> 
> $query = "select * from news WHERE id = "$_get['id']"";
> 
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
> 

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

Another thing you may want to try is the following line:

$query = "select * from news WHERE id = '" . $_get['id'] . "'";

Matt

On Mon, 27 May 2002 [EMAIL PROTECTED] wrote:

> I know it is probably something obvious but the following gives me a parse error and 
>as a newbie I am having trouble locating it.
> 
> $query = "select * from news WHERE id = "$_get['id']"";
> 
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
> 

--- End Message ---
--- Begin Message ---
I am trying to build a login page for client project review site.

I  DO NOT want to prompt the user for username and password with header 
calls to the browser. I don't want the authenticate dialog box to pop up 
on the client browser; I want to collect the username and password on a 
PHP or HTML page--I need to collect more data than just username and 
password. But when the user submits the login data, I  want to set 
authentication credentials that work just as though the user entered 
data in the pop up. How can I do this with PHP?

Can I set $PHP_AUTH_USER and $PHP_AUTH_PW manually? If so, does this set 
the Web server's authentication values for user name and password? If 
not, how can I use PHP to set authentication credentials that the Web 
server recognizes? Also, if I don't prompt the user with header( ) 
calls, how do I get the authentication cache on the client browser to 
store the auth data?

Any ideas? Please help.

Thanks.

-- 
---------------------------------------------------------------------------------------
Laura Harley
Sr Web Architect and Principal Manager
Design Interactive, LLC
PO Box 17356
Alexandria, VA 22302

Tel: 703-578-1544
Website: http://www.designinteractive.com


--- End Message ---
--- Begin Message ---
Two way's I can see
1. Use session variables
2. Use client side cookies

Martin


-----Original Message-----
From: Laura Harley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 2:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Setting PHP Authentication manually?


I am trying to build a login page for client project review site.

I  DO NOT want to prompt the user for username and password with header 
calls to the browser. I don't want the authenticate dialog box to pop up 
on the client browser; I want to collect the username and password on a 
PHP or HTML page--I need to collect more data than just username and 
password. But when the user submits the login data, I  want to set 
authentication credentials that work just as though the user entered 
data in the pop up. How can I do this with PHP?

Can I set $PHP_AUTH_USER and $PHP_AUTH_PW manually? If so, does this set 
the Web server's authentication values for user name and password? If 
not, how can I use PHP to set authentication credentials that the Web 
server recognizes? Also, if I don't prompt the user with header( ) 
calls, how do I get the authentication cache on the client browser to 
store the auth data?

Any ideas? Please help.

Thanks.

-- 
----------------------------------------------------------------------------
-----------
Laura Harley
Sr Web Architect and Principal Manager
Design Interactive, LLC
PO Box 17356
Alexandria, VA 22302

Tel: 703-578-1544
Website: http://www.designinteractive.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> I  DO NOT want to prompt the user for username and password with header
> calls to the browser. I don't want the authenticate dialog box to pop up
> on the client browser; I want to collect the username and password on a
> PHP or HTML page--I need to collect more data than just username and
> password. But when the user submits the login data, I  want to set
> authentication credentials that work just as though the user entered
> data in the pop up. How can I do this with PHP?

Impossible.  HTTP simply does not support you setting these credentials in
the remote browser directly.  The best you can do is emulate it using
cookies and/or sessions.

-Rasmus

--- End Message ---
--- Begin Message ---
what harm will it make if i declear a value as VARIABLE where i should make
it as CONSTANT actually??

how about if i declear 100 values as VARIABLEs where all are CONSTANTs
actually?

thx
HPS



--- End Message ---
--- Begin Message ---
what harm (in term of loading/performance) will it make if i declear a value
as VARIABLE where i should make it as CONSTANT actually??

how about if i declear 100 values as VARIABLEs where all are CONSTANTs
actually?

thx
HPS



--- End Message ---
--- Begin Message ---
Billy,
There must be a limit to the number of variables you can use in php but I
haven't run up against a limit yet, and php seems to run as fast on my high
variable count code as my more mundane code.
Obviously, the advantage of using variables is that you can group your
"variables/constants" in one area at the top of your code and when you need
to change one of the constants (and you know you will need to do this
eventually) you won't need to look for it in amongst your code.
Not really an answer to your question but more of an observation on my part.
I hope one of the more experienced will also pipe in.
Good Luck
Hugh
----- Original Message -----
From: "Billy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 27, 2002 8:46 AM
Subject: [PHP] Variable vs Constant


> what harm will it make if i declear a value as VARIABLE where i should
make
> it as CONSTANT actually??
>
> how about if i declear 100 values as VARIABLEs where all are CONSTANTs
> actually?
>
> thx
> HPS
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Thx Hugh

i got what u mean....let me give u more background for my problem

i am now working on a project which was developed by some others b4.
As the project is a multi-language enabled, there is a PHP file (language
file) which has all the setting , say
--------------------------------------------
$i_no_record_exists_msg = "There is no record at the moment.";
$i_no_search_result_msg = "Sorry, your search yielded no results. Please
revise your search query and try again.";
$i_alert_pleasefillin = "Please fill in the ";
$i_email_to = "To";
$i_status_approve = "Approve";
$i_status_pendinguser = "Pending";
$i_status_publish = "Publish";
$i_status_checkin = "Check In";
.....
..
..
--------------------------------------------

In this language file, over 500 variables are declared.  And what i scare is
1.  programmatically, should i change all these to CONSTANT?  (coz all these
values will never change)
2. if there is difference in declaring variable and constant  (say, memory
space required),   how much harm it will ?
3. as this file would be included in the entire system....the downside will
be even more....

thx
Billy


"Hugh Danaher" <[EMAIL PROTECTED]> wrote in message
000701c20620$885cd2e0$0100007f@localhost">news:000701c20620$885cd2e0$0100007f@localhost...
> Billy,
> There must be a limit to the number of variables you can use in php but I
> haven't run up against a limit yet, and php seems to run as fast on my
high
> variable count code as my more mundane code.
> Obviously, the advantage of using variables is that you can group your
> "variables/constants" in one area at the top of your code and when you
need
> to change one of the constants (and you know you will need to do this
> eventually) you won't need to look for it in amongst your code.
> Not really an answer to your question but more of an observation on my
part.
> I hope one of the more experienced will also pipe in.
> Good Luck
> Hugh
> ----- Original Message -----
> From: "Billy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, May 27, 2002 8:46 AM
> Subject: [PHP] Variable vs Constant
>
>
> > what harm will it make if i declear a value as VARIABLE where i should
> make
> > it as CONSTANT actually??
> >
> > how about if i declear 100 values as VARIABLEs where all are CONSTANTs
> > actually?
> >
> > thx
> > HPS
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


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

Hello again all,

I'm using the Mac OS X binary of PHP 4.2.1 provided by Mark Liyanage
(http://www.entropy.ch/software/macosx/php/), and I am starting to notice
some oddities, I was wondering if anyone else had seen these errors in other
ports.

I'm getting some base php functions that seem to be missing, such as:

bindtextdomain
textdomain

And it doesn't seem to like the _() references in array declarations. I
would appreciate any guidance on these...

Thanks,
Wes

--- End Message ---
--- Begin Message ---
On Monday 27 May 2002 22:59, Rasmus Lerdorf wrote:
> You cannot change the upload limit in your script because the file upload
> happens before your script is executed.  You need to set it in your
> php.ini, httpd.conf or .htaccess

Aha. How do i set this from .htaccess anyway?
And this might be worthy of notification in the manual that ppl like me don't 
end up searching for hours to find something trivial like this...

Thanks!

DK

-- 
Dentist, n.:
        A Prestidigitator who, putting metal in one's mouth, pulls
coins out of one's pockets.
                -- Ambrose Bierce, "The Devil's Dictionary"

--- End Message ---
--- Begin Message ---
On Tuesday 28 May 2002 07:33, DevilKin wrote:
> On Monday 27 May 2002 22:59, Rasmus Lerdorf wrote:
> > You cannot change the upload limit in your script because the file upload
> > happens before your script is executed.  You need to set it in your
> > php.ini, httpd.conf or .htaccess
>
> Aha. How do i set this from .htaccess anyway?
> And this might be worthy of notification in the manual that ppl like me
> don't end up searching for hours to find something trivial like this...
>

Nevermind, found it already :oP Thanks for the hint tho!

http://www.php.net/manual/en/configuration.php

This explains it all :-) And it works, too :oPP


DK

-- 
You will lose your present job and have to become a door to door
mayonnaise salesman.

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

Hello,

  Can anyone please tell me how to create a mailing archieve list


Thanks in advance
Uma

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

I can go in for a php based listener, yes, but this system is already in
a production environment and there will be major changes required to get
it done.

If I get a chance to redevelop this, that is probably what I'll go in
for.

Tx,
Vinod.

-----Original Message-----
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 24, 2002 10:18 PM
To: Vinod Panicker
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Re: [PHP] Full-Duplex communication


So still there is nothing in your requirements that doesn't suggest
you'll 
do fine with a PHP-based listener.

Of course you have the memory overhead of the PHP interpreter's RAM 
infrastructure multiplied by the number of simultaneous connections, but

that would be the same with Apache (at least on Unix). 

miguel

On 24 May 2002, Vinod  Panicker wrote:
> Let me explain my project more in detail.
> 
> This system is an Instant messaging system, with the backed
> running on apache / php / mysql.  The front end client is a COM 
> component that communicates with the backend, and interfaces with 
> an MFC app.
> 
> Now since Instant messaging requires that the server should be
> able to send asynchronous messages to the client (Presence, IM's, 
> notifications, etc), and HTTP does not allow asynchronous 
> communication, the only solution is to have the client poll the 
> server for messages.
> 
> Now i know that apache / php is not a good solution for an instant
> messaging server, but we needed it to be ready in a months time, 
> and php is so amazing that we could get it up and running so fast.  
> But it meant that we have to live with latency between messages 
> because of the polling.
> 
> So i was thinking if there was some way in which i could avoid the
> polling and send data asynchronously to the client (Pls refer to 
> my previous posts).  Thats why i was looking at a way in which i 
> could get hold of the socket to the client, so i could use it to 
> send data directly.
> 
> Tx,
> Vinod.
> 
> On Fri, 24 May 2002 Miguel Cruz wrote :
> >Not to be argumentative, but what you're trying to do is just so
> >amazingly
> >much more complicated than any of my suggestions. Maybe I 
> >haven't
> >communicated it well, it maybe there's some requirement to your 
> >project
> >that I don't understand.
> >
> >Why not just write a listener in PHP and redirect to it? It's
> >basically no
> >work.
> >
> >Handcrafting packets for this purpose is like building a car out
> >of paper
> >clips and cat hair because the car that's freely available to you 
> >is red -
> >and you don't like the color red because your old girlfriend used 
> >to wear
> >it a lot.
> >
> >miguel
> >
> >On 23 May 2002, Vinod  Panicker wrote:
> > > What you said did make sense, and complements my knowledge
> >of
> > > sockets.
> > >
> > > But what i'm not sure of is this - if i construct my own
> >packet
> > > and send it across, presuming that i do have the ip address
> >and
> > > port number of the client on which it is reading, will the
> >client
> > > accept it as a legitimate packet?
> > >
> > > I suspect that since the packets would be having some kind
> >of
> > > session identifier / sequence number.
> > >
> > > Getting the ip address and port number is no problem.  I
> >already
> > > have that getting stored on the server.  But from what i know
> >of
> > > sockets, i'm sceptical if the client will accept the packet.
> > >
> > > Guess the only way to go ahead is to try this out.
> > >
> > > Would someone pls pls pls write a PHP interface to libnet??
> > >
> > > Tx,
> > > Vinod.
> > >
> > > On Thu, 23 May 2002 Evan Nemerson wrote :
> > > >You're right- this is getting interesting ;)
> > > >
> > > >http://www.packetfactory.net/libnet/manual/4.html#s4.1.5
> > > >
> > > >Unless I'm mistaken, you don't need to actually hijack the
> > > >socket- you merely
> > > >need to write to the network. Check out section 3.1 of RFC
> >793.
> > > >There is
> > > >source and destination port- that is how they are routed.
> >Okay
> > > >anyone PLEASE
> > > >correct me if i'm wrong...
> > > >
> > > >My understanding is a socket is an interface to the kernel.
> >So
> > > >basically, you
> > > >talk to a socket, which the kernel associates with source
> >and
> > > >destination
> > > >ports, and destination IP address. Thats why you can just
> >write
> > > >to a socket
> > > >instead of explicitly stating all the information. The
> >kernel
> > > >then sends out
> > > >then creates the packet and send it to the destination IP.
> > > >
> > > >libnet would allow you to bypass the socket phase, and
> >manually
> > > >create a
> > > >socket. Think of a socket as a GUI for the network, and
> >libnet is
> > > >like a
> > > >console ;)
> > > >
> > > >Hope that helps, and once again anyone PLEASE correct any 
> > > >inaccuracies, since I want to know.
> > > >
> > > >
> > > >
> > > >
> > > >On Tuesday 21 May 2002 23:53 pm, Vinod Panicker wrote:
> > > > > Thanks for the reply Miguel, but here i'm not trying to
> > > >implement
> > > > > my own multi-threaded server - exactly the reason why
> >i'm
> > > >using
> > > > > Apache / PHP.
> > > > >
> > > > > I could have made a listening server which is based on a 
> > > > > multi-threaded or multi-forked model, but the time and 
> > > > > complexities involved would be huge.  Thats why I chose
> >Apache
> > > >/
> > > > > PHP.
> > > > >
> > > > > Now if what i'm asking for can be done, developers can
> > > >easily
> > > > > leverage existing efficient server technologies (Apache)
> >to
> > > >build
> > > > > their own App servers.
> > > > >
> > > > > I know that there is no existing function in PHP that
> >would
> > > >allow
> > > > > it to retrieve the socket from Apache ;), all i'm asking
> >for
> > > >is a
> > > > > hack that would allow me to do it.
> > > > >
> > > > > I thought that i'd just as well post it on the mailing
> >list
> > > >before
> > > > > diving into the source code and trying to figure out for
> > > >myself.
> > > > > No point trying to re-invent the wheel, right?
> > > > >
> > > > > Evan, that lib will allow me to create my own packets,
> >but
> > > >which
> > > > > socket do i send it to?  Thats been the question all
> >along.
> > > > >
> > > > > I think this is getting really interesting :)
> > > > >
> > > > > Tx,
> > > > > Vinod.
> > > > >
> > > > > On Wed, 22 May 2002 Miguel Cruz wrote :
> > > > > >I don't think you're going to get Apache to hand you
> >the
> > > > > >socket.
> > > > > >
> > > > > >However, you can write a program using the standalone
> >(CGI)
> > > >PHP
> > > > > >interpreter that will act like a server - check out 
> > > > > >http://php.net/socket_create_listen for more info.
> > > > > >
> > > > > >You could redirect from your standard web server to
> >your
> > > > > >listening PHP app
> > > > > >running on another port. You'll then have to implement
> >at
> > > >least a
> > > > > >subset
> > > > > >of the HTTP protocol in order to get browsers to talk
> >to
> > > >you.
> > > > > >
> > > > > >Unfortunately, since you can't - to the best of my
> >knowledge
> > > >-
> > > > > >fork a PHP
> > > > > >program, you're going to have to do your own homebrew
> > > >threading
> > > > > >which will
> > > > > >make life slightly complicated.
> > > > > >
> > > > > >miguel
> > > > > >
> > > > > >On 22 May 2002, Vinod  Panicker wrote:
> > > > > > > It still seems like I havent made the problem clear
> > > >enough.
> > > > > > >
> > > > > > > I am aware of the print(), echo() and flush()
> >functions
> > > >and
> > > > > >
> > > > > >what
> > > > > >
> > > > > > > they do.  It does not fit in as a solution.  Let me
> > > >explain
> > > > > >
> > > > > >my
> > > > > >
> > > > > > > problem more elaborately -
> > > > > > > The client calls a PHP script, script_a.php on the
> > > >Apache
> > > > > >
> > > > > >web
> > > > > >
> > > > > > > server, using a Keep-Alive connection.  The script
> > > >returns
> > > > > >
> > > > > >some
> > > > > >
> > > > > > > response to the client which it uses.  Now since the
> > > > > >
> > > > > >connection is
> > > > > >
> > > > > > > a Keep-alive, apache still has it open for reading
> >and
> > > > > >
> > > > > >writing.
> > > > > >
> > > > > > > When the client wants to call other scripts, it just
> > > >sends
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > request over the same connection.  Now the thing is
> >that
> > > >if
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > server needs to send some ASYNCHRONOUS data to the
> > > >client,
> > > > > >
> > > > > >without
> > > > > >
> > > > > > > the client requesting for anything, a normal PHP
> >script
> > > >wont
> > > > > >
> > > > > >be
> > > > > >
> > > > > > > able to do it, since the script would get executed
> >by
> > > >the
> > > > > >
> > > > > >web
> > > > > >
> > > > > > > server ONLY on a client request (coz thats the way
> >HTTP
> > > > > >
> > > > > >works).
> > > > > >
> > > > > > > Now what i was thinking was - if i could get hold of
> >the
> > > > > >
> > > > > >socket
> > > > > >
> > > > > > > that is being used by apache to send data to the
> >client,
> > > >I
> > > > > >
> > > > > >could
> > > > > >
> > > > > > > effectively write() to it, from a C++ app or a PHP
> > > >script
> > > > > >
> > > > > >(which
> > > > > >
> > > > > > > gets invoked from lets say another server).
> >print(),
> > > >echo()
> > > > > >
> > > > > >etc
> > > > > >
> > > > > > > are functions that write to the output stream, which
> >is
> > > >opened
> > > > > >
> > > > > >as
> > > > > >
> > > > > > > a result of the clients request, by the web server.
> > > > > > >
> > > > > > > I want the ability to write to a socket thats been
> > > >created
> > > > > >
> > > > > >earlier
> > > > > >
> > > > > > > - i want to steal it from Apache, so that i can use
> >it
> > > >when
> > > > > >
> > > > > >and
> > > > > >
> > > > > > > where i like.
> > > > > > >
> > > > > > > Functions like echo() and print() are not going to
> >work
> > > >here,
> > > > > >
> > > > > >i
> > > > > >
> > > > > > > will have to use write() so that i can specify the
> >socket
> > > >to
> > > > > >
> > > > > >which
> > > > > >
> > > > > > > the data has to be written!
> > > > > > >
> > > > > > > Hope the problem is understood now.
> > > > > > >
> > > > > > > Now for your question -
> > > > > > > When the client wants to send data to the server, it
> >just
> > > >has
> > > > > >
> > > > > >to
> > > > > >
> > > > > > > open a socket connection with the web server, and
> >issue a
> > > >GET
> > > > > >
> > > > > >or a
> > > > > >
> > > > > > > POST request!  if the connection is a keep-alive
> > > >connection,
> > > > > >
> > > > > >and
> > > > > >
> > > > > > > it has already been created, the client just has to do
> >a
> > > >GET
> > > > > >
> > > > > >or a
> > > > > >
> > > > > > > POST without the need to connect().
> > > > > > >
> > > > > > > This mechanism, where the client frequently
> >connects()
> > > >to
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > server and checks for messages is called polling.
> >One
> > > >way
> > > > > >
> > > > > >of
> > > > > >
> > > > > > > reducing the high overhead of this is to reuse the
> > > >connection
> > > > > >
> > > > > >by
> > > > > >
> > > > > > > using a keep-alive connection.  A still better
> > > >improvement
> > > > > >
> > > > > >would
> > > > > >
> > > > > > > be to remove the need for a poll altogether, by
> >doing
> > > > > >
> > > > > >something
> > > > > >
> > > > > > > (thats what my question is all about) on the server
> >so
> > > >that it
> > > > > >
> > > > > >can
> > > > > >
> > > > > > > send data asynchronously to the server.
> > > > > > >
> > > > > > >
> > > > > > > Tx,
> > > > > > > Vinod.
> > > > > > >
> > > > > > > On Wed, 22 May 2002 Bogdan Stancescu wrote :
> > > > > > > >For your specific problem, I think Mr. Lemos has
> >provided
> > > >a
> > > > > > > >viable solution (using print() or echo() and
> >flush()
> > > >whenever
> > > > > >
> > > > > >you
> > > > > >
> > > > > > > >need to, instead of grabbing the socket and write()
> >to
> > > >it).
> > > > > >
> > > > > >My
> > > > > >
> > > > > > > >problem however is how you envision solving the
> > > >communication
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >other way around (i.e. when the CLIENT wants to send
> >data
> > > >to
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >server).
> > > > > > > >
> > > > > > > >Bogdan
> > > > > > > >
> > > > > > > >Vinod Panicker wrote:
> > > > > > > >>Hi,
> > > > > > > >>
> > > > > > > >>Tx for your very prompt reply.
> > > > > > > >>
> > > > > > > >>Yeah, I'll post the solution as soon as I find it
> > > > > >
> > > > > >someplace.
> > > > > >
> > > > > > > >>Let me outline the problem in more detail -
> > > > > > > >>
> > > > > > > >>Client (VC++) calls a PHP script on the server,
> > > >specifies
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >>connection type as Keep-Alive.  The PHP script,
> > > >somehow
> > > > > >
> > > > > >(still a
> > > > > >
> > > > > > > >>big question) gets the socket on which the apache
> > > >server
> > > > > >
> > > > > >has
> > > > > >
> > > > > > > >>received the client request (so that it can send
> >data
> > > >to
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >>client later) and stores it in a database.
> > > > > > > >>
> > > > > > > >>Now whenever another PHP script wants to send data 
> > > > > > > >>asynchronously to the client, it gets the socket
> > from
> > > >the
> > > > > > > >>database, and just calls a write() on it.  Since
> >the
> > > > > >
> > > > > >connection
> > > > > >
> > > > > > > >>is still open (Keep-Alive), the client receives
> >the
> > > > > >
> > > > > >information,
> > > > > >
> > > > > > > >>and doesnt have to poll the server periodically.
> > > > > > > >>
> > > > > > > >>The application of this is indeed destined for a
> > > >messaging
> > > > > > > >>product, and could benefit a lot of other areas as
> > > >well.
> > > > > > > >>
> > > > > > > >>The only thing that is needed is the socket from
> > > >apache.
> > > > > > > >>
> > > > > > > >>Someone somewhere knows how to get this done, i'm
> >sure
> > > >:)
> > > > > > > >>
> > > > > > > >>Possibly a hack into the PHP module can get this
> >done,
> > > >i'm
> > > > > >
> > > > > >open
> > > > > >
> > > > > > > >>to suggestions.
> > > > > > > >>
> > > > > > > >>Tx,
> > > > > > > >>Vinod.
> > > > > > > >>
> > > > > > > >>On Tue, 21 May 2002 Bogdan Stancescu wrote :
> > > > > > > >>>Hi!
> > > > > > > >>>
> > > > > > > >>>I'm looking for an answer to your questions as
> >well, so
> > > >if
> > > > > >
> > > > > >you
> > > > > >
> > > > > > > >>>do find a solution on other lists, could you
> >please
> > > >post
> > > > > >
> > > > > >it
> > > > > >
> > > > > > > >>>here as well?
> > > > > > > >>>
> > > > > > > >>>Regarding the issue, your proposal wouldn't make
> >for
> > > > > > > >>>full-duplex as far as I understand since I don't
> >see
> > > >how
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >>>client would be able to send any data on the same
> > > > > >
> > > > > >connection
> > > > > >
> > > > > > > >>>_after_ getting connected.
> > > > > > > >>>
> > > > > > > >>>What are you using on the other end of the pipe
> >(on
> > > >the
> > > > > > > >>>client)? Plain HTML? Flash? Java? Something else?
> > > > > > > >>>
> > > > > > > >>>Bogdan
> > > > > > > >>>
> > > > > > > >>>Vinod Panicker wrote:
> > > > > > > >>>>Hi,
> > > > > > > >>>>
> > > > > > > >>>>We have developed a client-server application
> >where
> > > >the
> > > > > >
> > > > > >server
> > > > > >
> > > > > > > >>>>needs to send asynchronous data to the client.
> >Now
> > > >since
> > > > > >
> > > > > >we
> > > > > >
> > > > > > > >>>>are using Apache/PHP/MySQL, the client needs to
> >poll
> > > >the
> > > > > > > >>>>server periodically for information.
> > > > > > > >>>>
> > > > > > > >>>>I was thinking if there was some way to get
> >around
> > > >this
> > > > > >
> > > > > >basic
> > > > > >
> > > > > > > >>>>problem.  I understand that this is how things
> >are
> > > > > >
> > > > > >supposed to
> > > > > >
> > > > > > > >>>>work, but it would be just great if i could PUSH
> >data
> > > > from
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >>>>server to the client, using HTTP.
> > > > > > > >>>>
> > > > > > > >>>>Since HTTP is a request/response based protocol,
> > > >Apache
> > > > > >
> > > > > >would
> > > > > >
> > > > > > > >>>>not send any data to the client asynchronously.
> >So
> > > >what i
> > > > > >
> > > > > >was
> > > > > >
> > > > > > > >>>>thinking was - If i tell the server to allow
> > > >Keep-Alive
> > > > > > > >>>>connections, and increase the timeout value and
> >max
> > > > > >
> > > > > >requests,
> > > > > >
> > > > > > > >>>>I would effectively have a constant TCP
> >connection.
> > > >Now
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >>>>only problem would be of sending asynchronous
> >data
> > > >to
> > > > > >
> > > > > >the
> > > > > >
> > > > > > > >>>>client.  Solution?  Here goes - If there was some
> >way
> > > >in
> > > > > >
> > > > > >which
> > > > > >
> > > > > > > >>>>i could get hold of the file descriptor(socket)
> >that
> > > >is
> > > > > >
> > > > > >being
> > > > > >
> > > > > > > >>>>used by apache to write data to the client, then
> >i
> > > >could,
> > > > > >
> > > > > > from
> > > > > >
> > > > > > > >>>>a PHP script also send any data to the client
> >using
> > > >the
> > > > > >
> > > > > >socket
> > > > > >
> > > > > > > >>>>functions of PHP since i already have the socket
> > > >with
> > > > > >
> > > > > >me.
> > > > > >
> > > > > > > >>>>This would mean that the client doesnt have to
> >poll
> > > >the
> > > > > >
> > > > > >server
> > > > > >
> > > > > > > >>>>for data any more... and if the connection does
> >get
> > > > > >
> > > > > >closed,
> > > > > >
> > > > > > > >>>>the client could reconnect to the server asking
> >for
> > > > > >
> > > > > >another
> > > > > >
> > > > > > > >>>>keep-alive connection.
> > > > > > > >>>>
> > > > > > > >>>>Now I know that this is probably the wrong place
> >to
> > > >put
> > > > > >
> > > > > >such a
> > > > > >
> > > > > > > >>>>query - maybe the apache list would have been
> > > >better.
> > > > > >
> > > > > >But
> > > > > >
> > > > > > > >>>>since I'm using PHP out here, i thought i'd give
> >it
> > > >a
> > > > > >
> > > > > >try.
> > > > > >
> > > > > > > >>>>Does the solution sound very outlandish?  Are
> >there
> > > >any
> > > > > > > >>>>pitfalls?  And finally, how do i get hold of the
> > > >socket?
> > >
> > >
> _________________________________________________________
> Click below to visit monsterindia.com and review jobs in India or
> Abroad
> http://monsterindia.rediff.com/jobs
> 
> 


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

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

Can anyone please help me with a following problem.

There's a script which uses PEAR library (namely, DB class)

<?
$dbhost=...
$dblogin=...
$dbpassword=...
$dbname=...

require_once("DB.php");

$dsn = "mysql://$dblogin:$dbpassword@$dbhost/$dbname";
$db = DB::connect($dsn, true);
if (DB::isError($db)) die ("*** ".$db->getMessage());

var_dump($db);

?>


When i execute it everything is ok.

BUT when i access this script via redirect by mod_rewrite
it throws an error that open_basedir settings don't allow
this require to be made 

.htaccess:
RewriteEngine on
RewriteRule   test2.php  /~xaxa/test/test3.php [L]

test2.php,test3.php contain the code that i quoted above

error:

Warning:  open_basedir restriction in effect. File is in wrong directory
in /home/xaxa/public_html/test/test3.php on line 4

Fatal error:  Failed opening required 'DB.php'
(include_path='.:/usr/local/lib/php') in
/home/xaxa/public_html/test/test/test3.php on line 4



Is there any way to overcome this problem?

mod_rewrite is used to _hide_ urls from users and to _extend_ url with
additional params.


Alexei
--- End Message ---
--- Begin Message ---
I am opening file in append mode but file is not getting created at all. I 
am not getting error too. I think it is due to write permission. How to 
check it and how to set it ?

Environment - Linux / PHP4

Thanks in advance
Manisha

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


I have a Q about functions. My function should return 2 values. What syntax
should I use and how do I call these values outside the function? Are these
values returned as en array or something?


this is what I have now,
-----------------------------
function myFunction($some_vars)
{
 $max=count($some_vars);
 $some_value=($max/2);
 return($some_value && $max);
}

$var1=should be the value of  $some_value
$var2=should be the value of $max


thx. Wilbert

------------------------- 
Pas de Deux 
Van Mierisstraat 25 
2526 NM Den Haag 
tel 070 4450855 
fax 070 4450852 
http://www.pdd.nl 
[EMAIL PROTECTED] 
-------------------------
--- End Message ---
--- Begin Message ---
Hi,

I don't know if there is an easier way to do this but why don't you concatenate
the two values to be returned and then split the returned value ?
ex :
function myFunction($some_vars)
{
 $max=count($some_vars);
 $some_value=($max/2);
$result = $some_value.";".$max;
 return $result;
}
$resultado = myFunction($some_other_name_vars);
list($var1,$var2) = split(";",$resultado);

I hope it helps.

SR




$var1=should be the value of  $some_value
$var2=should be the value of $max

"W. Enserink" a écrit :

> Hi all,
>
> I have a Q about functions. My function should return 2 values. What syntax
> should I use and how do I call these values outside the function? Are these
> values returned as en array or something?
>
> this is what I have now,
> -----------------------------
> function myFunction($some_vars)
> {
>  $max=count($some_vars);
>  $some_value=($max/2);
>  return($some_value && $max);
> }
>
> $var1=should be the value of  $some_value
> $var2=should be the value of $max
>
> thx. Wilbert
>
> -------------------------
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> [EMAIL PROTECTED]
> -------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
 > > I have a Q about functions. My function should return 2 
 > values. What 
 > > syntax should I use and how do I call these values outside the 
 > > function? Are these values returned as en array or something?

 > I don't know if there is an easier way to do this but why 
 > don't you concatenate the two values to be returned and then 
 > split the returned value ? ex : function 
 > myFunction($some_vars) {  $max=count($some_vars);  

Personally, I'd put both values to be returned into an array and then
return the array.

CYA, Dave



--- End Message ---
--- Begin Message ---
Hy,

Is it possible to use a javascript variable into php or
to change it into php variable?

I have a list with the files from a directory, this works
fine. For the event onchange I want to show the content of
the file chosen.

So, in the code, the variable "inputf" has the file name
that I want to read. How can I use it in the code php?

Thanks a lot!

Mihaela

<form name=showfile>
<SELECT NAME=Types onChange="javascript:FileContenu
(this.form)">
<OPTION SELECTED value="choisir">- Choisissez -

<?php
 $conn_id = ftp_connect($server);
 $login_result = ftp_login($conn_id, $user, $pass);

 if ((!$conn_id) || (!$login_result)) {
         echo "Connection problem! ";
                 die;
 }
 else {
                $list=Array();
                $list=@ftp_nlist($conn_id, "dirName");
                $i=0;

         do{
                ?>
        <OPTION value="<?php echo $list[$i]; ?>">
 <?php

                echo $list[$i];
                $i++;
        }while($list[$i]);

 }

        ?>

</SELECT>
</form>

//JAVASCRIPT
<script language="JavaScript">
function FileContenu(n){
 var inputf ="";

inputf=n.Types.options[n.Types.selectedIndex].value;

        if(inputf=="choisir"){
        n.mesg.value = "";

        }

        else{

                <?php

        //conection ftp to read the file
        $file="ftp://$user:$pass@$server/home/$user/????";;
        $filehandle=fopen($file,"r");
        if($filehandle){

                while (!feof ($fp)) {
                $buffer = fgets($fp, 4096);

                }

        fclose($filehandle);

                ?>

                n.mesg.value = "<?php echo $buffer;?>";





}
}


//-->
</script>


______________________________________________________
Boîte aux lettres - Caramail - http://www.caramail.com

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

I'm wrapping a newsletter with

$message = wordwrap( $message1,75,"\r\n" );

before sending it out.



still, my customer with his Outlook client gets everything on one line!

(Eudora and Outlook Express on my own machine display it fine.)

Any takes?



Thank you.



--- End Message ---

Reply via email to