You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a fork of http://github.com/mkschreder/node-php and has been modified for making this take dynamic PHP pathing, so that it can run without a PHP distribution installed on a machine and can work with an embedded PHP binary distribution.
7
+
With Node PHP Embedded, you can leverage the speed of node.js and run all of the widely available php scripts directly inside your express site.
8
8
9
9
10
+
This was originally a fork of http://github.com/mkschreder/node-php and has been modified for making this take dynamic PHP pathing, so that it can run without a PHP distribution installed on a machine and can work with an embedded PHP binary distribution.
11
+
10
12
11
13
Installation
12
14
------------
@@ -15,8 +17,32 @@ Installation
15
17
npm install phpcgijs --save
16
18
```
17
19
18
-
Usage
19
-
-----
20
+
21
+
22
+
Includes CGIJS Library as a dependancy
23
+
---------------------------------------
24
+
25
+
# cgijs
26
+
27
+
28
+
#### Usage as `require("phpcgijs").cgijs` inbuilt dependency library APIs
*`CGIJS` is a library to run any `CGI` mode / `Interpreted language script` files, or connect to any web application server proxies, or manage processes in the system.*
32
+
33
+
34
+
`CGIJS` library:
35
+
36
+
- Supports running any `CGI` / `Interpreted Language scripts` in `any OS` that runs `node.js`.
37
+
- Supports both `CGI` executables as well as `proxy` to `localhost`/ `remote` /`embedded servers` using proxying of multiple protocols (`http`, `websockets`, `tcp`, `udp`, `socks`, `ssh`, `ftp`).
38
+
- Supports managing processes like `embedded``server` executables, embedded `database` executables, or `any other` embedded/ non-embedded executables
39
+
40
+
41
+
You can view more about `cgijs` at [github.com/cgi-js](https://github.com/cgi-js/cgi-js) or install it directly at [npm cgijs](https://www.npmjs.com/package/cgijs)
42
+
43
+
44
+
#### Usage as `require("phpcgijs").cgi` inbuilt dependency library APIs
To run php scripts with node js and express create the following script like below:
22
48
@@ -65,24 +91,50 @@ console.log("Server listening at 9090!");
65
91
66
92
```
67
93
94
+
95
+
68
96
Explanation
69
97
-----------
70
98
71
-
The script will pipe all files that end in the .php extension through the php parser. All other files will be served as static content.
99
+
The script will pipe all files that end in the .php extension through the php parser. All other files will be served as static content. Basic permalinks are supported but the support for them can probably be improved.
100
+
101
+
You can also use the inbuilt `cgijs` API using the following features using the `require("phpcgijs").cgijs` API.
72
102
73
-
Basic permalinks are supported but the support for them can probably be improved.
74
103
75
104
Dependencies
76
105
------------
77
106
78
-
# php-cgi
107
+
108
+
#### Inbuilt phpcgijs `.cgi` usage
109
+
-----------------------------------
110
+
79
111
80
112
* You need to have the interpreter installed in the system in order to use this extension.
81
113
* Alternatively, You can specify the full path of locally available php-cgi path.
82
114
* If custom path not specified in express, it tries to find the system installed php-cgi executable. If still unavailable, the server errors out.
##### Node CGI Embedded - run interpreted scripts that support cgi using nodejs
125
+
*[x] CGI file execution - Run any scripts that support CGI based serving/execution
126
+
127
+
##### Node Web Proxy - run web proxies
128
+
*[x] Running Proxies - Run any host that serves a web app, using proxy (HTTP, UDP, TCP, Websockets, Socks) and supports websocket implementation in web proxies
129
+
130
+
##### Node Processes - Manage web servers, database processes, or other system processes or services
131
+
*[x] Manage Processes or Services - Allows running and closing process Executables
132
+
133
+
##### CGIJS Functionality Details
134
+
*[x] The script should support piping all files of below interpreted languages including Python (2.x, 3.x) - `py`, Perl (Version Independent) - `plc`, `pld`, `pl`, PHP (Version Independent) - `php`, Ruby (Version Independent) - `rb`, Node.js (Version Independent) - `js`, CGI files - `cgi`.
135
+
*[x] The script should support piping all proxies of above languages and Jsp (With Tomcat, or any webserver as proxy) , Aspx (With IIS, Apache, or any webserver as proxy), Jsp and Aspx (With Tomcat, Nginx, and Apache embedded)
136
+
*[x] Some sections are pending to be tested but should function normally
0 commit comments