user1780730
user1780730

Reputation:

500 internal server error in zend framework

I am learning zend framework, i have setup all requirement for it as per tutorial given for zend framework, but still i got error this error :

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

How can I resolve it?

Upvotes: 11

Views: 17722

Answers (5)

Jimit Upadhyay
Jimit Upadhyay

Reputation: 11

You don’t have mod_rewrite loaded.

Find your httpd.conf file and locate the line:

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the # sign from the beginning of the line to uncomment and activate it.

Next, add a new section to httpd.conf that looks like this:

<Directory "C:/wamp/www/CRUD_ZEND/public">
    Options FollowSymLinks
    AllowOverride All
</Directory>


 The `AllowOverride` directive is important. By default, `.htaccess` files are not processed unless allowed. This line allows `.htaccess` files in that named directory.

After making those changes, restart Apache and then try loading your ZF2 page again.
try this link

Try this link, it will help you. You will get a working solution,definitely.

Upvotes: 1

John Foley
John Foley

Reputation: 4479

If you're using NGINX:

Change:

 location / {
    try_files $uri $uri/ /index.html;
 }

To:

 location / {
    try_files $uri $uri/ /index.php?q=$uri&$args;
 }

Upvotes: 2

takeshin
takeshin

Reputation: 50638

Using Zend Application you may see more information about the errors putting those lines in application.ini:

phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

500 Errors are mostly caught exeptions. You may debug the problem looking at the variables in ErrorController.php.

Also, the most common Apache issues:

  • mod_rewrite module not enabled in Apache
  • required RewriteBase / rule in .htaccess (on shared hostings)
  • missing AllowOverride All in virtual host configuration

Upvotes: 11

hohner
hohner

Reputation: 11588

You need two things:

  1. SSH/SFTP access
  2. Knowledge of where your Apache config folder is located

Log files for Apache are usually stored in /etc/httpd/logs - but it depends on your Linux setup.

Upvotes: 0

Tim Fountain
Tim Fountain

Reputation: 33148

Like the message suggests, you need to check the server error log to see what the problem actually is. If you are using Apache, it's the Apache error log that you need to check. On Linux systems this will be at somewhere like /var/log/apache2/error.log.

Upvotes: 3

Related Questions