php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21126 returncodes in shell $? aren't correct
Submitted: 2002-12-20 20:02 UTC Modified: 2002-12-20 20:03 UTC
From: Peter dot Valicek at Sun dot COM Assigned:
Status: Closed Package: Output Control
PHP Version: 4.2.2 OS: Solaris 9 - Sparc
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Peter dot Valicek at Sun dot COM
New email:
PHP Version: OS:

 

 [2002-12-20 20:02 UTC] Peter dot Valicek at Sun dot COM
Hello,

there is something wrong with the exitcodes in PHP. I use it instead of Perl for some shellscript addons. I need the exitcodes for sendmail.

Example:
********
<? exit(); ?>
Return as exitcode 0 which is ok.

<? exit(79); ?>
Return as exitcode 255 which isn't ok.

<? exit("79"); ?>
Print out 79 and return exitcode 255, which isn't ok as well.


Here my configure:
****************
'./configure' '--prefix=/www-1/src/php' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/usr/local/apache/conf/' '--enable-versioning' '--with-mysql=/usr/local/mysql' '--enable-ftp' '--enable-bcmath' '--disable-debug' '--enable-memory-limit=yes' '--enable-track-vars' '--enable-calendar' '--enable-force-cgi-redirect' '--enable-libgcc' '--enable-trans-sid' '--with-java=/usr/java' '--enable-yp' '--enable-sysvsem' '--enable-sysvshm' '--with-zlib=/sw/es-tools/' '--with-gd=/sw/es-tools/' '--with-system-regex' '--with-jpeg-dir=/sw/es-tools/pkg/jpeg-6b/' '--with-tiff-dir=/sw/es-tools/pkg/tiff-3.5.7/' '--with-ldap=/usr/local/' '--with-db3=/usr/local/BerkeleyDB.3.3/' '--enable-cli'

I don't  think that a backtrace should help here. If yes, please contact me.

Thx in forward.

Peter


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-20 20:03 UTC] cynic@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 18:03:33 2022 UTC