Giter VIP home page Giter VIP logo

electron-4-php's People

Contributors

aj-techsoul avatar botyk avatar strawmelonjuice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

electron-4-php's Issues

Not working with windows 10

I have installed the Windows version branch. When I try to run the app I don't see any app is opening. My command prompt has the following and doesn't move further.

windows10-error

Great additional tool to make Electron compatible with PHP.

My question is, I know that it is not possible to use the application with a file generated by Electron Builder Asar, but even in the files generated by the builder, the regular NPM and Yarn commands work, is it possible to install the NPM command line program into the program itself to run the code on any machine using vbs?

2 windows open

Hello, first I congratulate you for that excellent plug-in for electron, I wanted to ask you every time I generated the npm start or I generated the app with electron packager and I open the program two windows exit exactly the same with my program.
In the cmd there are two server runs, it's like if you hit it twice, which I do not do.

problem with the build of project in php

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

Commercial use

Hi.
I'm testing this application for the Electron framework and I liked it a lot.

I wanted to know if it is possible to use ELECTRON-4-PHP to carry out a project with commercial purpose.
Thank you.

NFC Access

H,

This repo has been very useful to my project, thank you. I am trying to develop an application. The PHP application I'm trying to develop needs to use NFC card reading and writing. Can I access NFC card reading and writing with PHP?

Cant package, says "cannot read properteis of undefined (reading 'info')"

When I try to run 'npm run package-win' or any of the othres, I get the error,
cannot read propertie of undefined (reading 'info')

full output:

[email protected] package-win
electron-packager . electron-tutorial-app --overwrite --no-asar --platform=win32 --arch=ia32 --icon=icons/logo.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName="Electron Tutorial App"
Packaging app for platform win32 ia32 using electron v22.0.0
Cannot read properties of undefined (reading 'info')

This was working for me last night, but I came back in the morning and now it isn't. Why?

Scrolling issue

Hi all,

Has anyone had an issue with a lack of scrolling ability in the BrowserWindow()? I cannot get mine to scroll.

Here is my browser window section:

mainWindow = new BrowserWindow({
width: 1024,
height: 768,
contentIsolation: false,
scrollBounce: true,
nodeIntegration: true,
webPreferences: {
blinkFeatures: 'OverlayScrollbars'
},
frame: true,
minWidth: 1024,
minHeight: 768
});

HI

How can I do if i want to use the app with an online PHP server on a WebHost ?
What can i put in the PHP.exe location ?
witch port can i use ?

Packaging Error

When trying to package the app using
npm run package-win

It throws an error in the console

CANNOT RUN WITH NODE 10.16.3 Electron Packager requires Node 4.0 or above.

open folder

hello, I want to know if it's normal that when I use "npm start" it open the app and also the folder where there is the php file ?

Run error

Hello ..
When write " npm start " into project folder this error appears " PHP server not started. Retrying... ".
Thanks

Building Application

Hello,

Such a nice initiative, I really like the idea!

I used electron-builder to pack the electron app. From CLI it was working, but after packing, it just shows blank white screen. Following are the steps to reproduce the problem -

  • Create src folder and put a PHP project in it.
  • Modify main.js file and append "src/" in loadURL (line 88)
  • Test using npm start
  • Now pack app using electron-builder
  • Run .exe file

I think I'm doing something wrong or is it just that electron-builder won't pack this properly? As for you, what do you use to pack the application?

Copy and Paste Disabled by Default

Hello. Copy and paste doesn't seem to work. I've read that you need to enable it with Electron, but I was thinking most people will probably want it on by default with your project.

Thank you!

htaccess

hey i just installed my website file in the electronjs folder but i see only index.php page loaded
image
image
the 4 buttons in the page redirecting to other pages but its not doing nothing here in electron

the website files work fine in XAMP

I think because i have file .htaccess which rewrite file names ...

Error when start

PHP Server error { Error: spawn php ENOENT
at exports._errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn php',
path: 'php',
spawnargs:
[ '-S',
'127.0.0.1:80',
'-d',
'display_errors=1',
'-d',
'expose_php=0' ] }
PHP Server closed

Directory permission checked and UAC is off..

Error: Website requested a subresource

Hey there!
My project worked just fine when running it off "npm run start" ("electron ."). I compiled my website for MacOS, but when I tried to open the app I got a blank white page. Seeking more information, I opened developer tools and Chromium gave me the following yellow error:

[Deprecation] The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them in Chrome 92 (July 2021). See https://chromestatus.com/feature/5436853517811712 for more details.

I have php installed globally and the project worked just fine on windows. Why isn't is working here?
Thanks!

Build not working

when i build it shows only black screen.. please give solution for building steps

