Internal Server Error

Whenever my website is loaded I am getting http error:

This the error I am getting in my log :

I try to refresh sometime once or multiple times for it to show the website. I don’t understand where the problem is exactly. I was thinking that the problem is may be with my .htaccess and tried to comment everything but still it is not working.

My .htaccess looks like this:

#RewriteEngine on

if a directory or a file exists, use it directly

#RewriteCond %{REQUEST_FILENAME} !-f

#RewriteCond %{REQUEST_FILENAME} !-d

otherwise forward it to index.php

#RewriteRule . index.php

I am so confused and don’t know what the problem is exactly.

Is it the only message in the log? How exactly error page looks like?

Sometimes in the error logger(dbtarget) it is saving the following information without any exception message:

level: 4,category: application, message: $_COOKIE = [

‘PHPSESSID’ => '3ef42d1252aed7c28…

OK. How about a screenshot?

The screen shot only show the same errors that I quoted.

Your htaccess is useless as it is, by the way, because everything is commented out :)

Try this: Rename your htaccess to something else.

Still got error?

If not, then uncomment out all lines except the one which is supposed to be a comment, and try again.

You need to restart your web server after each change.

I restarted the web server and everything seems to work fine so far. Thanks. I am still observing to confirm.

This problem is back again; what I don’t understand is on the localhost it is working perfectly but when it is on the production server; it brings that error.

I tried also to check the requirements.php file it is loading perfectly but the website is not.

I really need help on this issue; I am running my website on a vps and I have other wordpress websites(3) which are running well only my Yii2 website is not running.

Does the VPS support .htaccess?

Yes I have on in public_html and everything was working previously well. I don’t understand what happened.

The content of my .htaccess in public_html is :


# use mod_rewrite for pretty URL support

RewriteEngine on

# If a directory or a file exists, use the request directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise forward the request to index.php

RewriteRule . index.php

Should the permission on public_html files be 644 or 755; my index.php is 644 and I don’t remember the permission value when I deployed the project.

I am still following to see where the problem is but my website has been down for 1months now because of this problem. I can see log giving this error:

But I don’t if it has any thing to do with this internal server error.

I think another usefull information is this sets of error(I don’t know why they are there):

Stupid question… :blink:

Is there an index.php file in the webroot?

I ask ONLY because, these errors look like what I get when I create a new composer project, but didn’t run the init script. :huh: