Anyone running Craft 3 CMS?


#1

Hey guys, hosting on Digital Ocean and using EE4 and having issues installing Craft CMS. I used this command to create the site:

ee site create example.com --type=php --with-db --cache

Next, used composer to install Craft:

composer create-project craftcms/craft /opt/easyengine/sites/example.com/app/htdoc

When going through the Craft setup via terminal, I’m getting this error:


Which database driver are you using? [mysql,pgsql,?]: mysql
Database server name or IP address: global-db 
Database port: 3306 
Database username: example.com-xxXXXX
Database password: 
Database name: example.com
Database table prefix (type "none" for none): [craft_] 
Testing database credentials ... failed: could not find driver

The db credentials are correct but not sure what the error “failed: could not find driver” means.
Any help would be great!!!


#2

Ok… for anyone seeking answers, I may have finally installed Craft successfully knocks on wood*

Here were my steps. I did have issues with PHP not having enough permissions writing to files, so I chmod’ed everything to 777, which probably isn’t ideal, but it’s working at least.

With EE4 installed, I created my new site with:
ee site create example.com --type=php --with-db --admin-email=person@example.com --dbname=yourDBname --dbuser=yourDBuser --dbpass=yourDBpassword --public-dir=web

Next, Craft needs the PDO MySQL extension installed and enabled. To do that, here’s what I did
ee shell example.com --user=root

then

docker-php-ext-install pdo_mysql

Once everything is done installing, you’ll need to edit your php.ini found in
/opt/easyengine/sites/example.com/config/php/php.ini

In your php.ini, find
;extension=pdo_mysql and change it to extension=pdo_mysql

Save the file and restart the server.

I had serious issues installing Craft via command line and composer, but had success installing manually by uploading all the files via sftp and making everything was chmod’ed to 777. Once all your files have been uploaded edit the .env file on the server to match your DB credentials, then go to example.com/index.php?p=admin/install in your browser to start the installation.

Hope that helps!!


#3

You would run that CMS with chmod 777 in production?


#4

I have Craft installed on other environments with more restrictive permissions. For whatever reason EE4 needed to be tweaked a lot more than I’m comfortable with. With 755, php still was complaining. Changed files and directories to 777 and it was good to go. Haven’t had time to really investigate why it’s happening.


#5

It’s probably because you’re uploading the files as another user, not www-data. Have you chown -R www-data:www-data after uploading the CMS?


closed #6

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.