php-windows Digest 18 May 2004 03:57:37 -0000 Issue 2252

Topics (messages 23738 through 23746):

Re: Session troubles
        23738 by: Cory D. Wiles
        23739 by: Charles P. Killmer
        23740 by: Ron.Herhuth.tatumpartners.com
        23741 by: Charles P. Killmer
        23742 by: Svensson, B.A.T. (HKG)

PHP 5 try catch block
        23743 by: Charles P. Killmer
        23744 by: Charles P. Killmer
        23745 by: Svensson, B.A.T. (HKG)

i need help
        23746 by: Student

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 --- Though i can not verify this at the moment. I had a similar problem, but not with sessions and the notice steams from not having a var declared. To get rid of the error you have to turn e_notice off.

Something like this:
error_reporting = E_ALL & ~E_NOTICE

Here is a good explanation of what was happening.

http://www.webmasterworld.com/forum88/3494.htm

-Cory

[EMAIL PROTECTED] wrote:

For some reason I am not able to get sessions to work.
This is the code I have entered on the first page:

session_start();
$row['id']=545;

$_SESSION['individual_id'] = $row['id'];
header("location:dataFilterExpander.php");



On page two this is the code I'm using:

session_start();

if(empty($_SESSION['individual_id']))
{
header("location:dataLogin.php?status=nosession");
}


On the second page I get the error: Notice: Undefined index: individual_id in...

I have the appropriate permissions set, and I have Reg Globals turned on
and sessions enabled in the ini...why oh why is it not working??

Thanks for any help you might be able to provide.
Ron








--- End Message ---
--- Begin Message ---
When you use the header function, you must include the SID.  There are
numerous ways to do this but the way that I use is like this. 

session_start();
$row['id']=545;
 
$_SESSION['individual_id'] = $row['id']; 
header("location:dataFilterExpander.php?".sid);

Charles Killmer

-----Original Message-----
From: Cory D. Wiles [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 17, 2004 9:40 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Session troubles

Though i can not verify this at the moment. I had a similar problem, but
not with sessions and the notice steams from not having a var declared. 
  To get rid of the error you have to turn e_notice off.

Something like this:
error_reporting = E_ALL & ~E_NOTICE

Here is a good explanation of what was happening.

http://www.webmasterworld.com/forum88/3494.htm

-Cory

[EMAIL PROTECTED] wrote:

> For some reason I am not able to get sessions to work.
> This is the code I have entered on the first page:
> 
> session_start();
> $row['id']=545;
> 
> $_SESSION['individual_id'] = $row['id']; 
> header("location:dataFilterExpander.php");
> 
> 
> 
> On page two this is the code I'm using:
> 
> session_start();
> 
> if(empty($_SESSION['individual_id']))
> {
> header("location:dataLogin.php?status=nosession");
> }
> 
> 
> On the second page I get the error:
> Notice: Undefined index: individual_id in...
> 
> I have the appropriate permissions set, and I have Reg Globals turned 
> on and sessions enabled in the ini...why oh why is it not working??
> 
> Thanks for any help you might be able to provide.
> Ron
> 
> 
> 
> 
> 
> 
> 

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

--- End Message ---
--- Begin Message ---
THAT DID THE TRICK!!!!

Excellent...thanks Charles!

>From: Charles P. Killmer
>To: [EMAIL PROTECTED]
>Sent: 05/17/2004 10:39 AM
>When you use the header function, you must include the SID.  There are
>numerous ways to do this but the way that I use is like this.
>
>session_start();
>$row['id']=545;
>
>$_SESSION['individual_id'] = $row['id'];
>header("location:dataFilterExpander.php?".sid);
>
>Charles Killmer
>
>-----Original Message-----
>From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
>Sent: Monday, May 17, 2004 9:40 AM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PHP-WIN] Session troubles
>
>Though i can not verify this at the moment. I had a similar problem, but
>not with sessions and the notice steams from not having a var declared.
>  To get rid of the error you have to turn e_notice off.
>
>Something like this:
>error_reporting = E_ALL & ~E_NOTICE
>
>Here is a good explanation of what was happening.
>
>http://www.webmasterworld.com/forum88/3494.htm
>
>-Cory
>
>[EMAIL PROTECTED] wrote:
>
>> For some reason I am not able to get sessions to work.
>> This is the code I have entered on the first page:
>>
>> session_start();
>> $row['id']=545;
>>
>> $_SESSION['individual_id'] = $row['id'];
>> header("location:dataFilterExpander.php");
>>
>>
>>
>> On page two this is the code I'm using:
>>
>> session_start();
>>
>> if(empty($_SESSION['individual_id']))
>> {
>> header("location:dataLogin.php?status=nosession");
>> }
>>
>>
>> On the second page I get the error:
>> Notice: Undefined index: individual_id in...
>>
>> I have the appropriate permissions set, and I have Reg Globals turned
>> on and sessions enabled in the ini...why oh why is it not working??
>>
>> Thanks for any help you might be able to provide.
>> Ron
>>
>>
>>
>>
>>
>>
>>
>
>--
>PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
>http://www.php.net/unsub.php
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>







