'ENVIRONMENT' is not recognized as an internal or external command, operable program or batch file - banno-digital-toolkit

I'm trying to use the quickstart and I keep getting this error when I run npm start.
'ENVIRONMENT' is not recognized as an internal or external command,
operable program or batch file.
Can someone help me I'm doing the authentication quickstart.

This question has been asked before and is a duplicate of Beginner Working Through Authentication (Node.js example).
There are some options listed as comments as well as a general answer for Windows users.

Related

Cannot generate HTML file from cppcheck.xml on linux

I am trying to generate HTML file from the cppcheck.xml file. But i keep getting the following error : -bash: htmlreport/cppcheck-htmlreport: No such file or directory
I have installed the cppcheck and the htmlreport/cppcheck-htmlreport is also added to /usr/bin. I dont know what to do next. I cant find anythong related to this error on the internet.
I have to publish the cppcheck.xml on the jenkins UI. But the job i have is a multibranch pipeline and it doesnt support the cppcheck plugin. So I am left with no other option but to convert the cppcheck.xml to html and then publish that on the jenkins. This is also now getting error. Please tell how i should proceed further.

Trouble installing PHP Code Sniffer

I'm attempting to install PHP Code Sniffer for PhpStorm, but have been unable to get it to work. I've been following the steps here: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm
I added PHP Code Sniffer as a Composer dependency, and it now appears in the project directory. I then went to the code sniffer settings page, where I entered the path to the PHPCS.bat file. When I click Validate, I get an error message saying "Can not run PHP Code Sniffer".
Have I missed a step or is there a log somewhere with more information on what is not working?
I solved the same problem by editing the phpcs.bat file and replacing the paths:
PHPBIN=#php_bin#
with
PHPBIN=path\to\php.exe
and
"%PHPBIN%" "#bin_dir#\phpcs" %*
with
"%PHPBIN%" "path\to\phpcs" %*
I had the same issue, I solve it adding the php path to the PATH environment variables on windows. Because when it runs the scripts needs to run php and if it not present on the global path of windows will fail.

Permission denied - PHPMailer

EDIT
Returning to improve my question and make it useful to others.
I had two major issues here:
1) I didn't understand what composer really is and how to use it
2) I didn't realize I had different pieces of my dev stack running under different users/permissions (as one commentor suggested).
All is well after addressing those gaps in my knowledge. Don't copy tutorials blindly without full understanding!
END EDIT
I want to use PHPMailer in my cloud based software. I downloaded the PHPMailer library using Composer. I setup the SMTP example code replacing all the particulars with my information in a file called testmail.php. When run the script as a test I get:
Warning:
require_once(/var/www/html/appreciate-erp/vendor/autoload.php): failed
to open stream: Permission denied
in /var/www/html/appreciate-erp/testmail.php on line 2
Fatal error: require_once(): Failed opening required
'vendor/autoload.php'
(include_path='.:/usr/share/pear:/usr/share/php')
in /var/www/html/appreciate-erp/testmail.php on line 2
All the other directories in the appreciate-erp directory are accessible by httpd. I have temporarily given rwx permissions to all users in /usr/share/PHP. /Usr/share/pear doesn't exist from what I can tell.
Please help. Does anyone know what might be going on?

external auth module for ejabberd on windows

How can I get ejabberd to run an external auth script on windows?
So far- I've modified the file
C:\Program
Files\ejabberd-15.06\lib\ejabberd-15.06\priv\cfg\ejabberd.yml
to comment out the existing auth_method directive and instead added this:
auth_method: external
extauth_program: "D:\\DROPBOX\\Dropbox (Personal)\\EJABBERD\\auth\\ejabberd-auth.exe"
However, when I try to connect to the server- I see nothing in the logs indicating an attempt to run the script. I've even tried changing it to a non-existant file to see if that will log an error of some sort, but nothing.
All I get are "Accepted connection" type of logs.
In case it matters- upon start I do get several "unknown option" errors, including "ejabberd_config:validate_opts:752 unknown option 'auth_method' will be likely ignored" - however it seems this is a known, cosmetic-only error (see: https://github.com/processone/ejabberd/issues/630)
I do not use Windows, but, you should try playing with Erlang open_port command:
open_port({spawn, "YOURCOMMAND"}, [{packet, 2}]).
Note that open_port Erlang documentation says:
For external programs, the PATH is searched (or an equivalent method is used to find programs, depending on operating system). This is done by invoking the shell on certain platforms. The first space separated token of the command will be considered as the name of the executable (or driver). This (among other things) makes this option unsuitable for running programs having spaces in file or directory names.
I see your path has spaces. That alone should indeed make it impossible to call your command.
That said, external_auth command has never been tested on Windows. You may need to patch ejabberd command to make that authentication through external process work. I would be surprised if it works as is.

Why can't I run my Perl job in Hudson?

I tried to do this in Hudson but:
I have a script in Perl on my server (windows): lets say: d\util\demo.pl I want to have it running in Hudson. so I go to Hudson, create new job, go to: Build Execute Windows batch command and add: perl.exe d\util\demo.pl
I got this error: 'perl.exe' is not recognized as an internal or external command, operable program or batch file.
please help!
It can't find the perl.exe in the path of the agent that is running the task. Verify that perl is properly installed AND that the path where perl.exe was in stalled to is in you system path on EVERY agent that will run this task.
Can you run that command from any folder of the server?
If yes, than the Hudson server runs definitely under a different user account. Make sure that the user account Hudson is running under has all necessary environment variables set.
If not, than add the full qualified path to the perl.exe (e.g. C:\program files\perl\bin\perl.exe d:\util\demo.pl). If this doesn't help, you have to also set all environment variables (see "if yes").