littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
629 stars 112 forks source link

File ss-constants.php not found after initial ss-install completed #100

Closed xiopt closed 3 years ago

xiopt commented 3 years ago

Just installed the stack on a fresh installation of Ubuntu 20.04. The installation went well, everything works from what I tested, but the error log is spammed with this line:

include_once(/var/www/meta/ss-constants.php): failed to open stream: No such file or directory in /var/www/html/wp-config.php on line 27

Contents of /var/www/meta:

-rw-rw-r-- 1 www-data www-data 481K May 18 11:38 adminer.php
drwxr-xr-x 4 root     root     4.0K May 18 11:25 archive
-rw-r--r-- 1 www-data www-data    0 May 18 11:35 maintenance.html
-rwxr-xr-x 1 www-data www-data 2.6K May 18 11:39 wp-cli.yml
-rw-r----- 1 robin    www-data    0 May 18 11:37 wp.sql
xiopt commented 3 years ago

I created a empty ss-constats.php file for now

jessuppi commented 3 years ago

Thanks for reporting @xiopt

I believe this is happening on new installs because ss-constants.php is created by ss-worker which doesn't run until a few minutes after ss-install has completed.

So for now I've added that snippet to ss-install-wordpress-config as well to ensure this doesn't happen.

Ref: https://github.com/littlebizzy/slickstack/commit/e041b91a7dc0986fdba4e55a701677a7496bfaf0

Until now we've tried to avoid having any bash scripts that install SlickStack core stuff, to avoid confusing users, etc... instead we've just included that in the ss core cron jobs and bash scripts. In other words, the creation/permissions of the core files and folders that involve SlickStack's general structure do not have dedicated scripts currently.

In the future we may need to rethink this a bit, but for now it should be fixed.

xiopt commented 3 years ago

Oh ok, I thought it was a leftover file from previous versions. Thanks for the info.

jessuppi commented 3 years ago

Another note on this is that there are still some cases where the public mirrors (GitHub) times out, resulting in empty files or even non-existent files. We are continuing to improve file integrity checks via wget to avoid this happening.

See this Issue for more information: https://github.com/littlebizzy/slickstack/issues/90