--- End Message ---
--- Begin Message ---
I know this isnt the place, but this bugs the hell out of me.  Why would someone sign 
up for a mailing list and then not want to receive emails by default.  I am not going 
to go through extra work to help someone that is asking for help.  I hate spam as much 
as anyone but I will not require other people to go through extra work, that can be 
easily automated anyway, just to send me an email.
 
Sorry my little rant.  :)
 
Charles Killmer

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 17, 2004 9:37 AM
To: Charles P. Killmer
Subject: [QRfsoto]: RE: [PHP-WIN] Session troubles


Add Your E-Mail Address 
 <http://q4.quik.com/img/spacer.gif>    
Thank you for your e-mail. In an effort to address the growing spam issue and to 
therefore respond to your e-mail sooner, your e-mail message with the subject of "RE: 
[PHP-WIN] Session troubles" has been placed in a temporary holding file. It will be 
delivered immediately after you complete this simple one-time process of checking the 
link below. In the future, all of your e-mails to me will automatically be delivered. 
        
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
Please accept this and all future e-mails of mine to fsoto 
<http://mailbox12.quik.com/cgi-bin/fwdspamweb2.cgi?user=fsoto&[EMAIL PROTECTED]>   
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
        
While I apologize for this one-time minor inconvenience, this sytem will assist me in 
more rapidly responding to your future e-mails while eliminating the growing problem 
of spam that confronts each of us. 
� 2002 Quik Internet. All rights reserved.


Quik Internet Home <http://www.quik.com>  Need more information on Quik Cop 
or Quik Internet? Click here <http://www.quik.com> .    



Agrega tu direccion de correo electronico.      
 <http://q4.quik.com/img/spacer.gif>    
Se ha recibido un correo electrónico enviado por usted, referente al asunto "RE: 
[PHP-WIN] Session troubles". 

Cuento con el servicio anti-spamming denominado QuikCop, para que este correo me sea 
entregado, solo requiero que agregue su direccion de correo electronica a mi lista 
oprimiendo, durante las proximas 48 horas, la liga que lo indica. 

Esta sera la unica ocasion en la que usted requerira efectuar este sencillo 
procedimiento, el cual evita que correo spamming llegue a mi cuenta, por lo que me 
ayudara a optimizar el tiempo de respuesta a este y subsecuentes correos enviados por 
usted. 

No es necesario que reenvie el correo, me llegara tan pronto y agreg su direccion. 

        
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
Presiona aqui, para agregar su direccion de correo en la lista de fsoto 
<http://mailbox12.quik.com/cgi-bin/fwdspamweb2.cgi?user=fsoto&[EMAIL PROTECTED]>   
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
 <http://q4.quik.com/img/spacer.gif>    
        
