It does not 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 for the PHP error log (it's a .txt file, it's set up in php.ini)
Note that Laravel 5.3 as per the documentation shows link needs:
- PHP 5.6.4 or higher
- OpenSSL extension for PHP
- PDO extension for PHP
- Mbstring extension for PHP
- Tokenizer Extension for PHP
- XML Extension for PHP
If you are in a lower version of 5.6.4 this error will occur with certainty. Not having the active extensions also causes the error sometimes, note that the 500 error is displayed because PHP is in production mode and therefore does not display details of the error, it is best to look at the log.
All extensions can be enabled in php.ini if it is Like-unix hosting:
extension=openssl.so
extension=pdo.so
extension=pdo_mysql.so
extension=mbstring.so
extension=tokenizer.so
The XML I think compiles along with PHP, so if it does not (which I think is impossible) it will be kind of difficult to solve.
Note: The PDO example is for mysql, if it is another database, see link
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 also need to have mod_rewrite
enabled, but this usually does not cause 500 error.
To find out where the log is, you can create a file named teste.php
(delete later) and put something like:
<?php
echo 'Log:';
var_dump(ini_get('error_log'));
Then run it like this: http://meusite.com/teste.php
, if NULL
appears because it does not have logging configured, then you have to configure it and access to PHP.INI depends a lot on how the server releases, so you have to talk to the support of the hosting.
Moving to public_html
As I explained here link , also note 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)