Report this

What is the reason for this report?

500 Internal Server Error for index.php code

Posted on August 25, 2013

See The Error_Log will upload here http://lx5.in/500error.txt I will buy a VPS and install zpanel and then add a domain and upload script using FTP and Apache v2.2.15 (CentOS) DAVv2 PHP v5.3.3 Server.

Now i’m getting 500 Internal Server Error. i don’t understand these script come from script or some problem in the server install or configure

if now run my site i will gate 500 Internal Server Error. and then if I delete the .htaccess then if i access my site, I get a server error. If I change the index.php any other code like <h1>hi</h1>. That have no problem its how hi with or without .htaccess, it works.

The .htaccess Code is:


<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^eooly\.com [NC]
RewriteRule (.*) http://www.eooly.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} ^(.*(data|tmp|log).*\.php)$
RewriteRule .*$ – [F,L]

RewriteCond %{REQUEST_FILENAME} ^(.*(assets|themes|data).*\.(css|png|js|jpeg|gif|jpg))$
RewriteRule .*$ $0 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

And the index.php is:


<?php
if (substr(PHP_VERSION, 0, 1) != '5') exit('php frame need PHP > 5.0');
define('MODE', 'debug');
if (defined('MODE')){
    switch (MODE){
        case 'debug':
            error_reporting(E_ALL & ~E_NOTICE);
            break;
        case 'released':
            error_reporting(0);
            break;
        default:
            exit('The application mode is not set.');
    }
}
//file name
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('EXT', '.php');
define("BASEPATH",dirname(__FILE__).'/');
define("APPPATH",BASEPATH.'app/');
define("SYSPATH",BASEPATH.'core/');
define("MODPATH",BASEPATH.'modules/');

require_once SYSPATH.'core/Core.php';

Please tell me what is the problem. If you need any thing more info tell me Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I installed the lamp image and I have error 500

Try following the steps outlined in this article? <a href=“https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6”>How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6</a>

Hi, <br> <br>I have exactly the same problem, followed strictly the tutorial: <br>- Latest Ubuntu <br>- ZPanel <br> <br>And: <br>1/ instead of logging through zpanel.mydomain.com I have to enter my droplet’s ipaddress <br> <br>2/ my domain.com shows an error 500. I am quite lost without any support team, on this, the ZPanel forum do not show anything as it seems to be more on the server config side. <br> <br>All installation steps went well. <br> <br>I am puzzled. Tried checking everything through ZPanel, checked again the DNS for the domain, they point well to DigitalOcean. <br> <br>Any clue or troubleshooter? <br> <br>Thanks <br>Fab

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.