[prev in list] [next in list] [prev in thread] [next in thread]
List: php-install
Subject: Re: [PHP-INSTALL] Installation issue
From: "Tommy Peterson" <tpeterson () americaschoice ! org>
Date: 2008-07-06 18:32:04
Message-ID: fc.000f464b0190e8593b9aca0005f0c543.190e85b () ncee ! org
[Download RAW message or body]
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.
>
>
>
>
[Attachment #3 (text/html)]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title></title>
<style type="text/css">
<!--
body{margin-left:10px;margin-right:10px;margin-top:10px;margin-bottom:10px;}
-->
</style>
</head>
<body marginleft="10" marginright="10" margintop="10" marginbottom="10">
<div><font face="Geneva" size="+1" color="#000000" \
style="font-family:Geneva;font-size:14pt;color:#000000;">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. <br /> <br />
<br />
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. <br /> <br />
<br />
"Miles Thompson" <<a \
href="mailto:milesthom@gmail.com">milesthom@gmail.com</a>> on Sunday, July 6,<br \
/> 2008 at 11:20 AM wrote:<br />
<br />
<br />
>Tommy Peterson's instructions look right. (Although I've never<br />
>installed on a Windows box.)<br />
><br />
>When you "stopped" Apache, did you check to see if an older<br />
>instance was running. That often catches the experts. <br />
><br />
>Did you do a check on Apache's configuration? (Usually apache2ctl -check)<br />
><br />
>Is Apache running as a service?<br />
><br />
>Does Apache render HTML?<br />
><br />
>Create this file, phpinfo.php, and put it in your docroot (webroot,<br />
>however you think of it):<br />
><br />
><?php<br />
> phpinfo();<br />
>?><br />
><br />
>Then this URL: [ <a href="http://localhost/phpinfo.php" \
target="_blank">http://localhost/phpinfo.php</a><br /> >]<a \
href="http://localhost/phpinfo.php" target="_blank">http://localhost/phpinfo.php</a> \
should tell you about your PHP and Apache<br /> >configuration, IF correctly \
installed and configured.<br /> ><br />
>It's not generally recommended to parse HTML files a PHP files because<br />
>the interpreter has to look at every line, not just the sequences set<br />
>apart by PHP's open and close tags.<br />
><br />
>Apart from that I can't be much help. The other alternative is to grab<br />
>one of the WAMP packages which does a complete install of MySQL, Apache<br />
>and PHP.<br />
><br />
>Good luck with this - Miles<br />
><br />
>On Sun, Jul 6, 2008 at 12:02 PM, Jerry Adair <[<br />
><a href="mailto:fivetomins@yahoo.com" \
target="_blank">mailto:fivetomins@yahoo.com</a> ]<a \
href="mailto:fivetomins@yahoo.com">fivetomins@yahoo.com</a>> wrote:<br /> ><br \
/> ><br />
><br />
><br />
><br />
><br />
>Hi Tommy/Keith/Newsgroup,<br />
> <br />
>Thank you for the input, I REALLY appreciate it. I did everything you<br />
>said but it still does not work. A few observations:<br />
> <br />
>1) Yes I am running on Windows XP. So it seems that I shouldn't do any<br \
/> >of the "*.so" stuff that Keith mentioned, that seems like a<br />
>UNIX thing. If I can just get the thing to work, I will split my PHP<br />
>definitions off into another file just as Keith recommends. However for<br \
/> >now I just want it to work.<br />
> <br />
>2) What exactly am I supposed to rename in the php directory? Your email<br \
/> >just said "rename the PHP file" ... the documentation says to<br />
>rename either the php.ini-recommended or php.ini-dist as php.ini. So I<br \
/> >renamed the php.ini-recommended to php.ini in my PHP directory, which I<br />
>installed in C:\php.<br />
> <br />
>3) Here are the changes I made to conf\httpd.conf:<br />
>#JRA added this<br />
>#Preload the PHP interpreter so that Apache can find it<br />
>#even if it's not in the path<br />
>LoadFile "C:\php\php5ts.dll"<br />
>LoadModule php5_module "C:\php\php5apache2_2.dll"<br />
>PHPIniDir "C:\php"<br />
><br />
><br />
>AddHandler application/x-httpd-php .php<br />
>AddHandler application/x-httpd-php-source .phps<br />
><br />
> <br />
>The problem with this is that I cannot find the "application"<br />
>directory ANYWHERE. I downloaded what I thought was/is the latest<br />
>version of Apache from a mirror site, but there is no application<br />
>directory. Nothing in the instructions mentions such a directory, that I<br \
/> >read anyway. Do I just need to create it manually? Confusing. \
I tried<br /> >these definitions with both forward and backward slashes, and \
it made no<br /> >difference.<br />
> <br />
>4) I did not copy the php.ini file anywhere.<br />
> <br />
>5) I did add "C:\php" to the PATH environment variable. Is<br />
>that really a problem?<br />
><br />
>6) I have issued many "bin\httpd.exe -k [start|stop]" commands<br />
>recently, nothing has changed.<br />
> <br />
>7) Below is what I get when typing [ http://localhost/ ]http://localhost<br />
>into a browser window:<br />
><html><body><br />
><h1>It works!</h1><br />
><?php<br />
>echo "PHP test\n";<br />
>?><br />
></body></html><br />
><br />
>Note that I modified the file a bit just to see if I could get the php<br />
>echo text to appear in the browser in addition to the It works! text...<br />
> <br />
>8) Is there an installation issue at work here? Do I need to install PHP<br \
/> >only AFTER installing Apache?<br />
> <br />
>Thanks for any help. I am LOST!<br />
><br />
>Jerry<br />
><br />
><br />
><br />
>""Tommy Peterson"" <[<br />
><a href="mailto:tpeterson@americaschoice.org" \
target="_blank">mailto:tpeterson@americaschoice.org</a> ]<a \
href="mailto:tpeterson@americaschoice.org">tpeterson@americaschoice.org</a>><br /> \
>wrote in message [<br /> ><a \
href="news:fc.000f464b0190e53e3b9aca004d68f73f.190e548@ncee.org" \
target="_blank">news:fc.000f464b0190e53e3b9aca004d68f73f.190e548@ncee.org</a><br /> \
>]<a href="news:fc.000f464b0190e53e3b9aca004d68f73f.190e548@ncee.org" \
target="_blank">news:fc.000f464b0190e53e3b9aca004d68f73f.190e548@ncee.org</a>...<br \
/> >Keith, <br />
>If you can't get this working, and you are using a Windows, not<br />
>Linux/Unix machine, do the following (the online doc are not complete or<br />
>detailed enough I have found):<br />
><br />
>1) Rename the PHP file in your PHP directory to PHP.ini (add the .ini<br />
>extension to it).<br />
>2) In your Apache httpd.conf file (localed in the apache's conf directory<br />
>do the following<br />
><br />
>Here is the proper apache directives to load php, preferbly saved as<br />
>php.conf and included from your main config.<br />
><br />
>#load the php main library to avoid dll hell<br />
>Loadfile "C:\pathtophp\php5ts.dll"<br />
><br />
>#load the sapi so that apache can use php<br />
>LoadModule php5_module "C:\pathtophp\php5apache2_2.dll"<br />
><br />
>#set the php.ini location so that you don't have to waste time guessing<br />
>where it is<br />
>PHPIniDir "C:\pathtophp"<br />
><br />
>#Hook the php file extensions, notice that Addtype is NOT USED, since<br />
>that's just stupid<br />
>AddHandler application/x-httpd-php .php<br />
>AddHandler application/x-httpd-php-source .phps<br />
><br />
>3) <br />
>Do not copy any php files anywhere<br />
>Do not edit the system path. If you have deleted them. <br />
><br />
>4) Delete any additions from you httpd.conf and php.ini that you have<br />
>made to try to get it to work.<br />
><br />
>5) restart your apache server. It should work. <br />
><br />
><br />
><br />
><br />
<br />
<br />
</font></div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic