Question

500 Internal Server Error for index.php code

  • Posted 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 domain and upload script use FTP use Apache v2.2.15 (CentOS) DAVv2 PHP v5.3.3 Server

now i’m gate 500 Internal Server Error. i don’t understand these script come from script or some problem in server install or configar

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 (eooly.com) i will gate server error. if i change the index.php any outher code like <h1>hi</h1>. that have no problem its how hi with or with out .htaccess its work.

.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 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’; pleas tell me what is the problem . if you need any ting more info tell me Thanks

Subscribe
Share

Submit an 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 temporarily removing your .htaccess files. If that doesn’t work then most of the times it would be an error in your application, check the error logs or enable error reporting.

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

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>