Date: Wed, 24 Jul 2002 16:48:27 -0400 From: "MET" <met@uberstats.com> To: <freebsd-questions@FreeBSD.ORG> Subject: PHP Apache Assistance ~ like a moron Message-ID: <003201c23353$7cc7db90$6801a8c0@SURVIVAL>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_0033_01C23331.F5B63B90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Like a moron...I've decided to play with things. First off I've got Apache 1.3 and PHP 4.1.2 running on a different machine, but for one reason or another I've decided to test installing Apache 2 and PHP 4.2.2. And simply put whenever I put in the path to view a PHP file on the server it tries to download it. Here's what I've done so far. cd /usr/local/httpd-2.0.39 ./configure --prefix=/usr/local/apache --enable-module=all --with-mpm=worker make make install cd /usr/local/php-4.2.2 ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql --with-xml --enable-ftp --enable-short-tags --enable-calendar --enable-track-vars --with-tsrm-pth make make install I then get a nice little PHP Liscense notice as well as a warning for register_globals being off. So I continue: ee /usr/local/apache/conf/httpd.conf I then append the line: AddType application/x-httpd-php .php /usr/local/apache/bin/apachectl configtest it returns that all is proper. /usr/local/apache/bin/apachectl start lynx http://localhost/test.php And it prompts me for a download. Any ideas? /************************************************************** Matthew Metnetsky met@uberstats.com **************************************************************/ ------=_NextPart_000_0033_01C23331.F5B63B90 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <TITLE>Message</TITLE> <META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>Like=20 a moron...I've decided to play with things. First off I've got = Apache 1.3=20 and PHP 4.1.2 running on a different machine, but for one reason or = another I've=20 decided to test installing Apache 2 and PHP 4.2.2. And simply put = whenever=20 I put in the path to view a PHP file on the server it tries to download=20 it.</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>Here's what I've done so far.</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>cd=20 /usr/local/httpd-2.0.39</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>./configure --prefix=3D/usr/local/apache --enable-module=3Dall=20 --with-mpm=3Dworker</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>make</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>make=20 install</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>cd=20 /usr/local/php-4.2.2</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>./configure --with-apxs2=3D/usr/local/apache/bin/apxs = --with-mysql=20 --with-xml --enable-ftp --enable-short-tags --enable-calendar=20 --enable-track-vars --with-tsrm-pth</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>make</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>make=20 install</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>I=20 then get a nice little PHP Liscense notice as well as a warning for=20 register_globals being off.</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>So I=20 continue:</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>ee=20 /usr/local/apache/conf/httpd.conf</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>I=20 then append the line: </FONT></SPAN><SPAN=20 class=3D869433620-24072002><FONT face=3DVerdana color=3D#0000ff = size=3D2>AddType=20 application/x-httpd-php .php</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>/usr/local/apache/bin/apachectl configtest</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>it=20 returns that all is proper.</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2>/usr/local/apache/bin/apachectl start</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>lynx=20 <A=20 href=3D"http://localhost/test.php">http://localhost/test.php</A></FONT></= SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>And=20 it prompts me for a download.</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2>Any=20 ideas?</FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff size=3D2> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA"></SPAN> </DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA">/**************************************************************</S= PAN></DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA"></SPAN> </DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA"> =20 Matthew Metnetsky</SPAN></DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA"></SPAN> </DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA"> <FONT=20 color=3D#ff0000>met@uberstats.com</FONT></SPAN></DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA"></SPAN> </DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; = mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; = mso-fareast-language: EN-US; mso-bidi-language: = AR-SA">**************************************************************/</S= PAN></SPAN></DIV></FONT></SPAN></DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D869433620-24072002><FONT face=3DVerdana = color=3D#0000ff=20 size=3D2></FONT></SPAN> </DIV></BODY></HTML> ------=_NextPart_000_0033_01C23331.F5B63B90-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003201c23353$7cc7db90$6801a8c0>