Comments (16)
Running "php.exe -f myscript.php" does resolve the firewall issue, as executing
such command will also cause a firewall prompt. The ideal solution is to
execute PHP script through PHP API, in PHP binaries there is a "dev/php5.lib"
file, it looks like a static lib for the php5.dll, what we need is a php5.h
header so we can call PHP API directly through php5.dll with no need to execute
php5.exe. There seems to be no single "php5.h" file, it is probably required to
download all sources codes of php5 from here:
http://windows.php.net/download/#php-5.4 > "Download source codes".
Original comment by [email protected]
on 13 Jan 2013 at 2:46
from phpdesktop.
This will not work, unless we can implement a custom scheme,
without it we have no way to listen for coming requests.
Implementing a custom scheme is possible with Chrome, I'm not
sure about Internet Explorer, this feature will probably be
implemented only for Chrome.
Original comment by [email protected]
on 13 Jan 2013 at 6:24
- Changed title: Chrome: execute scripts directly through PHP API call with no web-server listening
from phpdesktop.
When executing php script directly how do we set the document root?
Original comment by [email protected]
on 14 Jan 2013 at 8:51
from phpdesktop.
The source of the "php.exe" can be found in sapi/cli/php_cli.c, function that
interests us is "php_execute_script":
https://github.com/php/php-src/blob/master/sapi/cli/php_cli.c#L988
Original comment by [email protected]
on 15 Jan 2013 at 5:08
from phpdesktop.
Calling PHP API directly would require implementing multi-threading
if we want to support handling multiple requests at the same time.
PHP built-in webserver is also single threaded, it cannot handle more
than one request at the same time, see Issue 14.
Original comment by [email protected]
on 15 Jan 2013 at 5:27
from phpdesktop.
[deleted comment]
from phpdesktop.
We will still need a web-server, otherwise submitting forms and uploading files
won't work. The solution would be to implement a virtual file system (VFS) in
the
mongoose web-server. Or maybe PHP API already has a VFS mechanism?
Original comment by [email protected]
on 2 Feb 2013 at 3:38
- Changed title: Chrome: execute scripts using PHP API calls
from phpdesktop.
VFS in mongoose web-server is not enough, as php scripts include other php
scripts, so it must be some kind of VFS in PHP API.
Original comment by [email protected]
on 2 Feb 2013 at 3:53
- Changed title: Execute PHP scripts through PHP API
from phpdesktop.
We need VFS in both Mongoose & PHP API.
Original comment by [email protected]
on 2 Feb 2013 at 3:56
from phpdesktop.
To use an in-memory file system in Mongoose web-server you have to
implement "open_file" callback, example here:
https://github.com/valenok/mongoose/blob/ee55d38b5592cbb55b78c74c2c36fc768fc22a0
7/test/unit_test.c#L192
Original comment by [email protected]
on 2 Feb 2013 at 5:29
from phpdesktop.
See this topic for an in-memory filesystem with Mongoose:
https://groups.google.com/d/topic/mongoose-users/JhNQFKC_0wI/discussion
Original comment by [email protected]
on 2 Feb 2013 at 5:57
from phpdesktop.
See Kroll's PHP module:
https://github.com/appcelerator/kroll/tree/master/modules/php
Original comment by [email protected]
on 4 Feb 2013 at 4:22
from phpdesktop.
[deleted comment]
from phpdesktop.
[deleted comment]
from phpdesktop.
When PHP is run in other way than through CGI, memory leaks might be a problem.
Original comment by [email protected]
on 13 Feb 2013 at 6:11
from phpdesktop.
This is not a good idea to execute PHP using the PHP API, as PHP was never
intended to run long hours and this could result in memory leaks.
Original comment by [email protected]
on 19 Jan 2014 at 7:24
- Changed state: WontFix
from phpdesktop.
Related Issues (20)
- Linux build php-cgi shared library issue HOT 2
- php-desktop 57.0 not interpreting HTML HOT 1
- Update HOT 4
- Bootstrap 5 off canvas, modals, burgur menu dropdowns is not working in php-desktop for windows. HOT 5
- Any version without chrome HOT 5
- Algum procedimento recomendado para a lib funcionar na versão 7.4 do php?
- Most links on Build/Windows are dead? HOT 2
- slowness HOT 1
- How to upgrade the CEF version? HOT 2
- Unable to play local video HOT 3
- Bootstrap js and Nav Js not work HOT 2
- Compilation : 'OVERRIDE' : unknown substitution specifier HOT 1
- Uncaught (in promise) ReferenceError: AbortController is not defined
- Codeigniter 4 sqlite3 connection problem HOT 3
- Code protection suggestion HOT 7
- Is PHP Desktop compatible with Laravel latest ( versrion 10.x now )?
- Default Window Size But
- how to update the chromium version HOT 6
- how to build this project HOT 3
- Why does php desktop run slow when the machine is connected to internet???
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpdesktop.