Re: [PHP] Uninitialized string offset

2002-07-05 Thread Uri Even-Chen

Hi,

Actually, the error_reporting is set to E_ALL and was set to E_ALL in
the previous version, too.  I found out they added the Uninitialized
string offset in Version 4.1.0 (see
<http://www.php.net/ChangeLog-4.php>).  I just wanted to know what this
error means.  Anyway, I think I'll just add a "@" sign to supporess
warnings.

Thanks!
Uri.


Chris Hewitt wrote:
> 
> Uri,
> 
> Sounds like the error reporting is set to E_ALL on the new php version
> and was set at a lower level before. The error indicates that the
> variable has not specfically been assigned a value before being used.
> 
> HTH
> Chris
> 
> Uri Even-Chen wrote:
> 
> >After upgrading to Red Hat Linux 7.3 (which also includes a new PHP
> >version), I saw this warning (Uninitialized string offset) on my apache
> >error log files. It refers to a line which was perfectly legal before:
> >
> >   if
> >(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName']))
> >
> >I always use isset to check if a variable is defined. Do you know why I
> >get this warning?



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




[PHP] suppressing errors with "@"

2002-07-05 Thread Uri Even-Chen

Hi,

I tried to suppress warnings in isset expressions (Uninitialized string
offset warnings).  The original line was something like this:

if (!(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))

When I added the "@" sign like this:

if (!(isset(@$GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))

My program stopped working, and I got errors like:

PHP Parse error:  parse error, expecting `T_VARIABLE' or `'$'' 

Eventually, I put the "@" in this place:

if (!(@isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))

Which works, but why didn't it work the other way?  Is it some kind of
PHP bug?

I'm using PHP Version 4.1.2

Thanks,
Uri.


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




[PHP] Re: Uninitialized string offset

2002-07-06 Thread Uri Even-Chen

Thanks for the advice! I understand the problem now. I think they added
the Uninitialized
string offset in Version 4.1.0 (see
). That's why I didn't get this
warning before. Anyway, I think I'll just add a "@" sign to suppress
warnings. I tried it last nights and it works.

Uri.


Richard Lynch wrote:
> 
> >After upgrading to Red Hat Linux 7.3 (which also includes a new PHP
> >version), I saw this warning (Uninitialized string offset) on my apache
> >error log files. It refers to a line which was perfectly legal before:
> 
> The new settings in php.ini are error_reporting E_ALL by default.
> 
> Those errors have always been there, have always been generated, and you've
> been "ignoring" them.
> 
> >   if
> >(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName']))
> >
> >I always use isset to check if a variable is defined. Do you know why I
> >get this warning?
> 
> Best Guess:
> 
> PHP is only checking if the *LAST* array reference "isset" -- and to do
> that, *has* to assume that the others are there -- IE, that
> $GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER'] is set...
> 
> Change it to this:
> 
> if (isset($GLOBALS['SPEEDY_GLOBAL_VARS'] &&
> $GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER'] &&
> $GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName']){
> 
> --
> Like Music?  http://l-i-e.com/artists.htm



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




Re: [PHP] suppressing errors with "@"

2002-07-06 Thread Uri Even-Chen

Thanks! I also think it might be a bug. I reported it as a bug report.

Uri.


Miguel Cruz wrote:
> 
> On Sat, 6 Jul 2002, Uri Even-Chen wrote:
> > I tried to suppress warnings in isset expressions (Uninitialized string
> > offset warnings).  The original line was something like this:
> >
> > if (!(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))
> >
> > When I added the "@" sign like this:
> >
> > if (!(isset(@$GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))
> >
> > My program stopped working, and I got errors like:
> >
> > PHP Parse error:  parse error, expecting `T_VARIABLE' or `'$'' 
> >
> > Eventually, I put the "@" in this place:
> >
> > if (!(@isset($GLOBALS['SPEEDY_GLOBAL_VARS']['PAGE_NAME'])))
> >
> > Which works, but why didn't it work the other way?  Is it some kind of
> > PHP bug?
> 
> It does seem to be a disagreement with the manual:
> 
>http://www.php.net/manual/en/language.operators.errorcontrol.php
> 
> There it says that you can stick @ before a variable name.
> 
> miguel



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




[PHP] Undefined variables

2001-07-04 Thread Uri Even-Chen

To PHP-general group,


I have configured PHP to report all errors & warnings ("error_reporting
=   E_ALL" on php.ini file), but since then I get tons of warning
messages for "Undefined variables". For example, referring $HTTP_HOST
directly leads a message like "Undefined variable:  HTTP_HOST in ... on
line ...". I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] instead, but
then I get the message "Undefined index:  HTTP_HOST in ... on line ...".
How do I get rid of these messages? I also get these messages for
internal variables, cookie variables (globals) etc.


I am also interested in testing whether the user typed the URL properly,
including upper/lower case. I'm using this code to check it in the
beginning of the page:

http://dating.speedy.co.il/');
   exit;
}
?>

But, if the user enters <http://DATING.SPEEDY.CO.IL/>, this has no
effect. Is there any way to get a case sensitive version of HTTP_HOST?
(I noticed HTTP_HOST has changed since the previous version of PHP &
apache).


Thanks,

Uri Even-Chen
Speedy Software
Raanana, Israel.

Welcome to Speedy Net (In Hebrew):
   http://www.speedy.co.il/
Speedy Dating (In Hebrew):
   http://dating.speedy.co.il/
Speedy Composer (In English):
   http://www.speedy.co.il/composer/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Always global variables

2001-07-09 Thread Uri Even-Chen

To PHP-general group,


Is there a way to define specific variables as "always global", without
needing to define them as global at each function separately?  For
example, these variables are always global on my scripts, so I have to
include this line in each function:


   // Global Variables.
   global $SPEEDY_GLOBAL_VARS, $HTTP_ENV_VARS, $HTTP_GET_VARS,
$HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS;


Is there a way to define them only once globally?


Thanks,

Uri Even-Chen
Speedy Software
Raanana, Israel.

Welcome to Speedy Net (In Hebrew):
   http://www.speedy.co.il/
Speedy Dating (In Hebrew):
   http://dating.speedy.co.il/
Speedy Composer (In English):
   http://www.speedy.co.il/composer/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Conference in California

2001-07-10 Thread Uri Even-Chen

I have heard about the PHP Conference & O'Reilly Open Source Convention
in San Diego, California. Do you think it is worth being there? I saw
the prices and it's quite expensive. Not to mention the cost to get
there...

http://conferences.oreilly.com/oscon/


Thanks,

Uri Even-Chen
Speedy Software
Raanana, Israel.

Welcome to Speedy Net (In Hebrew):
   http://www.speedy.co.il/
Speedy Dating (In Hebrew):
   http://dating.speedy.co.il/
Speedy Composer (In English):
   http://www.speedy.co.il/composer/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Conference in California

2001-07-10 Thread Uri Even-Chen

Is it worth going there for the exhibit hall only? I am also interested
in the sessions & tutorials, but it looks quite expensive to participate
in them.

By the way, do you live in San Diego?

Uri.


Aaron Bennett wrote:
> 
> Well, exhibit hall is free... I'll be there.. of course, its only 10 minutes
> away. *grin*
> --
> Aaron
> 
> - Original Message -
> From: "Uri Even-Chen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 10, 2001 9:11 AM
> Subject: [PHP] PHP Conference in California
> 
> > I have heard about the PHP Conference & O'Reilly Open Source Convention
> > in San Diego, California. Do you think it is worth being there? I saw
> > the prices and it's quite expensive. Not to mention the cost to get
> > there...
> >
> > http://conferences.oreilly.com/oscon/
> >
> >
> > Thanks,
> >
> > Uri Even-Chen
> > Speedy Software
> > Raanana, Israel.
> > 
> > Welcome to Speedy Net (In Hebrew):
> >http://www.speedy.co.il/
> > Speedy Dating (In Hebrew):
> >http://dating.speedy.co.il/
> > Speedy Composer (In English):
> >http://www.speedy.co.il/composer/
> > 
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Conference in California

2001-07-11 Thread Uri Even-Chen

Does it cost money to participate in the Microsoft vs RedHat Open Source
Debate and other events, or is the entrance free? I am also interested
in participating in this event. I would also like to participate in the
entire conference, but the prices are so high... Just the General
Conference Fee is $1095 (Early Bird Prices are over), and that's even
not including the tutorials. I am not a millionaire, And no company will
pay for me (I have my own business).

Uri.


Aaron Bennett wrote:
> 
> Well the exhibit hall is free... So if you're in town, and have a day or two
> sick-leave stored up, you might want to go...
> I'm still unclear if exhibit passes get you into any of the keynotes, but
> there will be a (heated) debate with MS sr. VP Craig Mundie and RedHat's
> Michael Tiemann...
> (http://conferences.oreillynet.com/cs/os2001/view/e_sess/1834)
> 
> Unless your company will spring for it, i'd skip the PHP seminar.. at $895,
> its no cheap vacation... I personally live in the area, and am just going to
> the exhibit.. I'd like to talk with those ActiveState and ArsDigita guys..
> I'd also like to see what Roadsend.com is doing with their PHP-SiteManager..
> (www.roadsend.com). Jabber.com is also going to be there, and (from what i
> hear) they're doing some stuff with XML exchanges...
> 
> --
> Aaron
> 
> - Original Message -
> From: "Uri Even-Chen" <[EMAIL PROTECTED]>
> To: "Aaron Bennett" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 10, 2001 2:43 PM
> Subject: Re: [PHP] PHP Conference in California
> 
> > Is it worth going there for the exhibit hall only? I am also interested
> > in the sessions & tutorials, but it looks quite expensive to participate
> > in them.
> >
> > By the way, do you live in San Diego?
> >
> > Uri.
> >
> >
> > Aaron Bennett wrote:
> > >
> > > Well, exhibit hall is free... I'll be there.. of course, its only 10
> minutes
> > > away. *grin*
> > > --
> > > Aaron
> > >
> > > - Original Message -
> > > From: "Uri Even-Chen" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, July 10, 2001 9:11 AM
> > > Subject: [PHP] PHP Conference in California
> > >
> > > > I have heard about the PHP Conference & O'Reilly Open Source
> Convention
> > > > in San Diego, California. Do you think it is worth being there? I saw
> > > > the prices and it's quite expensive. Not to mention the cost to get
> > > > there...
> > > >
> > > > http://conferences.oreilly.com/oscon/
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Uri Even-Chen
> > > > Speedy Software
> > > > Raanana, Israel.
> > > > 
> > > > Welcome to Speedy Net (In Hebrew):
> > > >http://www.speedy.co.il/
> > > > Speedy Dating (In Hebrew):
> > > >http://dating.speedy.co.il/
> > > > Speedy Composer (In English):
> > > >http://www.speedy.co.il/composer/
> > > > 
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP Conference in California

2001-07-11 Thread Uri Even-Chen

It looks like the Microsoft vs RedHat Open Source Debate is part of the
summit
(http://conferences.oreillynet.com/cs/os2001/pub/w/os2001/sessions_summit.html),
in this case the price can be something around $1495 ($1295 if you have
already registered early). Looks like Mr. O'Reilly is going to make a
fortune!

Uri.
----
Uri Even-Chen
Speedy Software
Raanana, Israel.
E-mail: [EMAIL PROTECTED]
ICQ Number: 7461268
Phone Number: 09-7710730

Welcome to Speedy Net (In Hebrew):
   http://www.speedy.co.il/
Speedy Dating (In Hebrew):
   http://dating.speedy.co.il/
Speedy Composer (In English):
   http://www.speedy.co.il/composer/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]