Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 11,881
» Latest member: soheliseo
» Forum threads: 68,217
» Forum posts: 425,733

Full Statistics

Latest Threads
Help Message: Trying to g...
Forum: General Help
7 hours ago
» Replies: 2   » Views: 53
How to SEND LINK in email...
Forum: Regional User Groups
9 hours ago
» Replies: 0   » Views: 27
Close connection
Forum: General Help
9 hours ago
» Replies: 9   » Views: 106
CodeIgniter 3.1.9 release...
Forum: News & Discussion
Today, 01:55 AM
» Replies: 43   » Views: 25,694
Forum: General Help
Yesterday, 11:22 PM
» Replies: 3   » Views: 49
The MIT License
Forum: Lounge
Yesterday, 10:42 PM
» Replies: 2   » Views: 51
Unable to load dynamic li...
Forum: Installation & Setup
Yesterday, 01:43 PM
» Replies: 2   » Views: 65
Getting encrypted name pr...
Forum: Best Practices
Yesterday, 12:11 PM
» Replies: 9   » Views: 121
Session expiring before e...
Forum: CodeIgniter 3.x
Yesterday, 08:52 AM
» Replies: 4   » Views: 82
get prev page and next ur...
Forum: CodeIgniter 4 Feature Requests
Yesterday, 05:29 AM
» Replies: 1   » Views: 82

  How to SEND LINK in email in codeigniter and how to GET id selected user
Posted by: jaydevvara - 9 hours ago - Forum: Regional User Groups - No Replies

Hello guyz i have create small kind of application in codeigniter,in this application i am doing forgot password module, i have created a function of forgot passowrd and send link in email But did not get id in link so how to set id in link, i want id in link and ecrypted pass in method, I need encrypted URL pass in update password view,

<form id="resetPassword" name="resetPassword" method="POST" action="<?php echo base_url(); ?>welcome/ForgotPassword" onsubmit ='return validate()'>
               <table class="table table-bordered table-hover table-striped">                                      
                           <td>Enter Email: </td>
                               <input type="email" name="user_email" id="email" required>
                           <td><input type = "submit" value="submit" class="button pull-right"></td>
