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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,421
» Latest member: iamlaura88
» Forum threads: 66,604
» Forum posts: 417,702

Full Statistics

Latest Threads
H1,H2 headings are to big
Forum: Lounge
6 minutes ago
» Replies: 4   » Views: 44
Error 500
Forum: Installation & Setup
4 hours ago
» Replies: 1   » Views: 21
.htaccess not working on ...
Forum: General Help
5 hours ago
» Replies: 3   » Views: 88
CI 3.1.5 php Warning shel...
Forum: Installation & Setup
7 hours ago
» Replies: 4   » Views: 104
Load custom language file...
Forum: CodeIgniter 4 Support
8 hours ago
» Replies: 0   » Views: 21
Sessions Performance Issu...
Forum: CodeIgniter 3.x
8 hours ago
» Replies: 4   » Views: 361
Problem with database que...
Forum: General Help
8 hours ago
» Replies: 0   » Views: 25
User Guide (Static Page) ...
Forum: Installation & Setup
11 hours ago
» Replies: 3   » Views: 82
Better update routine?
Forum: General Help
11 hours ago
» Replies: 16   » Views: 374
How to Upload Multiple Im...
Forum: General Help
Today, 08:06 AM
» Replies: 2   » Views: 88

 
Rainbow H1,H2 headings are to big
Posted by: CodeNoobGniter - 7 hours ago - Forum: Lounge - Replies (4)

I have big H1, H2, H3, H4, H5, H6 Headers.
How can I reduce that with CSS or there's another way.
I know i'm a beginner and seems stupid question.


  Error 500
Posted by: ana - 7 hours ago - Forum: Installation & Setup - Replies (1)

Hi my friends, i have a problem witch my new hosting error 500,  change the  database connection and config.php line 17 change path  $config['base_url'] = 'http://...'

What is my mistake?, i nedd your help.

link : http://kmt-test.keepmoving.com.mx/donrenton/.

thanks.


  Load custom language file BF $this->lang->load
Posted by: canado - 8 hours ago - Forum: CodeIgniter 4 Support - No Replies

Hi everyone

Before I forcing a custom language to load with

$this->lang->load("name_of_my_file_lang.php")

What would be the new method to achieve the same result in the new CI4 ?

Thanks


  Problem with database query
Posted by: desbest - 8 hours ago - Forum: General Help - No Replies

I have a problem with my database query and would like help getting it to work please.

PHP Code:
$acceptal $this->db->select(array('posts.content''posts.id''posts.userid''votes.userid'))->join('users''posts.userid = users.id')->join('votes'"votes.questionid = $debate[id]""users.id = votes.userid"'votes.content = accept')->select(array('users.username','users.avatarpath'))
                ->get_where('posts', array('posts.questionid' => $debate['id'], 'posts.floor' => 0))
                ->get_where('votes', array('votes.content' => "accept"))



PHP Code:
$acceptal $this->db->select(array('posts.content''posts.id''posts.userid''votes.userid'))->join('users''posts.userid = users.id')->join('votes'"votes.questionid = $debate[id]""users.id = votes.userid"'votes.content = accept')->select(array('users.username','users.avatarpath'))
                ->get_where('posts', array('posts.questionid' => $debate['id'], 'posts.floor' => 0'votes.content' => "accept"))



Both of the code snippets above do not work.

I have a joined the posts table to the votes table, and I would like to only fetch rows where votes.content is "accept".
However each time I try to do so with the code above, that never happens, it fetches rows that say "accept" and don't say accept in the same query.

What is going on and how do I fix it?


  User Guide (Static Page) Documentation Clarification Please
Posted by: kuler - Today, 07:26 AM - Forum: Installation & Setup - Replies (3)

Hello everyone, 

While I have been using PHP for quite some time, I am totally new to CodeIgniter so please forgive my ignorance.

I have downloaded and installed CodeIgniter and am running it on MAMP. I am working my way through the documentation and am following the instructions for a static page. 

I have come to this section: https://codeigniter.com/user_guide/tutor...controller

It reads (3rd paragraph): 

Quote:In order to load those pages, you’ll have to check whether the requested page actually exists:

It then provides some sample code: 



Code:
public function view($page = 'home')
{
        if ( ! file_exists(APPPATH.'views/pages/'.$page.'.php'))
        {
                // Whoops, we don't have a page for that!
                show_404();
        }

        $data['title'] = ucfirst($page); // Capitalize the first letter

        $this->load->view('templates/header', $data);
        $this->load->view('pages/'.$page, $data);
        $this->load->view('templates/footer', $data);
}


