# No PHP output



## pela0 (Dec 23, 2020)

Hi guys, I'm working in a test lab, my first jail ever (never had the need, now's the time)...I'm working with a FAMP install + Nagios, (php 74, apache24), when I visit my phpinfo.php or the nagios frontpage, I just get the code, not the php output (eg. phpinfo prints:

```
<?php 

phpinfo();
?
```
)

To test my install I did the same in a VM (FreeBSD 12.2, PHP 7.4, Apache 2.4), everything works flawessly...
I think this maybe related with my sysctl.conf (from the handbook): 

```
security.jail.set_hostname_allowed=1
security.jail.socket_unixiproute_only=1
security.jail.sysvipc_allowed=0
security.jail.enforced_statfs=2
security.jail.allow_raw_sockets=0
security.jail.chflags_allowed=0
security.jail.jailed=0
```

I have installed a lot, and I mean a LOT of similar infrastructures over the years, both in FreeBSD as well in Linux with no problem at all...Can't get why it doesn't work...

Any advice will be helpful

THNX


----------



## SirDice (Dec 23, 2020)

pela0 said:


> I just get the code, not the php output (eg. phpinfo prints


Has nothing to do with your jail settings. It's your Apache configuration that's not correct. Read the pkg-message from www/mod_php74.


----------



## pela0 (Dec 23, 2020)

SirDice said:


> Has nothing to do with your jail settings. It's your Apache configuration that's not correct. Read the pkg-message from www/mod_php74.


Hi, thanx for your reply, but doesn't seem to be related to that...As I wrote, just to test the installation outside of the jail, I did install a VM with the exact same configuration, that VM works fine...


----------



## SirDice (Dec 23, 2020)

pela0 said:


> but doesn't seem to be related to that


I'm pretty sure it is. Apache can't figure out what to do with those *.php files and just serves them up as text. So the problem is there. Look in /var/log/httpd-error.log for clues.


----------



## pela0 (Dec 23, 2020)

SirDice said:


> I'm pretty sure it is. Apache can't figure out what to do with those *.php files and just serves them up as text. So the problem is there. Look in /var/log/httpd-error.log for clues.


I agree, but again, got one configuration working outside the jail (same config files via scp), no errors anywhere...I'll keep digging...

Thanks a bunch.


----------



## SirDice (Dec 23, 2020)

I have several jails with Apache and PHP running. None of them required any "special" jail settings to work. They all run on the most basic and "plain" jails possible.


----------



## pela0 (Dec 23, 2020)

SirDice said:


> I have several jails with Apache and PHP running. None of them required any "special" jail settings to work. They all run on the most basic and "plain" jails possible.


Thanks, I imagine that's the way it's supposed to work, don't have a doubt about that. I'll start from scratch again, don't like the "trail and error" process.  Hugs from Chile


----------

