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



Search Forums

(Advanced Search)

Forum Statistics
» Members: 13,308
» Latest member: roll3lg
» Forum threads: 69,238
» Forum posts: 430,592

Full Statistics

Latest Threads
Different timezone betwee...
Forum: CodeIgniter 4 Discussion
10 minutes ago
» Replies: 0   » Views: 1
Advance Tutorials
Forum: CodeIgniter 4 Discussion
19 minutes ago
» Replies: 3   » Views: 85
[feature] Encrypter
Forum: CodeIgniter 4 Roadmap
24 minutes ago
» Replies: 9   » Views: 317
Model for the login, anyb...
Forum: General Help
30 minutes ago
» Replies: 3   » Views: 56
Issues accessing CI forum...
Forum: Lounge
1 hour ago
» Replies: 1   » Views: 20
Duplicate record in postg...
Forum: General Help
4 hours ago
» Replies: 3   » Views: 76
Post's comments
Forum: Best Practices
5 hours ago
» Replies: 3   » Views: 100
Is future CI will impleme...
Forum: Lounge
Yesterday, 06:18 PM
» Replies: 1   » Views: 102
sqlite3 connection
Forum: CodeIgniter 4 Support
Yesterday, 01:35 PM
» Replies: 1   » Views: 56
Dashboard navigation prob...
Forum: General Help
Yesterday, 09:18 AM
» Replies: 1   » Views: 72

  Public variable
Posted by: edica - 03-22-2019, 10:38 AM - Forum: CodeIgniter 4 Support - Replies (5)

Codeigniter 3 I had in /config/config.php:

$config['cdn_url']  = 'https://domain.com/';

But Codeigniter 4 it does not work this way:

public $cdn_url  = 'https://domain.com/';

  sqlite3 connection
Posted by: luk3b8 - 03-22-2019, 09:49 AM - Forum: CodeIgniter 4 Support - Replies (1)

Hi everyone,
I can't find out what's the problem whit my sqlite3 connection
This is my configuration:

PHP Code:
    public $sqlite = [
        'DSN'    => '',
        'hostname' => 'localhost',
        'username' => '',
        'password' => '',
        'database' => APPPATH 'Database/mydb.sql3',
        'DBDriver' => 'SQLite3',
        'DBPrefix' => '',
        'pConnect' => false,
        'DBDebug'  => (ENVIRONMENT !== 'production'),
        'cacheOn'  => false,
        'cacheDir' => '',
        'charset'  => 'utf8',
        'DBCollat' => '',
        'swapPre'  => '',
        'encrypt'  => false,
        'compress' => false,
        'strictOn' => false,
        'failover' => [],
        'port'     => 3306,

When I run
$query = $builder->get();
I have this response:
Class 'SQLite3' not found

PHP Code:
86             return (! $this->password)
87                 ? new \SQLite3($this->database)
88                 : new \SQLite3($this->databaseSQLITE3_OPEN_READWRITE SQLITE3_OPEN_CREATE$this->password);

Some idea?


  Just discovered how to utilise RSYNC to eliminate FileZilla
Posted by: John_Betong - 03-22-2019, 08:16 AM - Forum: Best Practices - Replies (3)

Just discovered how to utilise RSYNC to eliminate FileZilla

For years I have laboriously written code on my Localhost then used FileZilla to update the relevant Server files. 

Although FileZilla is very good it does take quite a few clicks to synchonise all the updated files so... eventually got round to trying RSYNC.  Updating changes now only takes a couple of seconds!!! FileZilla is never used!!!

The web-page update links and function can be used on any CodeIgniter installation.

The following prerequisites does take a bit of trial and error to install but the effort is well rewarded. 


1. install RSYNC
2. install Linux SSH
3. Localhost mirror image of the Server files 
4. Upload links on home page banner/footer (only on Localhost web-pages) 

Test for the following GET parameter links:

1. https://my-ci-website.com/web-page?rsync=app 
2. https://my-ci-website.com/web-page?rsync=wri
3. https://my-ci-website.com/web-page?rsync=ass

The main controller tests for above links and if true calls the following function:

PHP Code:
// Controller Web_page

$rsync = isset($_GET['rsync']) ? $_GET['rsync'] : false;
$data['updatedFiles'] = '';
LOCALHOST && $rsync):
$updatedFiles $this->rsync($rsync$DEBUG=TRUE);
'<pre>' .print_r($updatedFilesTRUE) .'</pre>';
$data['updatedFiles'] = $updatedFiles;


// ===========================================================
private function rsync
string $rsync ''
$result '';

$HERE  '/var/www/my-ci-website.com/';
$THERE '[email protected]:';

$HERE .= 'writable/';

$HERE .= 'public_html/assets/';

// case 'app':
$HERE 'app/'// application for CI3.??

