Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Application Login Error #3

Closed
sogewasp opened this issue Jul 4, 2019 · 5 comments
Closed

Application Login Error #3

sogewasp opened this issue Jul 4, 2019 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@sogewasp
Copy link

sogewasp commented Jul 4, 2019

Hello,

I've tried to configure the application but I've been unsuccessful so far.
I copied web application folder's content into /var/www/html/0xsp/, then added mysql credentials into application/config/database.php, accessed into the login page with user admin and password 0xsp (found on file 0xsp.sql), but then the application crashes with an error:

0xsp_Error

I've looked forward to fix the issue but I didn't find any solution.
The dologin function seems to be in the file application/controllers/Login.php but the application looks for login/dologin which does not exists.

I also noticed that the webapp has been built with CodeIgniter (v1.0 ?), but I didn't find any solution looking at his source code.

So I'm stuck now..
Have you any solution to this?

@lawrenceamer
Copy link
Owner

Hi , make sure to place .htaccess file on web application folder , if not available , make one with this code

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

@sogewasp
Copy link
Author

sogewasp commented Jul 5, 2019

Thanks for the tip !

I also had to load the rewrite module in apache2:

#> a2enmod rewrite

then add those lines in the file /etc/apache2/sites-available/000-default.conf :

<Directory "/var/www/html">
    AllowOverride All
</Directory>

and restart apache2:

#> systemctl restart apache2

Then I had another Mysql error : No Database selected
So I configured Mysql and CodeIgnite to use the correct database"

#> mysql "yourdatabasename" < 0xsp.sql

And added database details in application/config/database.php :

$db['default'] = array(
	'dsn'	=> '',
	'hostname' => 'localhost',
	'username' => 'yourdatabaseuser',
	'password' => 'yourdatabasepassword',
	'database' => 'yourdatabasename',
	'dbdriver' => 'mysqli',
	'dbprefix' => '',
	'pconnect' => FALSE,
	'db_debug' => (ENVIRONMENT !== 'production'),
	'cache_on' => FALSE,
	'cachedir' => '',
	'char_set' => 'utf8',
	'dbcollat' => 'utf8_general_ci',
	'swap_pre' => '',
	'encrypt' => FALSE,
	'compress' => FALSE,
	'stricton' => FALSE,
	'failover' => array(),
	'save_queries' => TRUE
);

Hope those information will be useful.

@wojiushixiaobai
Copy link

How to write nginx rewrite rules

@lawrenceamer
Copy link
Owner

How to write nginx rewrite rules

since the web application is made by codeigniter you can check up their solution to do it also . https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/

@lawrenceamer lawrenceamer added the documentation Improvements or additions to documentation label Aug 19, 2019
@lawrenceamer
Copy link
Owner

the newer version supports node js, which is compatible with any operating system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants