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



Search Forums

(Advanced Search)

Forum Statistics
» Members: 15,518
» Latest member: chirseins
» Forum threads: 70,576
» Forum posts: 362,973

Full Statistics

Latest Threads
How to use method setRule...
Forum: CodeIgniter 4 Discussion
1 hour ago
» Replies: 0   » Views: 23
Help with RIGHT JOIN con...
Forum: General Help
1 hour ago
» Replies: 8   » Views: 182
High error rate at TechEm...
Forum: Choosing CodeIgniter
1 hour ago
» Replies: 1   » Views: 131
Important News about Jim ...
Forum: News & Discussion
1 hour ago
» Replies: 70   » Views: 16,050
PHP 7.4.2 Has Been Releas...
Forum: Lounge
1 hour ago
» Replies: 1   » Views: 83
Potential website interru...
Forum: Events
4 hours ago
» Replies: 5   » Views: 1,922
Forum: Events
4 hours ago
» Replies: 5   » Views: 1,785
How to include TinyFileMa...
Forum: General Help
4 hours ago
» Replies: 4   » Views: 125
Forum: CodeIgniter 4 Discussion
5 hours ago
» Replies: 4   » Views: 158
Localization duplicate pa...
Forum: CodeIgniter 4 Support
5 hours ago
» Replies: 2   » Views: 142

  Parameter to database select function
Posted by: XTAZ - 01-08-2020, 08:48 AM - Forum: CodeIgniter 4 Feature Requests - Replies (1)


In my opinion, function select must have a parameter for reset last select data

