php-general Digest 6 Oct 2002 06:51:40 -0000 Issue 1627

Topics (messages 118961 through 118983):

Re: recent encrpyt decrypt code... (problems)
        118961 by: Tom Rogers
        118980 by: Tom Rogers
        118981 by: Jeff Bluemel

flash - php
        118962 by: Zeljko Bozic
        118963 by: Joseph Szobody

Re: unexpected t varable
        118964 by: Marek Kilimajer
        118968 by: Gary

Sessions
        118965 by: Steve Vernon
        118967 by: nicos.php.net
        118978 by: Jeff Bluemel
        118979 by: Justin French

MySQL>Limit size
        118966 by: Christian Ista

Re: More On: Good Practice: Variables, Error Reporting and Security
        118969 by: Sascha Cunz
        118970 by: Adam Royle

Re: Stuck at PHP4 installation( with Apache2 )
        118971 by: kramer
        118972 by: Rasmus Lerdorf

Open Source Mailing Lists
        118973 by: Jonathan Chum

Re: Static constants? Server persistent?
        118974 by: Lance Lovette

More Detailed Gettext() article?
        118975 by: Wee Keat [Amorphosium]
        118976 by: Sascha Cunz

Re: mobile number
        118977 by: David T-G

what is the best way to handle connectivity
        118982 by: Jeff Bluemel

Re: Record Sorting Using Up and Down Arrows
        118983 by: David Pratt

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,

Sunday, October 6, 2002, 4:20:40 AM, you wrote:
JB> here is the URL that will give you the php compile info on my website
JB> (phpinfo)

Looks identical to mine as far as mcrypt is concerned.
Try changing the $key = to this:

$key = 'test';


 As it looks like the key is getting truncated to 0


-- 
regards,
Tom

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

Sunday, October 6, 2002, 7:32:11 AM, you wrote:
JB> ok - that made things work...  here is the output.  it looks like it is
JB> still encrypting it.  what would the resolution be for this, or can I set
JB> the key to anything I want?

