skip to Main Content

Hey i am working on a script in laravel and i install it correctly but when i try to navigate the website it is giving me 500 error but when i reload the page it works fine.
Here is mey .htaccess file

<IfModule mod_rewrite.c>

  RewriteEngine  On
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  RewriteRule ^(.*)$ public/$1 [L]

</IfModule>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

Here is the log file

'[2021-12-20 14:16:57] codecanyon.ERROR: Allowed memory 
 size of 33554432 bytes exhausted (tried to allocate 6061440 
  bytes) {"userId":1,"exception":"[object] 
  (Symfony\Component\ErrorHandler\Error\FatalError(code: 
    0): Allowed memory size of 33554432 bytes exhausted (tried 
    to allocate 6061440 bytes) at  /  h   ome/admin/public_html/vendor/intervention/image/src/Intervent 
    .ion/Image/Gd/Decoder.php:32)
   [stacktrace]
   #0 {main}
   "}'

2

Answers


  1. Chosen as BEST ANSWER

    Thanks guys for your answers. I solved it. My memory limit in php.ini file had exceeeded, By increasing it solves the problem.


  2. working .htaccess

    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews -Indexes
        </IfModule>
    
        RewriteEngine On
    
        # Handle Authorization Header
        RewriteCond %{HTTP:Authorization} .
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} (.+)/$
        RewriteRule ^ %1 [L,R=301]
    
        # Send Requests To Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    </IfModule>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search