Integrating Bash with PHP
Posted: Thu Jan 28, 2010 7:57 am
Hi, I'm running php 5.3 on windows. I've recently downloaded the GNU Bash shell for windows. I made an example bash file and can run it through the command prompt. I'm trying to get it to run through a web page using "shell_exec".
The instructions for installing bash tell me to add the bash.exe path to my classpath setting, create a home directory and then set the environmental variable HOME to point to it. I'm already lost at this point. Can someone tell me how you add bash.exe to my classpath setting and the proper way to create a home directory?
I know shell_exec works because I can call windows processing and it works just fine. For example
results in:
Thanks
James
The instructions for installing bash tell me to add the bash.exe path to my classpath setting, create a home directory and then set the environmental variable HOME to point to it. I'm already lost at this point. Can someone tell me how you add bash.exe to my classpath setting and the proper way to create a home directory?
I know shell_exec works because I can call windows processing and it works just fine. For example
Code: Select all
$result = shell_exec('cmd version');
Code: Select all
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Program Files\Apache Software Foundation\Apache2.2\htdocs>
James