I got the "Exception: error=13, Permission denied" error when I tried to run a phing target

I tried to use phing in phpstorm but I got the following exception:

I cannot run program "/home/jtonic/development/tools/phing" (in directory "/home/jtonic/git/configfiles/phpstorm/LearningPhpMysqlJs"): java.io.IOException: error=13, Permission denied

I successfuly run phing from terminal window.

$ cd /home/jtonic/git/configfiles/phpstorm/LearningPhpMysqlJ

$ phing deploy
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
Buildfile: /home/jtonic/git/configfiles/phpstorm/LearningPhpMysqlJs/build.xml

php > deploy:

     [echo] deploying...

BUILD FINISHED

Total time: 0.0994 seconds


I have the following conf in ~/.bashrc
export PHING_HOME=~/development/tools/phing
export PATH=$PATH:$PHING_HOME/bin
export PHING_CLASSPATH=~/development/tools/phing/classes
export PHP_CLASSPATH=$PHING_CLASSPATH


build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="php" default="deploy" basedir=".">
    <target name="deploy">
        <echo message="deploying..."/>
    </target>
</project>

Env:
PHP 5.3.10-1ubuntu3 with Suhosin-Patch (cli) (built: Apr 11 2012 17:38:30)
PhpStorm 4.0.1
Linux Ubuntu 12.0.4 LTS 32 bits
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) Server VM (build 20.4-b02, mixed mode)
Phing 2.4.12


Attachment(s):
phpstrom_about.png
phing-settings.png
phing-permissiondenied.png
5 comments
Comment actions Permalink

Is phing file executable for IDE user? Terminal works under your user, I suppose.

0
Comment actions Permalink

I have the following directory permissions:

A. PhpStorm

jtonic@jtonic-laptop:~$ ll ~/development/IDE/Jetbrains/PhpStorm-4.0/
total 36
drwxrwxr-x  7 jtonic jtonic 4096 Apr 17 23:50 ./
drwxr-xr-x  9 jtonic jtonic 4096 Apr 17 23:53 ../
drwxrwxr-x  2 jtonic jtonic 4096 Apr 17 23:50 bin/
-rwxr--r--  1 jtonic jtonic   10 Apr 25 22:36 build.txt*
drwxrwxr-x  2 jtonic jtonic 4096 Apr 17 23:50 help/
-rw-r--r--  1 jtonic jtonic 1596 Apr 17 12:06 Install-Linux-tar.txt
drwxrwxr-x  3 jtonic jtonic 4096 Apr 17 23:50 lib/
drwxrwxr-x  2 jtonic jtonic 4096 Apr 17 23:50 license/
drwxrwxr-x 38 jtonic jtonic 4096 Apr 17 23:50 plugins/


B. Project directory


jtonic@jtonic-laptop:~$ ll ~/git/configfiles/phpstorm/LearningPhpMysqlJs/
total 28
drwxrwxr-x 3 jtonic jtonic 4096 Apr 28 16:18 ./
drwxrwxr-x 3 jtonic jtonic 4096 Apr 17 23:30 ../
-rw-rw-r-- 1 jtonic jtonic  180 Apr 28 14:12 build.xml
-rw-rw-r-- 1 jtonic jtonic 1074 Apr 21 18:22 ch5.php
-rw-rw-r-- 1 jtonic jtonic  268 Apr 28 16:18 ch9.php
drwxrwxr-x 4 jtonic jtonic 4096 Apr 28 17:55 .idea/
-rwxr-xr-x 1 jtonic jtonic   21 Apr 28 16:13 info.php*


C. Phing directory


jtonic@jtonic-laptop:~$ ll ~/development/tools/phing/
total 88
drwxrwxr-x 7 jtonic jtonic  4096 Apr 28 13:34 ./
drwxr-xr-x 8 jtonic jtonic  4096 Apr 28 13:34 ../
drwxrwxr-x 2 jtonic jtonic  4096 Jan  1  1970 bin/
-rw-r--r-- 1 jtonic jtonic 40099 Apr  6 21:42 CHANGELOG.md
drwxrwxr-x 3 jtonic jtonic  4096 Jan  1  1970 classes/
-rw-r--r-- 1 jtonic jtonic   624 Apr  6 21:42 composer.json
-rw-r--r-- 1 jtonic jtonic  1777 Apr  6 21:42 CREDITS.md
drwxrwxr-x 5 jtonic jtonic  4096 Jan  1  1970 docs/
drwxrwxr-x 2 jtonic jtonic  4096 Jan  1  1970 etc/
-rw-r--r-- 1 jtonic jtonic  7639 Apr  6 21:42 LICENSE
-rw-r--r-- 1 jtonic jtonic  2322 Apr  6 21:42 README.md
drwxrwxr-x 5 jtonic jtonic  4096 Jan  1  1970 test/



and I am running the phing in project directory as jtonic user (current user)


jtonic@jtonic-laptop:~/git/configfiles/phpstorm/LearningPhpMysqlJs$ phing
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
Buildfile: /home/jtonic/git/configfiles/phpstorm/LearningPhpMysqlJs/build.xml

php > deploy:

[echo] deploying...

BUILD FINISHED

Total time: 0.0980 seconds

Regards

jtonic

0
Comment actions Permalink

In settings should be provided path to phing executable, not phing home. Please, change /home/jtonic/development/tools/phing/ to /home/jtonic/development/tools/phing/bin/phing

0
Comment actions Permalink

It works now. Thank you Elena.

One more (in fact two) question.
- I didn't find phing configuration in Settings (Ctrl+Alt+S) in project section. The only way to setup (reconfigure) phing is through Phing Build View > Settings. Am I missed it, or there is no such config in project settings?
- Moreover, I did open the PHP project (created with PhpStorm 4.0.1) in IntelliJ Idea Ultimate Edition 11.1.1 (with PHP plugin installed and updated to last version) and I didn't find the option to load build.xml as Add as Phing Build File (only add as Ant File is enabled). I wonder why is add as ant file enabled in IntelliJ Idea (the project was created with PhpSorm, and IMO this means setting the "PHP nature" to project). Is there a way to get the build.xml loaded in Phing view in intellij idea ultimate 11.1.1?

Thank you in advance

Best regards

0
Comment actions Permalink

- There is no phing settings in Settings. Currently.
- Phing support is in Phing plugin, not in Php plugin. But it is bundled by default in PhpStorm. In IDEA you need to install it in plugin manages in Settings.

0

Please sign in to leave a comment.