Bug #52322 [NEW]: webPhar acting like not running in webpage

From: Date: Mon, 12 Jul 2010 21:03:05 +0000
Subject: Bug #52322 [NEW]: webPhar acting like not running in webpage
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-152330@lists.php.net to get a copy of this message
From:             
Operating system: Windows 7
PHP version:      5.2.13
Package:          PHAR related
Bug Type:         Bug
Bug description:webPhar acting like not running in webpage

Description:
------------
I'm using an Apache alias to map "/" to my Phar, and the webPhar() call
acts as if it was run from the CLI.

Test script:
---------------
My setStub() call looks like:

$phar->setStub('<?php
Phar::interceptFileFuncs();
Phar::webPhar("TestPhar.phar", "TestPhar/index.php");
echo "I am intended to be executed from a web browser: " . php_sapi_name()
. "\n";
exit -1;
__HALT_COMPILER();
');

Apache's alias:

  Alias / C:/Development/webdir/vhosts/phartest/TestPhar.phar



Expected result:
----------------
"I am index."

Actual result:
--------------
I am intended to be executed from a web browser: apache2handler

(*notice that PHP still recognizes that we're running under Apache. Why
doesn't webPhar()?)

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52322&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=52322&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=52322&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=52322&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=52322&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52322&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=52322&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=52322&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=52322&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=52322&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=52322&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=52322&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=52322&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=52322&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=52322&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52322&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52322&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=52322&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=52322&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=52322&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=52322&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=52322&r=mysqlcfg



Thread (9 messages)

« previous php.bugs (#152330) next »