N3TC4T / Hotel-Management-System

Web Base Hotel Management System base on CI
67 stars 64 forks source link

Help of Your Project #2

Open SabanMishriya opened 6 years ago

SabanMishriya commented 6 years ago

hi sir login and other things are not opening , i am running first time but didn't load the page please can you help me my email id is saban313@gmail.com

N3TC4T commented 6 years ago

Hey did you rename the htaccess file to .htaccess ?

SabanMishriya commented 6 years ago

No sir

SabanMishriya commented 6 years ago

but didn't load any page i will send the screen shot screenshot ![Uploading Screenshot.png…]()

SabanMishriya commented 6 years ago

this page only opening others not opening

SabanMishriya commented 6 years ago

Sir Now template run but how to run other pages Please here i am waiting for Your Reply sir

cassystech commented 6 years ago

please give admin panel login id and pswd and also front end

N3TC4T commented 6 years ago

@cassystech for login on admin dashboard use : admin:guards

SabanMishriya commented 6 years ago

admin:guards password not opening

what is user name and what is password please let me know

cassystech commented 6 years ago

thank you

SabanMishriya commented 6 years ago

@cassystech Your password worked please tell me i am waiting please tell me user name and password

cassystech commented 6 years ago

@SabanMishriya go to login type username admin and pswd guards

SabanMishriya commented 6 years ago

Not opening it will show above error msg what can i do please help me @cassystech

SabanMishriya commented 6 years ago

@cassystech The requested URL /Hotel-Management-System-master/admin/login/validate_credentials was not found on this server. this is my error please reply sir

http://127.0.0.1/Hotel-Management-System-master/index.php/user this Url type then open LOG in page na is it correct

cassystech commented 6 years ago

plz provide frontent details more

cassystech commented 6 years ago

@SabanMishriya http://localhost/Hotel-Management-System-master/admin

SabanMishriya commented 6 years ago

@cassystech not opening sir same error

The requested URL /Hotel-Management-System-master/admin/login/validate_credentials was not found on this server.

SabanMishriya commented 6 years ago

please tell me the validate_credentials code or what because i didn't c in my folder so

Akosss commented 6 years ago

hello, i think i can help with that. make sure your main htaccess file begins with a ".", for example, the project comes with an htaccess file without a DOT. so change is to this ".htaccess". hope it helps.

delete-this-account commented 6 years ago

For all who have issues loging in with admin. Note as below:

1) goto http://localhost/hotelms/admin or whatever your setup is and add the /admin 2) The admin password is not "guards" as told above. Its "admin123" which is the decrypted md5 of the given as 0192023a7bbd73250516f069df18b500 in the mysql entry. 3) The admin password is set using md5("yourpassword"), so do this in a php file to create/echo your new password:

<?php echo md5("guards"); // Will give you: ae72b1c489f5ee5afe76bc4ece3ab74c // Not as given: 0192023a7bbd73250516f069df18b500 ?> 4) So, guards will give you ae72b1c489f5ee5afe76bc4ece3ab74c

Hope that helps others.

SabanMishriya commented 6 years ago

I didn't solve still now and i didn't understand please explain @samimi-it and where should i change and md5 is nerw one or old please explain

delete-this-account commented 6 years ago

@SabanMishriya:

All the passwords of this project are using MD5 encryption.

1) Make a new php file in your localhost root folder and name it makepassword.php 2) Copy and Paste the code given below inside that file.

<?php echo md5("what-ever-password-you-want-to-encrypt-with-md5"); // Note: Change the "what-ever-password-you-want-to-encrypt-with-md5" with your required password ?>

3) then run it inside your browser like below:

http://localhost/makepassword.php

4) You can see the output of the echo as it makes and shows you the MD5 of the password that you want.

Also regarding the login page for the admin of this project, use the given below.

Username: admin Password: admin123

Question: How new are you to php?

If the answer is less than a year, then please avoid this project as it requires advance knowledge of PHP, OOP and MVC.

