Answers.Body: <p>I definitely would not recommend trying to install v2. Craft CMS 3 has many improvements over v2, a strong plugin ecosystem, and it will be supported for significantly longer.</p>
  
  <p>As for your setup issues, this is very likely some kind of a server config issue or Craft config issue. To find out which, we need to look at the error logs.</p>
  
  <p>First, look to see if there are error logs in <code>storage/logs/</code> (relative to your project root).</p>
  
  <p>If not, then the request isn't even hitting Craft, so it's likely an Apache misconfiguration (usually the server root isn't pointing to the right place or such), and you can get more information by looking at your Apache logs.</p>
  
  <p>If you do see logs there, then open up the <code>web.log</code> and search on <code>[error]</code> to see what the source of the error is. Often it is missing or incorrect database credentials.</p>
  
  <p>c.f.:</p>
  
  <ul>
  <li><a href="https://docs.craftcms.com/tutorial/" rel="nofollow noreferrer">Official Craft CMS Tutorial</a></li>
  <li><a href="https://nystudio107.com/blog/zen-and-the-art-of-craft-cms-log-file-reading" rel="nofollow noreferrer">Zen and the Art of Craft CMS Log File Reading</a></li>
  <li><a href="https://nystudio107.com/blog/setting-up-a-craft-cms-3-project" rel="nofollow noreferrer">Setting up a New Craft CMS 3 Project</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-07T12:54:21.100Z
Answers.LastActivityDate: 2020-05-07T12:54:21.100Z
Answers.UserDisplayName: andrew.welch
Answers.Body: <p>All the files that you've put in the HTML folder should be in a separate folder named "web" (/var/www/WebServerRoot/web - in your case). Move them from html folder to web and check if that solves things for you. If not, check these solutions:</p>
  
  <ol>
  <li>Check appropriate user permissions (ls -lh) for your webserver root folder. I had hit a wall with this thing for months. Then realized that I had never added www-data to the usergroup. That was the biggest hurdle.</li>
  <li>Check if you have installed all the php extensions necessary.</li>
  <li>Apache server config - thoroughly check for any typos or extra symbols. Another nagging issue when working late. Also, make sure you've specific the root folder correctly - /var/www/WebServerRoot/web — as per your config.</li>
  <li>Check error logs - php, apache, and craft's error log at /var/www/WebServerRoot/storage/logs. You can start from the logs. </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-08T06:13:13.697Z
Answers.LastActivityDate: 2020-05-08T06:13:13.697Z
Answers.UserDisplayName: shadez
Answers.Body: <p>Thanks to Oli - I downloaded the checker and all the requirements are met.</p>
  
  <p>Thanks @andrew.welch - The web.log has a lot of information including these lines as examples of some of the lines related to errors:</p>
  
  <pre><code>    2020-05-07 21:45:26 [-][-][-][error][yii\base\ErrorException:2] 
      yii\base\ErrorException: 
      fopen(/var/www/storage/runtime/mutex/63d796b0d2b1af59d16079cbad762e90.lock): 
      failed to open stream: Permission denied in 
      /var/www/vendor/yiisoft/yii2/mutex/FileMutex.php:105
      Stack trace:
      #0 /var/www/vendor/craftcms/cms/src/web/ErrorHandler.php(74): 
      yii\base\ErrorHandler-&gt;handleError(2, 'fopen(/var/www/...', 
      '/var/www/vendor...', 105)
      #1 [internal function]: craft\web\ErrorHandler-&gt;handleError(2, 
      'fopen(/var/www/...', '/var/www/vendor...', 105, Array)
  </code></pre>
  
  <p>@Shadez - I moved the files from the html web root into a new directory called "web" and changed the Apache to point to /var/www/html/web as the root. Now I do not see the twig template homepage but an apache error. </p>
  
  <p>Another poster said v3 really has to be installed with Composer, so that will be my next tactic.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-11T19:27:56.700Z
Answers.Text: It looks like Craft doesn't have permission to write in that folder.
Answers.UserDisplayName: RitterKnight
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-09T05:50:46.917Z
Answers.LastActivityDate: 2020-05-09T05:50:46.917Z
Answers.UserDisplayName: Elim
Body: <p>I installed Craft v3 on a live server running Debian 10, apache, latest PHP, and Mariadb. My structure is /var/www/html, and everything except for the files in "web" are in the www folder (along with the html folder which holds the public files - tested with an index.html), and then all of the files in "web" are in that html folder. My new user owns all of the files and they are set to 744.</p>
  
  <p>I ran the install in terminal (command line) and it checks for the database, user and password and says everything is successful. Then I go to the link specified to complete installation and get a 500 error. I've worked at this over the past 2 days and have never had any problems like this installing any PHP CMS or framework before. Can you tell if I'm missing something key here or direct me to a clearer set of instructions? I've seen the other posts about this issue and the solutions presented haven't worked for me yet. </p>
  
  <p>I'm also wondering if it's possible or worthwhile to go back to a previous version? I want to recommend and use Craft for a commercial project but I need to be sure I can get past the installation first.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-07T07:38:45.407Z
Comments.Text: You should [install this on your server](https://github.com/craftcms/server-check) and see if [all requirements](https://docs.craftcms.com/v3/requirements.html) are met.
Comments.UserDisplayName: Oli
Tags: <craft3><php><installation>
Title: Craft v3 gives 500 error on installation... how to get v2 instead
ThreadText: # Craft v3 gives 500 error on installation... how to get v2 instead
  
  (Asked by: username_0 on 2020-05-07)
  
  I installed Craft v3 on a live server running Debian 10, apache, latest PHP, and Mariadb. My structure is /var/www/html, and everything except for the files in "web" are in the www folder (along with the html folder which holds the public files - tested with an index.html), and then all of the files in "web" are in that html folder. My new user owns all of the files and they are set to 744.
  
  I ran the install in terminal (command line) and it checks for the database, user and password and says everything is successful. Then I go to the link specified to complete installation and get a 500 error. I've worked at this over the past 2 days and have never had any problems like this installing any PHP CMS or framework before. Can you tell if I'm missing something key here or direct me to a clearer set of instructions? I've seen the other posts about this issue and the solutions presented haven't worked for me yet.
  
  I'm also wondering if it's possible or worthwhile to go back to a previous version? I want to recommend and use Craft for a commercial project but I need to be sure I can get past the installation first.
  
  **Tags:** craft3, php, installation
  
  > **Comments:**
  > **username_1**: You should [install this on your server](https://github.com/craftcms/server-check) and see if [all requirements](https://docs.craftcms.com/v3/requirements.html) are met.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2020-05-07. Score: 3
  
  I definitely would not recommend trying to install v2. Craft CMS 3 has many improvements over v2, a strong plugin ecosystem, and it will be supported for significantly longer.
  
  As for your setup issues, this is very likely some kind of a server config issue or Craft config issue. To find out which, we need to look at the error logs.
  
  First, look to see if there are error logs in `storage/logs/` (relative to your project root).
  
  If not, then the request isn't even hitting Craft, so it's likely an Apache misconfiguration (usually the server root isn't pointing to the right place or such), and you can get more information by looking at your Apache logs.
  
  If you do see logs there, then open up the `web.log` and search on `[error]` to see what the source of the error is. Often it is missing or incorrect database credentials.
  
  c.f.:
  
  * [Official Craft CMS Tutorial](https://docs.craftcms.com/tutorial/)
  * [Zen and the Art of Craft CMS Log File Reading](https://nystudio107.com/blog/zen-and-the-art-of-craft-cms-log-file-reading)
  * [Setting up a New Craft CMS 3 Project](https://nystudio107.com/blog/setting-up-a-craft-cms-3-project)
  
  
  ---
  
  ### Answer by username_3 on 2020-05-08. Score: 1
  
  All the files that you've put in the HTML folder should be in a separate folder named "web" (/var/www/WebServerRoot/web - in your case). Move them from html folder to web and check if that solves things for you. If not, check these solutions:
  
  1. Check appropriate user permissions (ls -lh) for your webserver root folder. I had hit a wall with this thing for months. Then realized that I had never added www-data to the usergroup. That was the biggest hurdle.
  2. Check if you have installed all the php extensions necessary.
  3. Apache server config - thoroughly check for any typos or extra symbols. Another nagging issue when working late. Also, make sure you've specific the root folder correctly - /var/www/WebServerRoot/web — as per your config.
  4. Check error logs - php, apache, and craft's error log at /var/www/WebServerRoot/storage/logs. You can start from the logs.
  
  
  ---
  
  ### Answer by username_0 on 2020-05-09. Score: 0
  
  Thanks to Oli - I downloaded the checker and all the requirements are met.
  
  Thanks @username_2 - The web.log has a lot of information including these lines as examples of some of the lines related to errors:
  
  ```
      2020-05-07 21:45:26 [-][-][-][error][yii\base\ErrorException:2] 
      yii\base\ErrorException: 
      fopen(/var/www/storage/runtime/mutex/63d796b0d2b1af59d16079cbad762e90.lock): 
      failed to open stream: Permission denied in 
      /var/www/vendor/yiisoft/yii2/mutex/FileMutex.php:105
      Stack trace:
      #0 /var/www/vendor/craftcms/cms/src/web/ErrorHandler.php(74): 
      yii\base\ErrorHandler->handleError(2, 'fopen(/var/www/...', 
      '/var/www/vendor...', 105)
      #1 [internal function]: craft\web\ErrorHandler->handleError(2, 
      'fopen(/var/www/...', '/var/www/vendor...', 105, Array)
  
  ```
  
  @username_3 - I moved the files from the html web root into a new directory called "web" and changed the Apache to point to /var/www/html/web as the root. Now I do not see the twig template homepage but an apache error.
  
  Another poster said v3 really has to be installed with Composer, so that will be my next tactic.
  
  > **Comments:**
  > **username_4**: It looks like Craft doesn't have permission to write in that folder.  
  
  ---
  
  