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 8665231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:25:53+00:00 2026-06-12T17:25:53+00:00

My application is working totally fine in development environment. Once i uploaded it to

  • 0

My application is working totally fine in development environment. Once i uploaded it to my production server, i got the following error:

Parse error: syntax error, unexpected T_FUNCTION, expecting ‘)’ in
/home/fjamal/public_html/*/anyname/application/config/config.php
on line 27

The errors refers to the following code:

spl_autoload_register(function($class)
{
 if (strpos($class, 'CI_') !== 0)
 {
  if (file_exists($file = APPPATH . 'core/' . $class . EXT))
  {
   include $file;
  }
  elseif (file_exists($file = APPPATH . 'libraries/' . $class . EXT))
  {
   include $file;
  }
 }
}); 

If i change the above code to the older version as:

function __autoload($class)
{
 if (strpos($class, 'CI_') !== 0)
 {
  if (file_exists($file = APPPATH . 'core/' . $class . EXT))
  {
   include $file;
  }
  elseif (file_exists($file = APPPATH . 'libraries/' . $class . EXT))
  {
   include $file;
  }
 }
}  

I get the following error:

Fatal error: Class ‘Frontend_Controller’ not found in
/home/fjamal/public_html/**/anyname/application/controllers/home.php
on line 4

Explanation of the error: my controller extends from Frontend_Controller which resides in Libraries folder. Frontend_Controller extends from MY_Controller which resides under core folder. For some reason, all these problems in the production environment, i don’t get it in my localhost. Hence, home is default controller.

This error stops the application from running, i couldn’t figure it out at all. Any help will be appreciated.

  • 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-12T17:25:55+00:00Added an answer on June 12, 2026 at 5:25 pm

    I would guess that your production-server is running with PHP <5.3

    Your code uses a anonymous function, they have been introduced in PHP 5.3.0

    Solution: create a named function and use it as callback.

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

Sidebar

Related Questions

I've got application settings working just fine. However, I'd like to be able to
My Application was working fine. But as soon as i updated from ADT 16
I've got (working) application done with ttk. It uses self-created module for showing a
I am working on a server application which receives data over a TCP socket
i'm totally went crazy for that issue.. i have project that was working fine
Having got a chunk of my application working with Entity Framework 4.1, I needed
If you have an application with a GUI totally working on 2D drawing, what
In a rails application I am working on I have the following setup: class
Now that I have a read-only application working, I am working on the insert
I am trying to implement ios mapView related application,Before 3 hour my application working

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.