php-general Digest 8 Sep 2010 16:08:03 -0000 Issue 6930

Topics (messages 307882 through 307887):

Re: logical AND assignments
        307882 by: Paul M Foster

Re: PHP list posting confirmation for [email protected]
        307883 by: STANFIELD, VICKI CTR DFAS
        307885 by: tedd
        307886 by: STANFIELD, VICKI CTR DFAS

Recall: PHP list posting confirmation for [email protected]
        307884 by: STANFIELD, VICKI CTR DFAS

Filestat.c erorrs when building php-5.3.3 on solaris
        307887 by: STANFIELD, VICKI CTR DFAS

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 ---
On Tue, Sep 07, 2010 at 10:41:46PM -0400, Robert E. Glaser wrote:

> My ISP upgraded his server from Ubuntu 9.04 to Ubuntu 9.10, which
> probably included a newer PHP version.  I don't know what PHP version
> was on previously.  Code I've had running for years broke, and I tracked
> it down to this equivalent:
> 
> <?php
> 
> echo 'Current PHP version: ', phpversion(), "<br><br>";
> 
> $Condition0 = true and false;
> If ($Condition0)
>       echo "Condition0<br>";
>       else echo "Not Condition0<br>";
> 
> $Condition1 = false and true;
> If ($Condition1)
>       echo "Condition1<br>";
>       else echo "Not Condition1<br>";
> 
> $Condition2 = (true and false);
> If ($Condition2)
>       echo "Condition2<br>";
>       else echo "Not Condition2<br>";
> 
> $Condition3 = true && false;
> If ($Condition3)
>       echo "Condition3<br>";
>       else echo "Not Condition3<br>";
> 
> $Condition4 = (true && false);
> If ($Condition4)
>       echo "Condition4<br>";
>       else echo "Not Condition4<br>";
> ?>
> 
> which returns:
> 
> Current PHP version: 5.2.10-2ubuntu6.4
> 
> Condition0
> Not Condition1
> Not Condition2
> Not Condition3
> Not Condition4
> 
> ===============================
> 
> I added parentheses around the offending line of code and it seems okay
> now.  But I am stymied as to why they're required at all.  They never
> were before, and as far as I see there is no PHP requirement to include
> the parentheses.  Have I done something silly?        Mostly I'm worried if
> there are any other changes I need to make.  I searched my code and
> hopefully found all similar instances, but who really knows about those
> kinds of things?
> 
> Any comments?

I can't tell what (if anything) changed or why. But the problem appears
to rest with the fact that "&&" is higher precedence than "=", and "and"
is lower precedence. Here are two references:

http://us.php.net/manual/en/language.operators.logical.php

http://us.php.net/manual/en/language.operators.precedence.php

It's tricky, I'll admit. Since I normally mean for things I'm logically
"anding" to be "anded" before any other operation, it's forced me to
change almost all my "ands" to "&&". Just so I don't make a mistake.

Also note the "associativity" in the second reference.

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
I am trying to build php-5.3.3 and getting the following error: 

/users/03333/php-5.3.3/TSRM -I/users/cin05038/php-5.3.3/Zend
-I/usr/local/include -g -O2 -DZTS   -c
/users/03333/php-5.3.3/ext/standard/filestat.c -o
ext/standard/filestat.lo 
/users/03333/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chgrp':
/users/03333/php-5.3.3/ext/standard/filestat.c:416: error: too many
arguments to function `getgrnam_r'
/users/03333/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chown':
/users/03333/php-5.3.3/ext/standard/filestat.c:517: error: too many
arguments to function `getpwnam_r'
make: *** [ext/standard/filestat.lo] Error 1

I have set my ORACLE_HOME, my PATH, and my LD_LIBRARY_PATH
And used the following configure command:

./configure --prefix=/app/php532 --with-apxs2=/app/apache2215/bin/apxs
--with-zlib --with-zlib-dir=/usr/lib --with-png-dir=/usr/include/libpng
--with-openssl=/shared_ro/openssl_098
--with-oci8=/shared_ro/users.oracle/11.1.0

I have tried the make that came on Solaris 10 and gmake and get the same
error either way. Can anyone give me a hint as to what I am doing wrong
in this build?

  -Vicki Stanfield, RHCE, CISSP
Web Management Group


--- End Message ---
--- Begin Message ---
At 9:03 AM -0400 9/8/10, STANFIELD, VICKI CTR DFAS wrote:
I am trying to build php-5.3.3 and getting the following error:


And what does the Subject line say about your problem? Absolutely nothing!

Please understand that these Q&A's are kept in the archives for others to read, review, and resolve their problems.

You will do much better at getting your question answered by following normal practices for most all list servers. IOW, briefly describe your problem in the subject line and submit your problem.

Cheers,

tedd

--
-------
http://sperling.com/

--- End Message ---
--- Begin Message ---
That was a mistake. My apologies. I meant to change the Subject line
before hitting send.

  -Vicki Stanfield, RHCE, CISSP
Web Management Group
[email protected]

Defense Finance and Accounting Service
Technical Services Organization - Corporate Services
[email protected]
(317)510-3375

-----Original Message-----
From: tedd [mailto:[email protected]] 
Sent: Wednesday, September 08, 2010 9:22 AM
To: STANFIELD, VICKI CTR DFAS; [email protected]
Subject: [PHP] RE: PHP list posting confirmation for
[email protected]

At 9:03 AM -0400 9/8/10, STANFIELD, VICKI CTR DFAS wrote:
>I am trying to build php-5.3.3 and getting the following error:


And what does the Subject line say about your problem? Absolutely
nothing!

Please understand that these Q&A's are kept in the archives for 
others to read, review, and resolve their problems.

You will do much better at getting your question answered by 
following normal practices for most all list servers. IOW, briefly 
describe your problem in the subject line and submit your problem.

Cheers,

tedd

-- 
-------
http://sperling.com/

--- End Message ---
--- Begin Message ---
STANFIELD, VICKI CTR DFAS would like to recall the message, "PHP list posting 
confirmation for [email protected]".

--- End Message ---
--- Begin Message ---
I am trying to build php-5.3.3 and getting the following error: 

/users/03333/php-5.3.3/TSRM -I/users/03333/php-5.3.3/Zend
-I/usr/local/include -g -O2 -DZTS   -c
/users/03333/php-5.3.3/ext/standard/filestat.c -o
ext/standard/filestat.lo 
/users/03333/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chgrp':
/users/03333/php-5.3.3/ext/standard/filestat.c:416: error: too many
arguments to function `getgrnam_r'
/users/03333/php-5.3.3/ext/standard/filestat.c: In function
`php_do_chown':
/users/03333/php-5.3.3/ext/standard/filestat.c:517: error: too many
arguments to function `getpwnam_r'
make: *** [ext/standard/filestat.lo] Error 1

I have set my ORACLE_HOME, my PATH, and my LD_LIBRARY_PATH
And used the following configure command:

./configure --prefix=/app/php533 --with-apxs2=/app/apache2215/bin/apxs
--with-zlib --with-zlib-dir=/usr/lib --with-png-dir=/usr/include/libpng
--with-openssl=/shared_ro/openssl_098
--with-oci8=/shared_ro/users.oracle/11.1.0

I am using gmake 3.80. Can anyone give me a hint as to what I am doing
wrong in this build?

  -Vicki Stanfield, RHCE, CISSP

--- End Message ---

Reply via email to