Start learning PHP first, OOP along, then understand the MVC mindset, then Codeigniter.

Lastly, don't quit.

SabanMishriya commented 6 years ago

not too much knowledge but ok, and done md5 in root folder and run the program and after i come in login page , as same error occur again @samimi-it

delete-this-account commented 6 years ago

No worries. I will guide you to a fix. What is your folder name for this project?

Can you please rename it to "hotelms" so our links and following discussions will be uniform as below:

1) After the folder rename and visiting the above links, what do you get in the browser? 2) If admin page showed, can you login with the username as admin and password as admin123?

You must be able to view the links as the attached two pics.

hms_root_1 hms_admin_1

SabanMishriya commented 6 years ago

Back end opened and admin panel not opened

SabanMishriya commented 6 years ago

My admin page opening link is localhost/hotelms/index.php/user it's different and why @samimi-it sht please check my url sht2

SabanMishriya commented 6 years ago

Can you send full code with instructions at my email please :-saban313@gmail.com @samimi-it

delete-this-account commented 6 years ago

@SabanMishriya:

Can you send full code with instructions at my email please :-saban313@gmail.com @samimi-it

Sorry to say No! Discussion is to be public for all.

delete-this-account commented 6 years ago

Akosss commented on Mar 1

hello, i think i can help with that. make sure your main htaccess file begins with a ".", for example, the project comes with an htaccess file without a DOT. so change is to this ".htaccess". hope it helps.

@SabanMishriya: Do as given above by Akosss commented on Mar 1

SabanMishriya commented 6 years ago

yes final done thank thank you very much if any doubt i will ask you please help me @samimi-it

delete-this-account commented 6 years ago

@SabanMishriya: Glad it fixed. You are most welcome and sure will help as long as it remains here as a public thread.

SabanMishriya commented 6 years ago

how to open customer dashborad and how to reserve a room @samimi-it

delete-this-account commented 6 years ago

Under the red login button click the:

Don't have account ?

Then do as you see in the pics below:

hms_root_newperson_1 hms_root_newperson_2

SabanMishriya commented 6 years ago

now front end not load fully what can i do

sht2

delete-this-account commented 6 years ago

If you get this error:

Oh snap! Wrong username or password ! Or maybe your account is not verified yet !

Then goto phpmyadmin in the Table: tbl_customer and activate the account by setting the verifyed field value to 1. This will activate the new account since this is a local dummy setup, we don't have the activation mechanism.

See pics below. hms_root_newperson_3 hms_root_newperson_4 hms_root_newperson_5

SabanMishriya commented 6 years ago

front end design not opening properly what can i do @samimi-it

delete-this-account commented 6 years ago

@SabanMishriya:

It seems you still have htaccess problem with WAMP.

How to Enable .htaccess in WAMP Server

To Enable .htaccess in WAMP Server use the following steps:

STEP 1: click on Wampserver and select apache->httpd.conf http://www.bsourcecode.com/wp-content/uploads/2013/04/How-to-Enable-.htaccess-in-WAMP-Server-step1.png

STEP 2: Find and replace the following text Find #LoadModule rewrite_module modules/mod_rewrite.so Replace LoadModule rewrite_module modules/mod_rewrite.so http://www.bsourcecode.com/wp-content/uploads/2013/04/How-to-Enable-.htaccess-in-WAMP-Server-step2-300x202.png

STEP 3: Restart Wamp Server http://www.bsourcecode.com/wp-content/uploads/2013/04/How-to-Enable-.htaccess-in-WAMP-Server-step3.png

Now .htaccess will work successfully

Full article link: http://www.bsourcecode.com/php/how-to-enable-htaccess-in-wamp-server/

SabanMishriya commented 6 years ago

i am not replace because it already like that only LoadModule rewrite_module modules/mod_rewrite.so if i add # then again error @samimi-it

delete-this-account commented 6 years ago

send the screen shot of your folder content to show the directory structure.

SabanMishriya commented 6 years ago

