Skip to content

Commit 53b411e

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 6024d63 + 82d94f1 commit 53b411e

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

docs/index.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Create `pascal.load` file in `/etc/apache2/mods-available` directory with conten
3535
LoadModule pascal_module /path/to/mod_pascal.so
3636
```
3737

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
3939
`pascal-handler` to identify handler.
4040

4141
### Enable mod_pascal
@@ -69,9 +69,8 @@ begin
6969
end.
7070
```
7171

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)
7373

74-
If `test.pas` is downloaded then you do not register mod_pascal with Apache correctly.
7574
## Response header
7675

7776
When not set, `Content-Type` response header is assumed `text/html`.
@@ -202,7 +201,7 @@ begin
202201
end.
203202
```
204203

205-
## More module configuration
204+
## <a name="module-configuration"></a>More module configuration
206205

207206
By default, when not set, it is assumed that Free Pascal compiler path is
208207
`/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
236235
This is experimental project. Using it in production setup should be avoided. Performance is not very good due
237236
to initial compilation task that is required when any of source codes are changed.
238237
When source codes are not changed, next execution will avoid compilation step thus give similar performance of CGI executable.
238+
239+
## <a name="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.
256+

0 commit comments

Comments
 (0)