Nakiami / mellivora

Mellivora is a CTF engine written in PHP
GNU General Public License v3.0
441 stars 171 forks source link

Challenges not showing #63

Closed semprix closed 8 years ago

semprix commented 8 years ago

Only 1 challenge is being showed on /challenges and submission button is not visible.

Challenge management image

Challenge page Only 1 challenge showed on this category, "Submission button is also missing" image

Not sure if this is a bug or it has something to do with some settings.

0x90n commented 8 years ago

Have you set the time for release yet? Maybe it's set to open in the future. Additionally, ensure your server has NTP set up and is synced properly with your timezone :)

Nakiami commented 8 years ago

If I had to guess I'd say, as Shad0wSt3p pointed out, that you probably have some differences in time[zone] configuration between one or all of your web server, php, database and os..

Nakiami commented 8 years ago

I just added a timezone check for the admin page. Try pulling the latest version and see if it triggers. There should be a red box with warnings on the admin page if the timezones are different.

semprix commented 8 years ago

Timezone setting on OS and php.ini are both set correctly, how about the submission button missing?

semprix commented 8 years ago

Issue still exist after pulling the latest commits...

Tested on 4 browsers, Safari, Opera, Chrome and Firefox.

OS Version: Debian 8.4 root@ctfbox:/var/www/mellivora/include# uname -a Linux ctfbox 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

PHP Version: root@ctfbox:/var/www/mellivora/include# php --version PHP 5.6.20-0+deb8u1 (cli) (built: Apr 27 2016 11:26:05) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies root@ctfbox:/var/www/mellivora/include#

Debian Timezone root@ctfbox:/var/www/mellivora/include# cat /etc/timezone Asia/Manila root@ctfbox:/var/www/mellivora/include#

PHP Timezone root@ctfbox:/var/www/mellivora/include# cat /etc/php5/apache2/php.ini | grep date.timezone ; http://php.net/date.timezone date.timezone = "Asia/Manila" root@ctfbox:/var/www/mellivora/include#

MySQL Timezone mysql> SELECT @@global.time_zone, @@session.time_zone; +--------------------+---------------------+ | @@global.time_zone | @@session.time_zone | +--------------------+---------------------+ | SYSTEM | SYSTEM | +--------------------+---------------------+ 1 row in set (0.00 sec)

Screenshots image

image

image

Nakiami commented 8 years ago

Not sure what it could be. Could you upload or send me a database dump?

semprix commented 8 years ago

Hi you may download it from http://www.devio.us/~semprix/mellivora.zip included the htdocs and .sql file.

Nakiami commented 8 years ago

I imported the dump and it works fine on my end. Can you attach your configuration file?

semprix commented 8 years ago

Configs can be downloaded at http://www.devio.us/~semprix/configs.zip

thanks

Nakiami commented 8 years ago

Can't see anything amiss there. Could you try manually forcing the timezone in your config file by uncommenting/updating two lines up the top?

//const CONFIG_DATE_DEFAULT_TIMEZONE = 'Australia/Sydney'; //date_default_timezone_set(CONFIG_DATE_DEFAULT_TIMEZONE);

Do you have any output in the apache log files?

semprix commented 8 years ago

This is the "Fatal" error, could this be the culprit?

image

Uncommented the timezone setting.

image

Still nothing

image

Also I noticed that on /challenges URL the footer are gone....

semprix commented 8 years ago

This could be missing in composer?

Nakiami commented 8 years ago

Ah, yeah, you'll need php-pear installed. Try $ sudo apt-get install php-pear or $ wget http://pear.php.net/go-pear.phar $ php go-pear.phar

semprix commented 8 years ago

That works! closing this issue now.....