Ok I have got to the bottom of it :)
You changed the name of the class but did not change the name of the
constructor so the key was never getting set.
So change
class encrypt_decrypt
{
        var $secret;
        function encrypt_class(){
                $this->secret = 'this is a very long key, even too long for the 
cipher';
        }

to:
class encrypt_decrypt{
        var $secret;
        function encrypt_decrypt(){
                $this->secret = 'this is a very long key, even too long for the 
cipher';

}




-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
ok Tom - that worked...

thanks for your help and assistance...  I never would have figured this out
without the help.

Jeff

"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Sunday, October 6, 2002, 7:32:11 AM, you wrote:
> JB> ok - that made things work...  here is the output.  it looks like it
is
> JB> still encrypting it.  what would the resolution be for this, or can I
set
> JB> the key to anything I want?
>
> Ok I have got to the bottom of it :)
> You changed the name of the class but did not change the name of the
> constructor so the key was never getting set.
> So change
> class encrypt_decrypt
> {
>         var $secret;
>         function encrypt_class(){
>                 $this->secret = 'this is a very long key, even too long
for the cipher';
>         }
>
> to:
> class encrypt_decrypt{
>         var $secret;
>         function encrypt_decrypt(){
>                 $this->secret = 'this is a very long key, even too long
for the cipher';
>
> }
>
>
>
>
> --
> regards,
> Tom
>


--- End Message ---
--- Begin Message ---
I'm new to php.
want to build swf appl. with sql support
need some example (source)


please help

--- End Message ---
--- Begin Message ---
Couple good places to start...

http://www.phpbuilder.com/columns/hill20011214.php3
http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php.html

Joseph

"Zeljko Bozic" <[EMAIL PROTECTED]> wrote in message 
001b01c26ca2$cc79c7b0$b3411ad9@stuntssw9fdkdl">news:001b01c26ca2$cc79c7b0$b3411ad9@stuntssw9fdkdl...
> I'm new to php.
> want to build swf appl. with sql support
> need some example (source)
> 
> 
> please help
> 

--- End Message ---
--- Begin Message ---
Sorry, my fault, I forgot ) before {,
This line is right:
if( $res->numRows() ) {

Gary wrote:

> Doesn't work, get unexpected { for if( $res->numRows() {. If I remove 
> braces or rearrange them it fall apart piece by piece.
>
> Thanks for the try
> Gary
>
> Marek Kilimajer wrote:
>
>> what about
>>
>> if( $res->numRows() {
>>    while( $row = $res->fetchRows() ){
>>    ... do what you've got to do
>>    }
>> } else {
>>    ... no rows
>> }
>>
>> Gary wrote:
>>
>>> John W. Holmes wrote:
>>>
>>>>> John W. Holmes wrote:
>>>>>  
>>>>>
>>>>>>> Can someone tell where I messed up on this code snippit?
>>>>>>>       
>>>>>>
>>>>>>
>>>>>>
>>>>>> Your first mistake is not giving us the full error and the line
>>>>>> number...
>>>>>>
>>>>>>
>>>>>>   
>>>>>>
>>>>>>> if ($res->numRows() > 0){
>>>>>>>                 list($id, $question, $responce1,
>>>>>>>       
>>>>>>
>>>>>>
>>>>>>
>>>>>> $responce2,
>>>>>>
>>>>>>   
>>>>>>
>>>>>>> $responce3) =  $res->fetchRows()
>>>>>>>       
>>>>>>
>>>>>>
>>>>>>
>>>>>> and you're missing a ; here... ^^
>>>>>>
>>>>>>
>>>>>>   
>>>>>>
>>>>>>>                $id = $row[0];
>>>>>>>             $question = $row[1];
>>>>>>>             $responce1 = $row[2];
>>>>>>>             $responce2 = $row[3];
>>>>>>>             $responce3 = $row[4];
>>>>>>>         }
>>>>>>>       
>>>>>>
>>>>>>
>>>>>>
>>>>>> ---John Holmes...
>>>>>>
>>>>>>
>>>>>>     
>>>>>
>>>>>
>>>>>
>>>>> that fixed the unexpected t_variable but now it is Fatal error: Call
>>>>>   
>>>>
>>>>
>>>>
>>>> to
>>>>  
>>>>
>>>>> undefined function: fetchrows()
>>>>>
>>>>> list($id, $question, $responce1, $responce2,$responce3) =  $res-
>>>>>  
>>>>>
>>>>>> fetchRows()
>>>>>>     
>>>>>
>>>>>
>>>>>
>>>>
>>>> That means there is no function fetchrows() associated with whatever
>>>> class $res comes from...
>>>>  
>>>>
>>>
>>> I think it is time to call it a day. It is 11pm and I am getting so 
>>> punchy from this long day, I forgot to say it is a db call using 
>>> pearDB. If I remove the code and replace it with  while ($row  = 
>>> $res->fetchRows()) along the row array it work but then I can't 
>>> check for > 0
>>>
>>>
>>> Sorry
>>> Gary
>>>
>
>

--- End Message ---
--- Begin Message ---
Marek Kilimajer wrote:
> Sorry, my fault, I forgot ) before {,
> This line is right:
> if( $res->numRows() ) {
> 


Yeah, I figured it out after walking away from it for a while

   if( $res->numRows() > 0) {
    while ($row = $res->fetchRow()){
    $id = $row[0];
     $question = $row[1];
    $responce1 = $row[2];
    $responce2 = $row[3];
    $responce3 = $row[4];
    }
  }else{
    echo"bla bla";
  }
   ?>

now I have to post again on a strange row problem.

Thank
Gary

--- End Message ---
--- Begin Message ---
Hiya,
    Just upgraded to 4.2.3 and I am using the attatched PHP.ini file. I use
sessions on my website, and they dont seem to work now after the upgrade.
Just wondering which lines do I need to alter please? After I logon, they
loose the session after choosing another page. Every page runs the following
code to check the session passwords etc are valid..

    Thanks,

    Steve
    XX



<?php
 session_register("ssun");
 session_register("sspw");

 if(!isset($ssun)) $ssun="";
 if(!isset($sspw)) $sspw="";

 //Attempt to logon. Set the logon form variables to the session variables.
 if(isset($sspass))
 {
  $sspw=$sspass;
 }

 if(isset($ssname))
 {
  $ssun=$ssname;
 }

 //Make sure no one breaks in, if in the param loggedin was set, unset it.
 if(isset($loggedin))
 {
  unset($loggedin);
 }

 //Link and select the correct database
HIDDEN FOR MY SECURITY!!!!


 //Check if the ssun and sspw are correct
 $result = mysql_query("SELECT userid FROM users WHERE
userpassword=PASSWORD('$sspw') AND userid='$ssun'", $db_link);
 $norows = mysql_num_rows($result);

 if($norows==1)
 {
  $loggedin="yes";
 }
 else
 {
  $loggedin="no";
 }

 if(isset($logoff))
 {
  if($logoff=="true")
  {
   $loggedin="no";
   $ssun="";
   $sspw="";
  }
 }
--- End Message ---
--- Begin Message ---
Do you use globals on or off ?

--

Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com - Hébergement de sites Internet

"Steve Vernon" <[EMAIL PROTECTED]> a écrit dans le message de news:
056a01c26cb2$509f2260$[EMAIL PROTECTED]
> Hiya,
>     Just upgraded to 4.2.3 and I am using the attatched PHP.ini file. I
use
> sessions on my website, and they dont seem to work now after the upgrade.
> Just wondering which lines do I need to alter please? After I logon, they
> loose the session after choosing another page. Every page runs the
following
> code to check the session passwords etc are valid..
>
>     Thanks,
>
>     Steve
>     XX
>
>
>
> <?php
>  session_register("ssun");
>  session_register("sspw");
>
>  if(!isset($ssun)) $ssun="";
>  if(!isset($sspw)) $sspw="";
>
>  //Attempt to logon. Set the logon form variables to the session
variables.
>  if(isset($sspass))
>  {
>   $sspw=$sspass;
>  }
>
>  if(isset($ssname))
>  {
>   $ssun=$ssname;
>  }
>
>  //Make sure no one breaks in, if in the param loggedin was set, unset it.
>  if(isset($loggedin))
>  {
>   unset($loggedin);
>  }
>
>  //Link and select the correct database
> HIDDEN FOR MY SECURITY!!!!
>
>
>  //Check if the ssun and sspw are correct
>  $result = mysql_query("SELECT userid FROM users WHERE
> userpassword=PASSWORD('$sspw') AND userid='$ssun'", $db_link);
>  $norows = mysql_num_rows($result);
>
>  if($norows==1)
>  {
>   $loggedin="yes";
>  }
>  else
>  {
>   $loggedin="no";
>  }
>
>  if(isset($logoff))
>  {
>   if($logoff=="true")
>   {
>    $loggedin="no";
>    $ssun="";
>    $sspw="";
>   }
>  }
>


--- End Message ---
--- Begin Message ---
instead of using the session_register try $_SESSTION[' ssun']


"Steve Vernon" <[EMAIL PROTECTED]> wrote in message
056a01c26cb2$509f2260$a5e387d9@extreme">news:056a01c26cb2$509f2260$a5e387d9@extreme...
> Hiya,
>     Just upgraded to 4.2.3 and I am using the attatched PHP.ini file. I
use
> sessions on my website, and they dont seem to work now after the upgrade.
> Just wondering which lines do I need to alter please? After I logon, they
> loose the session after choosing another page. Every page runs the
following
> code to check the session passwords etc are valid..
>
>     Thanks,
>
>     Steve
>     XX
>
>
>
> <?php
>  session_register("ssun");
>  session_register("sspw");
>
>  if(!isset($ssun)) $ssun="";
>  if(!isset($sspw)) $sspw="";
>
>  //Attempt to logon. Set the logon form variables to the session
variables.
>  if(isset($sspass))
>  {
>   $sspw=$sspass;
>  }
>
>  if(isset($ssname))
>  {
>   $ssun=$ssname;
>  }
>
>  //Make sure no one breaks in, if in the param loggedin was set, unset it.
>  if(isset($loggedin))
>  {
>   unset($loggedin);
>  }
>
>  //Link and select the correct database
> HIDDEN FOR MY SECURITY!!!!
>
>
>  //Check if the ssun and sspw are correct
>  $result = mysql_query("SELECT userid FROM users WHERE
> userpassword=PASSWORD('$sspw') AND userid='$ssun'", $db_link);
>  $norows = mysql_num_rows($result);
>
>  if($norows==1)
>  {
>   $loggedin="yes";
>  }
>  else
>  {
>   $loggedin="no";
>  }
>
>  if(isset($logoff))
>  {
>   if($logoff=="true")
>   {
>    $loggedin="no";
>    $ssun="";
>    $sspw="";
>   }
>  }
>


--- End Message ---
--- Begin Message ---
To clarify, and correct a few typos:

Instead of:

$ssun = "foo";
session_register("ssun");

Try:

$_SESSION['ssun'] = "foo";


HTH

Justin


on 06/10/02 12:11 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote:

> instead of using the session_register try $_SESSTION[' ssun']
> 
> 
> "Steve Vernon" <[EMAIL PROTECTED]> wrote in message
> 056a01c26cb2$509f2260$a5e387d9@extreme">news:056a01c26cb2$509f2260$a5e387d9@extreme...
>> Hiya,
>> Just upgraded to 4.2.3 and I am using the attatched PHP.ini file. I
> use
>> sessions on my website, and they dont seem to work now after the upgrade.
>> Just wondering which lines do I need to alter please? After I logon, they
>> loose the session after choosing another page. Every page runs the
> following
>> code to check the session passwords etc are valid..
>> 
>> Thanks,
>> 
>> Steve
>> XX
>> 
>> 
>> 
>> <?php
>> session_register("ssun");
>> session_register("sspw");
>> 
>> if(!isset($ssun)) $ssun="";
>> if(!isset($sspw)) $sspw="";
>> 
>> //Attempt to logon. Set the logon form variables to the session
> variables.
>> if(isset($sspass))
>> {
>> $sspw=$sspass;
>> }
>> 
>> if(isset($ssname))
>> {
>> $ssun=$ssname;
>> }
>> 
>> //Make sure no one breaks in, if in the param loggedin was set, unset it.
>> if(isset($loggedin))
>> {
>> unset($loggedin);
>> }
>> 
>> //Link and select the correct database
>> HIDDEN FOR MY SECURITY!!!!
>> 
>> 
>> //Check if the ssun and sspw are correct
>> $result = mysql_query("SELECT userid FROM users WHERE
>> userpassword=PASSWORD('$sspw') AND userid='$ssun'", $db_link);
>> $norows = mysql_num_rows($result);
>> 
>> if($norows==1)
>> {
>> $loggedin="yes";
>> }
>> else
>> {
>> $loggedin="no";
>> }
>> 
>> if(isset($logoff))
>> {
>> if($logoff=="true")
>> {
>> $loggedin="no";
>> $ssun="";
>> $sspw="";
>> }
>> }
>> 
> 
> 

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

I have a form with a textarea. When I put a long text(one word page for
example), when I submit, the form is not submitted. I have to remove
some line to submit. I don't have any limit in the textarea. The content
of this form is sorted in a MySQL database. I tried to set the field
where the textarea will be stored to LONGTEXt or LONGBLOB but I have all
the time the same problem.

Is it a MySQL limit problem ? or form (textarea) problem ?


Christian,


--- End Message ---
--- Begin Message ---
Am Samstag, 5. Oktober 2002 20:44 schrieb Adam Royle:
> I very much appreciate the suggestions made by the people on this list,
> although for me, when developing, the less typing I have to do, the
> less errors I am bound to come across, and therefore the less debugging
> I must do. (Now, doesn't this seem sensible?)

Well, have you ever read a perl script? :-)
The shortest source is not the best in all cases. Consider, that there will be 
times, you must read the source again - well, the easier it is written (and 
structured), the easier you will see again how it works...

--Sascha

--- End Message ---
--- Begin Message ---
What I mean is, by using functions to do the hard work for you, it is 
less common to make an obvious mistake. I have a couple of functions 
that I use in most of my scripts.

eg.

securityCheck(); // authenticates the user

dbConnect(); // connects to database with default parameters (in config 
file)

$sql = "SELECT * FROM tblName";
$data = GetData($sql, VARIABLES); // grabs data from db and puts in 
global scope

Now if you compare the above code to something which does all that 
manually, then you'll be typing a heck of an amount. If you have to 
search through a hundred lines of code, it would be more difficult than 
searching through 4 lines of code, don't you think? A lot of errors 
people make are spelling errors.

Like so:

$ymVar = $_GET['myVar'];

or

$myVar = $HTTP_POST_VAR[myVar];

Now if you did this:

importVars($_POST, 'myVar,foo,bar');

It would be much easier to debug because you only have to look at one 
line, cause you know the function is working. If you don't see it in 
that one line, print_r($GLOBALS); might show you if the var is getting 
transferred, etc.

I know what you're saying about confusing code, where you are putting 
more than one statement in one line is difficult to debug, but thats 
different from targeting spelling errors.

Adam

On Sunday, October 6, 2002, at 07:57  AM, Sascha Cunz wrote:

> Am Samstag, 5. Oktober 2002 20:44 schrieb Adam Royle:
>> I very much appreciate the suggestions made by the people on this 
>> list,
>> although for me, when developing, the less typing I have to do, the
>> less errors I am bound to come across, and therefore the less 
>> debugging
>> I must do. (Now, doesn't this seem sensible?)
>
> Well, have you ever read a perl script? :-)
> The shortest source is not the best in all cases. Consider, that there 
> will be
> times, you must read the source again - well, the easier it is written 
> (and
> structured), the easier you will see again how it works...
>
> --Sascha
>
>

--- End Message ---
--- Begin Message ---
Ok guys,
To correcte all the typos, this is what I did.
1. Removed PHP( directory ) completely.
2. Start Apache - went fine( without any reference of PHP )
3. Installed PHP in a simple directory( not Program Files et al. ), so now
its e:\php-4.2.3-Win32\...
4. Copied php4ts.dll to \WINNT\system32 directory
5. Added the following lines to httpd.conf( at the end of the file, I hope
that's ok )...

LoadModule php4_module e:/php-4.2.3-Win32/sapi/php4apache2.dll
[ tried with LoadModule php4_module
e:\php-4.2.3-Win32\sapi\php4apache2.dll ]
AddModule mod_php4.c
#Action application/x-httpd-php e:\php-4.2.3-Win32\sapi\php.exe
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

Guess what ? No luck, it doesn't work. It failes while trying to bring up
Apache.

I read one suggesstion to copy php4ts LIB file to Apache's lib directory.
That didn't work either.
I went line by lile in the notes on install.txt that comes along with the
PHP zip-file, what am I missing ?
Basically its not liking the "loadmodule" !
Appreciate your help. Thanks.

----- Original Message -----
From: "Erwin Bovendeur" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
To: "kramer" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
Sent: Saturday, October 05, 2002 1:39 AM
Subject: Re: Stuck at PHP4 installation( with Apache2 )

> Hi,
>
> > Thanks Erwin. Unfortunately it doesn't work, even after I copied
> php4ts.dll.
> >
> > How would I specify the drive:\Program Files, which has a space
> in-between.
> > Should I include single or double quote ?
> >
> > I tried all these combinations...
> >
> > LoadModule php4_module F:/Progra~1/php-4.2.3-Win32/php4ts.dll
> > LoadModule php4_module 'F:/Program Files/php-4.2.3-Win32/php4ts.dll'
> > LoadModule php4_module "F:/Program Files/php-4.2.3-Win32/php4ts.dll"
> > LoadModule php4_module
"F:/Progra~1/php-4.2.3-Win32/sapi/php4apache2.dll"
> >
> > LoadModule php4_module D:/WINNT/system32/php4ts.dll
> > LoadModule php4_module 'D:/WINNT/system32/php4ts.dll'
> > LoadModule php4_module 'D:/WINNT/system32/php4ts.dll'
>
> Hmz...hold a second...
> You tried to include php4ts.dll? That's not correct. php4ts.dll must be in
> the path, so php4apache2.dll can find it. After that, use the line
>
> LoadModule php4_module f:/progra~1/php-4.2.3-Win32/sapi/php4apache2.dll
>
> to include php support. That should work (you didn't try this one ;-))
>
> HTH
> Erwin
>
>


--- End Message ---
--- Begin Message ---
Keep in mind that we do not officially support Apache2 yet.  Will be a
while before it will be anywhere near stable.

-Rasmus

On Sat, 5 Oct 2002, kramer wrote:

> Ok guys,
> To correcte all the typos, this is what I did.
> 1. Removed PHP( directory ) completely.
> 2. Start Apache - went fine( without any reference of PHP )
> 3. Installed PHP in a simple directory( not Program Files et al. ), so now
> its e:\php-4.2.3-Win32\...
> 4. Copied php4ts.dll to \WINNT\system32 directory
> 5. Added the following lines to httpd.conf( at the end of the file, I hope
> that's ok )...
>
> LoadModule php4_module e:/php-4.2.3-Win32/sapi/php4apache2.dll
> [ tried with LoadModule php4_module
> e:\php-4.2.3-Win32\sapi\php4apache2.dll ]
> AddModule mod_php4.c
> #Action application/x-httpd-php e:\php-4.2.3-Win32\sapi\php.exe
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
>
> Guess what ? No luck, it doesn't work. It failes while trying to bring up
> Apache.
>
> I read one suggesstion to copy php4ts LIB file to Apache's lib directory.
> That didn't work either.
> I went line by lile in the notes on install.txt that comes along with the
> PHP zip-file, what am I missing ?
> Basically its not liking the "loadmodule" !
> Appreciate your help. Thanks.
>
> ----- Original Message -----
> From: "Erwin Bovendeur" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> To: "kramer" <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> Sent: Saturday, October 05, 2002 1:39 AM
> Subject: Re: Stuck at PHP4 installation( with Apache2 )
>
> > Hi,
> >
> > > Thanks Erwin. Unfortunately it doesn't work, even after I copied
> > php4ts.dll.
> > >
> > > How would I specify the drive:\Program Files, which has a space
> > in-between.
> > > Should I include single or double quote ?
> > >
> > > I tried all these combinations...
> > >
> > > LoadModule php4_module F:/Progra~1/php-4.2.3-Win32/php4ts.dll
> > > LoadModule php4_module 'F:/Program Files/php-4.2.3-Win32/php4ts.dll'
> > > LoadModule php4_module "F:/Program Files/php-4.2.3-Win32/php4ts.dll"
> > > LoadModule php4_module
> "F:/Progra~1/php-4.2.3-Win32/sapi/php4apache2.dll"
> > >
> > > LoadModule php4_module D:/WINNT/system32/php4ts.dll
> > > LoadModule php4_module 'D:/WINNT/system32/php4ts.dll'
> > > LoadModule php4_module 'D:/WINNT/system32/php4ts.dll'
> >
> > Hmz...hold a second...
> > You tried to include php4ts.dll? That's not correct. php4ts.dll must be in
> > the path, so php4apache2.dll can find it. After that, use the line
> >
> > LoadModule php4_module f:/progra~1/php-4.2.3-Win32/sapi/php4apache2.dll
> >
> > to include php support. That should work (you didn't try this one ;-))
> >
> > HTH
> > Erwin
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

I'm looking for open source mailing lists. I'm aware of hotscripts.com and
the mailing lists listed there was not what I had in mind. What I'm looking
for is possible some code snippets or applications where the scripts handles
much like Mailman in which one person can post a new message to the list and
an email is emailed out to everyone. Anyone whose on that list can then
reply to that message via email, and all emails are tracked via the ID so
that it can be archived on the web.

I've coded part of one, but stumped on how the messages retain reply to
references in the header. The Reply-To field always reference back to the
Message-ID of the message as it left the server, not the ID when it was
received. I put this ID as part of the Reference field, but when replying in
Outlook, the Reference field does not stay in tack when it reaches the
server for parsing. It's like Outlook does not even attach the Reference
header even when the message when you are replying to has a Reference header
in it.

Any ideas?


--- End Message ---
--- Begin Message ---
I wrote the PWEE PHP extension to solve this exact problem.

http://pwee.sourceforge.net

It's great for constants but it's true power comes from "executor
persistent" variables. I haven't updated the web site but it does work with
PHP 4.2.3.

Lance

> -----Original Message-----
> From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, September 29, 2002 6:59 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Static constants? Server persistent?
>
>
> This is a bit hard for me to explain but is there any way to have PHP
> store a persistent server-side constant. Something that will stay in RAM
> and is not dependent on client connection.
>
> For example I have this code in consts.inc file:
>
> define ("HOME_PAGE", "http://myip.com/index.html);
>
> But if I want access to the constant I need to include the file in every
> script that needs it.
>
> I am hoping there is some way to say to the PHP engine, "this is a
> static constant that will never change, keep it RAM, and share it
> between invocations/children".
>
> Is this feasible? Is it is I could then "cache" whole blocks of static
> HTML and that would speed up my scripts quite a bit ... AND my my life
> as a programmer easier since I wouldn't have to always have an
> "include("conts.inc")" statement at the top of each of my scripts ...
>
> Jc
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi everyone..

Sorry for bothering u guys for such trivial matter...

But.... where can I get a good article on how to use the gettext() function in PHP? I 
am building a website that supports multilingual capability and I've tried searching 
for it (Google, Yahoo, etc).... the best that I could find is from O' Reilly but it 
was too brief to let me start on anything...

Please help.

Thanks a million... as usual!


Yours,

Wee Keat Chin

----------------------------------------------
"If you cannot win, make the one ahead of you break the record." 
--- End Message ---
--- Begin Message ---
Try the GNU Documentation on gettext:

http://www.gnu.org/manual/gettext/index.html

Regards
Sascha

Am Sonntag, 6. Oktober 2002 01:51 schrieb Wee Keat [Amorphosium]:
> Hi everyone..
>
> Sorry for bothering u guys for such trivial matter...
>
> But.... where can I get a good article on how to use the gettext() function
> in PHP? I am building a website that supports multilingual capability and
> I've tried searching for it (Google, Yahoo, etc).... the best that I could
> find is from O' Reilly but it was too brief to let me start on anything...
>
> Please help.
>
> Thanks a million... as usual!
>
>
> Yours,
>
> Wee Keat Chin
>
> ----------------------------------------------
> "If you cannot win, make the one ahead of you break the record."
--- End Message ---
--- Begin Message ---
Ryan, et al --

...and then Ryan A said...
% 
% Hi guys,

Hi!

Your project sounds interesting, but it pretty much won't work for the
US -- or at best it would be unworkable.

In the US, the area code is three digits, the exchange is three digits,
and the number itself is four digits.  For years people only needed the
exchange and the number (and, in fact, the exchange was based on the
city name, so you'd ring the operator and ask for KLondike 5 5555 or
PEnnsylvania 6 5000) unless you were calling outside your area code,
which was pretty much guaranteed to be a toll call (and some "local"
calls were toll as well).  More and more now, though, you have to dial
the full ten digits because local calling areas are bigger than a million
numbers.

And all of that goes for cell phones, pagers, and the like as well.
While an entire exchange is usually given to a cell provider, it could
be one off from a land line provider's exchange or even a different cell
provider's exchange.

The only shot I'd think could work would be to integrate a caller ID
service to just give you the whole number...  How's that for saving your
surfer's some keystrokes? :-)


HTH & HAND

:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg81258/pgp00000.pgp
Description: PGP signature

--- End Message ---
--- Begin Message ---
I've got informix on a sco open server box, and my webserver has php 4.2.3
with apache.  I'm wondering what the best way to handle the connectivity
into the sco box is (not concerned with how difficult this is to setup, but
rather pure speed)

do I try to use a native driver?  if I use the native driver does informix
have to be installed on the same box?  do I just try to use odbc?

--
Jeff Bluemel


--- End Message ---
--- Begin Message ---
I'm hoping someone can help me solve this problem. I've almost got something
working.  Only problem  is I am having some difficulty trying to come up
with a case or condition for the single value (ie. devmodfile value = file 3
in example below) that it won't print any arrows up, up/down, or down. It's
a bit of a puzzler and haven't added anything to the case.  I have a print_r
and a print with the variables so that anyone can see what is happening.  I
put a small array of test values in so that it can be run.  The data will
come from an SQL database but this is enough to test.  Once this is working,
I'll attach graphics and actions to the up and down arrows. The script is
below:

Thanks in advance for any help.
Regards,  Dave Pratt

<?php>
    $items[] = array(devfunctionid => 1, devmodfile => file1);
    $items[] = array(devfunctionid => 2, devmodfile => file1);
    $items[] = array(devfunctionid => 3, devmodfile => file1);
    $items[] = array(devfunctionid => 4, devmodfile => file2);
    $items[] = array(devfunctionid => 5, devmodfile => file2);
    $items[] = array(devfunctionid => 6, devmodfile => file3);
    $items[] = array(devfunctionid => 7, devmodfile => file4);
    $items[] = array(devfunctionid => 8, devmodfile => file4);
    foreach ($items as $item) {
        $devmodfile_values[] = $item['devmodfile'];
    }
    $rownum = 1;
    $numrows = count($items);
    $last_position = '';
    foreach ($items as $item) {
        if (!isset($devmodfile_values[$rownum])) {
            $next_position = '';
        } else {
            $next_position = $devmodfile_values[$rownum];
        }
        $up = "up arrow";
        $down = "down arrow";
        switch($rownum) {
            case 1:
                if ($next_position != $item['devmodfile']) {
                    $arrows = '';
                } else {
                    $arrows = "$down";
                }
                break;
            case $numrows:
                if ($last_position != $item['devmodfile']) {
                    $arrows = '';
                } else {
                    $arrows = "$up";
                }
                break;
            default:
                if ($devmodfile_values[$rownum] != $item['devmodfile']) {
                    $arrows = "$up";
                } elseif ($item['devmodfile'] != $last_position) {
                    $arrows = "$down";
                } else {
                    $arrows = "$up $down";
                }
                break;
        }
        $rownum++;
        $last_position = $item['devmodfile'];
        print $arrows . "--current file value: " .  $item['devmodfile'] .
"--last_position: " . $last_position . "--next_position: " . $next_position
. "</br>";
    }
    print "</br></br>";
    print_r($devmodfile_values);
?>
--- End Message ---

Reply via email to