MY WEBLOG

cURL with PHP and Apache on Windows
Setting up cURL my linux server it was no problem at all, but I had a heck of a time getting cURL to work properly on my Windows test box with PHP and Apache. There are a lot of tricks scattered around on the web so here is my list of notes:

1. Only install PHP with the zip'd binaries. Don't use the installer. I recommend deleting your current PHP installation and reinstalling with the binaries. Downloading the latest PHP has the added benefit of ensuring its compatible with the version of cURL you'll download later. (I installed to D:\apps\php and will use that path for the rest of this example)
2. Edit your php.ini file:
   - set extensions_dir to d:\apps\php\extensions
   - set register_globals to On
   - set sessions.save_path to d:\apps\php\temp (you need to create that directory first)
3. Copy php4ts.dll to your Apache bin folder
4. Copy libeay32.dll and ssleay32.dll to c:\windows\system32
5. Download cURL for Windows at: http://curl.haxx.se/download.html. I chose the Win32 - Generic by J├Ârn Hartroth. I recommend getting the SSL version in case you ever need SSL. I unzipped cURL to d:\apps\curl and will use that path for the rest of this example
6. [SSL INSTALL ONLY] Download OpenSSL for Windows from http://curl.haxx.se/download.html. (Its near the bottom of the page). Extract libssl32.dll to d:\apps\curl
7. [Windows XP Install Only] Check to see if you have the following file: c:\windows\system32\msvcr70.dll. If not, search for it in Google and download it to system32. You may get error messages without it.
8. Uncomment the curl line in your php.ini file to enable curl: extension=php_curl.dll
9. Finally edit your Apache httpd.conf file to enable php:
   - Uncomment: LoadModule php4_module d:/apps/php/sapi/php4apache2.dll
   - Add Line: AddType application/x-httpd-php .php

Test with the following PHP code:

   $url = "http://www.thinkgeek.com";
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL,$url);
   curl_setopt($ch, CURLOPT_VERBOSE, 1);
   curl_setopt($ch, CURLOPT_POST, 0);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
   $returned = curl_exec($ch);
   curl_close ($ch);
   echo $returned;

SSL NOTE: I kept getting no response when I tried using curl with SSL urls. I found that adding the following solved the problem:
   curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);

I have read that the proper solution is to use the ca-bundle.crt file for curl to be able to verify certificates but I haven't tried this yet:
   curl_setopt($ch, CURLOPT_CAINFO, 'drive:\pathto\ca-bundle.crt');


10.22.03 @ 03:33 PM EST [link]

Wireless Repeater with a Linksys WET11
At my girlfriends apartment I can pickup a faint unencrypted 802.11b signal from a nearby neighbor. Here's how I created a Wi-Fi repeater to "borrow" that high bandwidth connection.

I bought a Linksys WET11 wireless ethernet bridge.

I connected the Linksys WET11 to an extra Linksys AP I had.
Then I configured the devices like this:

Linksys WET11
ssid - linksys (same as neighbor's AP)
channel - 6 (same as neighbor's AP)
IP - static 192.168.1.226 (changed from default 192.168.1.225
changed default password

My AP
ssid - notsleepy (different from neighbor's AP)
turned off ssid broadcasting
channel - 11 (different from neighbor's AP)
IP - obtain from AP1 DHCP
turned on encryption
disabled DHCP (obtains from neighbor's AP)
changed default password


VOILA! Instant boosted signal! I'm mostly transparent except for the fact that I obtain an IP from his AP.

08.06.03 @ 12:05 PM EST [link]

Welcome Reese
Yesterday I went to see the one day old new addition to the family.
He has long toes that he likes to spread wide when his feet are exposed.

Photos from the visit



06.21.03 @ 10:35 AM EST [link]

java URLConnection and timeout
Throw this into your bag of goodies:

If you find yourself needing to make connections to other web servers from Java you'll quickly run into problems. I found this nice package that provides a lot of functionality that is lacking in java URLConnection. The nicest things are the ability to read all response codes and set a timeout for the connection.

http://www.innovation.ch/java/HTTPClient/
http://www.innovation.ch/java/HTTPClient/urlcon_vs_httpclient.html


06.12.03 @ 01:52 PM EST [link]

bank city
I visited Charlotte a couple of years ago (only my second time) for a wedding. I was amazed at the downtown improvement. So I tipped my hat to the city by creating a Charlotte, North Carolina version of the city.

Maclaga, this one is for you homey. :)

04.16.03 @ 06:48 PM EST [link]

new york, new york
its kind of late to be posting this but here it is: pics from our NYC visit

04.10.03 @ 07:24 PM EST [link]

another southern city - houston texas
last night i launched my houston, tx version of raleighlist. it went pretty smooth and i'm confident i can launch additional cities fairly quickly. i also incorporated a forum in this site for testing. if all goes well i'll add the forum to raleighlist as well.

03.19.03 @ 03:21 PM EST [link]

goodbye directtv. hello bellsouth dsl.
well directtv dsl service went out of business leaving me in a search for a new broadband connection. i signed up for bellsouth fastaccess dsl yesterday and this morning i could no longer connect to directtv. uggg. a quick check of my order status revealed that i was scheduled to receive my new modem in about one week. ugg.

i started reading newsgroups (on dial-up of course) and realized that my alcatel speed touch home dsl modem from when i had pacbell dsl in CA would work with bellsouth. sure enough it works.

i hate that stupid PPPoE crap so i configured my linksys router to maintain a connection with bellsouth dsl.

01.17.03 @ 05:56 PM EST [link]



Home
Archives
Nice Muscle Bodybuilding Supplements
SEO Position
Gift Baskets
TaxClue.com
Bermuda Bag
Discount Bodybuilding Supplements
Email Tony