Codeigniter Ion Auth configuration - codeigniter

I am using Ion Auth for registration, and everything is working fine on local, So when I wanted to move Live server I need email activation for new registrations [I am not using SMTP, there is no email config file in my config folder], So I made changes in ion_auth.php in config file as follows::
$config['email_activation'] = TRUE;
$config['manual_activation'] = FALSE;
$config['use_ci_email'] = TRUE;
as far as I know about this library (I am new to CodeIgniter), that's it. But unfortunately these configurations are not taking effect. When I var dump the following items inside constructor of ion_auth.php library file returns null
$this->config->item('use_ci_email','ion_auth') or
$this->config->item('email_activation','ion_auth')
And other config items like 'admin_email' has no issues, I can fetch the value. So, what is wrong with my config file, I am using very basic file provided by the library repo.
When I set the values, inside the constructor of library file as below, it works.
$this->config->set_item('use_ci_email', TRUE);
$this->config->set_item('email_activation', TRUE);
Is there anything wrong I am doing to get this weird behavior.

Ok, so I opened an issue on Ion Auth Git repo, and the Author, Ben Edmunds responded with the solution, If anybody facing this issue, with latest CodeIgniter, please pull the latest commit of IonAuth library and test, It will work.
For more on the issue, please refer the isse,
Codeigniter Ion Auth configuration and Email Activation

Related

Laravel forcing Http for asssets

this is a little bit strange because most of the questions here wanted to force https.
While learning AWS elastic beanstalk. I am hosting a laravel site there. Everything is fine, except that none of my javascripts and css files are being loaded.
If have referenced them in the blade view as :
<script src="{{asset('assets/backend/plugins/jquery/jquery.min.js')}}"></script>
First thing I tried was looking into the file/folder permissions in the root of my project by SSHing into EC2 instance. Didn't work even when I set the permission to public folder to 777.
Later I found out that, the site's main page url was http while all the assets url were 'https'.
I dont want to get into the SSL certificates things just yet, if it is possible.
Is there anyway I can have my assets url be forced to Http only?
Please forgive my naiveity. Any help would be appreciated.
This usually happens if your site is for example behind an reverse proxy, As the URL helper facade, trusts on your local instance that is beyond the proxy, and might not use SSL. Which can be misleading/wrong.
Which is probaly the case on a EC2 instance... as the SSL termination is beyond load balancers/HA Proxies.
i usually add the following to my AppServiceProvider.php
public function boot()
{
if (Str::startsWith(config('app.url'), 'https')) {
\URL::forceScheme('https');
} else {
\URL::forceScheme('http');
}
}
Of course this needs to ensure you've set app.url / APP_URL, if you are not using that, you can just get rid of the if statement. But is a little less elegant, and disallows you to develop on non https

Laravel - Domain API?

I'm trying to figure something out. I want to make a page where a user can check for domain names and if they're available or not. I'm asking for advice because I don't know where to look. TransIP does have an API but I can't understand their documentation. What can I do? I want to make this work in laravel
There are many API wrappers you can grab from github, here is one I found on a google search. https://github.com/verschoof/transip-api
Just install with composer, put your login and private key in your .env perhaps and then include it in whatever file you want.
$client = new Transip\Client(env('TRANSIP_LOGIN'), env('TRANSIP_KEY'), true);
$domainApi = $client->api('domain');
$domainInfo = $domainApi->getInfo('user-input-domain.com');
$status = $domainApi->checkAvailability();
I would put env variables into a config file and access with config('key') but this is a basic example.

ASP.Net login status control not work with Intelligencia.UrlRewriter

I use intelligencia.urlrewriter to rewriting my URLs.But I have a problem,when I use an asp.net log in status and trying to log off from site, LogoutPageUrl is changing to unclean URL.
for example when I'm trying to log off,My URL is example.com/Mysite/en
and the return URL must be http://example.com/login?returnurl=/Mysite/en
but the return URL is http://example.com/login?returnurl=default.aspx?page=Mysite&lang=en
I using weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx post back issues but this issue does not work with login status control...
please help me,I need to solve this problem.
thanks friends.

Using DX Auth for Codeigniter

Has anyone used DX Auth for Codeigniter bundeled examples?
After following Installing DX Auth library with bundled examples on http://dexcell.shinsengumiteam.com/dx_auth/installation/index.html
I added a route $route['auth'] = "auth"; in config/routes.php, uploaded /controllers/auth.php, added $autoload['libraries'] = array('database', 'session', 'xmlrpc', 'DX_Auth'); in /config/autoload.php.
The bundled example comes with the views in a subfolder /views/auth.
I tried to put the register_form.php view in both /views and /views/auth.
Once I enter http://mydomain.com/auth/register I get a blank page, like no view is loading.
An help would be greatly appreciated.
I've considered using DX Auth for a while, but I ended up using Redux Auth instead for flexibility and simplicity.
Redux is outdated now, but the new Ion Auth is based on Redux Auth, and works great for me.
They have good documentation as well.
What does your PHP error log say?
Also, this is kind of a tangent but you might want to check out Tank_auth, which was built on DX_Auth and contains a # of security updates/fixes.
http://www.konyukhov.com/soft/tank_auth/

Joomla displaying blank page after login after moving the installation from one server to another

I just moved my current office Joomla 1.5.8 instalation from the server(linux) to my local machines (winxp) so I can work locally and only upload the changes.
The thing is after downloading all the files and installing a backup of the remote DB on my local machine I found myself unable to login to the administrator panel, I can see the frontpage but not login :/
So far, I have googled alot this problem, but most people seem to be experiencing this problem while upgrading from joomla 1.0
To make sure the problem was not on permissions for the files,I did a separate brand new joomla instalation on another folder and it worked just fine, I could access the website and I also could login to admin page, then I changed the config file to connect to the joomla I'm trying to move and now I find myself again unable to login :/
I think the problem is on the DB however I already tried searching for specific paths but no luck
Does anyone has another Idea?
thanks in advance :)
Try to change following variable in your local configuration file with you local values.
var $offline = '0';
var $log_path = 'Your local joomla path\logs';
var $tmp_path = 'Your local joomla path\tmp';
var $live_site = 'local url will be here';
var $dbtype = 'mysql';
var $host = 'local db host';
var $user = 'DB user for local';
var $db = 'Db name for local';
var $dbprefix = 'DB prefix whatever you have set, by default jos_';
var $password = 'your DB password for local';
You probably have LDAP or openid authentication enabled and thats what is causing this blank page while you try to login.
Just go to your database and go to your:
jos_plugins
And edit the plugins which are either openid or LDAP
set their published status from 1 to '0'
Case solved.
Does your site use any kind of extra authentication? Mine used the LDAP Authentication plugin. MY local machine couldn't connect to the LDAP server. After turning LDAP authentication off (only use Joomla authentication) it worked.
edit the jos_plugins table in mysql to set published from 1 to 0 for any extra authentication plugins you are using.
I have discussed this issue in details here: http://www.itoctopus.com/blank-page-on-joomla-login
In most cases we have seen, Joomla is trying to load a file that no longer exists.

Resources