-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Platform
Windows
Operating system version
Windows 11 (23H2 22631.3155)
System architecture
Windows
Herd Version
1.19.1
PHP Version
8.3, 8.4
Bug description
I'm using Herd for a vanilla PHP project, and have added the following lines to php.ini
to automatically put my opening and closing HTML on each rendered page:
herd_auto_prepend_file = C:/Users/MY_USERNAME/path/to/project/wrapper-open.php
herd_auto_append_file = C:/Users/MY_USERNAME/path/to/project/wrapper-close.php
wrapper-open.php
works as expected, but wrapper-close.php
is not appended.
I have also tried using auto_append_file
without herd_
, which doesn't work either.
Any assistance to get this to work would be much appreciated :)
Steps to reproduce
- Create a project with three PHP files:
wrapper-open.php
,wrapper-close.php
,my-page.php
(e.g., in a folder calledsample-project
) and add some simple HTML to them (example attached) - Add the project as a Herd site
- Open the
php.ini
file for the current global PHP version - Add the following with the paths updated to match your system:
herd_auto_prepend_file = C:/Users/MY_USERNAME/path/to/project/wrapper-open.php
herd_auto_append_file = C:/Users/MY_USERNAME/path/to/project/wrapper-close.php
- Visit https://sample-project.test/my-page.php
- Observe that the content of
wrapper-open.php
andmy-page.php
are shown in the browser, butwrapper-close.php
is not.