Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeigniter blank page and error 500 in apache log?
    text
    copied!<p>I spent over 5 hours yesterday trying to figure out whats wrong with my setup. In the ci213/application/controllers and views directories I have a simple site.php controller and test.php view. I'm out of ideas as to why this site wont load. Anyone have suggestions on what I could look for next? Maybe logging it's working properly? If I could get better log errors I could have more to work with.</p> <p>I figured it has to be something with codeigniter since I have an index.php and index.html at apaches root (/var/www) and also an index2.php at the sites root (/var/www/vhosts/srp-local/htdocs), when I go to localhost/index.(php|html) or srp-local/index2.php the pages load and display properly so php and apache are working.</p> <p>Trying to load the site I get a blank page so I figured it has to be something with CI. I'm tailing all the log files and the only one that gets an update is the site access.log with the following error.</p> <pre><code>127.0.0.1 - - [23/Mar/2013:09:00:28 -0600] "GET / HTTP/1.1" 500 381 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0" </code></pre> <p>config.php</p> <pre><code>$config['base_url'] = 'http://srp-local/'; # My hosts file is configured for this. $config['log_threshold'] = 4; $config['log_path'] = '/var/www/vhosts/srp-local/logs/ci_error.log'; </code></pre> <p>controllers/site.php</p> <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Site extends CI_Controller { public function index() { $this-&gt;load-&gt;view('test'); } } </code></pre> <p>views/test.php</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;?php echo "PHP is working and the 'test' view was loaded"; ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Apache Root</p> <pre><code>/var/www/vhosts $ ll drwxrwsr-x 6 krizzo www-data 4096 Mar 22 10:45 it355 drwxrwsr-x 6 krizzo www-data 4096 Mar 22 17:45 srp-local </code></pre> <p>htdocs is the webroot for srp-local and it's index.php is referred to the ci213 folder.</p> <pre><code>/var/www/vhosts $ ll srp-local/ drwxrwsr-x 2 krizzo www-data 4096 Mar 22 17:06 cgi-bin drwxrwsr-x 4 krizzo www-data 4096 Mar 22 17:14 ci213 drwxrwsr-x 2 krizzo www-data 4096 Mar 22 17:19 logs drwxrwsr-x 5 krizzo www-data 4096 Mar 22 17:26 htdocs </code></pre> <p>All log locations/permissions</p> <pre><code>/var/log/apache2/ -rw-rw-rw- 1 www-data adm 0 Mar 23 08:52 php_errors.log -rw-r----- 1 root adm 12191 Mar 23 09:32 access.log -rw-r----- 1 root adm 4858 Mar 23 09:32 error.log /var/www/vhosts/srp-local/logs/ -rw-r--r-- 1 root www-data 3227 Mar 22 19:42 error.log -rw-rw-r-- 1 krizzo www-data 0 Mar 23 09:37 ci_error.log -rw-r--r-- 1 root www-data 12983 Mar 23 09:38 access.log </code></pre> <p>php.ini file settings</p> <pre><code>error_reporting = E_ALL &amp; ~E_DEPRECATED log_errors = On error_log = /var/log/apache2/php_errors.log </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload