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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:58:16+00:00 2026-05-23T09:58:16+00:00

System: Debian Lenny/Apache 2.2/php5.3.3 compiled from sources I’m strugglying with the date.timezone within php.ini.

  • 0

System: Debian Lenny/Apache 2.2/php5.3.3 compiled from sources

I’m strugglying with the date.timezone within php.ini.

I can define the TZ using in the php source code but I’d like to fix that at once in the ini file.

php code : Ok

date_default_timezone_set('Europe/Berlin');

php.ini : Not taken into consideration if not setup within the source code

date.timezone = 'Europe/Berlin'

I also checked that I modified the right php.ini file and have interference with some php.default.ini files.
I checked within the apache config files whether there would be an interfering TZ env data, but none.

Don’t know what to do more, so any hints will be welcomed,

thx in advance.

EDIT:
I also tried with no or single or double quotes as date.timezone = ‘Europe/Berlin’ but I still get a “no value” in the phpinfo.

EDIT2: Both phpinfo() and the below test script return that the date.timezone is empty (eg. no value) :

 date_default_timezone_set('America/Los_Angeles');
 $script_tz = date_default_timezone_get();
 $iniset = ini_get('date.timezone') ;
 if (strcmp($script_tz, $iniset)){
   echo "Script timezone ($script_tz) differs from ini-set timezone ($initset).";
 } else {
   echo "Script timezone ($script_tz) and ini-set timezone match.";
 }

EDIT3: hum, I guess I found sthg in the php.ini :

 Configuration File (php.ini) Path : /usr/local/php533/php.ini 
 Loaded Configuration File : VOID !

So I have to find the way to make sure Apache is looking for the right php.ini somehow…

  • 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-05-23T09:58:17+00:00Added an answer on May 23, 2026 at 9:58 am

    Hope it can help others on debian’s like distros :

    SOLVED:
    needed to tell Apache to load the wanted php.ini file

    Context:
    PHP loaded as an Apache module (eg DSO)

    HOW in short :
    shell ENV

    PHP_INI_SCAN_DIR=/pathtophpini
    export PHP_INI_SCAN_DIR
    

    http.conf

    # ...
    # DSO Modules: PHP as an Apache module
    SetEnv PHPRC /usr/pathtophpini
    SetEnv PHP_INI_SCAN_DIR /usr/pathtophpini
    
    LoadModule php5_module /pathtophpmod/libphp5.so
    PHPINIDir /pathtophpini
    # ...
    

    Shell

    /etc/init.d/apache2 restart   
    

    Now just checking that the loaded configuration file php.ini is the right one either using the php-cli in commandline or phpinfo() :

    /path/to/your/phpcli/bin/php -i | grep php.ini | tail -n2   
    # which gives you the expected answer
    Configuration File (php.ini) Path => /pathtophpini/php.ini
    Additional .ini files parsed => /pathtophpini/php.ini
    

    Some more documentation :
    on that very particular point, provided there are very few docs on that subject, as this is a kind of shared responsability topic between apache and php matters :
    on stackoverflow
    on php manual
    askapache

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

Sidebar

Related Questions

No related questions found

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.