• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CommunityAuth

#1
Hi skunkbad, I've downloaded XAMPP and CodeIgniter 3 and they are working OK.

I've downloaded Community Auth For CodeIgniter 3 and copied and pasted it into CodeIgniter’s application/third_party directory.

Instruction (3) is difficult to understand. "Copy [which] files from community_auth package to CodeIgniter’s application [which] sub-directories."

I've followed the other instructions but if I point my browser to http://localhost/examples/create_user I get the following result;

Service unavailable!
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
If you think this is a server error, please contact the webmaster.

Error 503
localhost
Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8
Reply

#2
Instruction (3) is telling you that since you are on Windows, skip to step (4).

(4) Copy MY_Controller.php, MY_Input.php, and MY_Model.php from community_auth/core to CodeIgniter’s application/core directory.

(5) Copy auth_constants.php from community_auth/hooks to CodeIgniter’s application/hooks directory.

(6) Copy the Examples controller in community_auth/controllers to CodeIgniter’s application/controllers directory.

(7) The .htaccess file in community_auth/public_root can be moved to CodeIgniter’s public root directory. Notice the lines at the top that allow for access denial. If you already have an .htaccess file, make sure to include those lines at the top of it.

What about these steps (4 through 7) do you not understand?
Reply

#3
(08-21-2015, 01:58 PM)skunkbad Wrote: Instruction (3) is telling you that since you are on Windows, skip to step (4).

(4) Copy MY_Controller.php, MY_Input.php, and MY_Model.php from community_auth/core to CodeIgniter’s application/core directory.

(5) Copy auth_constants.php from community_auth/hooks to CodeIgniter’s application/hooks directory.

(6) Copy the Examples controller in community_auth/controllers to CodeIgniter’s application/controllers directory.

(7) The .htaccess file in community_auth/public_root can be moved to CodeIgniter’s public root directory. Notice the lines at the top that allow for access denial. If you already have an .htaccess file, make sure to include those lines at the top of it.

What about these steps (4 through 7) do you not understand?

I understand 4 to 6 and have rechecked those but (7) is difficult to understand.

This is the content of the existing .htaccess file in CodeIgniter’s public root directory;

Code:
<IfModule authz_core_module>
   Require all denied
</IfModule>
<IfModule !authz_core_module>
   Deny from all
</IfModule>

And this is the content of the community_auth/public_root .htaccess file;

Code:
# MAKE SURE TO LEAVE THE NEXT TWO LINES HERE.
# BEGIN DENY LIST --
# END DENY LIST --

I guess the # is commenting out however I have tried including those lines at the top of the existing but still get the error.

Aside from CommunityAuth, I have checked index.php in CodeIgniter’s public root directory and curious about the bottom line;

Code:
require_once BASEPATH.'core/CodeIgniter.php';

I cannot find CodeIgniter.php
Reply

#4
(08-21-2015, 05:26 PM)christaliise Wrote:
(08-21-2015, 01:58 PM)skunkbad Wrote: Instruction (3) is telling you that since you are on Windows, skip to step (4).

(4) Copy MY_Controller.php, MY_Input.php, and MY_Model.php from community_auth/core to CodeIgniter’s application/core directory.

(5) Copy auth_constants.php from community_auth/hooks to CodeIgniter’s application/hooks directory.

(6) Copy the Examples controller in community_auth/controllers to CodeIgniter’s application/controllers directory.

(7) The .htaccess file in community_auth/public_root can be moved to CodeIgniter’s public root directory. Notice the lines at the top that allow for access denial. If you already have an .htaccess file, make sure to include those lines at the top of it.

What about these steps (4 through 7) do you not understand?

I understand 4 to 6 and have rechecked those but (7) is difficult to understand.

This is the content of the existing .htaccess file in CodeIgniter’s public root directory;


Code:
<IfModule authz_core_module>
   Require all denied
</IfModule>
<IfModule !authz_core_module>
   Deny from all
</IfModule>

And this is the content of the community_auth/public_root .htaccess file;


Code:
# MAKE SURE TO LEAVE THE NEXT TWO LINES HERE.
# BEGIN DENY LIST --
# END DENY LIST --

I guess the # is commenting out however I have tried including those lines at the top of the existing but still get the error.

Aside from CommunityAuth, I have checked index.php in CodeIgniter’s public root directory and curious about the bottom line;


Code:
require_once BASEPATH.'core/CodeIgniter.php';

I cannot find CodeIgniter.php

CodeIgniter.php is in system/core, which is a CodeIgniter system file.

If you are not able to use the commented lines in your .htaccess file, then leave it out for now. It's unlikely that you will need those lines there.
Reply

#5
(08-21-2015, 09:27 PM)skunkbad Wrote:
(08-21-2015, 05:26 PM)christaliise Wrote:
(08-21-2015, 01:58 PM)skunkbad Wrote: Instruction (3) is telling you that since you are on Windows, skip to step (4).

(4) Copy MY_Controller.php, MY_Input.php, and MY_Model.php from community_auth/core to CodeIgniter’s application/core directory.

(5) Copy auth_constants.php from community_auth/hooks to CodeIgniter’s application/hooks directory.

(6) Copy the Examples controller in community_auth/controllers to CodeIgniter’s application/controllers directory.

(7) The .htaccess file in community_auth/public_root can be moved to CodeIgniter’s public root directory. Notice the lines at the top that allow for access denial. If you already have an .htaccess file, make sure to include those lines at the top of it.

