aj-techsoul / ELECTRON-4-PHP

An easiest way to use php in electron
MIT License
202 stars 46 forks source link

PHP server not starting #28

Closed Rajeshwaran2001 closed 3 years ago

Rajeshwaran2001 commented 3 years ago

I just use this repo but I am getting this error PHP SERVER NOT STARTED: RETRYING... I had placed Screenshot (69) the code in c drive only kindly resolve this issue. I am using windows 10 20H2

Rajeshwaran2001 commented 3 years ago

Hi,

I had the same issue.

I have installed the xampp package, and I had C:\xampp\php in my PATH environment variable. So the phpinfo() here always showed the PHP installed with xampp.

I removed C:\xampp\php from my PATH in order to see the PHP info which came with the ELECTRON-4-PHP git package. Then it showed

PHP server not started. Retrying... It works when you change main.js to add the path to the bundled PHP like this:

const server = new PHPServer({ php: "php\php.exe", // <==== ADDED port: 5555, directory: __dirname, directives: { display_errors: 1, expose_php: 1 } }); Perhaps this should just be added to the README file?

Regards Rajeshwaran