My question is, WHERE does that code go? Does it go in the applications/controllers/Pages.php file?

The instructions don't really tell you where that is supposed to go. 

Again, I know that this is probably really stupid question, but like I said, I am spanking new to CodeIgniter ... however, feel free to make fun of me Smile


  CI 3.1.5 php Warning shell_exec
Posted by: moshair - Today, 03:48 AM - Forum: Installation & Setup - Replies (4)

Hello,

I got this warning:

Quote:A PHP Error was encountered

Severity: Warning

Message: shell_exec() has been disabled for security reasons

Filename: models/Magazine_model.php

Line Number: 82

Backtrace:

File: /home/****/public_html/application/models/Magazine_model.php
Line: 82
Function: shell_exec

File: /home/****/public_html/application/controllers/Magazine.php
Line: 29
Function: get_highest_views_posts

File: /home/***/public_html/index.php
Line: 315
Function: require_once

First I thought files are infected with bad virus codes, I found shell_exec exists in the file
system/libraries/upload.php

I didn't use any shell_exec command or upload operations. this is the model function centent:

PHP Code:
function get_highest_views_posts() {
    
$this->db->select('fid,tid,subject,dateline,replies,views,visible,username,closed');
    
$this->db->order_by(`views`, 'asc');
    
$this->db->where_in('closed', Array('0','1',''));
    
$this->db->where_not_in('fid'$this->config->item('private_forums'));
    
$this->db->limit($this->config->item('posts_views_limit'));
    
$query $this->db->get('threads');
    return 
$query->result();
  } 

Is there another solution to solve this than setting environment to production to hide warnings?

Regards,


  .htaccess not working on Amazon EC2 [Solved]
Posted by: dlm1897 - Yesterday, 06:17 PM - Forum: General Help - Replies (3)

I just moved my project to EC2 and I can't get my .htaccess to work properly for removing index.php. When attempting to access my website, I receive the following error message - "The requested URL /nutrition/auth/login was not found on this server". I have tried numerous .htaccess files and switched my uri_protocol back and forth between 'REQUEST_URI' and 'AUTO'.

The folder structure of where my project is located is /var/www/html/nutrition/

I have verified that mod_rewrite is enabled. It shows as a loaded module when I view phpinfo.

I have set AllowOverride All in httpd.conf:

Code:
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
    AllowOverride All
    Require all denied
</Directory>

Code:
#
# Relax access to content within /var/www.
#
<Directory "/var/www">
    AllowOverride All
    # Allow open access:
    Require all granted
</Directory>

base_url in config.php is set to:
PHP Code:
$config['base_url'] = 'http://<ip_address>/nutrition/'

index_page in config.php is set to:
PHP Code:
$config['index_page'] = ''

uri_protocol in config.php is set to:
PHP Code:
$config['uri_protocol'] = 'REQUEST_URI'

.htaccess file is:
Code:
RewriteEngine On
RewriteBase /nutrition/
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

I know this is a common question that I'm sure you're tired of answering, but I have tried numerous offered solutions to no avail. Thanks for any help you all can give.


  Make custom driver
Posted by: omid_student - Yesterday, 02:58 AM - Forum: Libraries & Helpers - Replies (3)

Hello guys
I try to make driver with below sample code
https://stackoverflow.com/questions/2353...odeigniter
but it get error "Invalid driver requested: Testdriver_first_driver"
Why?


  Subdomain for users
Posted by: theedo - Yesterday, 12:13 AM - Forum: General Help - No Replies

Hello people!
I'm using IIS 7.0 on Windows Server 2008 R2 as SO. I have a website that foreach user has a profile page. The link foreach user is https://domain.com/profile?user=%username%.

Now I saw that I must add a wildcard subdomain *.domain.com, but in IIS 7.0 I can't add this. There is another way to do that if I go to username.domain.com I see the profile page of this user?

Maybe you can give me some suggestion!

Thank you


  View update_batch without executing
Posted by: bhogsett - 09-19-2017, 04:32 PM - Forum: Model-View-Controller - Replies (1)

I am using a db->update_batch and as I am debugging I would like to view what will be in the update without executing the update.

Can this be done?

Thanks.



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