� 2002 Quik Internet. All rights reserved.


Quik Internet Home <http://www.quik.com>  Si le interesa mayor informacion de este 
servicio 
exclusivo de Quik Internet presione aqui <http://www.quik.com target=> .        



  _____  


--- End Message ---
--- Begin Message ---
It's only that idiot (quickcop) at QUICK.COM again - use to pop up once
every half year or so....

-----Original Message-----
From: Charles P. Killmer
To: [EMAIL PROTECTED]
Sent: 17-5-2004 16:47
Subject: FW: [QRfsoto]: RE: [PHP-WIN] Session troubles

I know this isnt the place, but this bugs the hell out of me.  Why would
someone sign up for a mailing list and then not want to receive emails
by default.  I am not going to go through extra work to help someone
that is asking for help.  I hate spam as much as anyone but I will not
require other people to go through extra work, that can be easily
automated anyway, just to send me an email.
 
Sorry my little rant.  :)
 
Charles Killmer

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 17, 2004 9:37 AM
To: Charles P. Killmer
Subject: [QRfsoto]: RE: [PHP-WIN] Session troubles

--- End Message ---
--- Begin Message ---
Has anyone figured out how to catch fatal errors?  Something like a
script like this with an obvivous parse error.
 
<?php
try {
   bar = foo;
} catch (Exception $exception) {
   echo "hello";
}
?>

I want to know how to catch any klind of error so I can deal with it
gracefully instead of crashing the CGI.
 
 
Charles Killmer
Netgain Technology
[EMAIL PROTECTED]
Office: (320) 251-4700 ext 107
 

--- End Message ---
--- Begin Message ---
I am trying to catch any error that could occur not just account for the
ones that I can think of.  But yes I do use isset pretty often.  But I
am looking for something to catch any error before the script bombs out.

Charles Killmer 

-----Original Message-----
From: Daniel Anderson [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 17, 2004 12:58 PM
To: Charles P. Killmer
Subject: Re: [PHP-WIN] PHP 5 try catch block

Have you tried the if statement with the isset command?

For example:

**********

$SomeVariable = "NoneTheLess";

if (!isset($SomeVariables))
  {
    echo "Variable is not set!";
  }

**********
----- Original Message -----
From: "Charles P. Killmer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 17, 2004 6:50 PM
Subject: [PHP-WIN] PHP 5 try catch block


Has anyone figured out how to catch fatal errors?  Something like a
script like this with an obvivous parse error.
 
<?php
try {
   bar = foo;
} catch (Exception $exception) {
   echo "hello";
}
?>

I want to know how to catch any klind of error so I can deal with it
gracefully instead of crashing the CGI.
 
 
Charles Killmer
Netgain Technology
[EMAIL PROTECTED]
Office: (320) 251-4700 ext 107
 

--- End Message ---
--- Begin Message ---
What is generating these exceptions? Java? 

-----Original Message-----
From: Charles P. Killmer
To: [EMAIL PROTECTED]
Sent: 17-5-2004 19:50
Subject: [PHP-WIN] PHP 5 try catch block

Has anyone figured out how to catch fatal errors?  Something like a
script like this with an obvivous parse error.
 
<?php
try {
   bar = foo;
} catch (Exception $exception) {
   echo "hello";
}
?>

I want to know how to catch any klind of error so I can deal with it
gracefully instead of crashing the CGI.
 
 
Charles Killmer
Netgain Technology
[EMAIL PROTECTED]
Office: (320) 251-4700 ext 107
 

--- End Message ---
--- Begin Message ---
Hi i was hoping if someone can help;

I want to trim the following text

[i:abcdef]

but the inside text is different at time eg abcdef, bcdefg, etc etc
how can i trim [i:(some text here)] so that i can replace them with nothing.

eg these are to be trimmed.

[i:abcdef]
[i:bcdefg]
[i:xyzab]
[i:priftds]

how can i trim them..
thanks

-- 


--- End Message ---

Reply via email to