Bug #52322 [Com]: webPhar acting like not running in webpage
Edit report at http://bugs.php.net/bug.php?id=52322&edit=1
ID: 52322
Comment by: panman at traileyes dot com
Reported by: myselfasunder at gmail dot com
Summary: webPhar acting like not running in webpage
Status: Open
Type: Bug
Package: PHAR related
Operating System: Windows 7
PHP Version: 5.2.13
Block user comment: N
Private report: N
New Comment:
I noticed that you listed the PHP version as 5.2.13. The Phar::webPhar()
wasn't introduced until PHP 5.3.
http://www.php.net/manual/en/phar.webphar.php
Previous Comments:
------------------------------------------------------------------------
[2010-07-12 23:03:03] myselfasunder at gmail dot com
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 this bug report at http://bugs.php.net/bug.php?id=52322&edit=1
Thread (9 messages)