Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8914475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:43:40+00:00 2026-06-15T04:43:40+00:00

I am using codeigniter 2 for a module in my site. this is the

  • 0

I am using codeigniter 2 for a module in my site. this is the first run on production.

num_rows() throws the following error

A PHP Error was encountered

Severity: Warning

Message: Home::index() [home.index]: It is not safe to rely on the
system’s timezone settings. You are required to use the
date.timezone setting or the date_default_timezone_set() function. In
case you used any of those methods and you are still getting this
warning, you most likely misspelled the timezone identifier. We
selected ‘Asia/Calcutta’ for ‘IST/5.0/no DST’ instead

Filename: controllers/home.php

Line Number: 18

in line no 18 i have echo $catgory->num_rows();

then i updated the code as follows

function __construct()
{
    date_default_timezone_set('UTC');
    parent::__construct();
}

When reloaded the page i get

HTTP Error 500 (Internal Server Error): An unexpected condition was
encountered while the server was attempting to fulfill the request.

What could be the problem?

Is there any possibility to hide this particular error?

Is it anything to do with the server side settings?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:43:41+00:00Added an answer on June 15, 2026 at 4:43 am

    The problem is not with timezone.

    I checked the logs and found that the a Fatal error has occurred and codeigniter sends 500 status to the browser.

    I did ini_set(‘display_errors’, 1) and CI displayed the actual error instead of sending 500 status to the client.

    So at this point either turn off all errors in production or enable it to see all the initial conflicts(errors) (because development will be different in production in some cases) and then after a test drive then again hide all errors.

    I got the information while reading this post in stackoverflow

    Codeigniter displays a blank page instead of error messages

    Besides, instead of setting timezone in each controller i set it in index.php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using codeigniter framework and I'm getting this error when I've submitted my form:
using CodeIgniter normally one has to specify the controllers in the config/routes.php file. This
Using Codeigniter, I am trying to get a php script to run after a
Background: Using CodeIgniter with this MongoDB library . This is my first go-round with
I made one website xyz.com using php codeigniter framework. This website has modules, so
I am using this htaccess file on my site to remove index.php. RewriteEngine on
I am using modular MVC with codeigniter. I have a module playlist in which
I'm using CodeIgniter (a PHP framework) to build an app, and I have an
I'm using CodeIgniter for my php framework and TankAuth for my authorization/registration. By default,
Am using codeigniter to build an eCommerce site. I have a method on controller

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.