Wednesday, August 3, 2011

mssql php extenstion won't load


There are quite a few reason's the php_mssql.dll extension for PHP may not be loading on your windows server.

For PHP 5.2 anyway I found that both MSVCR71.DLL and ntwdblib.dll needed to be copied to various places.

MSVCR71.DLL needed to be in c:\Windows\System32 as having it in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 wasn't good enough.

ntwdblib.dll needed to be both in the PHP directory and c:\Windows\System32

I'd love to know why this is, but for now I'm just happy it's working.

This post helped me out, when google failed me; http://www.php.net/manual/en/function.mssql-connect.php#68115 .


Sunday, July 24, 2011

Windows Environment Variables Editor

Rapid Environment Editor is a pretty awesome utility that let's you easily edit your windows environment variables. A co-worker of mine passed this around a year or so ago.

Installing PHPUnit for use in Windows NetBeans

I initially used NetBeans Guide to get PHPUnit installed in NetBeans but here is a quick install checklist for use with PHP 5.2. These are mostly workarounds I had to do for 5.2.17, that work as of this post, but may not work in the future.

For details on how to use it see NetBeans Guide.
  1. Install NetBeans
  2. PHP 5.2 w/ the following extensions
    Curl
    At least one of the PDO extensions
  3. Run go-pear.bat located in the PHP directory
  4. Run the PEAR_ENV.reg it creates
  5. from the cmd line run "pear upgrade pear"
  6. Modify pear.bat add a semi-colon to include_path="%PHP_PEAR_INSTALL_DIR%" so that it becomes include_path=";%PHP_PEAR_INSTALL_DIR%" This will prevent you from getting an "Invalid configuration directive" error every time you run pear.
  7. run "pear install channel://pear.php.net/Net_URL2-0.3.1"
  8. run "pear install channel://pear.php.net/HTTP_Request2-2.0.0RC1"
  9. Follow the PHPUnit Install Guide to install PHPUnit
If you get any errors like "Failed to download pear/Net_URL2 within preferred state "stable", latest release is version 0.3.1, stability "beta", use "channel://pear.php.net/Net_URL2-0.3.1" to install" Just run "pear channel://WHATEVER_CHANNEL_IT_TOLD_YOU_TO_USE". In this example you would run "pear install channel://pear.php.net/Net_URL2-0.3.1".

If after following the PHPUnit Install Guide you get the message

No releases available for package "pear.phpunit.de/PHPUnit"

try running pear update-channels and then pear clear-cache

Monday, July 11, 2011

ssleay32.dll missing error when trying to run go-pear.bat

On windows when trying to run go-pear.bat (which comes with the installation of PHP) you may get an error that ssleay32.dll is missing.

You can remedy this by installing the CURL extension when installing PHP

Sunday, July 10, 2011

Setting up NUnit in Jenkins

Jaco van Staden has a really good article that covers how to set everything up and more: http://yakiloo.com/jenkins-tfs-and-msbuild/

The only issue I had to overcome was that on my dev machine I think testdriven.net put the nunit.framework.dll in my path. But on my companies build machine I didn't install testdriven.net and msbuild couldn't find the DLL. So I just ended up committing the DLL with my cs project to SVN.

I'm sure there are a variety of other ways to fix this (environment variables, including the nunit project, ...) but it's late....errr early.

Friday, July 8, 2011

How to escape the escape character in C#

string t = @"c:\";

http://stackoverflow.com/questions/1768023/how-to-use-in-a-string-without-making-it-an-escape-sequence-c

Wednesday, March 30, 2011

How to find which version of Ubuntu/Debian you are running

source: http://www.debianadmin.com/find-your-debian-or-ubuntu-linux-version-you-are-running.html

ou can find in different ways in ubuntu

Solution 1

cat /etc/issue

The file /etc/issue holds the version of Ubuntu installed on your system

Solution 2

lsb_release -a

or

cat /etc/lsb-release

Wednesday, March 9, 2011

Find Ubuntu Version Number using the Terminal

Solution 1

cat /etc/issue

The file /etc/issue holds the version of Ubuntu installed on your system

Solution 2

lsb_release -a

or

cat /etc/lsb-release

source:

Thursday, March 3, 2011

Updating to Subversion 1.6 in Ubuntu 8

Here is a great blog post on how to update to subversion in Ubuntu 8, since apt-get won't update to 1.6 for you.

http://growingventuresolutions.com/blog/installing-subversion-svn-1-6-ubuntu-8-04-lts-hardy