[Chugalug] LAMP problem

kitepilot at kitepilot.com kitepilot at kitepilot.com
Sat Mar 2 02:59:46 UTC 2013


Do:
dpkg --list|grep -i php
ET 


Garrett Gaston writes: 

> I just look in /etc/apache2/mods-enabled/ ,,, and I see two files with php names, php5.conf & php5.load. 
> 
> From: garrett85 at hotmail.com
> To: chugalug at chugalug.org
> Subject: RE: [Chugalug] LAMP problem
> Date: Fri, 1 Mar 2013 20:11:10 -0600 
> 
>  
> 
> 
> I ran telnet localhost 80, then I ran 
> GET http://localhost/phptest.php 
> 
> It returned a lot of html/php code. Mike I think you mentioned a module that was missing, how can I fix this? 
> 
> From: kigtest at hotmail.com
> To: chugalug at chugalug.org
> Date: Thu, 28 Feb 2013 21:42:36 -0500
> Subject: Re: [Chugalug] LAMP problem 
> 
>  
> 
>  
> 
> Ok.  I was on my phone last go around.  Here is an example for google (below).  The "Content-Type: text/html; charset=ISO-8859-1" is what you should be looking for.
> On the command line I type in "telnet www.google.com 80"
> I then see:Trying 74.125.137.147...Connected to www.google.com.Escape character is '^]'. 
> 
> I then type in:GET / HTTP/1.0Host:www.google.com 
> 
> and after hitting return a couple of times get the HTTP/1.0 200 OKDate: Fri, 01 Mar 2013 02:29:24 GMTExpires: -1....
> response.
> So if you are checking to see what "Content-Type" is being returned by your web-server your session should be something like$ telnet localhost 80Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.GET /sometextfile.php HTTP/1.0Host:localhost 
> 
> You should then see the headers and content your web-server returns.
> Hope this helps.
> Keith 
> 
> 
> $ telnet www.google.com 80Trying 74.125.137.147...Connected to www.google.com.Escape character is '^]'.GET / HTTP/1.0Host:www.google.com
> HTTP/1.0 200 OKDate: Fri, 01 Mar 2013 02:29:24 GMTExpires: -1Cache-Control: private, max-age=0Content-Type: text/html; charset=ISO-8859-1Set-Cookie: PREF=ID=5667ae3139af25ab:FF=0:TM=1362104964:LM=1362104964:S=fSLjFEEB2Xafhiha; expires=Sun, 01-Mar-2015 02:29:24 GMT; path=/; domain=.google.comSet-Cookie: NID=67=DMc6r8ExePJws1rYt2tKsFyHS-jwVK_nZyyA8XkVVoG0NiTF8x5_oVDww4QsrNXU44F4oQX9udDRBOwNykqj09WnZMTOga7nW5ztb4Bb_97P2E2hRQISvArc2BuidnQl; expires=Sat, 31-Aug-2013 02:29:24 GMT; path=/; domain=.google.com; HttpOnlyP3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."Server: gwsX-XSS-Protection: 1; mode=blockX-Frame-Options: SAMEORIGIN
> <!doctype html><html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><meta content="Search the world's information, including webpages, images, videos.......(The rest of the HTML) 
> 
>  
> 
>  
> 
> From: garrett85 at hotmail.com
> To: chugalug at chugalug.org
> Date: Thu, 28 Feb 2013 19:23:33 -0600
> Subject: Re: [Chugalug] LAMP problem 
> 
>  
> 
> 
> I ran telnet localhost 80 in one terminal and GET in another, here is what I got. 
> 
> garrett at mint-desktop ~ $ GET /var/www/phptest.php HTTP/1.0
> <?php 
> 
> phpinfo() 
> 
> ?> 
> 
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
> <head>
> <title>Topic Related Searching at HTTP.COM.</title>
> <meta  name="description" content="Hypertext Transfer Protocol - Topic Related Searching (TRS)" />
> <meta  name="keywords" content="http, hypertext, hypertext transfer protocol, topic related searching, trs, http.com, sponsored search results" />
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
> <frameset rows="*,0" frameborder="NO" border="0" framespacing="0">
>   <frame name="mainFrame" src="http://domains.googlesyndication.com/apps/domainpark/domainpark.cgi?cid=ca-dp-og03&s=HTTP.com&kw=network%2Cnetwork+monitoring&kw_type=broad">
> </frameset>
> <noframes>
> <body bgcolor="#FFFFFF">
> Please visit <a href="http://domains.googlesyndication.com/apps/domainpark/domainpark.cgi?cid=ca-dp-og03&s=HTTP.com&kw=network%2Cnetwork+monitoring&kw_type=broad">this link</a> since your browser does not support frames.
> </body>
> </noframes>
> </html> 
> 
>> From: kigtest at hotmail.com
>> Date: Thu, 28 Feb 2013 19:41:57 -0500
>> To: chugalug at chugalug.org
>> Subject: Re: [Chugalug] LAMP problem 
>> 
>> You can also check the mime-type by telnetting to port 80.
>> From the command line: 
>> 
>> telnet localhost 80
>> GET /somefile.php HTTP/1.0
>> Host: localhost  
>> 
>> (Two returns there) 
>> 
>> It should show you the mime-type in the headers.  Text/html is good.  Application/octet-stream not so much 
>> 
>> Keith 
>> 
>> On Feb 28, 2013, at 7:15 PM, "Mike Harrison" <cluon at geeklabs.com> wrote: 
>> 
>> >> My opening tag <?php and closing tag ?> are present. This problem is occurring with my html & PHP files as well as files that
>> >> I'M copying from else ware just to make sure. So the syntax should be good. The PHP files are working just as long as I point
>> >> the URL straight to the file, 'localhost/somefile.php' but their downloading instead of executing when trigged from an html
>> >> form.
>> > 
>> > While not the real problem, part if it the mime types for your files are wrong. In Apache, set your default mime document type to text/html
>> > 
>> > You can also do this in your PHP code.. or server mime types comfig.. or.. or..
>> > 
>> > 
>> > _______________________________________________
>> > Chugalug mailing list
>> > Chugalug at chugalug.org
>> > http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
>> _______________________________________________
>> Chugalug mailing list
>> Chugalug at chugalug.org
>> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
>  		 	   		   
> 
> _______________________________________________
> Chugalug mailing list
> Chugalug at chugalug.org
> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug 		 	   		   
> 
> _______________________________________________
> Chugalug mailing list
> Chugalug at chugalug.org
> http://chugalug.org/cgi-bin/mailman/listinfo/chugalug 		 	   		   		 	   		  


More information about the Chugalug mailing list