aj-techsoul / ELECTRON-4-PHP

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

problem with the build of project in php #25

Open adadros opened 4 years ago

adadros commented 4 years ago

hello. I have a problem to build the project. It works fine with npm start so the problem is with the build apparently everything is compile and then when i want to excecute it shows a white screen without errors. Could you help me?. Too I try to use electron-builder with nsis and the result is the same.

Has anyone tried to build his project and got good results?.

I am use win10 , electron v10.1.3, node v12.18.0

johnhart96 commented 3 years ago

Hi.

I have the same problem. It is the problem with the PHP server not starting. Works fine with npm start but once built it fails to start the php server

aj-techsoul commented 3 years ago

Kindly build with php files bro. Could be possible that once it's building up, it's stopping up. Any way we are working on new Electron 4 PHP which will be work as expected but this time it will be in python and it's will be very fast.

On Mon, Mar 1, 2021, 3:38 PM John Hart notifications@github.com wrote:

Hi.

I have the same problem. It is the problem with the PHP server not starting. Works fine with npm start but once built it fails to start the php server

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AJ-TechSoul/ELECTRON-4-PHP/issues/25#issuecomment-787826322, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGP4QIHIVRSXKVYAR5YSNGTTBNRRFANCNFSM4SJANIRA .

johnhart96 commented 3 years ago

Could you be so kind to explain how this is done?

aj-techsoul commented 3 years ago

You will find the php folder if you using windows, in your build, just make sure its in your make build source folder too. Its kinda dirty way to implement. but it works.

Also the most better way is to allow npm to create php server which is included in Electron 4 PHP but window's firewall play a very good role in blocking it.

AJ Kumar

(Founder & CEO)

Mobile : +91 9862542983

Email : techsoul4@gmail.com techsoul4@gmail.comWebsite : www.techsoul.in http://www.techsoul.in/

On Mon, Mar 1, 2021 at 6:18 PM John Hart notifications@github.com wrote:

Could you be so kind to explain how this is done?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AJ-TechSoul/ELECTRON-4-PHP/issues/25#issuecomment-787923734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGP4QIBLS74LVQBJFPUXEQ3TBOEJXANCNFSM4SJANIRA .

johnhart96 commented 3 years ago

Do you mean in the package.json file or in the src directory.

Sorry I don't fully understand what you mean.

aj-techsoul commented 3 years ago

No, you will find php folder. Kindly find that did you got the windows master or not. In Windows branch, there is a folder called php.

AJ Kumar

(Founder & CEO)

Mobile : +91 9862542983

Email : techsoul4@gmail.com techsoul4@gmail.comWebsite : www.techsoul.in http://www.techsoul.in/

On Mon, Mar 1, 2021 at 7:25 PM John Hart notifications@github.com wrote:

Do you mean in the package.json file or in the src directory.

Sorry I don't fully understand what you mean.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AJ-TechSoul/ELECTRON-4-PHP/issues/25#issuecomment-787966442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGP4QIC3SLWWODUOE57F5YDTBOMD7ANCNFSM4SJANIRA .

adadros commented 3 years ago

Well i solved my problem using a portable version of xampp server and include them in the src in the package.json as extra files, then i made a .bat that executes the folder of apache server "xampp/apache/bin/httpd.exe" in the installation directory of extra files. I wait 10 seconds before initialize my window because the apache is starting. Then i create the window that load a url con php. when you execute "httpd.exe" in the xampp folder, php server initialize and you can open your project in xampp/htdocs/yourproject, then in electron you can load the url using for example:

mainWindow.loadURL('http://localhost:80/yourproject')

aj-techsoul commented 3 years ago

It's good till then it works. If you didn't find php folder then I think you working on diffrent branch of repo.

On Mon, Mar 1, 2021, 10:34 PM adadros notifications@github.com wrote:

Well i solved my problem using a portable version of xampp server and include them in the src in the package.json as extra files, then i made a .bat that executes the folder of apache server "xampp/apache/bin/httpd.exe" in the installation directory of extra files. I wait 10 seconds before initialize my window because the apache is starting. Then i create the window that load a url con php. when you execute "httpd.exe" in the xampp folder, php server initialize and you can open your project in xampp/htdocs/yourproject, then in electron you can load the url using for example:

mainWindow.loadURL('http://localhost:80/yourproject')

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AJ-TechSoul/ELECTRON-4-PHP/issues/25#issuecomment-788111124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGP4QIAVM3HRXYL4DRGJ27TTBPCKBANCNFSM4SJANIRA .

adadros commented 3 years ago

At the end i had to change of solution because i had the time on me and the portable xamp version was a fast solution for me. however i would like to test the python version, i will waiting when you release it

aj-techsoul commented 3 years ago

Sure, I will let you know.

AJ Kumar

(Founder & CEO)

Mobile : +91 9862542983

Email : techsoul4@gmail.com techsoul4@gmail.comWebsite : www.techsoul.in http://www.techsoul.in/

On Tue, Mar 2, 2021 at 9:22 AM adadros notifications@github.com wrote:

At the end i had to change of solution because i had the time on me and the portable xamp version was a fast solution for me. however i would like to test the python version, i will waiting when you release it

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AJ-TechSoul/ELECTRON-4-PHP/issues/25#issuecomment-788559369, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGP4QIATHDOREUWHCQKUNELTBROH3ANCNFSM4SJANIRA .