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