Closed harperaa closed 4 years ago
Hi there,
Thank you so so much for your extensive report and I am terribly sorry you had to suffer through our lack of documentation for the installation.
Regarding last problem create the folders frontend/web/assets
and backend/web/assets
and make sure they are writable from www-data
or whatever the user of your web server is.
I will update the documentation to address your issues :)
@harperaa Can you please provide the error output from composer install
without the –ignore-platform-reqs
if possible, so that I can investigate this as well?
@harperaa Can you please provide the error output from
composer install
without the–ignore-platform-reqs
if possible, so that I can investigate this as well?
Here you go, for both backend and frontend... I tried to resolve the issues but ended up in a mess... thus the ignore command... root@ubuntu:/var/www/echoCTF.RED/backend# composer install Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for codeception/base 2.3.9 -> satisfiable by codeception/base[2.3.9].
To enable extensions, verify that they are enabled in your .ini files:
/etc/php/7.4/cli/conf.d/25-memcached.ini
You can also run php --ini
inside terminal to see which files are used by PHP in CLI mode.
root@ubuntu:/var/www/echoCTF.RED/backend# cd ../frontend/
root@ubuntu:/var/www/echoCTF.RED/frontend# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
Installation request for codeception/base 2.3.9 -> satisfiable by codeception/base[2.3.9].
To enable extensions, verify that they are enabled in your .ini files:
php --ini
inside terminal to see which files are used by PHP in CLI mode.
root@ubuntu:/var/www/echoCTF.RED/frontend# If you are willing to give it another try here is an update Linux specific guide
https://github.com/echoCTF/echoCTF.RED/blob/master/docs/INSTALL-LINUX.md
Make sure you have an updated echoCTF.RED repo since a lot of changes have taken place.
I think we're passed all these issues so we can safely close this.
I followed the instructions in the installation doc. I ran into several issues, I worked around... here are my notes. Installed on Ubuntu LTS 18.04
composer command gave several dependency errors, had to use following. composer install –ignore-platform-reqs
yii command is migrate, not migration... had to run as below.
root@ubuntu:/var/www/echoCTF.RED/backend# ./yii migrate --interactive=0 Yii Migration Tool (based on Yii v2.0.32)
Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [1049] Unknown database 'echoCTF_dev''
in /var/www/echoCTF.RED/backend/vendor/yiisoft/yii2/db/Connection.php:635
Stack trace:
0 /var/www/echoCTF.RED/backend/vendor/yiisoft/yii2/db/Connection.php(1015): yii\db\Connection->open()
1 /var/www/echoCTF.RED/backend/vendor/yiisoft/yii2/db/Connection.php(1002): yii\db\Connection->getMasterPdo()
#
root@ubuntu:/var/www/echoCTF.RED/backend# grep -nr "echoCTF_dev" . ./config/db-sample.php:5: 'dsn' => 'mysql:host=localhost;dbname=echoCTF_dev', ./config/db.php:5: 'dsn' => 'mysql:host=localhost;dbname=echoCTF_dev', ./runtime/logs/app.log:1:2020-03-06 22:57:49 [-][-][-][error][yii\db\Exception] PDOException: SQLSTATE[HY000] [1049] Unknown database 'echoCTF_dev' in /var/www/echoCTF.RED/backend/vendor/yiisoft/yii2/db/Connection.php:698 ./runtime/logs/app.log:28:Next yii\db\Exception: SQLSTATE[HY000] [1049] Unknown database 'echoCTF_dev' in /var/www/echoCTF.RED/backend/vendor/yiisoft/yii2/db/Connection.php:635 root@ubuntu:/var/www/echoCTF.RED/backend#
root@ubuntu:/var/www/echoCTF.RED/backend# vi config/db-sample.php root@ubuntu:/var/www/echoCTF.RED/backend# vi config/db.php root@ubuntu:/var/www/echoCTF.RED/backend# ./yii migrate --interactive=0 Yii Migration Tool (based on Yii v2.0.32)
Total 6 new migrations to be applied: m200207_093104_version_bump_v0_10 …
... that worked.
then, when trying to run the index.php I kept running into server errors and figured out that memcached was not installed...
errors can be seen in cat /var/log/apache2/error.log
to fix, installed memcached
add-apt-repository ppa:ondrej/php sudo apt-get install -y php php-dev php-pear libapache2-mod-php apt-get install -y php-memcached
root@ubuntu:/var/www/echoCTF.RED/backend# cat /etc/apache2/sites-available/echoCTF.RED.conf <VirtualHost :80> ServerAdmin webmaster@localhost ServerName echoCTF.RED ServerAlias www.your_domain DocumentRoot /var/www/echoCTF.RED/frontend/web/ ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined DirectoryIndex index.php <VirtualHost :80> ServerName backend.echoCTF.RED DocumentRoot "/var/www/echoCTF.RED/backend/web/" DirectoryIndex index.php ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
then restart apache2
systemctl reload apache2
I got the website to comeup, but now it appears the controller is not working, as any clicks on links send 404 errors, it seems as the controller is not routing to the sub pages and forms... please advise how to start controller or any other guidance needed to operate the system.
When, I goto backend.echoCTF.RED (using /etc/hosts file for DNS to 127.0.0.1), that web page throws many errors as follows....
Invalid Configuration – yii\base\InvalidConfigException The directory is not writable by the Web process: /var/www/echoCTF.RED/backend/web/assets
Please advise how to proceed and troubleshoot further if needed.