It doesn’t look like a mod_rewrite error, if it were it would be for not having active, but there is a if
.
First to be sure of the problem, look up the PHP error log (it is a file . txt, this configured in php.ini)
Note that Laravel 5.3 as the documentation shows https://laravel.com/docs/5.3#server-Requirements accurate:
- PHP 5.6.4 or greater
- Openssl extension for PHP
- PDO extension for PHP
- Mbstring extension for PHP
- Tokenizer extension for PHP
- XML extension for PHP
If you’re in a version inferior to 5.6.4 this error will occur for sure. Not having active extensions also causes the error sometimes, note that the error 500 is displayed because PHP is in production mode and so does not show details of the error, it is best to look at the log.
All extensions can be enabled in php.ini if it’s Like-Unix hosting:
extension=openssl.so
extension=pdo.so
extension=pdo_mysql.so
extension=mbstring.so
extension=tokenizer.so
XML I believe is compiled together with PHP, so if you don’t have (which I find impossible) it will be kind of hard to solve.
Note: the PDO example is for mysql, if it is another database see http://php.net/manual/en/pdo.installation.php
If it is Windows-server:
extension=php_openssl.dll
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_mbstring.dll
extension=php_tokenizer.dll
And you also need to have the mod_rewrite
enabled, but this usually does not cause error 500.
To know where the log is, you can create a file called teste.php
(delete later) and put something like:
<?php
echo 'Log:';
var_dump(ini_get('error_log'));
So run him like this: http://meusite.com/teste.php
, turn up NULL
is because there is no log configured, so you will have to configure and access to PHP.INI depends a lot on how the server releases, so you will have to talk to the hosting support.
Moving to public_html
As I explained here /a/91799/3635, note also that the folder structure should look like this:
/home/user/
|--- /access-logs (pasta padrão em servidores com cpanel)
|--- /etc (pasta padrão em servidores com cpanel)
|--- /public_ftp (pasta padrão em servidores com cpanel)
|--- /tmp (pasta padrão em servidores com cpanel)
|--- /public_html (pasta padrão em servidores com cpanel)
|--- index.php (arquivo da pasta /public)
|--- .htaccess (arquivo da pasta /public)
|--- /app (pasta do seu projeto laravel)
|--- /bootstrap (pasta do seu projeto laravel)
|--- /config (pasta do seu projeto laravel)
|--- /database (pasta do seu projeto laravel)
I always use this, Julian... so I have no idea, I wish I could help. Try one of these links: https://www.google.pt/webhp?sourceid=chrome-instant&=1&espv=2&ie=UTF-8#q=remove+public+Standard
– Miguel
@Michael the same also http://answall.com/a/91799/3635
– Guilherme Nascimento
@Guilhermenascimento had already seen this, also had given +1. Good answer, I think it solves the pronoun of AP
– Miguel