You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by motty cruz <mo...@gmail.com> on 2014/08/06 16:57:12 UTC

[users@httpd] Apache 2.4 PHP 5.5

Hello, I just finished installing Apache 2.4 and PHP 5.5 on FreeBSD 10, but
Apache 2.4 is not loading PHP. can someone help me with this issue?

Thanks in advance

Re: [users@httpd] Re: Apache 2.4 PHP 5.5

Posted by Edgar Pettijohn <ed...@pettijohn.no-ip.biz>.
Of course we don't know what if anything you are attempting to use to
serve php content because you have not supplied your configuration file.

On 08/07/2014 09:20 AM, Francois Gingras wrote:
> D'arcy,
>
> Those are actually erroneous responses.
>
> You do not need mod_php to serve php content; that's the legacy
> approach. Also, AddType should never be used for dynamic content. The
> purpose of that directive is to change the content type for static files.
>
> Nowadays, you can use fcgi and even php-fpm as a fcgi backend, and
> those solutions perform far better.
>
> Please see http://wiki.apache.org/httpd/php for recipes on the various
> configuration options.
>
>
>
> On Thu, Aug 7, 2014 at 9:59 AM, D'Arcy J.M. Cain <darcy@vex.net
> <ma...@vex.net>> wrote:
>
>     On Thu, 7 Aug 2014 06:42:31 -0700
>     motty cruz <motty.cruz@gmail.com <ma...@gmail.com>> wrote:
>     > I am not getting anything similar to the example you have, I get a
>     > blank page, (using chrome) then I get "file download"
>
>     Sounds like one of three things.
>
>     1. You have not built the PHP Apache module.  How to do this
>     depends on
>     the system that you are using.
>
>     2. You have built but have not installed the PHP Apache module.  Run
>     httpd with the -M option (as well as any other options that you
>     normally use) to see if this is the case.  Search for LoadModule for
>     instructions on loading it.
>
>     2.  If the module is loaded then you may not have added php file
>     types.  Search for AddType if that is the case.
>
>     --
>     D'Arcy J.M. Cain
>     System Administrator, Vex.Net
>     http://www.Vex.Net/ IM:darcy@Vex.Net
>     VoIP: sip:darcy@Vex.Net
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>     <ma...@httpd.apache.org>
>     For additional commands, e-mail: users-help@httpd.apache.org
>     <ma...@httpd.apache.org>
>
>


Re: [users@httpd] Re: Apache 2.4 PHP 5.5

Posted by Francois Gingras <fr...@gmail.com>.
D'arcy,

Those are actually erroneous responses.

You do not need mod_php to serve php content; that's the legacy approach.
Also, AddType should never be used for dynamic content. The purpose of that
directive is to change the content type for static files.

Nowadays, you can use fcgi and even php-fpm as a fcgi backend, and those
solutions perform far better.

Please see http://wiki.apache.org/httpd/php for recipes on the various
configuration options.



On Thu, Aug 7, 2014 at 9:59 AM, D'Arcy J.M. Cain <da...@vex.net> wrote:

> On Thu, 7 Aug 2014 06:42:31 -0700
> motty cruz <mo...@gmail.com> wrote:
> > I am not getting anything similar to the example you have, I get a
> > blank page, (using chrome) then I get "file download"
>
> Sounds like one of three things.
>
> 1. You have not built the PHP Apache module.  How to do this depends on
> the system that you are using.
>
> 2. You have built but have not installed the PHP Apache module.  Run
> httpd with the -M option (as well as any other options that you
> normally use) to see if this is the case.  Search for LoadModule for
> instructions on loading it.
>
> 2.  If the module is loaded then you may not have added php file
> types.  Search for AddType if that is the case.
>
> --
> D'Arcy J.M. Cain
> System Administrator, Vex.Net
> http://www.Vex.Net/ IM:darcy@Vex.Net
> VoIP: sip:darcy@Vex.Net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Re: Apache 2.4 PHP 5.5

Posted by "D'Arcy J.M. Cain" <da...@Vex.Net>.
On Thu, 7 Aug 2014 06:42:31 -0700
motty cruz <mo...@gmail.com> wrote:
> I am not getting anything similar to the example you have, I get a
> blank page, (using chrome) then I get "file download"

Sounds like one of three things.

1. You have not built the PHP Apache module.  How to do this depends on
the system that you are using.

2. You have built but have not installed the PHP Apache module.  Run
httpd with the -M option (as well as any other options that you
normally use) to see if this is the case.  Search for LoadModule for
instructions on loading it.

2.  If the module is loaded then you may not have added php file
types.  Search for AddType if that is the case.

-- 
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
VoIP: sip:darcy@Vex.Net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache 2.4 PHP 5.5

Posted by motty cruz <mo...@gmail.com>.
Thanks Good Guy,

I am not getting anything similar to the example you have, I get a blank
page, (using chrome) then I get "file download"

Thanks,



On Wed, Aug 6, 2014 at 5:38 PM, Good Guy <xf...@hotmail.com> wrote:

>  On 06/08/2014 21:38, motty cruz wrote:
>
> Thanks, I created index.php with the following:
> <?php
>    phpinfo();
> ?>
>
>  when I go to localhost, it download file.
>
>  I don't get an error,
>
>
>
>
> Well I don't know what it means "it download file" because that small file
> is not supposed to download anything but it should show something like this:
>
> [image: PhP-Info]
> <http://content.screencast.com/users/JT19560819/folders/Jing/media/b24b1096-bdcd-430d-aa14-682182b5a980/2014-08-07_0133.png>
>
> Do you get anything like this?  If so then PHP module is working but it
> might need some tinkering if something doesn't work.
>
>
>

