Solved FAMP -Info.php not decoding

I followed this tutorial I found doing a search for FAMP and all is well, except for info.php.

https://www.digitalocean.com/commun...ache-mysql-and-php-famp-stack-on-freebsd-10-1

1) www/apache24: "It works!" (sysutils/webmin sees it (after directory path adjustments to show 24, not 22)
2) MySQL -good

The only problem:

http://mywebsite/info.php, instead of showing the usual PHP report, as in the tutorial above, just shows the file's contents:

Code:
<?php phpinfo(); ?>

I have looked through the tutorial several times and can't see that I have missed anything. I checked lang/php56 with pkg info php56 to see if it was missing but the system says that latest version is installed.

I want to install phpMyAdmin, Wordpress, MediaWiki, netx (just a local play website, not production), etc,but I'm stalled on this issue for the moment.
 
Code:
root@mail:~ # pkg info -D mod_php5
mod_php5-5.4.43,1:
***************************************************************

Make sure index.php is part of your DirectoryIndex.

You should add the following to your Apache configuration file:

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

***************************************************************

In your case you'd need www/mod_php56.
 
# pkg info -D mod_php56
Code:
mod_php56-5.6.12:
***************************************************************
Here's the necessary section of my[FILE] httpd.conf[/FILE] file:

Make sure index.php is part of your DirectoryIndex.


<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>
.
.
.
.
.
You should add the following to your Apache configuration file:

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

***************************************************************
# pkg info -D php56-mysql
Code:
php56-mysql-5.6.12
:
# pkg info -D php56-mysqli
Code:
php56-mysqli-5.6.12:
 
Last edited by a moderator:
I'm halfway there!

After much searching online,and trying out different commands,I suddenly noticed several spelling mistakes in the above required addition to my Apache configuration file.

The result:

1. info.php now works.
2. phpmyadmin(/setup) -after adding the Alias and Directory for it to Apache's configuration file is giving me a message:
Code:
"Forbidden
You don't have permission to access /phpmyadmin on this server."
 
Got it!
After adding this:

Code:
Alias /phpmyadmin "/usr/local/www/phpMyAdmin/"

<Directory "/usr/local/www/phpMyAdmin/">
Options none
AllowOverride Limit
Order Deny,Allow
Require all granted
</Directory>

from another forum post,it works!

Thanks all!
 
Back
Top