PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, March 14, 2022

[FIXED] Symfony - MAMP(windows) - warning timezone

 March 14, 2022     ini, mamp, php, symfony, timezone     No comments   

Issue

I installed MAMP for windows

I have this error since several hours...

    [Symfony\Component\Debug\Exception\ContextErrorException]                   
 Warning: date_default_timezone_get(): 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 me 
 thods and you are still getting this warning, you most likely misspelled th 
 e timezone identifier. We selected the timezone 'UTC' for now, but please s 
 et date.timezone to select your timezone.

In the php.ini concerned (C:/MAMP/conf/php5.5.19/php.ini), I changed the line DATE like this:

    [Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/Paris"

And in my phpinfo(), the path loaded is :

Loaded Configuration File   C:\MAMP\conf\php5.5.19\php.ini

When I do in the consol the command php --ini I have this :

C:\Users\Thomas>php --ini
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed:      (none)

Why Configuration File (php.ini) Path: is "C:\Windows" and not C:\MAMP\conf\php5.5.19\. Can I change this Path ?

I don't know what to do now...

thanks !


Solution

I had the same error. I had no clue where it was coming from, but with some trial and error I figured out it had something to do with the special character in my htdocs folder:

htdocs/Exámple

By changing that character to a normal character (thus changing to htdocs/Example), I no longer got the error and the site would load normally.



Answered By - Maarten
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing