#43565 [NEW]: the alternative IF syntax doesnt work with echo

2007-12-11 Thread peter at 3p1 dot net
From: peter at 3p1 dot net
Operating system: linux
PHP version:  5.2.5
PHP Bug Type: Compile Failure
Bug description:  the alternative IF syntax doesnt work with echo

Description:

// Try this
$meta = array();
$meta['foo'] = 'bar';
$meta['foo2'] = 'bar2';

//-- THIS DOES NOT WORK -- 
($meta['foo']) ? print $meta['foo']  : echo ($meta['foo2']);

//-- THIS DOES WORKS -- 
($meta['foo']) ? print $meta['foo']  : print ($meta['foo2']);

Reproduce code:
---
// Try this
$meta = array();
$meta['foo'] = 'bar';
$meta['foo2'] = 'bar2';

//-- THIS DOES NOT WORK -- 
($meta['foo']) ? print $meta['foo']  : echo ($meta['foo2']);

//-- THIS DOES WORKS -- 
($meta['foo']) ? print $meta['foo']  : print ($meta['foo2']);


-- 
Edit bug report at http://bugs.php.net/?id=43565&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43565&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43565&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43565&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43565&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43565&r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=43565&r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=43565&r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=43565&r=needscript
Try newer version:http://bugs.php.net/fix.php?id=43565&r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=43565&r=support
Expected behavior:http://bugs.php.net/fix.php?id=43565&r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=43565&r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=43565&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43565&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43565&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43565&r=dst
IIS Stability:http://bugs.php.net/fix.php?id=43565&r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=43565&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43565&r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=43565&r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=43565&r=mysqlcfg


#16263 [Com]: session.start() create new empty session file and not resume existing session

2007-08-22 Thread peter at 3p1 dot net
 ID:   16263
 Comment by:   peter at 3p1 dot net
 Reported By:  kur at natur dot cuni dot cz
 Status:   No Feedback
 Bug Type: Session related
 Operating System: ANY
 PHP Version:  4.3.0-dev
 New Comment:

hELLo i use php 5.1 and still experience this bug


Previous Comments:


[2007-08-03 13:17:26] shivam dot honey at gmail dot com

Hi Every one.
My name is shivam.
Thanks for the suggestion i tried it and now its not giving me any
error just simply printing mail sent successfully

But i m "NOT" getting the mail delivered to the recipient account

my new php.ini mail setting are

[mail function]
SMTP = smtp.cc.iitk.ac.in
sendmail_from = [EMAIL PROTECTED]

; For Unix only.  You may supply arguments as well (default: 'sendmail
-t -i').
sendmail_path = /usr/local/sbin/sendmail -t -i

and my code is

Mail sent successfully.'); 
} else {
 echo('Mail could not be sent.');
}
?>


Now i m just wondering if
1. my mail settings are not correct or 
2. my smtp server is not forwarding the mail or
3. the reciepient server is not excepting the mail

can anyone HELP me!!!
Please do mention ur name would b easy to address.
Thanks in advance



[2007-08-01 16:58:52] breda at unisolution dot de

I had the same problem with IIS (version? from XP Pro) and PHP 5.2.3. I
changed the session.save_path to a simple path without weird windows
short form (like PROGRA~1 and so on) and reinstalled php with the
windows php installer and it works now.



[2007-07-24 06:39:48] shivam dot honey at gmail dot com

Windows XP Professional Service Pack 2, v.2096 (build 2600)
Internet Explorer 6
Php triad
   Php 4.1.1
   Apache 1.3.23

I have changed the php.ini file in my default folder C:\apache\php
 i.e., SMTP = smtp.cc.iitk.ac.in(my mail server in iitk,india) &
   sendmail_from = [EMAIL PROTECTED] (my e-mail id)

The code i am using is simple



Everything seems to be fine but i am getting an error -->

Warning: Server Error in c:\apache\htdocs\experiment\e-mail.php on
line
2

where, as i am able to send mails from my outlook account using the
same
mail server.


Please someone listen i got some serious problem,i gotta show it to
someone!!!
Please reply me at [EMAIL PROTECTED]



[2007-07-22 15:59:07] shivam dot honey at gmail dot com

Windows XP Professional Service Pack 2, v.2096 (build 2600)
Internet Explorer 6
Php triad
   Php 4.1.1
   Apache 1.3.23

I have changed the php.ini file in my default folder C:\apache\php
 i.e., SMTP = smtp.cc.iitk.ac.in(my mail server in iitk,india) &
   sendmail_from = [EMAIL PROTECTED] (my e-mail id)

The code i am using is simple




Everything seems to be fine but i am getting an error -->

Warning: Server Error in c:\apache\htdocs\experiment\e-mail.php on line
2


where, as i am able to send mails from my outlook account using the
same mail server.

Please Help!!! me out.
Please!



[2007-07-10 14:48:23] ponas dot termas at gmail dot com

Win XP
IE 7
PHP 5.2.3
Apache 2.2

Suggested sollutions not helped. When I am using site as
http://localhost/site it works well, session resumed.
When I am using site using computer name (externally)
http://computer_name/site, session is not resumed and separate files are
created for it.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/16263

-- 
Edit this bug report at http://bugs.php.net/?id=16263&edit=1