This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251072

Summary: Remote PHPUnit support
Product: php Reporter: Henkie81
Component: PHPUnitAssignee: Tomas Mysik <tmysik>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: PHP_interpreter

Description Henkie81 2015-03-10 15:40:11 UTC
To run the PHPUnit test in Netbeans I must select the PHP interpreter.
I have installed php on the server in the map: /usr/lib/php. So I want to select this folder in Tools -> Options -> PHP -> General. This doesn't work because Netbeans gives the message: PHP interpreter must be an absolute path.

How can I fix this. I do not want any wamp or xamp installations.
Comment 1 Tomas Mysik 2015-03-10 18:49:10 UTC
(In reply to Henkie81 from comment #0)
> on the server in the map: /usr/lib/php

Can you please explain what you mean by this exactly?

Simply reopen this issue, thanks.
Comment 2 Henkie81 2015-03-11 07:41:56 UTC
Created attachment 152548 [details]
PHP_interpreter
Comment 3 Henkie81 2015-03-11 07:44:34 UTC
I have added a screenshot of the problem.

I wan't to use the PHP interpreter, but it looks like I need to install an wamp or xamp solution. I don't want to do that because we have a own develop server where the php is installed.

So I want to tell Netbeans to take that folder as the Interpreter.
Comment 4 Tomas Mysik 2015-03-11 08:09:36 UTC
If I understand it correctly, you want to use PHP interpreter from some remote PC. This is definitely not supported - how could it work? You would need to connect to the remote PC, transfer your file(s) there, run it and transfer the result of the run back to your PC? And what if you want to work e.g. with your local filesystem?

But, back to the original issue - you want to run PHPUnit tests on your server, right? It means that you have your project there, PHP interpreter and PHPUnit as well. Could you confirm this, please?

Thanks.
Comment 5 Tomas Mysik 2015-03-11 08:12:09 UTC
(In reply to Henkie81 from comment #3)
> I wan't to use the PHP interpreter, but it looks like I need to install an
> wamp or xamp solution

BTW you don't, you can simply install only PHP itself.
Comment 6 Henkie81 2015-03-11 08:53:16 UTC
The php interpreter and the phpunit are installed on the remote server. We have mapped the server with the project and run this project in Netbeans. So we are working in remote files.

We do run the phpunit test from commandline. All I want to do is that this tests are run in Netbeans. The test files and the files that needs to be tested are in Netbeans.

So yes: the project, phpunit and php interpreter are all on the remote server.
Comment 7 Tomas Mysik 2015-03-11 08:57:30 UTC
Thanks for confirmation.
Comment 8 Henkie81 2015-03-11 12:50:41 UTC
As I look at:
http://forums.netbeans.org/topic50703.html
And
https://blogs.oracle.com/netbeansphp/entry/ubuntu_php_netbeans_part_iii

It looks like it is possible to use /usr/bin/php as interpreter, but no success
Comment 9 Tomas Mysik 2015-03-11 13:02:51 UTC
(In reply to Henkie81 from comment #8)
> It looks like it is possible to use /usr/bin/php as interpreter, but no
> success

Of course it is but only if you have Linux or Mac (and not Windows).
Comment 10 Henkie81 2015-03-11 13:07:20 UTC
Allright. But our develop server is Linux. We only run Windows as operating system, which runs Netbeans.

So our project, phpunit and interpreter are installed on an Ubuntu linux server. 

So if I understand correctly it is not possible to run phpunit or code coverage in Netbeans using Windows?
Comment 11 Tomas Mysik 2015-03-11 13:18:24 UTC
(In reply to Henkie81 from comment #10)
> Allright. But our develop server is Linux.

Totally irrelevant.

> We only run Windows as operating
> system, which runs Netbeans.

And NetBeans runs only local (locally installed) programs in this case.

> So our project, phpunit and interpreter are installed on an Ubuntu linux
> server.

Again, irrelevant.

> So if I understand correctly it is not possible to run phpunit or code
> coverage in Netbeans using Windows?

Not true, why do you think so? You only need to install these programs (PHP, PHPUnit) on your local PC and it will work without any problems. All the documentation can be found here [1].

Thanks.
[1] https://netbeans.org/kb/trails/php.html
Comment 12 Henkie81 2015-03-11 13:35:48 UTC
I have one final question:
The php on the linux server is installed and updated by our server admin. If I install php on Windows, and the php on the server is updated, does that mean I have to update the php on Windows?
Comment 13 Tomas Mysik 2015-03-12 06:25:11 UTC
(In reply to Henkie81 from comment #12)
> I have one final question:
> The php on the linux server is installed and updated by our server admin. If
> I install php on Windows, and the php on the server is updated, does that
> mean I have to update the php on Windows?

No. NetBeans does not use any PHP (or any other program) which is installed on your/any server.
Comment 14 Henkie81 2015-03-12 10:07:00 UTC
The 'bug' is already mentioned:
https://netbeans.org/bugzilla/show_bug.cgi?id=197552, https://netbeans.org/bugzilla/show_bug.cgi?id=195817 and is not supported.
Comment 15 Tomas Mysik 2015-03-12 10:39:28 UTC
Thanks for catching it.
Comment 16 Tomas Mysik 2015-03-12 10:39:37 UTC

*** This bug has been marked as a duplicate of bug 197552 ***