Embeder uses the phpembed
SAPI from PHP inorder to embed a version of PHP into itself.
From there is uses win32std
to access a PHP file and run it from it's internal res.
Currently, there is one major limitation: It does not embed PHP completely, rather it ouputs PHP into a DLL, as of now called php5ts.dll
This is the same for extensions, shared ones must be loaded via php-embed.ini
You'll need:
- Microsoft Visual Studio 2012+ (2010 might work)
- PHP Source code w/ it being compilied
- Download this repo.
- Open up
src/embeder.sln
- Modify the projects includes/libs path to reflect your php source location (must be compilied with atleast
--enable-embed
) - Run
make_embeder.cmd
Includes: Project > embeder Properties > Configuration Properties > VC++ Directories > Include Directories
Libraries: Project > embeder Properties > Configuration Properties > VC++ Directories > Library Directories
Modify php-embed.ini
[PHP]
extensions_dir='./'
extension=php_someextension.dll
You're using an old version, afxres.h
has been replaced by winres.h
Eric Colinet - For the original concept & code!
RainbowDashDC - Mantaining the project, improving the features, and more!