Search code examples
phpapachedebiandebian-jessie

PHP not running on Debian Jessie


I am having trouble getting php5 to run on recently installed Debian machine, running Jessie and Apache 2.4.10.

I have PHP 5.6.30-0+deb8u1 installed. And apache module php5 enabled. All seems to be working well with the webserver, however when I visit the url of the following php script file, I get Error 304

<?php
   phpinfo();
?>

However if I interpret it in the terminal with php5 info.php the script is interpreted fine.

And I am running phpmyadmin, without any issue.

I looked for answers to similar error, but could not find anything. Hope you people can help me here.

Info on Apache:

apachectl -V

Server version: Apache/2.4.10 (Debian)
Server built:   Feb 24 2017 18:40:28
Server's Module Magic Number: 20120211:37
Server loaded:  APR 1.5.1, APR-UTIL 1.5.4
Compiled using: APR 1.5.1, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/apache2"
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="mime.types"
 -D SERVER_CONFIG_FILE="apache2.conf"

Solution

  • I think your php is working, check your apache conf settings like allow from and deny from. follow this tutorial https://wiki.debian.org/LaMp