maniootek Posted December 1, 2014 Share Posted December 1, 2014 I am just wondering if it's possible to run some code written in php and get same results with Autoit without installing software like apache. Any idea? Link to comment Share on other sites More sharing options...
jguinch Posted December 1, 2014 Share Posted December 1, 2014 You can certainly execute you php file directly with php.exe (php.exe script.php). Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
maniootek Posted December 1, 2014 Author Share Posted December 1, 2014 (edited) ok thanks, but where do I find that php.exe file and how will I get the return values? Edited December 1, 2014 by maniootek Link to comment Share on other sites More sharing options...
jguinch Posted December 1, 2014 Share Posted December 1, 2014 PHP.exe is part of the PHP archive you have to install (or just unpack). (PHP files need the PHP interpreter, like au3 files with AutoIt) To get the result, you can redirect the output in a file (php test.php > result.txt) or use an AutoIt function like StdoutRead() Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
maniootek Posted December 1, 2014 Author Share Posted December 1, 2014 thank you, i will try it and will come back with results Link to comment Share on other sites More sharing options...
maniootek Posted December 3, 2014 Author Share Posted December 3, 2014 I tried application called "bamcompile" which can convert PHP file into exe file but when I try to compile my php script then I got error: "Fatal error: Cannot instantiate non-existent class: soapclient" error line: $client = new SoapClient($wsdl); any chance to install that missing class "soapclient" ?? Link to comment Share on other sites More sharing options...
EndFunc Posted December 3, 2014 Share Posted December 3, 2014 I tried application called "bamcompile" which can convert PHP file into exe file but when I try to compile my php script then I got error: any chance to install that missing class "soapclient" ?? How old is your version of PHP? You might try using PEAR to install SOAP, it not loaded. Also if you're using the PHP CLI, which it looks like, it might not have SOAP loaded as it uses a different PHP.ini file than the regular PHP code uses. EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
maniootek Posted December 3, 2014 Author Share Posted December 3, 2014 I didn't install anything regarding php except that tool called "bamcompile". Please advise me what to install and where to get it from. Link to comment Share on other sites More sharing options...
EndFunc Posted December 3, 2014 Share Posted December 3, 2014 I didn't install anything regarding php except that tool called "bamcompile". Please advise me what to install and where to get it from. I never said you installed anything. I was just giving you suggestions of what to try and look for. If it doesn't see the class, then it either needs the library or probably just needs to be enabled. Here http://bit.ly/1wsx2LI EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
maniootek Posted December 4, 2014 Author Share Posted December 4, 2014 (edited) I just had to install php package from this website: http://windows.php.net/download/ then I extracted zip archive, configure php.ini file and unquote line extension=php_soap.dll and now it works ! amazing ! I am just curious how to place output "paramter: paramter-test" into variable in autoit any idea? trying this: $iPID = Run("C:\php\php.exe script.php parameter-test") $sOutput = StdoutRead($iPID) msgbox(0, "", $sOutput) $iPID return 0 $sOutput return null Edited December 4, 2014 by maniootek Link to comment Share on other sites More sharing options...
JohnOne Posted December 4, 2014 Share Posted December 4, 2014 Show php code. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
maniootek Posted December 4, 2014 Author Share Posted December 4, 2014 (edited) Show php code. <?php echo 'parameter: ' . $argv[1]; ?> FIXED: #include <Constants.au3> $iPID = Run('C:\php\php.exe script.php parameter-test', "C:\php\" , "", $STDOUT_CHILD) ProcessWaitClose($iPID) $sOutput = StdoutRead($iPID) msgbox(0, "", $sOutput) Edited December 4, 2014 by maniootek Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now