Setup on Windows Problem

Greetings, awesome project! Have been wanting to learn more about electron, especially with PHP.

I have installed using GIT and can start (npm start) but showing "PHP server not started. Retrying..."

Running Windows 10. Here is my config:

const PHPServer = require('php-server-manager');

const server = new PHPServer({
    port: 5555,
	directory: __dirname,
    directives: {
		display_errors: 0,
        expose_php: 0
    }
});

server.run();

Sure it is something I do not understand about configuring main.js

Could you give me example of what you have working for Windows?

Thanks!

Put the app online

Hi there,
ELECTRON-4-PHP is really good !
but just how can we acess to our online PHP version ?
actualy the php is in local, should we keep it or get an online php from a web server ?

PHP version update

Weeks ago I was looking at the project, and I noticed that it was in PHP version 7.0. I cloned the repository and updated it to PHP 8.1, if you want I can upload the update I made, but you will need access as a project contributor to make the pull requests.

MacOS error: spawn /php/php.exe EACCES

EDIT: There is solved, there is a new issue below. I left this here just for documentation if others have the same problem
Hey there!
I used this repository for windows, and it worked just fine. However, when I transferred the files to MacOS to build for mac, I got a strange error. The log is below:

npm run start

[email protected] start
electron .

PHP Server error Error: spawn php/php.exe EACCES
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -13,
code: 'EACCES',
syscall: 'spawn php/php.exe',
path: 'php/php.exe',
spawnargs: [
'-S',
'127.0.0.1:5000',
'-t',
'/Users/pheros/Desktop/Scouting-App',
'-d',
'display_errors=1',
'-d',
'expose_php=1'
]
}
PHP Server closed

This is my php server declaration:
server = new PHPServer({
php: "php/php.exe",
port: 5000,
directory: __dirname,
directives: {
display_errors: 1,
expose_php: 1
}
});

I've seen other people fix their problems with adding that php: "php/php.exe" line, but that didn't solve it for me clearly. How can I fix this error?

Server not starting linux

Hi, when I use npm start, the php server doesn't start (I'm on linux so I can't run the .bat)

Any idea ?

update : I fix it

Issue with this existing

So what possible use case on this earth would require this and do you realize the performance bottleneck doing this would cause? Electron is a wrapper for javascript applications to run as desktop applications... NOT A THING YOU SHOULD BUTCHER PHP INTO!!!

add new php extension

I want to use source guardian to encrypt my source code of the project and I need to add a special extension, I add this to php.ini and copy extension to ext folder but it doesn't work
in the tutorial of source guardian we need to change php.ini of apache but here I can't find any way to add and run this extension for ELECTORN4PHP

Need help

Error: spawn open ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
at onErrorNT (node:internal/child_process:477:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn open',
path: 'open',
spawnargs: [
'-dxdebug.start_with_request=yes',
'e:\FILES\Desktop\Lab 8.php'
]
}

Im just running the php file then this appears

Love this! When I run npm start it works, but when I package for installation it doesn't...

Hello. Love this project! I've got it working great when I type npm start on OSX, but when I package it into an app, by moving the files into the app folder within the .app, the app launches the window and says "Not Found - The requested resource /index.php was not found on the server". Any idea what's wrong? Or do you have any directions on how to package into an app properly? Thank you so much!

Writing files

Hello,

Thanks for writing this module. I'm running this on OS X and I can't seem to be able to write to a file using PHP. I can read successfully, however. Here is my write function:
$path = check_path($dir.$file); if (!is_dir($path)) { $content = file_get_contents('php://input'); file_put_contents($path, $content); echo "1"; } else { echo "0"; } exit();
This works fine on Apache/PHP through a browser, but not in Electron.
Does file_put_contents work for you?
Any thoughts on how I can troubleshoot this?

Thanks again,
Andrey

How to make an installer of Electron 4 Php application?

Tried Every possible solution to build an installer.

Hello, I used almost all the methods to make an installer. Inno Setup makes an Installer but it places all the files and folders in the installation location. Release-builds folder contains the exe also have the resources folder in which all the php code resides. I don't want to share my code with anyone so that's why I want to make an Installer that hides the code while installing the app.

PHP server not starting

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

Is There a Way to Flush PHP Output During Execution?

Hello again! I've made a program with PHP that outputs progress to the browser (and updates a progress bar via JS) while it executes. It can take some time time to finish, so it's important to see the progress while it executes. I use flush() in PHP after each echo, and in the browser, it works as I intended. Using ELECTRON-4-PHP, I can only see the output after execution finishes. Do you know if there's a way to see progress as it executes using ELECTRON-4-PHP? Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.