Re: Netbeans Terminal not working correctly (PATH problem?)

  • From: Mark Longmire < >
  • To: " " < >
  • Subject: Re: Netbeans Terminal not working correctly (PATH problem?)
  • Date: Thu, 27 Sep 2012 06:26:02 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

Some Windows applications only read the environment variables on startup.
Quit the application and try again, or open a new command shell(or cygwin
bash shell) and execute 'php -h'.  You can see the path environment
variable value by typing "path" or "echo %path%" in the command shell.
Any environment variable can be printed to the console using the 2nd
method, for example "echo %pathext%".

A quick on-line search shows that extensions declared in PATHEXT allow
invocation without having to include the file extension. After adding .PHP
to mine and associating PHP.EXE to the file extension, I can invoke the
script by just using the file name without the extension.


So, a script file called phpinfo.php, with the directory containing
php.exe in the path, and the PHP extension set in pathext, and a file
association between the php file extension and the php.exe excutable, can
be invoked using just the file name itself.

Example:

The script phpinfo.php

<?php phpinfo(); ?>

Can be invoked from any directory locationĊ 

C:\Users\Administrator>phpinfo
C:\Windows\System32>phpinfo
C:\Program Files\NetBeans 7.2>phpinfo






On 9/27/12 12:40 AM, "Tomas Mysik" 
< >
 wrote:

>Hi,
>
>Dne 26.9.2012 18:47, NeilC napsal(a):
>> I added the php.exe directory to the Path in the system variables list
>>(PHP is part of WAMP server installation). Do I also need to add php as
>>an extension in the pathext list?
>
>Sorry, no idea what "pathext" is.
>BTW I made a mistake - instread of ";C:\php\php.exe", there should be
>just ";C:\php\" (just directory, not the file itself).
>
>> I tried changing directory in the terminal window and then tried php to
>>see if I got the help file but unfortunately not.........
>
>First, as I wrote, please verify it in the standard Command Line of
>Windows (invoke Run and type "cmd"); if it works here then I would
>expect that it works in the NetBeans Terminal Window as well.
>
>> Code:
>> sh-4.1$ pwd
>> /cygdrive/c/Program Files/NetBeans 7.2
>> sh-4.1$ cd /cygdrive/c/wamp
>> sh-4.1$ pwd
>> /cygdrive/c/wamp
>> sh-4.1$ php
>> sh: php: command not found
>> sh-4.1$ 
>
>> I am starting to get really frustrated by this! Any advice is greatly
>>appreciated.
>
>Sorry, I do not know Windows - anyone else who could help?
>
>Tomas



Netbeans Terminal not working correctly (PATH problem?)

NeilC 09/25/2012

Re: Netbeans Terminal not working correctly (PATH problem?)

Tomas Mysik 09/26/2012

Netbeans Terminal not working correctly (PATH problem?)

NeilC 09/26/2012

Re: Netbeans Terminal not working correctly (PATH problem?)

Tomas Mysik 09/27/2012

Re: Netbeans Terminal not working correctly (PATH problem?)

Mark Longmire 09/27/2012

Netbeans Terminal not working correctly (PATH problem?)

NeilC 09/30/2012

Project Features

About this Project

PHP was started in November 2009, is owned by Petr Jiricka, and has 236 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close