You are here: Re: loaded latest edition of Apache http server on XP, and installed php on that server... « PHP Programming Language « IT news, forums, messages
Re: loaded latest edition of Apache http server on XP, and installed php on that server...

Posted by Jerry Stuckle on 02/09/07 04:43

rfhurley wrote:
> On Feb 8, 7:42 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> rfhurley wrote:
>>> On Feb 6, 11:50 pm, Siegfreed <s...@freed.org> wrote:
>>>> rfhurley wrote:
>>>>> How do I run a .php program? (I'm starting with the "hello world"
>>>>> script)
>>>> You need to specify the document root (the directory that Apache will
>>>> look for files when asked to serve them) in your "httpd" configuration
>>>> file, which in turn is located in the "Conf" directory. The section
>>>> that control the "DocumentRoot" look like this:-
>>>> # DocumentRoot: The directory out of which you will serve your
>>>> # documents. By default, all requests are taken from this directory, but
>>>> # symbolic links and aliases may be used to point to other locations.
>>>> # Example:-
>>>> DocumentRoot "C:/my_chosen_php_directory"
>>>> Once you set up your "DocumentRoot", place the files you want to run in
>>>> there, and type:
>>>> http://localhost/your_file_name.phpintoa web browser; orhttp://127.0.0.1/your_file_name.phpintoa web browser.
>>> OK, I went to the "httpd.conf" file, and added this:
>>> # For PHP 5 do something like this:
>>> LoadModule php5_module "C:\Program Files\PHP\php5apache2_2_4.dll"
>>> AddType application/x-httpd-php .php
>>> # configure the path to php.ini
>>> PHPIniDir "C:\Program Files\PHP"
>>> and then ran the "<?php phpinfo(); ?>" script. It ran (correctly) in
>>> my browser, but then an error message came up, shutting down apache. I
>>> turned apache back on; the same thing happened again-- but this time,
>>> when I tried to turn it back on, an error message came up, telling me
>>> the operation couldn't be performed (wouldn't run apache). I restarted
>>> my computer; Apache wouldn't start again (same error message).
>>> I removed the added lines from the "httpd.conf" file, and restarted
>>> everything. Everything ran fine; but when I re-added the "LoadModule
>>> php5_module..." code, it wouldn't start apache. What's going on? And
>>> what do I do now?
>> What error message do you get?
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>
> Not much to report. At this point Apache won't even start if I change
> "httpd.conf" to add the "LoadModule_php5" code. Before, I had to plow
> through a couple of levels of error message to even get to an
> indecipherable explanation.
> I try again, though, and see if I can get something.
>

You said you got an error message before. Do you remember what it was?

What do you get if you do a syntax check the Apache configuration file?
Use the -t parameter to the startup command.

And what's in your Apache error log?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация