echoCTF / echoCTF.RED

A platform to develop, run and administer CTF competitions. The online echoCTF.RED platform user interfaces and codebase
https://echoCTF.RED/
BSD 2-Clause "Simplified" License
114 stars 24 forks source link

Frontend 404 Page Error After Manual Installation #544

Closed mirfansulaiman closed 2 years ago

mirfansulaiman commented 2 years ago

Hi Team,

I am facing issues after manual installation, I followed this step https://echoctfred.readthedocs.io/INSTALL-LINUX/ and got an error after the installation was completed when opened the frontend page, for every page I got an error 404.

image

Do you have any solution to fix that? or did I miss something?

OS: Debian 10 php: 7.2 composer: 2.2.4

proditis commented 2 years ago

Hi there,

Can you please try the following and report back?

  1. Check that select count(*) from url_route returns non 0
  2. Check that select val from sysconfig where id='routes' returns a value other than null or false
  3. Import the init mysql < /etc/mysql-init.sql and see if you get any errors
mirfansulaiman commented 2 years ago

Hi @proditis ,

Here is the output:

  1. select count(*) from url_route image

  2. select val from sysconfig where id='routes' image

  3. mysql < /etc/mysql-init.sql image

proditis commented 2 years ago

Thank you for the provided info @mirfansulaiman,

I guess the previous commands did not fix the problem :smiling_face_with_tear: ?

If not please try the following:

  1. log into the backend with the admin user you created and go to Settings=>Configure
  2. Fill in the details you'd like for your installation, making sure Event Active is checked.
  3. Once done check the frontend again and see if the problem is gone

edit: I just noticed that your database is called ctftiket and not echoCTF. If this is indeed the name of your database edit the mysql-init.sql and replace the echoCTF references with your database name (eg ctftiket). Dont forget to reimport mysql-init.sql if you made changes.

mirfansulaiman commented 2 years ago

Hi @proditis ,

I just recreated the frontend app and still not working :'( it seems the route URL is missing on the frontend.

proditis commented 2 years ago

This is not helping unfortunately.

Did you follow my previous instructions? Is the database still named ctftiket? have you edited the mysql-init as instructed?

mirfansulaiman commented 2 years ago

Yes, I'm following your instruction even database name ctftiket or echoCTF.

proditis commented 2 years ago

The url rules are kept on memcache. If your database is not properly configured then there will be no url rules loaded there, just as your case.

  1. What is your database called?
  2. Can you show your mysql-init.sql?
  3. Show output of the following commands
    SELECT memc_get('sysconfig:routes');
    CALL init_mysql();
    SELECT memc_get('sysconfig:routes');
proditis commented 2 years ago

Closing this due to lack of information. Feel free to open a new issue if you're still having issues.