Windows 7 machines won't sync time
Solution 1
On your server, how exactly have you entered the peer servers (step 4c in the Microsoft KB article referenced)? If you just typed in the word peers as stated in the KB, that certainly won't do. The entry should be something like: us.pool.ntp.org,0x1 time.windows.com,0x1 some.other.time.server,0x1
You can verify these settings with the command 'net time /querysntp'
If the server is unable to get a usable timestamp from the upstream peer, it will not advertise itself as authoritative to your clients, and the clients may not synchronize with it. I have found that time.windows.com regularly fails to provide usable timestamps to my servers; therefore I do not use it.
Solution 2
Keep in mind that Group Policy may be overriding your local registry settings.
w32tm /query /configuration in 2008 to find out, I can find no equivalent for 2003.
Related videos on Youtube
Lane
Updated on September 17, 2022Comments
-
Lane almost 2 years
I created a Virtual Machine with Ubuntu Desktop 12.0.4 LTS.
On it, I have installed Apache2, php5, MySQL.
I have read a ton of posts trying to understand how to connect to a SQL Server database on another box, but I haven't quite got it figured out.
On the Linux box, I installed unixODBC and FreeTDS and I can connect to the database and execute queries at a command-line level.
What I need is the ability to configure Codeigniter on the Linux box to talk to the SQL Server instance on the Windows box.
I assume that the unixODBC and FreeTDS installations can be leveraged, yet I'm not sure how to go about it.
Included is a copy of my database.php configuration file from Codeigniter:
$db['default']['hostname'] = '<ip address, port #>'; $db['default']['username'] = 'username'; $db['default']['password'] = 'password'; $db['default']['database'] = 'database name'; $db['default']['dbdriver'] = 'odbc'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = FALSE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = TRUE; $db['default']['stricton'] = FALSE;
In my php.ini file, I set the extension_dir to point to the directory where the freetds drivers are located and I defined the driver file "extension=libtdsodbc.so".
Anyone experienced in this area?
Thanks for your time.
-
Dan over 13 yearsPort 123 UDP/TCP/Both?
-
Rich over 13 years@Dan Just UDP when I wrote the question, but I've just tried opening up TCP too and it doesn't appear to have made any difference.
-
gusya59 over 12 yearsDo you get the correct server names when you type w32tm /monitor ?
-
Rich over 12 years@ColdT No! I get:
GetDcList failed with error code: 0x8007054B. Exiting with error 0x8007054B
-
gusya59 over 12 yearsUnder HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Parameters, set the Type to "NT5DS" without the quote. If it was already there, the value is correct. If it needs changing, then after this type in w32tm /resync /rediscover, I'd assume it would provide you with some info and then finally w32tm /monitor. Let me know if that helps.
-
Rich over 12 years@ColdT The
Type
registry value is already set toNT5DS
for me. The output forw32tm /resync /rediscover
is the same as the output I pasted into the question:Sending resync command to local computer. The computer did not resync because no time data was available.
-
majidarif over 10 yearsDoesn't
php
already have support for sqlsrv with pdo? -
Lane over 10 yearsYes, however, that only works if you're using PHP on a Windows box. In my case, PHP is being served up on a Linux box.
-
-
Rich over 12 yearsI'm running 2008! 2003 was a typo. What should I be looking for in the output of w32tm /query /configuration? If it turns out Group Policy is the problem, how do I fix it?
-
Rich over 12 years@ChrisJ That's what I'm trying to do. I can't get it to work, though.