Here is my model:
public function sendpassword($data) {
   $user_email = $data['user_email'];

   $query1 = $this->db->query("SELECT * from user_registration where user_email='" . $user_email . "'");
   $row = $query1->result_array();

   if ($query1->num_rows() > 0) {


       //SMTP & mail configuration
       $config = array(
           'protocol' => 'smtp',
           'mailpath' => 'C:\xampp\sendmail',
           'smtp_host' => 'ssl://smtp.googlemail.com',
           'smtp_port' => 465,
           'smtp_user' => '[email protected]',
           'smtp_pass' => 'XXXXXXX',
           'mailtype' => 'html',
           'charset' => 'utf-8'

       //Email content

       $this->email->from('[email protected]', 'Admin');
       $this->email->subject('Password reset request');
       $mail_message = 'Dear ' . $row[0]['full_name'] . ',' . "<br>\r\n";
       $mail_message .= 'Thanks for contacting regarding to forgot password,<br> Click On Link And Reset Password:<b><a href="http://www.ciadmin.local/welcome/update_password">Reset Password</a></b>'."\r\n";
       $mail_message .= '<br>Please Update your password.';
       $mail_message .= '<br>Thanks & Regards';
       $mail_message .= '<br>Red Feather Software';


       //Send email

       if ($this->email->send()) {

           echo '<script>alert("success..!")</script>';
       } else {
           echo '<script>alert("Please Try Again Later..!")</script>';


public function update_password()
    $id = $this->uri->segment(3);
    echo '<script>alert('.$id.')</script>';  

  The MIT License
Posted by: ChicagoPhil - Yesterday, 06:53 PM - Forum: Lounge - Replies (2)

A simple inquiry about the License and use of the Codeigniter framework.

I thought I go right to the source for this question. What limitations exactly apply to the reuse of the framework? Could a person strip parts out and reuse the code in a new framework? Are there any limitations other than keeping the copyright notice in the code?

Can we rip it apart change it and do whatever we like and then offer it to the public?

Does it all have to stay open source?

Thank You to anyone who can clear this matter up for me.

Posted by: leequalls - Yesterday, 05:52 PM - Forum: General Help - Replies (3)

Hi, Is it possible for the for platforms to detect what version of Mac OS X is being used?

  Help Message: Trying to get property of non-object!!!!
Posted by: PortalNET - Yesterday, 05:46 PM - Forum: General Help - Replies (2)

Hi guys 

i  have a strange issue

i have 2 servers setup with the same codeigniter version and code, one works and the other does not.. which is more strange

but ok this is the error i am getting

A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: controllers/statut.php
Line Number: 32

lets check the file code

PHP Code:


class Statut extends Controller {
    public function __construct() {

    public function index($status=''$type='') {
        $data['tuners'] = $this->tuner_model->findAll();
public function info($id) {
        $transponder $this->tuner_model->find($id);
        $data['transponder'] = $transponder->name;
        $num_card $transponder->num_card;
        $http_port $this->config_model->findOneByName('port_http');
        $port $http_port->value+$num_card;
        $ip $this->config_model->findOneByName('ip_http');
        if (@fopen("http://".$ip->value.":".$port."/monitor/state.xml""r")) {
= new DomDocument;
['card_path'] = $dom->getElementsByTagName('card_path');
            $data['chaines'] = $dom->getElementsByTagName('name');
                $data['pcr_pid'] = $dom->getElementsByTagName('pcr_pid');
                $data['ratio_scrambled'] = $dom->getElementsByTagName('ratio_scrambled');
                $data['service_id'] = $dom->getElementsByTagName('service_id');        
['pmt_version'] = $dom->getElementsByTagName('pmt_version');
            $data['ip_multicast'] = $dom->getElementsByTagName('ip_multicast');
            $data['port_multicast'] = $dom->getElementsByTagName('port_multicast');
            $data['traffic'] = $dom->getElementsByTagName('traffic');
            $data['chaines'] = $dom->getElementsByTagName('name');
            $data['version'] = $dom->getElementsByTagName('global_version');
            $data['uptime'] = $dom->getElementsByTagName('global_uptime');
            $data['signal'] = $dom->getElementsByTagName('frontend_signal');
$data['snr'] = $dom->getElementsByTagName('frontend_snr');
                $data['frontend_name'] = $dom->getElementsByTagName('frontend_name');
                $data['unicast_client_count'] = $dom->getElementsByTagName('unicast_client_count');
                $data['remote_address'] = $dom->getElementsByTagName('remote_address');
                $data['remote_port'] = $dom->getElementsByTagName('remote_port');

        else {
            $data['err'] = true;
    public function startAll() {
        exec('sudo /etc/init.d/iptvmiddleware start');
    public function stopAll() {
        exec('sudo /etc/init.d/iptvmiddleware stop');
public function start($id) {
        $tuner $this->tuner_model->find($id);        
('sudo /etc/init.d/iptvmiddleware start '.strtolower($tuner->name));
public function stop($id) {
        $tuner $this->tuner_model->find($id);        
('sudo /etc/init.d/iptvmiddleware stop '.strtolower($tuner->name));
public function wait() {

line 32 of the code is 

PHP Code:
    $http_port $this->config_model->findOneByName('port_http'); 

Basically it pulls the information of the IP and port  to fetch the following data from  ip:port/monitor/state.xml  file

or at least it was supposed to do it , but its not..

this is the real file on the server with problems ok so it searches for the information from the xml, and displays it on PHP info file on the WEBGUI from the middleware server but for some reason its not picking up the information necessary.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<iptvmiddleware card="20" frontend="0">
    <frontend_name><![CDATA[TurboSight TBS 6909 DVB-S/S2 ]]></frontend_name>
    <cam_menustring><![CDATA[Not retrieved]]></cam_menustring>
    <channel number="1" is_up="1">
        <name><![CDATA[Esporte interativo]]></name>
        <service_type type="0"><![CDATA[Please report : Unknown service type doc : EN 300 468 v1.13.1 table 87]]></service_type>
            <pid number="400" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="256" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="258" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="257" language="" scrambled="0"><![CDATA[Unknown]]></pid>
        <clients count="1">
            <client number="0">
                <socket>17</socket>                <remote_address><![CDATA[]]></remote_address>
                <remote_port>22282</remote_port>                <buffersize>0</buffersize>

and this is the monitor.xml file from another server running fine with the same exact status.php file

both servers running same OS version, same php version, etc.etc.etc. , just different channels being streamed.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<iptvmiddleware card="13" frontend="0">
    <frontend_name><![CDATA[TurboSight TBS 6909 DVB-S/S2 ]]></frontend_name>
    <cam_menustring><![CDATA[Not retrieved]]></cam_menustring>
    <channel number="1" is_up="1">
        <name><![CDATA[TV SENADO]]></name>
        <service_type type="0"><![CDATA[Please report : Unknown service type doc : EN 300 468 v1.13.1 table 87]]></service_type>
            <pid number="1792" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="1110" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="1211" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="1213" language="" scrambled="0"><![CDATA[Unknown]]></pid>
            <pid number="150" language="" scrambled="0"><![CDATA[Unknown]]></pid>
        <clients count="0">

so i am freaking lost.. not shure i am running out of ideas , the only difference is this

1st picture server not working

2nd picture server working

The only difference i have seen is that  server working fine has PHP5.6.37 version  with Xdebug v2.5.5, Copyright © 2002-2017, by Derick Rethans

and the one not working has the same PHP 5.6.37 version but without xdebug.. its the only difference i could see so far..

Any help, hints or ideas are welcome ...


Attached Files Thumbnail(s)

  Close connection
Posted by: omid_student - Yesterday, 05:07 AM - Forum: General Help - Replies (9)

Is it important for close connection after query?
$res = $this->db->query('')->result_array();

Also i have other question
How do i can delete cache only for special query?
at the moment we can delete all cache

  Menu and pages?
Posted by: wishmaster - Yesterday, 04:20 AM - Forum: Best Practices - Replies (2)


i am currently develop one site and i do not know how to implement my idea: site will contain pages with something like wordpress' shotcodes and menu with url like below.


My thought is that i should create one controller e.g. Page and library e.g. Menu, but i don not know how to combine them.

Any ideas.


  success: function(data)
Posted by: jackey - Yesterday, 03:32 AM - Forum: General Help - No Replies

after successfully adding new employee, same time I want to add a record to increment table from using the data added to emp table.  
inside   success: function(data)how and where to add, without opening new window?
if I successfully add data to 1st table only , then only I need to add data to 2nd table, 3rd table from using the data I added 1st table.

 function add_emp()
    var form = $('#form_new_emp')[0];
    var formData = new FormData(form);
            url : "<?php echo site_url('index.php/User/add_new_emp')?>",     
            type: "POST",
            //data: $('#form_new_emp').serialize(),
            data: formData,
            contentType: false,
            processData: false,
            dataType: "JSON",
            success: function(data)
                            for (var i = 0; i < data.inputerror.length; i++)
            error: function (jqXHR, textStatus, errorThrown)
                alert('ERROR in ADDING NEW EMPLOYEE');

  get prev page and next url
Posted by: neuron - Yesterday, 03:14 AM - Forum: CodeIgniter 4 Feature Requests - Replies (1)

To build right structure (for SEO) for paginated web pages, as stated here https://support.google.com/webmasters/an...3744?hl=en we have 2 options:

1. implement VIEW ALL page or
2. put rel="prev" and rel="next" meta info in page

I am using second option. I extended Pagination Library to get prev_url and next_url. 

I guess it would very helpful functionality for Pagination Library if you add functions to get prev_url and next_url

  set_flashdata & session timeout
Posted by: rhodium - 08-16-2018, 10:57 PM - Forum: CodeIgniter 3.x - Replies (1)

I recently updated from CI 3.1.3 to 3.1.9 and I am now experiencing some strange issues with set_flashdata. 

All session features involving set_userdata() and userdata() work flawlessly. 

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'sess_';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = APPPATH.'/ci_sessions/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

My controller creates a success/confirmation message as flashdata, then followed to a redirect that will output the said message:

$this->session->set_flashdata('success_message', 'Success!');
redirect( base_url('account/page') );

The page located at account/page successfully displays the success message.  

What happens after this is puzzling. Any action/link I click after this leads to a session timeout. (All pages in this application are protected by session variables and require a logged in user.) The error message taken from the logs looks like this:

ERROR - 2018-08-15 12:02:39 --> Severity: Error --> Maximum execution time of 300 seconds exceeded
/home/project/public_html/system/libraries/Session/drivers/Session_files_driver.php 212

I ran some test to see if the session variables were still present and they are. (I output all userdata() right after showing the flashdata message, the Profiler also indicates that all session variables are still present.) 

Commenting out the set_flashdata resolves the issue. Anyone experiencing such issues with 3.1.9? (I had no issues with 3.1.3) Perhaps I messed up the update to 3.1.9... 

Any ideas?

UPDATE: I downgraded to 3.1.8 and it resolved the issue. FYI, when using 3.1.9, the session does not necessarily time out, but the page load following the flashdata usage leads to an EXTREMELY slow page load if the page uses sessions. ( well over 3-4 minutes and sometimes times out after 300 seconds. )

  Need your suggestions on a project's "thinking".
Posted by: HarrysR - 08-16-2018, 04:55 PM - Forum: General Help - Replies (1)

Hey guys,
I'm currently creating a CI project and i'm really stuck on how to cope with a situation i face. So i thought the best way to solve it was to ask someone who's more advanced here.

The situation is the following: 
I have 3 tables with data: Users, Contact info and  Pets.
These are all joined.

There will be non-registered and registered users. 

The non-registered users will submit a form with some data on (e.g. email, name and phone number) and i want from my side:
1) To check if email exists in table #1 named "Users",
2) If exists get the user_id of the existing user,
3) pass this user_id, together with phone in table #2 Contact_info
4) then finally, passing the user_id + newly created contact info id + all the other form data to table #3 Users.

The thing is that i also have upload file function in my controller and this kinda confused me.

Any ideas on how can i make it work?! 

Thank you very much!

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