sht3

@samimi-it

delete-this-account commented 6 years ago

hms_root_files

delete-this-account commented 6 years ago

Your config.php, database.php should be like below.

hms_config_1

hms_config_2

And the database should look like below.

hms_config_3

Or set to whatever your user name and password is for phpmyadmin/mysql

delete-this-account commented 6 years ago

@SabanMishriya:

Are your database and tables setup?

check the settings for both config.php and database.php I gave above your reply.

SabanMishriya commented 6 years ago

ya it is same @samimi-it

delete-this-account commented 6 years ago

Delete your screen shots you sent above they are of the wrong directry.

Also paste your setting here as text for both config and database.

Inside config.php:

$config['base_url'] = 'http://localhost/hotelms/';

Inside database.php:

$db['default']['hostname'] = '127.0.0.1'; $db['default']['username'] = 'root'; $db['default']['password'] = 'root123'; $db['default']['database'] = 'hotelms';

SabanMishriya commented 6 years ago

what can i do now

SabanMishriya commented 6 years ago

config.php<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/* -------------------------------------------------------------------------- Base Site URL
URL to your CodeIgniter root. Typically this will be your base URL,
WITH a trailing slash:
http://example.com/
If this is not set then CodeIgniter will guess the protocol, domain and
path to your installation.

*/ $config['base_url'] = 'http://localhost/hotelms/';

/* -------------------------------------------------------------------------- Index File
Typically this will be your index.php file, unless you've renamed it to
something else. If you are using mod_rewrite to remove the page set this
variable so that it is blank.

*/ $config['index_page'] = '';

/* -------------------------------------------------------------------------- URI PROTOCOL
This item determines which server global should be used to retrieve the
URI string. The default setting of 'AUTO' works for most servers.
If your links do not seem to work, try one of the other delicious flavors:
'AUTO' Default - auto detects
'PATH_INFO' Uses the PATH_INFO
'QUERY_STRING' Uses the QUERY_STRING
'REQUEST_URI' Uses the REQUEST_URI
'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO

*/ $config['uri_protocol'] = 'AUTO';

/* -------------------------------------------------------------------------- URL suffix
This option allows you to add a suffix to all URLs generated by CodeIgniter.
For more information please see the user guide:
http://codeigniter.com/user_guide/general/urls.html

*/

$config['url_suffix'] = '';

/* -------------------------------------------------------------------------- Default Language
This determines which set of language files should be used. Make sure
there is an available translation if you intend to use something other
than english.

*/ $config['language'] = 'english';

/* -------------------------------------------------------------------------- Default Character Set
This determines which character set is used by default in various methods
that require a character set to be provided.

*/ $config['charset'] = 'UTF-8';

/* -------------------------------------------------------------------------- Enable/Disable System Hooks
If you would like to use the 'hooks' feature you must enable it by
setting this variable to TRUE (boolean). See the user guide for details.

*/ $config['enable_hooks'] = FALSE;

/* -------------------------------------------------------------------------- Class Extension Prefix
This item allows you to set the filename/classname prefix when extending
native libraries. For more information please see the user guide:
http://codeigniter.com/user_guide/general/core_classes.html
http://codeigniter.com/user_guide/general/creating_libraries.html

*/ $config['subclassprefix'] = 'MY';

/* -------------------------------------------------------------------------- Allowed URL Characters
This lets you specify with a regular expression which characters are permitted
within your URLs. When someone tries to submit a URL with disallowed
characters they will get a warning message.
As a security measure you are STRONGLY encouraged to restrict URLs to
as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
Leave blank to allow all characters -- but only if you are insane.
DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!

*/

$config['permitted_urichars'] = 'a-z 0-9~%.\:-';

