1

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.

2

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.:

| improve this answer | |
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.
| improve this answer | |
0

Thanks to Oli - I downloaded the checker and all the requirements are met.

Thanks @andrew.welch - 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)

@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.

Another poster said v3 really has to be installed with Composer, so that will be my next tactic.

| improve this answer | |
  • 1
    It looks like Craft doesn't have permission to write in that folder. – RitterKnight May 11 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.