Hello,
if someone could help I’d sure appreciate it.
I got this error even though as far as I know I followed the instructions, except i suppose for using 644 instead of chown at first…
–
OpenEMR Setup
Step 3
Configuring OpenEMR…
Connecting to MySQL Server… OK.
Creating database… OK.
Creating user with permissions for database… OK.
Reconnecting as new user… OK.
Creating Main tables… OK
Creating Language Translation (utf8) tables… OK
Creating CVX Immunization Codes tables… OK
Writing SQL configuration… unable to open configuration file for writing: /var/www/openemr/library/classes/…/…/sites/stmatthew/sqlconf.php
I did “chown -R www-data:www-data /var/www/openemr/sites” and got this for, and did chmod 644 for the setup.php, etc, etc in main directories…
Connecting to MySQL Server… OK .
Creating database… OK .
Creating user with permissions for database… OK .
Reconnecting as new user… OK .
Creating Main tables… OK
Creating Language Translation (utf8) tables… OK
Creating CVX Immunization Codes tables… OK
Writing SQL configuration... **ERROR** . unable to open configuration file for writing: /var/www/html/emr1/library/classes/../../sites/Fairfax/sqlconf.php
Yes, I ran the command
sudo chmod -R 666 /var/www/html/emr1/sites
After running the command it displays.
ubuntu@ip-172-31-57-244:~$ ls -al /var/www/html/emr1/sites/Fairfax
ls: cannot access ‘/var/www/html/emr1/sites/Fairfax’: Permission denied
Log
[Wed Sep 11 17:31:32.813106 2019] [php7:warn] [pid 3730] [client 72.:61991] PHP Warning: include_once(): Failed opening '/var/www/html/emr1/library/classes/../../sites/Fairfax/sqlconf.php' for inclusion (include_path='/var/www/html/emr1/vendor/pear/archive_tar:/var/www/html/emr1/vendor/pear/console_getopt:/var/www/html/emr1/vendor/pear/pear-core-minimal/src:/var/www/html/emr1/vendor/pear/pear_exception:.:/usr/share/php') in /var/www/html/emr1/setup.php on line 225, referer: http://3.86.251.96/emr1/setup.php
[Wed Sep 11 17:34:31.831143 2019] [php7:warn] [pid 3729] [client 72.:62033] PHP Warning: include_once(/var/www/html/emr1/library/classes/../../sites/Fairfax/sqlconf.php): failed to open stream: No such file or directory in /var/www/html/emr1/setup.php on line 225, referer:
But I ran the sudo chmod -R 666 /var/www/html/emr1/sites to make the dir world writable.
Thanks, Brady!
PS
I ran that command a level up and this is what I get
If AWS be sure that permissions aren’t being reset by any container startup scripts. Ensure case in your site names. I setup a 3 site multi last year on AWS were a script that checks permissions was rewriting but I though Brady or I fixed that. Just reverify after container up. Otherwise, multi works great in my experience.
Linux is touchy on pathing names. Is your site directory named Fairfax? Verify if you can hit login from browser replacing site=default with site=Fairfax. Reverify sites/Fairfax permissions exactly match sites/default.
Also, i’d expect some sort of error and check out what the url you are directed to in the browser console. Also, sometimes login encryption can get corrupted or out of sync. Try deleting sites/Fairfax/documents/logs_and_misc/methods/sixa and sixb. Should get a php error though.
ubuntu@ip-172:~$ ls -al /var/www/html/emr1/sites/default total 112
drwxrwxrwx 5 ubuntu ubuntu 4096 Aug 4 01:13 .
drwxrwxrwx 4 ubuntu ubuntu 4096 Sep 11 17:30 ..
drwxrwxrwx 2 ubuntu ubuntu 4096 Aug 4 01:13 LBF
-rwxrwxrwx 1 ubuntu ubuntu 2302 Aug 4 01:13 clickoptions.txt
-rwxrwxrwx 1 ubuntu ubuntu 3318 Aug 4 01:13 config.php
-rwxrwxrwx 1 ubuntu ubuntu 2 Aug 4 01:13 docker-version
drwxrwxrwx 14 ubuntu ubuntu 4096 Aug 4 01:13 documents
-rwxrwxrwx 1 ubuntu ubuntu 392 Aug 4 01:13 faxcover.txt
-rwxrwxrwx 1 ubuntu ubuntu 11218 Aug 4 01:13 faxtitle.eps
drwxrwxrwx 2 ubuntu ubuntu 4096 Aug 4 01:13 images
-rwxrwxrwx 1 ubuntu ubuntu 11451 Aug 4 01:13 referral_template.html
-rwxrwxrwx 1 ubuntu ubuntu 649 Aug 25 12:23 sqlconf.php
-rwxrwxrwx 1 ubuntu ubuntu 48249 Aug 4 01:13 statement.inc.php
ubuntu@ip-172-:~$ ls -al /var/www/html/emr1/sites/Fairfax total 12
drwxrwxrwx 2 ubuntu ubuntu 4096 Sep 13 11:33 .
drwxrwxrwx 4 ubuntu ubuntu 4096 Sep 11 17:30 ..
-rw-r--r-- 1 www-data www-data 653 Sep 13 11:33 sqlconf.php
There are no sub folders in the sites/Fairfax.
Figured out that the contents of the default folder had not been copied to the Fairfax folder and now it works after doing that.
I believe if multi is setup via setup.php then the default should have been copied though on this i’m not sure any longer.
Still, glad ya got it worked out…
It should have because when I setup the third site with the folder permissions set to 777 and the owner set to www-data www-data. It copied everything and setup like it was suppose to the first time. Now I know.
yep, i’m always having issues with user:group. Lately it’s been with vendor but, then again, I wouldn’t know what to do with myself if I weren’t befuddled about something.