PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, February 17, 2022

[FIXED] PHPUnit runs on Terminal but not in NetBeans

 February 17, 2022     mamp, netbeans, php, terminal, unix     No comments   

Issue

I'm running Mac OS X 10.6 w/ bitnami mampstack 5.4.11 (PHP 5.4.11) and NetBeans 7.2.1. Since I've switched from XAMPP (for Mac) w/ PHP 5.3.x to 5.4+ NB can't use PHPUnit or any other bash script. PHPUnit is up and running and works like a charm via Terminal. But in NB I get this:

/Applications/mampstack-5.4.11/php/bin/phpunit: line 2: ?php: No such file or directory

Looks like php didn't interprete the actual php code ... I've no idea why this happens and how to fix this.

Some setup details:

  • My mampstack is located at /Applications/mampstack-5.4.11/
  • php interpreter is set to /Applications/mampstack-5.4.11/php/bin/php within NB config
  • include paths are set and working in php as well as in NB
  • path to php binary within PHPUnit bash script is correct (/Applications/mampstack-5.4.11/php/bin/php)
  • none of the scripts that go like #!/path/to/php/executable \n work within NB anymore

Any ideas on how to fix this?

Also postet this question on the NetBeans Forums.


Solution

Fixed it by creating a phpunit.sh and phpunit-skelgen.sh within [...]/php/bin with

#!/bin/sh
/Applications/mampstack-5.4.11/php/bin/php /Applications/mampstack-5.4.11/php/bin/phpunit "$@"

and

#!/bin/sh
/Applications/mampstack-5.4.11/php/bin/php /Applications/mampstack-5.4.11/php/bin/phpunit-skelgen "$@"

and ponting to it within NetBeans config.

Thanks to victor ♦♦ from bitnami answers.



Answered By - m02ph3u5
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing