[SOLVED] CONFIGURATION PHP.INI :: x86_64::on fedora 27::
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2018
    Location
    colombia
    Posts
    4

    CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    Hello, good evening, I'm new to fedora. And I have problems configuring the php.ini file more specifically in the date.timezone directive.

    1. create a php blank file with the phpinfo function.

    Click image for larger version. 

Name:	1.jpg 
Views:	12 
Size:	92.8 KB 
ID:	29466

    Click image for larger version. 

Name:	2.jpg 
Views:	9 
Size:	112.9 KB 
ID:	29467

    2.check the configuration of the /etc/php.ini file

    Click image for larger version. 

Name:	3.jpg 
Views:	13 
Size:	47.7 KB 
ID:	29468

    3.check some other location of the php.ini file

    Click image for larger version. 

Name:	4.jpg 
Views:	11 
Size:	45.9 KB 
ID:	29469

    4.configure the date.timezone directive in the 2 files as well as /etc/php.ini

    5.opened the .ini files one by one (/etc/php.d)and only enabled extensions, and none changed the value of the date.tiemezone directive

    6.create the script

    PHP Code:
    <?php
    date_default_timezone_set
    ('America/Bogota');
    $script_tz date_default_timezone_get();
    if (
    strcmp($script_tzini_get('date.timezone'))){
        echo 
    'La zona horaria del script difiere de la zona horaria de la configuracion ini.';
    } else {
        echo 
    'La zona horaria del script y la zona horaria de la configuración ini coinciden.';
    }
    ?>
    7.confirm the server's time zone
    Click image for larger version. 

Name:	5.jpg 
Views:	8 
Size:	29.6 KB 
ID:	29470
    8. execute the code
    .... continue

  2. #2
    Join Date
    Mar 2018
    Location
    colombia
    Posts
    4

    Re: CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    local
    Click image for larger version. 

Name:	6.jpg 
Views:	7 
Size:	18.2 KB 
ID:	29471
    url
    Click image for larger version. 

Name:	7.jpg 
Views:	6 
Size:	12.7 KB 
ID:	29472
    9.nothing. Finally take the desperate measure of configuring in each of the files (/etc/php.d from step 4.) the directive date.timezone and nothing
    Click image for larger version. 

Name:	2.jpg 
Views:	4 
Size:	112.9 KB 
ID:	29473
    Please help me, I go around and around and I do not see the solution. Thanks so much for any help

    PD. In all the steps the services were restarted

    systemctl restart mariadb
    systemctl restart httpd
    systemctl restart snmpd

  3. #3
    Join Date
    Sep 2004
    Location
    Champagne
    Posts
    126

    Re: CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    1/ don't change php.ini, the worst solution to configure php

    2/ create a configuration, ex: /etc/php.d/date.ini

    Code:
    date.timezone = Europe/Paris
    3/ test from CLI

    PHP Code:
    php -'var_dump(date_default_timezone_get());'
    string(12"Europe/Paris" 
    4/ restart the php service

    Code:
    systemctl restart php-fpm
    As explained in https://blog.remirepo.net/post/2017/...n-http-and-php (see §5.1)

  4. #4
    Join Date
    Mar 2018
    Location
    colombia
    Posts
    4

    Thumbs up Re: CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    Quote Originally Posted by remi
    1/ don't change php.ini, the worst solution to configure php

    2/ create a configuration, ex: /etc/php.d/date.ini

    Code:
    date.timezone = Europe/Paris
    3/ test from CLI

    PHP Code:
    php -'var_dump(date_default_timezone_get());'
    string(12"Europe/Paris" 
    4/ restart the php service

    Code:
    systemctl restart php-fpm
    As explained in https://blog.remirepo.net/post/2017/...n-http-and-php (see §5.1)

    Excellent, Thank you very much Remi

    Click image for larger version. 

Name:	solved.jpg 
Views:	3 
Size:	71.2 KB 
ID:	29477

  5. #5
    Join Date
    Mar 2018
    Location
    colombia
    Posts
    4

    Re: CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    Quote Originally Posted by remi
    1/ don't change php.ini, the worst solution to configure php

    2/ create a configuration, ex: /etc/php.d/date.ini

    Code:
    date.timezone = Europe/Paris
    3/ test from CLI

    PHP Code:
    php -'var_dump(date_default_timezone_get());'
    string(12"Europe/Paris" 
    4/ restart the php service

    Code:
    systemctl restart php-fpm
    As explained in https://blog.remirepo.net/post/2017/...n-http-and-php (see §5.1)
    Excellent, Thank you very much Remi

    Click image for larger version. 

Name:	solved.jpg 
Views:	4 
Size:	71.2 KB 
ID:	29478

    PD.
    I'm New. How do I select solved?
    Last edited by nstestns; 15th March 2018 at 03:20 AM. Reason: I need to mark resolved

  6. #6
    Join Date
    Dec 2013
    Location
    United Kingdom
    Posts
    6,277

    Re: CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    threads in this section can't be marked solved so I'll edit the title instead. EDIT - On second thoughts it's better in programming and packaging so I've moved it there and marked it solved for you.

  7. #7
    Join Date
    Sep 2004
    Location
    Champagne
    Posts
    126

    Re: CONFIGURATION PHP.INI :: x86_64::on fedora 27::

    Additional notice: starting with PHP 7.2 on Fedora 28, the restart will be automatic

    => https://bugzilla.redhat.com/show_bug.cgi?id=1556762

Similar Threads

  1. Replies: 3
    Last Post: 18th October 2011, 10:23 PM
  2. Replies: 1
    Last Post: 21st May 2011, 08:24 PM
  3. fc13.x86_64 and X11 configuration
    By willihi in forum Hardware & Laptops
    Replies: 3
    Last Post: 26th February 2011, 07:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •