google-code-backups / xinc

Automatically exported from code.google.com/p/xinc
0 stars 0 forks source link

Phing - PHPLint Task fails to run within Xinc #196

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup a project in Xinc which contains any number of php files.
2. Create simple build.xml which only performs a PHPLint task
3. Run Xinc.

What is the expected output? What do you see instead?

Expected output is PHPLint test results, instead for every php file in the
project which a lint is attempted on, the following is output:

sh: php: command not found

What version of the product are you using? On what operating system?

Setup is as follows:

Xinc:  2.0.0b196
Phing: 2.3.3
OS:    CentOS release 5.2 (Final)
Architecture:  2.6.18-92.el5 #1 SMP x86_64
PHP: PHP 5.2.5 (cli) (built: Apr 15 2009 10:13:23) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Xdebug v2.0.4, Copyright (c) 2002-2008, by Derick Rethans

Xinc Settings: 
Section:       xinc

version        = 2.0.0b196
etc            = /etc/xinc
etc_conf_d     = /etc/xinc/conf.d
dir            = /var/xinc
status_dir     = /var/xinc/status
project_dir    = /var/xinc/projects
www_dir        = /var/www/xinc
www_port       = 80
www_ip         = XXX.XXX.XXX.XXX
log_dir        = /var/log
tmp_dir        = /tmp/xinc

Section:       web
title          = DS Build System
ohloh          = 0

Section:       googleanalytics
-No values-

Section:       phing
path           = /usr/local/bin/phing

Section:       php
path           = /usr/local/bin/php

The 'php' section in my xinc-settings was an attempt to manually specify
the path to php in hopes of resolving this issue, but that did not work.

I have var_dump'ed the command that the Phing plugin is using to fire off
its tasks within build() in Phing.php on line 137.  Using this command, I
setup a test php script which only contains an exec call.  Manually
entering an sh shell and running this script does not result in any errors,
the PHPLint task is fired off via Phing and runs as expected.

Also, manually calling phing directly with the same build.xml file results
in the expected output for PHPLint.

Original issue reported on code.google.com by FarSide...@gmail.com on 21 Apr 2009 at 3:21

GoogleCodeExporter commented 8 years ago
Forgot to mention, specifying the interpreter manually within the Phing PHPLint 
task
will resolve this, however, that seems like a work-around and not a fix, as it 
makes
the Phing build scripts less portable and as previously mentioned, the PHPLint 
task
works fine when run manually via phing.

Original comment by FarSide...@gmail.com on 23 Apr 2009 at 8:34

GoogleCodeExporter commented 8 years ago

Original comment by apshoema...@gmail.com on 25 Apr 2009 at 4:40

GoogleCodeExporter commented 8 years ago
FarSide: Can you post your build.xml please?

Original comment by opitz.al...@googlemail.com on 20 Aug 2011 at 10:35

GoogleCodeExporter commented 8 years ago

Original comment by opitz.al...@googlemail.com on 1 Oct 2011 at 11:16

GoogleCodeExporter commented 8 years ago
No response and I have no problem with phplint and phing

Original comment by opitz.al...@googlemail.com on 7 Aug 2013 at 10:22

GoogleCodeExporter commented 8 years ago
Using a fresh install of Xinc 2.2 and Phing 2.5.0 then modifying the default 
SimpleProject's build.xml to utilize phplint results in the error, "sh: phing: 
command not found".  The modified build.xml is attached.  Environment is CentOS 
5.6 and PHP 5.3.2.

Original comment by adam.j.s...@gmail.com on 7 Aug 2013 at 2:26

Attachments:

GoogleCodeExporter commented 8 years ago
Ugh, ignore that previous comment.  Should have had my coffee before leaving a 
comment this morning.  That problem was because I did not specify the phing 
path in Xinc's ini Configuration.  The original issue reported regarding the 
error "sh: php: command not found" does not appear to be an issue with xinc 2.2.

Original comment by adam.j.s...@gmail.com on 7 Aug 2013 at 2:50