What about these steps (4 through 7) do you not understand?

I understand 4 to 6 and have rechecked those but (7) is difficult to understand.

This is the content of the existing .htaccess file in CodeIgniter’s public root directory;



Code:
<IfModule authz_core_module>
   Require all denied
</IfModule>
<IfModule !authz_core_module>
   Deny from all
</IfModule>

And this is the content of the community_auth/public_root .htaccess file;



Code:
# MAKE SURE TO LEAVE THE NEXT TWO LINES HERE.
# BEGIN DENY LIST --
# END DENY LIST --

I guess the # is commenting out however I have tried including those lines at the top of the existing but still get the error.

Aside from CommunityAuth, I have checked index.php in CodeIgniter’s public root directory and curious about the bottom line;



Code:
require_once BASEPATH.'core/CodeIgniter.php';

I cannot find CodeIgniter.php

CodeIgniter.php is in system/core, which is a CodeIgniter system file.

If you are not able to use the commented lines in your .htaccess file, then leave it out for now. It's unlikely that you will need those lines there.

I am still no wiser as to what is causing the error;

Service unavailable!
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
If you think this is a server error, please contact the webmaster.

Error 503
localhost
Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.6.8
Reply

#6
I'm sorry, but without server access, I'm not sure I can help, other than to suggest turning on logging in application/config/config.php and seeing if you have some helpful logging to look at.
Reply

#7
(08-22-2015, 04:37 PM)skunkbad Wrote: I'm sorry, but without server access, I'm not sure I can help, other than to suggest turning on logging in application/config/config.php and seeing if you have some helpful logging to look at.

OK, I've changed application/config/config.php to;
Code:
$config['log_threshold'] = 4;

I assume there should be files created in application/logs but there remains only index.html

I've also tried 3 browsers - IE, Chrome & Firefox, and all give the same result.

Can anybody else help?
Reply

#8
Perhaps you can make a zip of your entire website files, and include a database dump, then make it available for download so I can check it out.
Reply

#9
(08-23-2015, 01:45 PM)skunkbad Wrote: Perhaps you can make a zip of your entire website files, and include a database dump, then make it available for download so I can check it out.

Maybe I can try to do that later, but I'd like to learn what I'm doing wrong.   I've read your instructions many times and curious about 4, 5, 6 & 11.

You use the word "Copy" which means;
4. having a file remaining in community_auth/core AND another new file in CodeIgniter’s application/core directory, 2 files in total.
5. having a file remaining in community_auth/hooks AND another new file in CodeIgniter’s application/hooks directory, 2 files in total.
6. having a file remaining in community_auth/controllers AND another new file in CodeIgniter’s application/controllers directory, 2 files in total.

or do you mean "Cut" or "Transfer" and having only the new files in the CodeIgniter's directories, 1 file in each directory?   I have tried deleting the community_auth files but it makes no difference.

Another area where I suspect maybe causing the error is the failure to set the encryption key.   11. Enable hooks and "make sure there is an encryption key set" in config/config.php.   I enabled the hooks but I'm confused about setting the encryption key.

Undoubtedly I'll need to learn how to encrypt data at a later stage in the development process.

I've read "Setting your encryption_key" in the user_guide\libraries\encryption.html and wonder why an encryption key can not be set at a later stage of development, and be left blank in the meantime.

Or can I just enter any 16 characters into $config['encryption_key'] = ''; for the meantime?
Reply

#10
(08-23-2015, 10:44 PM)christaliise Wrote:
(08-23-2015, 01:45 PM)skunkbad Wrote: Perhaps you can make a zip of your entire website files, and include a database dump, then make it available for download so I can check it out.

Maybe I can try to do that later, but I'd like to learn what I'm doing wrong.   I've read your instructions many times and curious about 4, 5, 6 & 11.

You use the word "Copy" which means;
4. having a file remaining in community_auth/core AND another new file in CodeIgniter’s application/core directory, 2 files in total.
5. having a file remaining in community_auth/hooks AND another new file in CodeIgniter’s application/hooks directory, 2 files in total.
6. having a file remaining in community_auth/controllers AND another new file in CodeIgniter’s application/controllers directory, 2 files in total.

or do you mean "Cut" or "Transfer" and having only the new files in the CodeIgniter's directories, 1 file in each directory?   I have tried deleting the community_auth files but it makes no difference.

Another area where I suspect maybe causing the error is the failure to set the encryption key.   11. Enable hooks and "make sure there is an encryption key set" in config/config.php.   I enabled the hooks but I'm confused about setting the encryption key.

Undoubtedly I'll need to learn how to encrypt data at a later stage in the development process.

I've read "Setting your encryption_key" in the user_guide\libraries\encryption.html and wonder why an encryption key can not be set at a later stage of development, and be left blank in the meantime.

Or can I just enter any 16 characters into $config['encryption_key'] = ''; for the meantime?

Actually, step 4 is telling you to copy 3 files. You could copy or cut and paste, it doesn't matter.

Your understanding of step 5 is correct, but you could copy or cut and paste, and it would not matter.

Step 6 should only require that you copy (or cut and paste) the Examples.php controller.

The encryption key should normally be set as a random 32 character string. For a good random string, you might try the password generator over at grc.com: https://www.grc.com/passwords.htm

The encryption key is necessary for encryption of the session. If you read the documentation for sessions, you'll see that this is a requirement.

16 characters for an encryption key will work. CodeIgniter "fixes" this for you.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.