/* -------------------------------------------------------------------------- Enable Query Strings
By default CodeIgniter uses search-engine friendly segment based URLs:
example.com/who/what/where/
By default CodeIgniter enables access to the $_GET array. If for some
reason you would like to disable it, set 'allow_get_array' to FALSE.
You can optionally enable standard query string based URLs:
example.com?who=me&what=something&where=here
Options are: TRUE or FALSE (boolean)
The other items let you set the query string 'words' that will
invoke your controllers and its functions:
example.com/index.php?c=controller&m=function
Please note that some of the helpers won't work as expected when
this feature is enabled, since CodeIgniter is designed primarily to
use segment based URLs.

*/ $config['allow_get_array'] = TRUE; $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; // experimental not currently in use

/* -------------------------------------------------------------------------- Error Logging Threshold
If you have enabled error logging, you can set an error threshold to
determine what gets logged. Threshold options are:
You can enable error logging by setting a threshold over zero. The
threshold determines what gets logged. Threshold options are:
0 = Disables logging, Error logging TURNED OFF
1 = Error Messages (including PHP errors)
2 = Debug Messages
3 = Informational Messages
4 = All Messages
For a live site you'll usually only enable Errors (1) to be logged otherwise
your log files will fill up very fast.

*/ $config['log_threshold'] = 0;

/* -------------------------------------------------------------------------- Error Logging Directory Path
Leave this BLANK unless you would like to set something other than the default
application/logs/ folder. Use a full server path with trailing slash.

*/ $config['log_path'] = '';

/* -------------------------------------------------------------------------- Date Format for Logs
Each item that is logged has an associated date. You can use PHP date
codes to set your own date formatting

*/ $config['log_date_format'] = 'Y-m-d H:i:s';

/* -------------------------------------------------------------------------- Cache Directory Path
Leave this BLANK unless you would like to set something other than the default
system/cache/ folder. Use a full server path with trailing slash.

*/ $config['cache_path'] = '';

/* -------------------------------------------------------------------------- Encryption Key
If you use the Encryption class or the Session class you
MUST set an encryption key. See the user guide for info.

*/ $config['encryption_key'] = 'HKe9bg56Vk9RufyPe6SR87tqJgs5X73d';

/* -------------------------------------------------------------------------- Session Variables
'sess_cookie_name' = the name you want for the cookie
'sess_expiration' = the number of SECONDS you want the session to last.
by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
'sess_expire_on_close' = Whether to cause the session to expire automatically
when the browser window is closed
'sess_encrypt_cookie' = Whether to encrypt the cookie
'sess_use_database' = Whether to save the session data to a database
'sess_table_name' = The name of the session database table
'sess_match_ip' = Whether to match the user's IP address when reading the session data
'sess_match_useragent' = Whether to match the User Agent when reading the session data
'sess_time_to_update' = how many seconds between CI refreshing Session Information

*/ $config['sess_cookie_name'] = 'ci_cookie'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = TRUE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = TRUE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300;

/* -------------------------------------------------------------------------- Cookie Related Variables
'cookie_prefix' = Set a prefix if you need to avoid collisions
'cookie_domain' = Set to .your-domain.com for site-wide cookies
'cookie_path' = Typically will be a forward slash
'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.

*/ $config['cookie_prefix'] = ""; $config['cookie_domain'] = ""; $config['cookie_path'] = "/"; $config['cookie_secure'] = FALSE;

/* -------------------------------------------------------------------------- Global XSS Filtering
Determines whether the XSS filter is always active when GET, POST or
COOKIE data is encountered

*/ $config['global_xss_filtering'] = FALSE;

/* -------------------------------------------------------------------------- Cross Site Request Forgery
Enables a CSRF cookie token to be set. When set to TRUE, token will be
checked on a submitted form. If you are accepting user data, it is strongly
recommended CSRF protection be enabled.
'csrf_token_name' = The token name
'csrf_cookie_name' = The cookie name
'csrf_expire' = The number in seconds the token should expire.

*/ $config['csrf_protection'] = FALSE; $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200;

