forked from wolfsoft/poc-apache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (65 loc) · 2.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html>
<body>
<h1>Testing mod_poc</h1>
<p>This page is intended to testing the functionality of the mod_poc with PHP in two different modes: FastCGI and Classic CGI.</p>
<p>Testing procedure (for each form):</p>
<ol>
<li>Enter any text without letter 'Z' in the field and press Submit button.</li>
<li>The PHP output should appear displaying the same text. Now return back.</li>
<li>Enter any text with letter 'Z' in the field and press Submit button.</li>
<li>The text "The letter 'Z' was found!" should appear, it was generated by the mod_poc module instead of PHP.</li>
</ol>
<p>As you can see, the FastCGI works correctly, but Classic CGI looses the form data, step 2 fails.</p>
<main style="display:flex; flex-direction:row; justify-content:space-around;">
<section>
<p>This form is handled by PHP script running as FastCGI:</p>
<form action="/fastcgi/test.php" method="post">
<input type="text" name="text" required />
<button>Submit</button>
</form>
<p>Apache configuration used by this form:</p>
<pre>
<Location /fastcgi/>
FcgidWrapper /usr/bin/php-cgi .php
AddHandler fcgid-script .php
</Location>
<Directory "/var/www/html">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory "/usr/bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
</pre>
</section>
<section>
<p>This form is handled by PHP script running as Classic CGI:</p>
<form action="/cgi/test.php" method="post">
<input type="text" name="text" required />
<button>Submit</button>
</form>
<p>Apache configuration used by this form:</p>
<pre>
ScriptAlias "/cgi-bin/" "/usr/bin/"
<Location /cgi/>
Action php-script /cgi-bin/php-cgi
AddHandler php-script .php
</Location>
<Directory "/var/www/html">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory "/usr/bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
</pre>
</section>
</main>
</body>
</html>