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
Copy file name to clipboardExpand all lines: docs/index.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Create `pascal.load` file in `/etc/apache2/mods-available` directory with conten
35
35
LoadModule pascal_module /path/to/mod_pascal.so
36
36
```
37
37
38
-
It is important that you use `pascal_module` to identify mod_pascal module and
38
+
Do not forget to replace `/path/to/mod_pascal.so` with actual path of `mod_pascal.so`. It is important that you use `pascal_module` to identify mod_pascal module and
39
39
`pascal-handler` to identify handler.
40
40
41
41
### Enable mod_pascal
@@ -69,9 +69,8 @@ begin
69
69
end.
70
70
```
71
71
72
-
Open URL http://localhost/test.pas from Internet browser, you should see text `Hello from Pascal` printed in browser.
72
+
Open URL http://localhost/test.pas from Internet browser, you should see text `Hello from Pascal` printed in browser otherwise [things may have gone wrong](#things-can-go-wrong)
73
73
74
-
If `test.pas` is downloaded then you do not register mod_pascal with Apache correctly.
75
74
## Response header
76
75
77
76
When not set, `Content-Type` response header is assumed `text/html`.
By default, when not set, it is assumed that Free Pascal compiler path is
208
207
`/usr/local/bin/fpc`, InstantFPC path is `/usr/local/bin/instantfpc` and cache directory
@@ -236,3 +235,22 @@ You can set any compiler configurations by creating `fpc.cfg` file in directory
236
235
This is experimental project. Using it in production setup should be avoided. Performance is not very good due
237
236
to initial compilation task that is required when any of source codes are changed.
238
237
When source codes are not changed, next execution will avoid compilation step thus give similar performance of CGI executable.
238
+
239
+
## <aname="things-can-go-wrong"></a>Things can go wrong
240
+
241
+
### Restarting Apache service fails
242
+
Make sure you set correct path to `mod_pascal.so` in `pascal.load` file.
243
+
244
+
### Pascal source code is downloaded instead of executed
245
+
If `test.pas` is downloaded then you do not register `mod_pascal` with Apache correctly. Make sure that you use correct name for handler and module which is `pascal-handler` and `pascal-module` respectively.
246
+
247
+
### Connection was reset
248
+
249
+
If browser reports "The connection to the server was reset while the page was loading." check `/var/log/apache/error.log` for error. If you get
250
+
```
251
+
An unhandled exception occurred at $00007FAB82297C74:
252
+
EProcess: Executable not found: "/usr/local/bin/instantfpc"
253
+
$00007FAB82297C74
254
+
```
255
+
Make sure you set correct path for Free Pascal compiler and InstantFpc binaries. You can either set `FpcBin` and `InstantFpcBin` in [module configuration](#module-configuration) or create symlink to those binaries. If you set in module configuration, do not forget to restart Apache service after making changes.
0 commit comments