Re: Installation issue
| From: | Tommy Peterson | Date: | Sun, 06 Jul 2008 18:32:04 +0000 |
| Subject: | Re: Installation issue | ||
| References: | 1 2 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-19079@lists.php.net to get a copy of this message | ||
Also, since you made changes to the httpd.conf file, run a apache -t or a
httpd -t, depending upon the apache version, from the command line. It
will show you syntax errors, for example, if it can't find one of the php
files you added a statement for in the httpd.conf file. It will even give
you the line number.
If those are hte results you are getting for trying to browser, through
your server, for a php file Apache doesn't know what a php file is.
"Miles Thompson" <milesthom@gmail.com> on Sunday, July 6,
2008 at 11:20 AM wrote:
>Tommy Peterson's instructions look right. (Although I've never
>installed on a Windows box.)
>
>When you "stopped" Apache, did you check to see if an older
>instance was running. That often catches the experts.
>
>Did you do a check on Apache's configuration? (Usually apache2ctl -check)
>
>Is Apache running as a service?
>
>Does Apache render HTML?
>
>Create this file, phpinfo.php, and put it in your docroot (webroot,
>however you think of it):
>
><?php
> phpinfo();
>?>
>
>Then this URL: [ http://localhost/phpinfo.php
>]http://localhost/phpinfo.php should tell you about your PHP and
>Apache
>configuration, IF correctly installed and configured.
>
>It's not generally recommended to parse HTML files a PHP files because
>the interpreter has to look at every line, not just the sequences set
>apart by PHP's open and close tags.
>
>Apart from that I can't be much help. The other alternative is to grab
>one of the WAMP packages which does a complete install of MySQL, Apache
>and PHP.
>
>Good luck with this - Miles
>
>On Sun, Jul 6, 2008 at 12:02 PM, Jerry Adair <[
>mailto:fivetomins@yahoo.com ]fivetomins@yahoo.com> wrote:
>
>
>
>
>
>
>Hi Tommy/Keith/Newsgroup,
>
>Thank you for the input, I REALLY appreciate it. I did everything you
>said but it still does not work. A few observations:
>
>1) Yes I am running on Windows XP. So it seems that I shouldn't do any
>of the "*.so" stuff that Keith mentioned, that seems like a
>UNIX thing. If I can just get the thing to work, I will split my PHP
>definitions off into another file just as Keith recommends. However for
>now I just want it to work.
>
>2) What exactly am I supposed to rename in the php directory? Your email
>just said "rename the PHP file" ... the documentation says to
>rename either the php.ini-recommended or php.ini-dist as php.ini. So I
>renamed the php.ini-recommended to php.ini in my PHP directory, which I
>installed in C:\php.
>
>3) Here are the changes I made to conf\httpd.conf:
>#JRA added this
>#Preload the PHP interpreter so that Apache can find it
>#even if it's not in the path
>LoadFile "C:\php\php5ts.dll"
>LoadModule php5_module "C:\php\php5apache2_2.dll"
>PHPIniDir "C:\php"
>
>
>AddHandler application/x-httpd-php .php
>AddHandler application/x-httpd-php-source .phps
>
>
>The problem with this is that I cannot find the "application"
>directory ANYWHERE. I downloaded what I thought was/is the latest
>version of Apache from a mirror site, but there is no application
>directory. Nothing in the instructions mentions such a directory, that I
>read anyway. Do I just need to create it manually? Confusing. I tried
>these definitions with both forward and backward slashes, and it made no
>difference.
>
>4) I did not copy the php.ini file anywhere.
>
>5) I did add "C:\php" to the PATH environment variable. Is
>that really a problem?
>
>6) I have issued many "bin\httpd.exe -k [start|stop]" commands
>recently, nothing has changed.
>
>7) Below is what I get when typing [ http://localhost/
>]http://localhost
>into a browser window:
><html><body>
><h1>It works!</h1>
><?php
>echo "PHP test\n";
>?>
></body></html>
>
>Note that I modified the file a bit just to see if I could get the php
>echo text to appear in the browser in addition to the It works! text...
>
>8) Is there an installation issue at work here? Do I need to install PHP
>only AFTER installing Apache?
>
>Thanks for any help. I am LOST!
>
>Jerry
>
>
>
>""Tommy Peterson"" <[
>mailto:tpeterson@americaschoice.org
>]tpeterson@americaschoice.org>
>wrote in message [
>news:fc.000f464b0190e53e3b9aca004d68f73f.190e548@ncee.org
>]news:fc.000f464b0190e53e3b9aca004d68f73f.190e548@ncee.org...
>Keith,
>If you can't get this working, and you are using a Windows, not
>Linux/Unix machine, do the following (the online doc are not complete or
>detailed enough I have found):
>
>1) Rename the PHP file in your PHP directory to PHP.ini (add the .ini
>extension to it).
>2) In your Apache httpd.conf file (localed in the apache's conf directory
>do the following
>
>Here is the proper apache directives to load php, preferbly saved as
>php.conf and included from your main config.
>
>#load the php main library to avoid dll hell
>Loadfile "C:\pathtophp\php5ts.dll"
>
>#load the sapi so that apache can use php
>LoadModule php5_module "C:\pathtophp\php5apache2_2.dll"
>
>#set the php.ini location so that you don't have to waste time guessing
>where it is
>PHPIniDir "C:\pathtophp"
>
>#Hook the php file extensions, notice that Addtype is NOT USED, since
>that's just stupid
>AddHandler application/x-httpd-php .php
>AddHandler application/x-httpd-php-source .phps
>
>3)
>Do not copy any php files anywhere
>Do not edit the system path. If you have deleted them.
>
>4) Delete any additions from you httpd.conf and php.ini that you have
>made to try to get it to work.
>
>5) restart your apache server. It should work.
>
>
>
>