diff --git a/php-webkit/main.js b/php-webkit/main.js index 04e5cf9..c8e3e15 100644 --- a/php-webkit/main.js +++ b/php-webkit/main.js @@ -7,6 +7,7 @@ var phpwebkit = { var os = require('os'); var os = os.platform(); var pw = this; + var fs = require('fs'); process.on('uncaughtException', function(err){ pw.changeState(''+err+'', '#CD0000'); @@ -27,6 +28,9 @@ var phpwebkit = { } } + // set the permissions to be able to execute + fs.chmodSync(process.cwd() + bin.slice(1), 0755); + this.fileExists(bin, function(result){ if(result === false) { return 'php-cgi'; @@ -102,4 +106,4 @@ var phpwebkit = { }; -phpwebkit.runApp(); \ No newline at end of file +phpwebkit.runApp();