Terence Chang Photography

PHP + ADODB + IIS + MSSQL + Windows Authentication

These is my technical notes on how to make PHP connect to MSSQL using Windows Authentication, if PHP(IIS) and MSSQL are running on separate servers.

Environment:
PHP4 + PHP Adodb + IIS + MSSQL

In normal case, using PHP Adodb library do not allow you to user windows authentication to access MSSQL runing on the server or other server. To use the windows authentication in PHP to access MSSQL server, you will need to tweak the IIS configuration and the PHP connection string.

IIS configuration
- Open IIS Manager
- Right click on the web site running the PHP script.
- Choose Properties and go to Directory Security tab
- Click Edit on Anonymous access and authentication control
- Change the Anonymous access user name and password to the desired domain username and password
- Uncheck the “Allow IIS to control password
- Make sure the domain user has rights to access desired database on the MSSQL server

PHP Script
Useing the following connection string when connect to MSSQL with PHPAdodb library
$myDSN=”PROVIDER=SQLOLEDB;DRIVER={SQL Server};SERVER=[MSSQL Server Name];DATABASE=[Database Name];Integrated Security=SSPI“;

Notes:
As you can see, the doman user will need to have rights to access both servers. The user will also need to have rights to execute PHP.EXE and read(and possible write) access to the PHP script folders. Basically, the domain user will need to have everything IUSR_[server_name] user has.

I have not had chance to test this. Please use it at your own risk.

Reference:
Authentication methods for connections to SQL Server in Active Server Pages

Google Gbuy vs eBay Paypal

Today’s top new for me is regarding to Google’s coming Gbuy service (News). Being an eBay’s Paypal customer for a long time, I have developed many e-commerce services based on the eBay’s paypal API, Authorize.net, echo payment and other payment gateway systems. I have to say that I am so interested in the Google’s Gbuy service. Google is well known for it’s easy to user APIs for developers. Their API is developer friendly. By user Google’s map API can easily implement my travel waypoint from my Garmin eTrex GPS device.

Google claim their transaction fee will be cheaper than other rivals. I don’t know what services GBuy promised to provide, but I am sure it’s going to be userful. I will keep my eyes open.

Gbuy is expected to be free during the initial phase, but merchants may eventually be charged a 1.5 percent to 2 percent per-transaction fee, Jordan Rohan, an RBC Capital Markets analyst, said in his research note. A fee of that size would be slightly less than that charged by eBay’s online payment system, PayPal. – Source from News.com

Just as other servie already doing, Google will capture user’s transaction data for their own goods. They will user the data for marketing purpose, search engine optimization purpose and making $$ purpose. I don’t care how Google user the data, which I have no control anyway. However, I do care how I can use their Gbuy API to do good for me and my clients.

We will see!

RORY’S STORY – by Ryan Seek

After writting Divine Witness, Ryan Seek’s first book, Ryan surprises me with this interesting book. Rory’s Story. You can read sample chapters on his web site here.

Do the Spirits Speak to You?

Nineteen-year-old Rory Fisher is all but orphaned and alone in the world. Her only remaining loved one is her Yavapai grandfather, a once proud Indian, who is stricken with a diseased mind and confined to a nursing home in Twin Falls, Idaho.

In a rare moment of clarity the old Yavapai suddenly informs his granddaughter that the Spirits have spoken to him and the message is clear. She must leave immediately, on this very day, back to the land of his people in the red-walled canyons of Arizona.

The true purpose of the journey remains a mystery as Rory embarks on her quest to a place called Vortex Canyon, located in the wilderness just north of Sedona. She travels with only the promise of her grandfather; the promise that his Spirits will guide and protect her.

But will the Spirits speak to Rory, a Caucasian girl adopted by an Indian family, and not of true Yavapai blood? Was the training her grandfather gave to her as a child enough to reach out to the Spirit World in adulthood?

Only Rory’s Story will tell?

You can order his book from his web sites or the following links.
To order Rory’s Story:
At iUniverse, click here
At Amazon, click here
At B&N, click here

DIVINE WITNESS – by Ryan Seek

Divine Witness – A book written by a friend of mine Ryan Seek . He has been a Nascar fan for many many years. He starts writting the novals many years ago. Divine Witness is a intersting story book and worth to read.

You can go to Divine Witness‘s page to read the sample chapters. Here is what the books is about.

At first, Nick Morrison and Trevor Devane believe that solving a thirty-year-old mystery should be easy; even for two twelve-year-old boys.

Using Nick’s psychic visions of the crime, they decide to piece together enough clues to identify the killer and capture the $10,000 reward. It soon becomes apparent that the boys are digging up bones that others would prefer remain buried. The harassment begins slowly with members of the local police force and quickly escalates into a serious threat to the young boys’ investigation…and their lives!

As the boys dodge their pursuers and continue to gather clues, they begin to realize that the mystery may go much deeper than just the local police force. It appears there are even more powerful people trying to keep the past right where it is…buried and forgotten.

You can order his book from his web sites or the following links.
To order Divine Witness:
At iUniverse, click here
At Amazon, click here
At B&N, click here

Garmin eTrex GPS + Google Maps – Updated


*** Please don’t pay too much attention on the marker location. I am faking the GPS position, it is not accurate. It’s just for approving the concept ***
As I continue to experiment the Garmin eTrex GPS + Google Maps idea, I thought it might be userful to show what the map will look like when I finish the trip. I pretend that I will go to Taipei, Taiwan from Phoenix Arizona. Taking my Garmin eTrex GPS with me, I will be traveling to many cities in south Taiwan. Then I will fly to Hong Kong. Travel into mainland China and go to Tibet eventually.

The map will show you where I was and default to the last spot I stop. I hope this to be useful eventually. If it all works out fine. I will be creating an GUI interface allow people to upload their waypoint from their Garmin GPS and download the html file and XML file for their own use. The other idea come after this is to link to the dedicated photo blog page for that spot. This will make the map more userful for travel photographers. It also make the blog more interesting. How many time you have tried to link the geography to the photos you saw on the internet. At least I have tried to locate Rome and Mogolia, but dont’ really have idea where they are.

Currently, my Nikon D70S doesn’t allow me to track the GPS waypoint. I do know Ricoh produce one pricy digital camera, which will automatically record the GPS information into the JPEG file meta data. I hope one day Nikon release the GPS feature or utilities built-in to the Nikond D70S. So all D70S lover or D200 users can enjoy the features.

Keywords: Google Maps, Google Earth, Garmin eTrex GPS, Nikon D70S, D200, Phoenix, Arizona, Taipei, Taiwan

Related Posts Plugin for WordPress, Blogger...