[users@httpd] Re: Apache 2.4 PHP 5.5

Posted by Good Guy <xf...@hotmail.com>.
On 06/08/2014 21:38, motty cruz wrote:
> Thanks, I created index.php with the following:
> <?php
>    phpinfo();
> ?>
>
> when I go to localhost, it download file.
>
> I don't get an error,
>
>
>

Well I don't know what it means "it download file" because that small 
file is not supposed to download anything but it should show something 
like this:

PhP-Info 
<http://content.screencast.com/users/JT19560819/folders/Jing/media/b24b1096-bdcd-430d-aa14-682182b5a980/2014-08-07_0133.png>

Do you get anything like this?  If so then PHP module is working but it 
might need some tinkering if something doesn't work.



Re: [users@httpd] Apache 2.4 PHP 5.5

Posted by Edgar Pettijohn <ed...@pettijohn.no-ip.biz>.
Did you install from ports or packages?

Post /var/log/httpd-error.log and /usr/local/etc/apache24/httpd.conf

On 08/06/2014 03:38 PM, motty cruz wrote:
> Thanks, I created index.php with the following: 
> <?php 
>    phpinfo();
> ?>
>
> when I go to localhost, it download file. 
>
> I don't get an error, 
>
> Thanks again, 
>
>
> On Wed, Aug 6, 2014 at 12:04 PM, Jeff Trawick <trawick@gmail.com
> <ma...@gmail.com>> wrote:
>
>     On Wed, Aug 6, 2014 at 1:07 PM, Jeff Trawick <trawick@gmail.com
>     <ma...@gmail.com>> wrote:
>     >
>     > On Wed, Aug 6, 2014 at 10:57 AM, motty cruz
>     <motty.cruz@gmail.com <ma...@gmail.com>> wrote:
>     >>
>     >> Hello, I just finished installing Apache 2.4 and PHP 5.5 on
>     FreeBSD 10, but Apache 2.4 is not loading PHP. can someone help me
>     with this issue?
>     >>
>     >> Thanks in advance
>     >
>     >
>     >
>     > error messages?
>
>
>     I probably read too much into "loading".
>
>     What exactly is the symptom?
>     Have you read this?  http://php.net/manual/en/install.unix.apache2.php
>     What is your configuration?
>
>     With the LoadModule for php and
>
>     <FilesMatch \.php$>
>         SetHandler application/x-httpd-php
>     </FilesMatch>
>
>
>     it should be trivial to get some simple test.php working.
>      (test.ph <http://test.ph> contains the classic <?php phpinfo(); ?>
>
>


Re: [users@httpd] Apache 2.4 PHP 5.5

Posted by motty cruz <mo...@gmail.com>.
Thanks, I created index.php with the following:
<?php
   phpinfo();
?>

when I go to localhost, it download file.

I don't get an error,

Thanks again,


On Wed, Aug 6, 2014 at 12:04 PM, Jeff Trawick <tr...@gmail.com> wrote:

> On Wed, Aug 6, 2014 at 1:07 PM, Jeff Trawick <tr...@gmail.com> wrote:
> >
> > On Wed, Aug 6, 2014 at 10:57 AM, motty cruz <mo...@gmail.com>
> wrote:
> >>
> >> Hello, I just finished installing Apache 2.4 and PHP 5.5 on FreeBSD 10,
> but Apache 2.4 is not loading PHP. can someone help me with this issue?
> >>
> >> Thanks in advance
> >
> >
> >
> > error messages?
>
>
> I probably read too much into "loading".
>
> What exactly is the symptom?
> Have you read this?  http://php.net/manual/en/install.unix.apache2.php
> What is your configuration?
>
> With the LoadModule for php and
>
> <FilesMatch \.php$>
>     SetHandler application/x-httpd-php
> </FilesMatch>
>
>
> it should be trivial to get some simple test.php working.  (test.ph
> contains the classic <?php phpinfo(); ?>
>
>

Re: [users@httpd] Apache 2.4 PHP 5.5

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Aug 6, 2014 at 1:07 PM, Jeff Trawick <tr...@gmail.com> wrote:
>
> On Wed, Aug 6, 2014 at 10:57 AM, motty cruz <mo...@gmail.com> wrote:
>>
>> Hello, I just finished installing Apache 2.4 and PHP 5.5 on FreeBSD 10,
but Apache 2.4 is not loading PHP. can someone help me with this issue?
>>
>> Thanks in advance
>
>
>
> error messages?


I probably read too much into "loading".

What exactly is the symptom?
Have you read this?  http://php.net/manual/en/install.unix.apache2.php
What is your configuration?

With the LoadModule for php and

<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>


it should be trivial to get some simple test.php working.  (test.ph
contains the classic <?php phpinfo(); ?>

Re: [users@httpd] Apache 2.4 PHP 5.5

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Aug 6, 2014 at 10:57 AM, motty cruz <mo...@gmail.com> wrote:

> Hello, I just finished installing Apache 2.4 and PHP 5.5 on FreeBSD 10,
> but Apache 2.4 is not loading PHP. can someone help me with this issue?
>
> Thanks in advance
>


error messages?


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/
http://edjective.org/

[users@httpd] Re: Apache 2.4 PHP 5.5

Posted by Good Guy <xf...@hotmail.com>.
On 06/08/2014 15:57, motty cruz wrote:
> Hello, I just finished installing Apache 2.4 and PHP 5.5 on FreeBSD 
> 10, but Apache 2.4 is not loading PHP. can someone help me with this 
> issue?
>
> Thanks in advance

What platform?  Windows?  I can help you with windows but not Linux.