1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

19 Commits

Author SHA1 Message Date
Niels Dossche
b32a2a55ef Fixes to phar stub (#10706)
* Fixes to phar stub

There were a couple of issues with the phar stub. It seems that in the
past people did not realise they had to change shortarc.php and run
makestub.php to generate the stubfile and instead they modified stub.h
manually. This meant that there were a couple of mistakes in the stub
which are fixed in this patch. In particular:

* The title tag was not closed
* The length of the stub was wrong in stub.h
* This PR syncs previous changes to stub.h back to shortarc.php
  and vice versa.
* Adds a note such that hopefully no mistakes against updating the stubs
  are made in the future (hopefully).
* The makestub.php script was actually broken because the expected
  signature of the stub got changed in b874f1a73d

* Verify that the phar stub is up-to-date in CI

* Update stub again after master changes

* size_t changes

* Update test after stub changes (canonical casts)

---------

Co-authored-by: Joe Watkins <krakjoe@php.net>
2025-10-01 17:19:37 +02:00
Gina Peter Banyard
1e0c8baf05 tree: drop non canonical casts and ZPP tests 2025-08-06 13:20:28 +01:00
peter279k
ba0913a2e5 Fix undefined variable, and remove unused test-pdo 2019-05-03 18:14:32 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Stanislav Malyshev
73ca9b3773 Fix bug #74782: remove file name from output to avoid XSS 2018-01-01 19:51:02 -08:00
Steph Fox
f08aea109b - IS_UNICODE checks and conversions
- stub and creation file updates
- far too many test updates to think about
2008-05-19 19:05:42 +00:00
Steph Fox
c1ae13b985 - Make internal code back-compatible. This included a binary cast in the default stub, hence many test updates.
- Just over a third of tests pass. Test manifests are broken currently.
2008-05-14 21:27:31 +00:00
Greg Beaver
0262e844c4 implement full support and usage of phar stream in include_path, for both 5.2 and 5.3.
5.3 code expects the proposed patch for stream wrapper in include_path to be committed
5.2 code only supports phar stream wrapper in include_path.
this is a 2-step process.  After this, more magic, particularly in funcinterceptors.c will be
converted to use phar_resolve_path, which is far safer than the current implementation.

this needs windows and 5.2 testing unix/windows
2008-03-12 03:55:12 +00:00
Steph Fox
cf9bbcc2e6 Satisfy the pedants :) 2008-02-21 14:48:41 +00:00
Steph Fox
7bb00d024e Allow createDefaultStub() to accept 0, 1 or 2 parameters. Default for both CLI and web is 'index.php'.
@Greg: this breaks a handful of tests due to the change in stub.h - will fix in a bit. The only one that's interesting is you can't do strlen(Phar::createDefaultStub()) and expect anything other than an exception now.
2008-02-18 21:45:02 +00:00
Steph Fox
76640a615f - One last tweak (so Phar and no-phar work the same again now)
- Bunch of test fixes
- Note: I added a silencer to the unlink() call in zip/tarmaker to avoid system warnings here. If this messes up tests elsewhere we'll need to re-think.
2008-01-29 11:58:27 +00:00
Steph Fox
182519877b Job done. 2008-01-29 09:45:11 +00:00
Steph Fox
7e85b150a6 Rock'n'roll... just php includes to figure out now. 2008-01-29 07:10:22 +00:00
Steph Fox
a6abbfd55d 'It works on my box'.
Please test.
2008-01-28 21:23:02 +00:00
Steph Fox
6f95353e77 - Added is_writable() check on temp directory
- Regenerated stub and tests/nophar.phar
- Fixed tests
2008-01-26 00:12:00 +00:00
Steph Fox
ddc051cebe - Rewrite stub to take up slightly less space
- Fix tests
- Test phars should probably be regenerated, although only one fails here currently (nophar.phar in web context)
2008-01-25 17:26:18 +00:00
Greg Beaver
117f5e2639 add web-based support for default stub, now phars written with webPhar() will work
out of the box regardless of server configuration with phar file format
split up stub.h strings into 2046 byte chunks because MS VC 6 is friggin stupid
2008-01-20 00:49:45 +00:00
Greg Beaver
d583fae0cc add Phar::createDefaultStub(), which can take as an argument the filename
that should be loaded as a "bootstrap" for the phar archive
2008-01-19 04:26:22 +00:00
Greg Beaver
7540adf058 major improvement:
the new default stub allows creation of phars that run identically
1) with Phar extension
2) without Phar extension
3) extracted to disk from the phar
this makes the default phar format quite interesting as it eliminates the only drawback of the extension
2008-01-18 05:42:16 +00:00