500 Internal Server Error for index.php code

  • Posted on August 25, 2013
  • bisu7589Asked by bisu7589

See The Error_Log will upload here 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 ( 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} ^ [NC] RewriteRule (.*)$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]

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

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 I have to enter my droplet’s ipaddress <br> <br>2/ my 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