0

I have successfully deployed my application to a remote host using Deployer.

I'm on shared hosting and I don't have access to the Apache configuration.

The application is deployed in a directory created for an Add-on domain, that is, it is not in the main domain. This folder is into: home/serverid/myrootadon

When I try to navigate to the domain in which I have installed the app: https://example.com I get:

Error 500 - Internal Server Error

An error was encountered while processing your request. Typically this is a temporary condition. Please contact the web site owner for further assistance.

I don't understand what causes this error. I've tried looking in the error logs, but can't find anything.

In the root folder there is an error_log file only with this:

[01-Jun-2023 15:23:46 UTC] 2023-06-01T15:23:46+00:00 [info] User Deprecated: The "Monolog\Logger" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Bridge\Monolog\Logger".

In the var/log folder, there is one file called dev.log with this:

2023-06-01T15:46:05.158715+00:00] deprecation.INFO: User Deprecated: The "Monolog\Logger" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Bridge\Monolog\Logger". {"exception":"[object] (ErrorException(code: 0): User Deprecated: The "Monolog\Logger" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Bridge\Monolog\Logger". at /home/serverid/myrootadon/releases/4/vendor/symfony/error-handler/DebugClassLoader.php:338)"} []

I have this:

# Options All -Indexes
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteBase /
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ public/index.php [QSA,L]
</IfModule>

in two .htaccess files: /home/serverid/myrootadon/.htaccess and /home/serverid/myrootadon/public_html/.htaccess.

The database connection is working, if I do this from the console:

$ php current/bin/console  dbal:run-sql "SELECT * from post";

I can see the rows into the post table.

And the routes are defined:

$ php current/bin/console debug:router

 -------------------------- -------- -------- ------ ----------------------------------- 
  Name                       Method   Scheme   Host   Path                               
 -------------------------- -------- -------- ------ ----------------------------------- 
  _preview_error             ANY      ANY      ANY    /_error/{code}.{_format}           
  _wdt                       ANY      ANY      ANY    /_wdt/{token}                      
  _profiler_home             ANY      ANY      ANY    /_profiler/                        
  _profiler_search           ANY      ANY      ANY    /_profiler/search                  
  _profiler_search_bar       ANY      ANY      ANY    /_profiler/search_bar              
  _profiler_phpinfo          ANY      ANY      ANY    /_profiler/phpinfo                 
  _profiler_xdebug           ANY      ANY      ANY    /_profiler/xdebug                  
  _profiler_search_results   ANY      ANY      ANY    /_profiler/{token}/search/results  
  _profiler_open_file        ANY      ANY      ANY    /_profiler/open                    
  _profiler                  ANY      ANY      ANY    /_profiler/{token}                 
  _profiler_router           ANY      ANY      ANY    /_profiler/{token}/router          
  _profiler_exception        ANY      ANY      ANY    /_profiler/{token}/exception       
  _profiler_exception_css    ANY      ANY      ANY    /_profiler/{token}/exception.css   
  app_post                   ANY      ANY      ANY    /post                              
  post_show                  ANY      ANY      ANY    /post/{id}                         
 -------------------------- -------- -------- ------ ----------------------------------- 

If I try to navigate to: https://example.com/post/1 I have Error 500 too, when the post with id=1 exists in the database.

All this works perfectly locally but when I deploy it to the remote server I can't get it to work nor can I find where the 500 error is. I don't see anything in the browser console either.

A. Cedano
  • 101
  • 1

0 Answers0