codeigniter-3

Codeigniter 3 Session not working With PHP 7.1.4

巧了我就是萌 提交于 2019-11-28 01:20:45
I have an application built with Codeigniter 3 HMVC .The application was working fine on PHP 5.6 version, But after upgrading my PHP version to 7.1.4 I was not able to log in into my application. After a complete checkup I found that session is not setting at all. I role back to PHP 5.6 and session was working fine again while switching to PHP 7.1.4 bring the "session not working" issue back. I tried altering some config value like cookie prefix and cookie save name etc, nothing seems to fix it. Can anyone please help. A1ft I found that the issue is with some earlier version of Codeigniter 3

fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known

亡梦爱人 提交于 2019-11-27 19:36:46
问题 I am failing to send form contents to email. I am getting the following error: : Warning Message: fsockopen(): php_network_getaddresses: getaddrinfo failed:Name or service not known Filename: libraries/Email.php Line Number: 1986 Severity: Warning Message: fsockopen(): unable to connect to ssl://smtp.123mailsetup.com:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) Filename: libraries/Email.php Line Number: 1986 My line 1986 is $this->smtp_timeout); Part of the

Codeigniter echoing [::1] instead of localhost

你说的曾经没有我的故事 提交于 2019-11-27 13:41:55
I am using CodeIgniter 3 as a web platform and trying to import semantic-UI CSS into my page. I'm doing so by using CodeIgniter's base_url() method in the href property for the CSS import. However, semantic.css itself imports some other fonts present on my server, which are then unable to load because of Cross-Origin resource sharing policy. This is the error message chrome gives me: Font from origin ' http://[::1] ' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' http://localhost ' is

Codeigniter 3.x Authentication Library?

落爺英雄遲暮 提交于 2019-11-27 10:27:29
问题 With the new Codeigniter 3.0 version what authentication libraries do you use? Flexi auth was very good and robust with great documentation for CI 2.0 but it is old and as I can see it is discontinued. Of course it does not work out of the box with CI 3.0. I have tested it and tried to migrate it to CI 3.0 but as it uses the old ci_sessions schema I have seen that it has a lot work to be made to rewrite all the code parts that use sessions. It seems to work with file sessions and some

File Upload Validation In Codeigniter

六眼飞鱼酱① 提交于 2019-11-27 06:51:54
问题 I am trying to validate file upload for image uploading, but it is not getting the validation like other fields. I am using Form_Validation.php process for validation. Image uploading array: array( 'field'=>'image', 'label' => 'Image', 'rules' => 'required' ) when i try to upload the image it did not response like it is required etc. I also want to validate it for .jpg etc and "how to set the file value on incorrect file like instead of .jpg we try to upload the .pdf " like we set the value

default controller inside subfolder codeigniter 3 not working

久未见 提交于 2019-11-27 06:17:15
问题 In codeigniter 3 application i have directory structure like this: -Myproject -application -controllers -home Welcome.php //This is my controller inside home directory How to set Welcome controller as default controller? I use below code $route['default_controller'] = 'home/Welcome'; This routing works for previous versions of codeigniter. 回答1: By default, you are not allowed to do that. To get around this, you need to hack your system Router.php : codeigniter/system/core/Router.php Edit a

Codeigniter 3 Session not working With PHP 7.1.4

亡梦爱人 提交于 2019-11-27 04:47:10
问题 I have an application built with Codeigniter 3 HMVC .The application was working fine on PHP 5.6 version, But after upgrading my PHP version to 7.1.4 I was not able to log in into my application. After a complete checkup I found that session is not setting at all. I role back to PHP 5.6 and session was working fine again while switching to PHP 7.1.4 bring the "session not working" issue back. I tried altering some config value like cookie prefix and cookie save name etc, nothing seems to fix

How I can set a session in codeigniter 3 database?

我们两清 提交于 2019-11-27 02:13:14
问题 I'm using the new version(3.0.0). of CodeIgniter and I have a new problem, my sessions doesn't work. I mean, the code in the controller is correct because there are not errors but, when I try to print a PHP variable in a view there is nothing. I checked my table in the MySQL Server, and nothing, I don't now what is the problem. I put my code of config.php. (I don't understand a lot of things in this new version) $config['sess_table_name'] = 'ci_sessions'; $config['sess_driver'] = 'database';

Codeigniter Transactions

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 22:10:39
I'm using Codeigniter transactions $this->db->trans_start(); $this->db->query('AN SQL QUERY...'); $this->db->trans_complete(); This works fine , the problem I have is that inside the trans_start and trans_complete I'm calling other functions and those functions deals with database so they contains inserts and update and some deletes ... ex: $this->db->trans_start(); $this->utils->insert_function($data); $this->utils->update_function2($test); $this->db->trans_complete(); Now if those functions are executed and some errors occur CodeIgniter won't do a rollback. What is the best way to deal with

Codeigniter echoing [::1] instead of localhost

时光毁灭记忆、已成空白 提交于 2019-11-26 18:21:02
问题 I am using CodeIgniter 3 as a web platform and trying to import semantic-UI CSS into my page. I'm doing so by using CodeIgniter's base_url() method in the href property for the CSS import. However, semantic.css itself imports some other fonts present on my server, which are then unable to load because of Cross-Origin resource sharing policy. This is the error message chrome gives me: Font from origin ' http://[::1] ' has been blocked from loading by Cross-Origin Resource Sharing policy: No