-
Notifications
You must be signed in to change notification settings - Fork 40
Home
During the installation process of XAMPP you will be presented with various dialogue boxes. One such dialogue states that the timezone values in both php.ini and my.ini have been set to “America/Chicago” and that you should change them if they are not correct. The problem is you’re not told where you can easily find those files.
Before you do anything you’ll need the timezone information applicable to you. Head over to http://us2.php.net/manual/en/timezones.php where you will find a list of supported timezones divided by various geographic regions. I chose “America”. Then, you will be presented with a list of timezones under the heading “America”. I chose “America/Winnipeg” – select the one applicable to you and make note of it's name.
Navigate to C:\xampp\php\php.ini and open the file in a plain text editor such as Notepad. Look for the following …
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Chicago"
Change “America/Chicago” to the proper value. In my case it is “America/Winnipeg”. Save the file and restart Apache (if it is running) in order for the change to take effect.
Next, navigate to C:\xampp\mysql\bin\my.ini and open the file in a plain text editor such as Notepad. Look for the following …
default-time-zone = "America/Chicago"
Again change the value to the one applicable to you. Save the file and restart MySQL (if it is running) in order for the change to take effect.
Password protect /webalizer, /security, and any other XAMPP folders that you decided to keep If you want to keep the webalizer and security pages of XAMPP, I suggest that you password protect them. You may also want to password protect other XAMPP pages that you have chosen to keep. You can use the same username/password that you chose for the XAMPP pages, which is stored in the c:\xampp\security\xampp.users file.
To protect these folders with the same password that you have for the /xampp folder, you need to add some text just before the directives in your Apache config files for each folder, as shown in red below:
Alias /web_folder_name “C:/xampp/foldername”
<Directory “C:/xampp/foldername“>
…
…
AuthType Basic
AuthUserFile C:\xampp\security\xampp.users
require valid-user
</Directory>
The file to edit to add this text for /security and /webalizer is c:\xampp\apache\conf\extra\httpd-xampp.conf. If you kept some of the other XAMPP folders and want to password protect them, I indicate which config files are used on this page.
In order for these changes in the config files to take effect, you need to stop Apache and restart it.
There are some folders that already have some password protection, and you should leave them alone (if you didn’t already delete them), unless you want them to have the same password as your /xampp folder. If you are running a webdav server, it may be a good idea to keep the separate password file for the webdav server.
There are also some default passwords that XAMPP has created for the /webdav, /restricted, and a /fonts directory (that is protected by /forbidden). Additionally, XAMPP has some default passwords for the FTP and mail servers. I’ll discuss how to change those passwords in a future article.