Opened 14 months ago
Closed 14 months ago
#871 closed defect (invalid)
Calling bin/phing with exec from apache environment causes fatal error
| Reported by: | bas@… | Owned by: | mrook |
|---|---|---|---|
| Priority: | major | Milestone: | Icebox |
| Component: | phing-core | Version: | 2.4.9 |
| Keywords: | Cc: |
Description (last modified by mrook)
problem When calling phing from a script executed within Apache context (no PATH to PEAR) a fatal error occurs.
exec("/Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/vendor/phing/bin/phing -buildfile '/Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/application/../data/phing-build-files/buildPackage.xml")
[00;36mBuildfile: /Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/application/../data/phing-build-files/buildPackage.xml[m [01;35m[PHP Error] require_once(System.php): failed to open stream: No such file or directory [line 19 of /Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/vendor/phing/classes/phing/tasks/ext/rSTTask.php][m
Fatal error: require_once(): Failed opening required 'System.php' (include_path='/Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/vendor/phing/classes:.:') in /Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/vendor/phing/classes/phing/tasks/ext/rSTTask.php on line 19
workaround However a workaround seems to exists...
When the PHP_COMMAND environment variable is defined the (empty) buildfile does run
export PHP_COMMAND=/opt/local/bin/php && \ /Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/vendor/phing/bin/phing -buildfile '/Users/bas/Documents/Projects/Lumasol/store.lumasol.nl/src/application/../data/phing-build-files/buildPackage.xml'
Attachments (0)
Change History (4)
comment:1 Changed 14 months ago by mrook
- Description modified (diff)
- Milestone changed from TBD to 2.4.10
- Priority changed from tbd to major
- Status changed from new to assigned
comment:2 Changed 14 months ago by mrook
- Milestone changed from 2.4.10 to TBD
comment:3 Changed 14 months ago by bas@…
Hmm, I can't reproduce it myself either any more. I figured I had solved it be added some ENVIRONEMNT VARS. However a command link such as this now runs flawlessly...
/Users/bas/Sandbox/ZendSkeletonApplication/vendor/PhingService/vendor/phing/bin/phing -buildfile '/Users/bas/Sandbox/ZendSkeletonApplication/vendor/PhingService/data/build-example.xml' \
-logger 'phing.listener.HtmlColorLogger' \ show-defaults dist 2>&1
Thought I needed the PHP path at least, but apparently not...
export PHP_COMMAND=/usr/bin/php && \ export PHING_HOME=/Users/bas/Sandbox/ZendSkeletonApplication/vendor/PhingService/vendor/phing && \ export PHP_CLASSPATH=${PHING_HOME}/classes && \ export PATH=${PATH}:${PHING_HOME}/bin && \ /Users/bas/Sandbox/ZendSkeletonApplication/vendor/PhingService/vendor/phing/bin/phing -buildfile '/Users/bas/Sandbox/ZendSkeletonApplication/vendor/PhingService/data/build-example.xml' \
-logger 'phing.listener.HtmlColorLogger' \ show-defaults dist 2>&1
comment:4 Changed 14 months ago by mrook
- Resolution set to invalid
- Status changed from assigned to closed
Ok, thanks for the feedback!

I'm having trouble reproducing this; can you give me more details about your setup and the build file you are using?