Showing posts with label Issue. Show all posts
Showing posts with label Issue. Show all posts

Thursday, April 16, 2015

Ubuntu Linux: Install or Add PHP-GD To Apache Web Server

The GD Graphics Library for dynamically manipulating images. You will need to compile PHP with the GD library of image functions for this to work. However. Ubuntu (and Debian) Linux comes with the package called php5-gd.
 Just type the following command to install this module:

 
# apt-get install php5-gd
 

OR


 
$ sudo apt-get install php5-gd
 


Finally, restart the Apache 2 web server, enter:


 
# /etc/init.d/apache2 restart
 




Now, you can test your php application.


How do I verify that php5-gd support loaded or not?

Type the following command at a shell prompt:


 
$ php5 -m | grep -i gd
 



Sample outputs:

 
   gd
 



OR


 
$ php5 -i | grep -i --color gd
 



OR


 
$ php -i | grep -i --color gd
 


Wednesday, April 8, 2015

Pagination Issue in Codeigniter [solved]

There is many students face problem in Pagination library in CI
CodeIgniter

Please update the following code and your problem resolved


public function index($index=1)
    {
        $per_page=2;   // set accorrding to requiremnet
       if($index==1){
           $index=0;
       }
         
         $this->load->model("MODLE_NAME");
            $user_data['user_data']=$this->Model_name->select($per_page,$index);
            $t=$this->Model_name;
            $table_name=$t::table_name;
            $query = $this->db->get($table_name);
            $row_count=$query->num_rows();
   // pagination     
       $this->load->library('pagination');

            $config['base_url'] = base_url().'admin/controller_function/index/';
            $num_rows_pagination=$row_count;
            $config['total_rows'] = $num_rows_pagination;
            $config['per_page'] = $per_page;
             $config['uri_segment'] = 4;
               // pagination formating
                    $config['full_tag_open'] = "<br><ul class='pagination'>";
                    $config['full_tag_close'] ="</ul>";
                    $config['num_tag_open'] = '<li>';
                    $config['num_tag_close'] = '</li>';
                    $config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
                    $config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
                    $config['next_tag_open'] = "<li>";
                    $config['next_tagl_close'] = "</li>";
                    $config['prev_tag_open'] = "<li>";
                    $config['prev_tagl_close'] = "</li>";
                    $config['first_tag_open'] = "<li>";
                    $config['first_tagl_close'] = "</li>";
                    $config['last_tag_open'] = "<li>";
                    $config['last_tagl_close'] = "</li>";
            
            $this->pagination->initialize($config); 
            $user_data['pagination']= $this->pagination->create_links();
            $user_data['total_row']=$row_count;
            $user_data['page'] = 'controller_function';
        $this->load->view('admin/Manage/view_page',$user_data);   // Customize according its to view panel
       
   }
 
                           //---------------WARNING------------ 
 
//================= YOUR MODEL and Controller According to your Project ================ 

How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide

How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide If you're looking to host a Laravel project on Hostinger’s hPa...