GithubHelp home page GithubHelp logo

Comments (16)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
[deleted comment]

from phpdesktop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
We need VFS in both Mongoose & PHP API.

Original comment by [email protected] on 2 Feb 2013 at 3:56

from phpdesktop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
[deleted comment]

from phpdesktop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
[deleted comment]

from phpdesktop.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 27, 2024
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)

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.