PHP Code:
public function select($select '*'bool $escape nullbool $reset false)
if (
$this->QBSelect = [];
$this->QBNoEscape = [];

Now in my code one function with join use $this->select('table.*'), so that not include addational table. After I use $this->select('table.id').

After in SQL:
SELECT table.*, table.id FROM ...

I dont want select all columns

  load() method doesn't work
Posted by: blaudroid - 01-08-2020, 02:51 AM - Forum: CodeIgniter 4 Support - Replies (5)

Hello there,

since 1 week i started to get into the whole MVC World. And because my understanding of it equals null i was unsuccessful with CakePHP, Symfony or Laravel. Then i found the Codeigniter.

I was experimenting with Routing and AJAX and Controllers and now i want to make myself a template in the Views folder. I tried to include the so called header.php and footer.php in my home.php page but i doesn't work. After some research i found out that in Codeigniter you can't just do an include like in conventional php. 

After another research i found a way to do it but my Codeigniter seems to not recognize the method i am using although for everyone else works without for them to do anything.
My Code looks like this:

PHP Code:
<?php namespace App\Controllers;

Home extends BaseController

    public function 
$pageData = [

'header' => $this->load->view('header.php'NULLTRUE),
'footer' => $this->load->view('footer.php'NULLTRUE),
'tabTitle' => 'Online Shop MTFKS!'



This call $this->load seems not to be existent. My PHPStorm throws me an error everytime i click on it.

[Image: jSNcdf0.png]

I am stuck and i don't know how can i go further.

I have to mention that when i installed the Codeigniter Framework i just downloaded it and extracted it in my project folder as mentioned in the Docs. Then i followed the docs to finish setting it up. But somehow i think something is missing. And whenever i try to install it composer it just doesn't run, my powershell is stuck on an empty line.

When i run this code my website just gives me the standard CI Whoops! Error.

Thank you !

  Internal CI Site Upgrade
Posted by: job2do - 01-07-2020, 10:35 AM - Forum: Jobs - Replies (8)

We seek a developer to update an internal-facing CI site. My company uses this CI 2.1.4 site to retrieve xmls from an external, government site, edit the data, and export to another system. Its function speeds up a workflow. 

The primary goal of this project is to add functionality to negotiate SSL with the external, government site.

The secondary goal is to upgrade the site to current CI version.

This is a paid contract job to be completed within 3 weeks of hire. From you, we will ask for a quote, and references to prior work.

Please PM (my PM's are enabled) for details.

  erreur 404 when using upload file
Posted by: guizmo - 01-07-2020, 08:26 AM - Forum: General Help - Replies (3)


I am using the file upload class with the 2 views and the controllers.

It work at the beginning but I got the 404 error from apache when Im clicking on the upload button after adding a file.

Moreover when I delete my actual base_url= "http://local host/ the problem disapear

Any help ?

Attached Files Thumbnail(s)

  New PHP Framework Benchmarks including CI4
Posted by: albertleao - 01-07-2020, 07:44 AM - Forum: CodeIgniter 4 Discussion - Replies (7)

I thought this was interesting. Though it's pretty basic, it's interesting that CI3 is actually faster than current RC CI4. Also looks like Laravel has become quite fast.


  Website in codeigniter with blog and forum
Posted by: john stro - 01-07-2020, 03:09 AM - Forum: General Help - Replies (1)

I have a requirement where in I need to create a website with registrations and login for end Users and Vendors. Using the same login they should be able to post comments on blog and forum too. Client wants to use Codeigniter 3.0.

Blog will be tentatively Wordpress based and forum will be PHPbb.

Should the blog and forum be something like Dove / Pyro etc which are based on CI?
xxx damplips vepron xxnx porno pirnhub xnnx xnx

  404 pages with latest CI version
Posted by: byteme - 01-06-2020, 09:51 AM - Forum: CodeIgniter 3.x - Replies (3)


Yesterday i've added the 3.1 version to the root path of the website from someone I help. The old version  2.0.2 was broken after the webhost upgraded to php7.0 (no way to switch to old version, unlike my webhost, so no quick fix). I've moved the old directories (appliction/system/etc and used the new ones. I compared the old config settings to make sure it's correct. But I get 404 pages from CI itself. I have no clue what I have to change to make it work.

I have an index.html with the complete naviagation structure/links as it should be working temporarily.

When i want to open www.website.com/index.php it gives 404 error
When i want to open www.website.com/index.php/welcome/ (as default) it gives 404 error
When i want to open www.website.com/CATEGORY/product-title (the way the links used to work) it gives 404 error

I don't think the .htacces is faulty, but here is it anyway:

#AddHandler x-httpd-php53 .php

<IfModule mod_rewrite.c>

    # Make sure directory listing is disabled
    Options +FollowSymLinks -Indexes
    RewriteEngine on

    # NOTICE: If you get a 404 play with combinations of the following commented out lines
    #AllowOverride All
    #RewriteBase /wherever/pyro/is

    # Restrict your site to only one domain
    #RewriteCond %{HTTP_HOST} !^example\.com$
    #RewriteRule ^(.*)$ http://example.com/$1 [L]

    # Keep people out of codeigniter directory and Git/Mercurial data
    RedirectMatch 403 ^/(system\/pyrocms\/cache|system\/codeigniter|\.git|\.hg).*$

    # Send request via index.php (again, not if its a real file or folder)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    <IfModule mod_php5.c>
        RewriteRule ^(.*)$ index.php/$1 [L]

    <IfModule !mod_php5.c>
        RewriteRule ^(.*)$ index.php?/$1 [L]


When i view the error_log of the host I dont find error (makes sence, as the 404 is from CI itself).

Some other config settings:

$config['index_page'] = '';
$config['base_url'] = '';
$config['uri_protocol']    = 'REQUEST_URI';
$config['language']    = 'dutch';
$config['subclass_prefix'] = 'MY_';
$config['encryption_key'] = 'VALUEXX';

$route['default_controller'] = 'products';

$route['404'] = 'page';

$route['admin/help/([a-zA-Z_-]+)']        = 'admin/help/$1';
$route['admin/([a-zA-Z_-]+)/(:any)']    = '$1/admin/$2';
$route['admin/(login|logout)']            = 'admin/$1';
$route['admin/([a-zA-Z_-]+)']            = '$1/admin/index';
I changed the indexpage to index.php, did'nt make difference. The default_controller value is copied from the old website. As I read the manual, there should be a file products, but it doesn't exist anywhere, so I guess it's never used? Rest is also copied.

So basically the two questions are: how do i solve the 404 errors? And how can i make the links work correctly?

From the top navigation the old website linked to: www.website.com/page/title
from the sidebar the old website categorized the products in blocks and linked every product to: www.website.com/category/product

Thanks in advance!


I disabled the show_404 function here:

        // Did we reset the $e404 flag? If so, set the rsegments, starting from index 1
        if ( ! $e404)
            $class = $error_class;
            $method = $error_method;

            $URI->rsegments = array(
                1 => $class,
                2 => $method

Which gives the output in browser:

An uncaught Exception was encountered

Type: Error

Message: Class '' not found

Filename: /home/xxxxx/domains/website.nl/public_html/system/core/CodeIgniter.php

Line Number: 518


File: /home/xxxx/domains/website.nl/public_html/index.php
Line: 317
Function: require_once

Is it because i Disabled the 404 function, or is this the error which wasn't shown because of the show_404?


It seems i still had to copy some files and had to fill the base_url, it was pointing to an IP address, not the correct URL. After some database errors (config was empty) i'm again stuck at new errors:

A PHP Error was encountered

Severity: Notice

Message: Only variables should be passed by reference

Filename: MX/Loader.php

Line Number: 141


File: /home/xxx/domains/website.nl/public_html/application/third_party/MX/Loader.php
Line: 141
Function: _error_handler

File: /home/xxxx/domains/website.nl/public_html/application/third_party/MX/Loader.php
Line: 176
Function: library

File: /home/xxxx/domains/website.nl/public_html/application/third_party/MX/Loader.php
Line: 139
Function: libraries

File: /home/xxx/domains/website.nl/public_html/application/controllers/Categories_demo.php
Line: 22
Function: __construct

File: /home/xxxx/domains/website.nl/public_html/index.php
Line: 318
Function: require_once

This one might not be a big deal for now, but the next one is:

An uncaught Exception was encountered

Type: Error

Message: Call to undefined method MY_Loader::_ci_load_class()

Filename: /home/xxx/domains/website.nl/public_html/application/third_party/MX/Loader.php

Line Number: 158


File: /home/xxx/domains/website.nl/public_html/application/third_party/MX/Loader.php
Line: 176
Function: library

File: /home/xxx/domains/website.nl/public_html/application/third_party/MX/Loader.php
Line: 139
Function: libraries

File: /home/xxx/domains/website.nl/public_html/application/controllers/Categories_demo.php
Line: 22
Function: __construct

File: /home/xxx/domains/website.nl/public_html/index.php
Line: 318
Function: require_once

When i Google this particular problem, it seems people solved it by going from from ci_load_library to ci_load_class...

  Codeigniter knowledge required
Posted by: daxFPG - 01-06-2020, 07:03 AM - Forum: Jobs - Replies (6)

Hi! I am looking for a colleague to finish a web application. I would need someone that has knowledge in codeigniter, ajax, html, css, etc. The app is almost finished, but if this goes out well, I would have more work for you!

  Cancel $model->save($data) operation using $beforeInsert
Posted by: littlej - 01-06-2020, 04:51 AM - Forum: CodeIgniter 4 Support - Replies (6)

Hi everyone !

I have a controller, that checks if a record already exists in the database. If it does, it performs an update instead of an insertion.

But I want to take full advantages of all the models' features. So I'm trying to do the same thing, but with a function called using $beforeInsert.

My problem is that I don't know how to cancel the insertion, as CI expects an array... Someone has any clue on how I can do this ?

Here is the code I have in my model:

PHP Code:
  protected $beforeInsert = ['uniqueTokenPerUser'];

  protected function uniqueTokenPerUser(array $data)
    if (! isset($data['data']['user']) ) { return $data; }

    // We check if a row already exists
    $currentToken $this->where('user',$data['data']['user'])->first();
    // If the row exists
    if( $currentToken !== FALSE ) {
      // We set the ID
      $data['data']['id'] = $currentToken['id'];
      // And perform an "update" using "save()" (could have been "update()" too)
      $this->save($data['data']); // THIS IS WORKING
      // And we stop the insertion

Thank you in advance for your help !

  sending emails
Posted by: Knutsford - 01-06-2020, 03:13 AM - Forum: General Help - No Replies

I am trying to send an html email but the from and reply to addresses are not coming out correctly

The from is arriving in the format

name <> <blaa@blaa.net>

and the reply to is just


I have

$this->email->from(trim($this->settings->admin_email), 'name');

$this->email->reply_to(trim($this->settings->admin_email), 'name');

Which looks ok to me


OOPs - Just spotted my mistake. $this->settings->admin_email wasn't being set up. Sorry

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