Opened 6 years ago

Closed 6 years 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/ -buildfile '/Users/bas/Documents/Projects/Lumasol/")

[00;36mBuildfile: /Users/bas/Documents/Projects/Lumasol/[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/][m

Fatal error: require_once(): Failed opening required 'System.php' (include_path='/Users/bas/Documents/Projects/Lumasol/') in /Users/bas/Documents/Projects/Lumasol/ 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/ -buildfile '/Users/bas/Documents/Projects/Lumasol/'

Attachments (0)

Change History (4)

comment:1 Changed 6 years 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 6 years ago by mrook

  • Milestone changed from 2.4.10 to TBD

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

comment:3 Changed 6 years 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 6 years ago by mrook

  • Resolution set to invalid
  • Status changed from assigned to closed

Ok, thanks for the feedback!

Add Comment

Modify Ticket

as closed The owner will remain mrook.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.