|
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`. |
@@ -202,7 +201,7 @@ begin |
202 | 201 | end. |
203 | 202 | ``` |
204 | 203 |
|
205 | | -## More module configuration |
| 204 | +## <a name="module-configuration"></a>More module configuration |
206 | 205 |
|
207 | 206 | 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 | +## <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