/* -------------------------------------------------------------------------- Output Compression
Enables Gzip output compression for faster page loads. When enabled,
the output class will test whether your server supports Gzip.
Even if it does, however, not all browsers support compression
so enable only if you are reasonably sure your visitors can handle it.
VERY IMPORTANT: If you are getting a blank page when compression is enabled it
means you are prematurely outputting something to your browser. It could
even be a line of whitespace at the end of one of your scripts. For
compression to work, nothing can be sent before the output buffer is called
by the output class. Do not 'echo' any values with compression enabled.

*/ $config['compress_output'] = FALSE;

/* -------------------------------------------------------------------------- Master Time Reference
Options are 'local' or 'gmt'. This pref tells the system whether to use
your server's local time as the master 'now' reference, or convert it to
GMT. See the 'date helper' page of the user guide for information
regarding date handling.

*/ $config['time_reference'] = 'local';

/* -------------------------------------------------------------------------- Rewrite PHP Short Tags
If your PHP installation does not have short tag support enabled CI
can rewrite the tags on-the-fly, enabling you to utilize that syntax
in your view files. Options are TRUE or FALSE (boolean)

*/ $config['rewrite_short_tags'] = FALSE;

/* -------------------------------------------------------------------------- Reverse Proxy IPs
If your server is behind a reverse proxy, you must whitelist the proxy IP
addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
header in order to properly identify the visitor's IP address.
Comma-delimited, e.g. '10.0.1.200,10.0.1.201'

*/ $config['proxy_ips'] = '';

/ End of file config.php / / Location: ./application/config/config.php /

SabanMishriya commented 6 years ago
database.php <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /* ------------------------------------------------------------------- DATABASE CONNECTIVITY SETTINGS
This file will contain the settings needed to access your database.
For complete instructions please consult the 'Database Connection'
page of the User Guide.
-------------------------------------------------------------------
EXPLANATION OF VARIABLES
-------------------------------------------------------------------
['hostname'] The hostname of your database server.
['username'] The username used to connect to the database
['password'] The password used to connect to the database
['database'] The name of the database you want to connect to
['dbdriver'] The database type. ie: mysql. Currently supported:
             mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
['dbprefix'] You can add an optional prefix, which will be added to the table name when using the Active Record class ['pconnect'] TRUE/FALSE - Whether to use a persistent connection ['db_debug'] TRUE/FALSE - Whether database errors should be displayed. ['cache_on'] TRUE/FALSE - Enables/disables query caching ['cachedir'] The path to the folder where cache files should be stored ['char_set'] The character set used in communicating with the database ['dbcollat'] The character collation used in communicating with the database NOTE: For MySQL and MySQLi databases, this setting is only used as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7 (and in table creation queries made with DB Forge). There is an incompatibility in PHP with mysql_real_escape_string() which can make your site vulnerable to SQL injection if you are using a multi-byte character set and are running versions lower than these. Sites using Latin-1 or UTF-8 database character set and collation are unaffected. ['swap_pre'] A default table prefix that should be swapped with the dbprefix ['autoinit'] Whether or not to automatically initialize the database. ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections - good for ensuring strict SQL while developing
The $active_group variable lets you choose which connection group to
make active. By default there is only one group (the 'default' group).
The $active_record variables lets you determine whether or not to load
the active record class

*/

$active_group = 'default'; $active_record = TRUE;

$db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'root'; $db['default']['password'] = ''; $db['default']['database'] = 'hms';

$db['default']['dbdriver'] = 'mysql'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE;

/ End of file database.php / / Location: ./application/config/database.php /

delete-this-account commented 6 years ago

settings? I don't see anything that you pasted?

delete-this-account commented 6 years ago

If you still don't see the pages, I 100% doubt your WAMP settings for rewrite_module is bad or a faulty WAMP installation, or perhaps you are changing the wrong file.

Just in case, see if this is also enabled:

Wampmanager tray icon -> Apache -> Apache modules -> autoindex_module

Read this link for more info on WAMP 64 bit issues.

http://forum.wampserver.com/read.php?2,140721,printview,page=1

SabanMishriya commented 6 years ago

yes that one also enabled