I am having a online website and I want to edit my site locally with the use of XAMPP. Here are the things I have done below:
- Change Xampp port Listen 80 to 8080
- Install database to MySQL
- put my website files into htdocs
- change username, dbname in local.xml
- change web/secure/base_url and web/unsecured/base_url to http://127.0.0.1:8080/(my folder name) in MySQL database, core_config_data table
However, my website does not show after I have done all these.
It occurs Error 500.
what should I do for this to display my website?
After I change the permission and files to 777, I check for the error log in the xampp files (xampp\apache\logs. The error log shows below:
Solution 1:
If you're facing a 500 error then firstly you should search for the webserver error log, and if it's running on apache server it can mostly be found in one of these 2 locations:
Centos or Archlinux: /var/log/httpd/
Debian or Ubuntu: /var/log/apache2/
In xampp, you can find the error logs in \xampp\apache\logs\error.log, where xampp is your installation folder, if you didn't change the error_log setting in PHP.
Solution 2:
You can simply enable all errors by setting ini_set('display_errors', 1); from the index.php file of your Magento project, something like this:
index.php:
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
.htaccess:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You can also check errors in /var/log/system.log and /var/log/exception.log. in your Magento project's directory.
By default Magento errors output is off. If your PHP is not
configured to log errors then web server will return Internal 500 error in
case of fatal error.
OR maybe you're facing this issue because of the permission to your project folders, so the first thing you should look for error in the logs and then you can easily fix it.
But, if the issue occurs due to the permission then:
# Change folders permission to 777
app/etc
var
media
# Change files permission to 644
index.php (main index file in magento root folder)
downloader/index.php
Related
I got a project for some enhancement which is running on CakePHP 2.9.
which is a ERP for govt Hospitals, i need work on admin panel for some enhancements.
I copied the project folder in localhost
/var/www/html/
and already imported schema into my phpmyadmin named esic.
and then i configured my esic/app/config/database.php file to the database(esic).
When I'm accessing the project from localhost, it is showing an error.
localhost/esic/
Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster#localhost 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.
I read the issue on Google and CakePHP official site but I didn't understand anything.
Please help me to figure out this problem.
Please let me know if some other details required.
Note: All other projects are working fine.
500 internal server occurs when the desired file or URL is not accessible.
AS you said all other projects are running on your localhost then please check that your .htaccess file is correct on this project.
Or else check other URL of the project.
Link: https://book.cakephp.org/2.0/en/installation/url-rewriting.html
If you are using linux environment try maybe only the permission of the folder. I somehow encounter that problem.
sudo chmod -R 755 /var/www/html/esic
or
sudo chmod -R 777 /var/www/html/esic
I install new laravel package through composer and everything is going fine (including the error page) when I use php artisan serve and access my project in http://localhost:8000. But when I use virtual hosts (for example: example.dev), the error page is not showing, just a blank page. I'm not sure if it has something to do with my virtual host configuration because if the code has no error, the page just load normally. And I have changed the permission of storage and bootstrap/cache folder to 777.
Is there any other configuration that have to do?
Which PHP version do you use on your server? Check the logs and see if you find something there.
Try giving the entire Laravel folder 755 permissions and then change the bootstrap/cache and storage folders.
Also try editing your .htaccess file, add something like:
RewriteEngine On RewriteBase /
I have a vagrant box setup that and would like to debug some '500 internal server' errors I am receiving in Magento application
I see the log folder within my directory structure but cannot see any access.log or error.log files within this directory do I need to something to turn this on?
Remember the log files for errors is exception.log, and notice/warnings is system.log. Both files are under var/log of your magento installation.
Sometimes magento can not catch an error. In this case the error is either printed to the browser or saved to the Apache log. Checkout the apache log under /var/log/apache/ (file name may be pho_error.log, error.log as set in apache vhost config.
I have configured Amazon EC2 Server and install PHP and MySQL. I have uploaded my website on it. it is in smarty.
Problem is when I update any .tpl file, then the server return white page as output in Firefox and Chrome return 500 Internal Server Error. I have surfed everywhere on internet but got nothing.
When I update any .php file then the code work nicely. problem is only with .tpl file.
I'm willing to bet that your templates_c directory is not writable by Apache (identified as apache or httpd, and you can check in your httpd.conf file), or it hasn't been configured correctly during Smarty initialization.
You can try temporarily setting your templates_c directory to 777 permissions to test this hypothesis.
If this ends up being the case, then you'll want to assign group ownership of templates_c to apache, and set the folder permissions to 775. (They explain this in their documentation.)
An HTTP status of 500, with no page content (Chrome is just being nice and rendering a default error message for you) means that PHP encountered a Fatal Error.
You will need to find out where PHP is configured to log to (usually a file called php_errors.log) and see what the error was.
Alternatively, you could temporarily allow PHP to output errors to screen, using the error_reporting setting.
My site frequently displays 500 Internal Server Error. Restarting apache, brings the site back to normal state. Other sites running on the same server does not have this issue. Apache error log have no information related to this. The apache loglevel of this site is set as "warn".
What may be the reason for this ?
My site is written on PHP and deployed in linux server.
If you have suphp installed it might be e permissions problem - if its installed all the files need to have chmod set to 644 and all thefolders - 755
Please check the folder necessary permissions. Then in index.php file add
ini_set('display_errors', 1);
to display error reports. So that you can find the error.