On 17/01/13 11:55, Karl E. Jorgensen wrote:
On Wed, Jan 16, 2013 at 07:04:43PM +0000, William Lee Valentine wrote:
If one wants to test PHP modules against HTML code browsed on a local
machine through the file:/// prefix, where should the PHP modules be
placed? Do Apache directives have to be issued to allow PHP to process
these PHP modules?

Well... If you point your browser to file:///some/file, then apache
will not get involved at all, as the browser will read the file
directly from the file system.

Thus, PHP code will not be executed at all.

If you want to test PHP code locally, you're probably better off
enabling the "userdir" module in apache (as well as PHP, obviously),
put your PHP (or HTML or whatever) files in $HOME/public_html/, and
point your browser to http://localhost/~your-login-name .

If you have PHP (cli) 5.4 or later installed, it has a built-in web server for this sort of testing.

cd into the directory where your php files are and enter

php -S localhost:8000

The webserver will start listening on port 8000 on localhost only and report all activity to your terminal until you press Ctrl-C.

Then point your browser at http:localhost:8000/yourfile.php
--
Dom


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/50f7f8b3.8060...@rpdom.net

Reply via email to