$USER   'ssh-root-user';  
$PWORD  'ssh-password';
// START - PHP HereDoc syntax  
$tmp = <<< ____EOT
     /usr/bin/rsync -vratlz      \
     --progress \
     --rsh="/usr/bin/sshpass -p  \
$PWORD ssh -o               \
     StrictHostKeyChecking=no -l \
$USER" \
// FINISH - PHP HereDoc syntax  

  // call RSYNC and get parameters by reference

// Maybe DEBUG - return updated files
$result $aRefFilesUploaded;   

// endfunc 

  Issue while running phpunit in codeigniter
Posted by: Rekha - 03-22-2019, 06:33 AM - Forum: CodeIgniter 3.x - No Replies

I am new to PHPUnit tests for CodeIgniter application. I have installed ci-phpunit-test(with reference from https://github.com/kenjis/ci-phpunit-test) in my CI application and tried to run it with Welcome Test case. Then I got some errors. I am not sure whether I missed any configuration. Please find the issues below,

  1. Undefined index: scheme in DB.php line number 121. Then, I statically gave mysqli instead of $dns['scheme'] to check further.

  2. After 1, got an error such Error: Call to a member function close() on string in the file mysqli_driver line number 541. Then I commented this line and executed the phpunit. Welcome controller got tested successfully.

  3. So, I thought to test the model and then I wrote a test and executed. The error is Error: Call to a member function result() on null. Model Code below,
    $this->db->select('name,value'); $query = $this->db->get('config'); $configData=$query->result();
I tried to fix it by myself but I couldn't. Please help me to fix these errors.

  Problem with code developed with XAMPP on LAMP
Posted by: rbkman - 03-22-2019, 04:46 AM - Forum: General Help - Replies (4)

I have developed a software using XAMPP, CodeIgniter, HTML, CSS, JavaScript, PHP, MySQL, JQuery, AJAX. For uploading it on to a website I purchased a website on GoDaddy. There I am facing problems. When contacted with the website support, I was told that for shared website they have LAMP only. Now, for making it functional I need to convert the entire system for working on LAMP. Actually, as per my understanding both XAMP & LAMP have Apache, MySQL & PHP engine. But, as of now it is giving problems. 

Need help, request to suggest on what all I need to work on in above case to arrive at a solution?

  Error 508
Posted by: Knutsford - 03-22-2019, 03:06 AM - Forum: General Help - Replies (3)

Has any one else had problems with 508 messages after upgrading to version 3. The site I look after was fine until I upgraded it and I am trying to pin down why it isn't now. It is trying to display a lot of images at once. It just seems odd that once it was ok but now isn't and the upgrade seems to be the only difference not that I can see how that can affect it

  controllers and model
Posted by: nikhil9989 - 03-22-2019, 01:58 AM - Forum: General Help - Replies (3)

I'm a beginner with codeigniter, I'm trying to insert the records into the database, but the in the editor phpstorm I'm using showing the model as an unidentified. someone please help me with this.

public function index()
       $data['title']= 'Workload';
       $data['workload']  = $this->Workload_Model->get_workload();
       $this->load->view('administrator/Workload', $data);
$data['workload']  = $this->Workload_Model->get_workload();
 workload_model in this line is showing not found.

  form_open() - URL Redirect Error
Posted by: SunMeiTzu - 03-21-2019, 02:51 PM - Forum: General Help - Replies (2)

Helloo, I was following the Tutorial off the main CodeIgniter page and when I tried to submit the form, I was directed to this URL:
http://localhost/index.php/news/localhost/index.php/news/create. I have some PHP experience and tried a few things to get the result I wanted, but nothing worked. If anyone can offer a suggestion it would be greatly appreciated.

I want to leave my original question in case anyone else comes across the same issue. I decided to check through the system files and didn't find the answer so I went back to the applications/config folder and opened config.php and set the $config['base_url'] = 'localhost'; to $config['base_url'] = '/'; . I am not sure if localhost was preset or if I set it, but I now get the result I am looking for.

  Your best suggestions to implement Google AMP ?
Posted by: Coool6 - 03-21-2019, 12:07 PM - Forum: General Help - Replies (4)

Hello Wonderful Community ! 

I'm interested regarding what's the best solution to implement Google AMP in a Codeigniter structure ?

In a nutshell, the concept is to have another version of your HTML (mainly) matching all the AMP specs and easily-access through a suffixed url like http://www.yoursite.com/yourpage/amp 
The specs : https://www.ampproject.org/docs/fundamentals/spec
For example <img tag must become <amp-img, image URL must contains a pre-url of a CDN, etc. 

How would you do that ? What will be the best solution ? 
I hope Cloudflare will have an automatic convert tools for that, but that's not the case unfortunately.

If some people here already implemented that, I will be happy to hear what choice they did. And if you didn't do that already, I'm interested about your opinion too ! 

Thanks a lot Smile

  login prompt bypassed
Posted by: scatman98 - 03-21-2019, 11:21 AM - Forum: General Help - Replies (1)

i have an admin account setup in the database which allows login from login form but if someone knows the url of pages protected by login they can bypass the login

how do i protect the pages from not being viewed without login?

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