Archive

Archive for the ‘Internet’ Category


Configuring PHP and MySql on IIS (For Windows XP)

June 9th, 2008

I was once asked to develop a web based database project which I had to do either using PHP or Java and I was not familiar with either of them. I searched on Google and felt that PHP is easy to learn and use. So I started learning PHP using the tutorials available online and building my project on the same time. Today I feel PHP has everything that one may need for any kind of web application which may require a back end database.

Installing PHP can be a mess so here are the instructions are for the following versions: PHP 5.2.3, MySql 5.0 and IIS 6.0

Steps may change a little with other versions.


Installing PHP

Step 1: Create a folder on C: called “PHP” and unzip the files from the PHP download into that folder.

Step 2: Open IIS6 Manager Right Click -> Default Website -> Properties -> Select Home Directory -> Select Configuration. On Application configuration check to see if .php is in list. If not click “Add”. For executable browse to “c:\php” folder and select “php5isapi.dll”. Click “OK” and then “OK” again.

Step 3: In the “C:\PHP” folder copy the file “php.ini-recommended” to your C:\WINDOWS folder. Rename this file to “php.ini”

Step 4: Create a test file in the root of your web folder called “phpinfo.php” and insert the code below:

<php
phpinfo();
?>

Step 5: Click Start –> Run and type IISRESET and press enter.

Step 6: Open Internet Explorer and type “http://127.0.0.1/phpinfo.php” and you should see it give you information about the PHP version.

If you see a page with all sorts of information about your PHP version that means your installation was successful.

Configuring MySQL Server

While running the setup you will need to configur an Instance. You can choose the following options while following the wizard.

MySQL Server Instance Configuration Wizard –> Detailed Configuration –> Developer Machine –> Non-Transactional Database Only –> Decision Support (DSS)/OLAP –> Check Enable TCPIP Netwokring –> Port 3306 –> Standard Character Set –> Install as a Windows Service –> Give it a password –> Execute!!

Configuring PHP for MySQL

Step 1: In the C:\PHP folder copy the file “libmysql.dll” to your C:\WINDOWS\SYSTEM32 folder. Make sure you don’t overwrite any existing file in this folder. If file exists, first rename it so you can go back.

Step 2: In the C:\PHP folder copy the file “php.ini-recommended” to your C:\WINDOWS folder. Rename this file to “php.ini” (You already did this.)

Step 3: Edit this file “php.ini” using a text editor like notepad. Find the line where it says “extension_dir = ***”. Uncomment this line by removing the preceding semi-colon. and set it to:

extension_dir=”c:\php\ext”

Step 4: In the same file “php.ini” also un-comment out 2 other where it says: extension=php_mysql.dll and extension=php_mysqli.dll by removing the semi-colon.

Step 5: Click Start –> Run and type IISRESET and press enter.

You are good to go!!

Internet, Programming


Your Ad Here
Ad by AdBrite

Dynamic IFRAME Resizing

June 9th, 2008

IFRAMEs are generally not considered a good idea to use but sometimes it really helps. But resizing an IFRAME as per the content is a big issue and I found a piece of code after some search which can resolve this issue.

In the head of your document enter the following JavaScript code:

<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>

and in the body create the iframe tag:

<iframe width="700" id="the_iframe"
onLoad="calcHeight();"
src="testing_page.shtml"
scrolling="NO"
frameborder="1"
height="1">
</iframe>

This will create an IFRAME of width=700 and the height will depend on the content it stores.

Reference: Guymal Code

Internet, Programming


Your Ad Here
Ad by AdBrite

IIS 5.0 error message: Service Unavailable

June 8th, 2008

Problem: You are hosting a website using IIS 5.0 and the website is giving an Error message saying “Service Unavailable”.

Solution:
1. Open the IIS Manager, right click Web Sites on the left panel and select properties.
2. Click on the Service Tab.

IIS Properties Isolation Mode

3. Check “Run WWW Service in IIS 5.0 Isolation Mode”.
4. If asked to Restart of IIS then click yes else click Start –> Run –> type ‘iisreset’ and press Enter.

Try opening the website again and you will be perfectly fine.

Internet


Your Ad Here
Ad by AdBrite

Outlook 2003 Calendar Printing – “The messaging interface has returned an unknown error”

June 8th, 2008

Problem: When you try to print another user’s shared calendar in Microsoft Office Outlook 2003, the calendar does not print. Additionally, you receive the following error message:

“The messaging interface has returned an unknown error. If the problem persists, restart Outlook.”

Solution:

Disable the TaskPad option
1. On the File menu, click Print.
2. Click Page Setup.

Outlook Page Setup Taskpad

3. On the Format tab, click to clear the TaskPad check box.
4. Click OK to close the Page Setup dialog box.
5. With the Daily Style print style selected, click OK to print the shared calendar.

and u are good to go!!

Internet


Your Ad Here
Ad by AdBrite

Download YouTube videos

June 8th, 2008

Not just YouTube but most of the websites sharing some form of videos have shifted to Flash format (.flv files). There are websites that can download these videos for you but do you really need to go to another website to download these ??

Follow these simple steps to download videos from YouTube (and other similar websites):

1. You need to install a player for .flv files. You can search on Google for free flv player. Here is the link to the one I use:

FLV Player

2. To download a video from YouTube, just play the video using Internet Explorer. Once it is fully played, go to Tools menu –> Internet Options. Under Browing History, click on Settings and then click View Files. It will open the Temporary Files Folder in your hard drive. You can sort the files by name or size (or even type) and look for a file with name starting with ‘get_video‘ (without any file extension).

3. Copy and paste this file some where in your computer and add an extension (.flv) to it. Play it with the FLV Player you downloaded earlier.

Hurray !!!

Even the videos from other websites, which are in flash format, can be downloaded and played using the above steps. They may already have .flv extension or may not like in case of YouTube.

Tip: If you want to reduce the effort in finding the file in Temporary Files Folder, clean your your browsing history before you play the file. For this, go to Tools menu –> Internet Options –> Delete Browsing History.. and click Delete All and selet the box for Also delete files and settings stored by Add-ons and click yes.

Note: Make sure you follow the copyright guidelines of the material you want to download.

Update 1:
I was having some trouble with the FLV players available so I searched a bit more. Even the famous VLC player can play flv files but dragging the progress bar was putting a stop to the playback. I found a better way. Enable your own Windows Media Player to play these files.

Download and install PlayFLV. While installation, it will ask you to install ffdshow. Install that also. Once the installation is complete, Window Media Player will be able to play flv files as well with all default functions, such as zooming, skipping and full screen view.

Update 2:
Found a very good player that can play most of the files including FLV – GOM Media Player. You can find a link to the download in the Multimedia Utilities page.

Internet, Utilities


Your Ad Here
Ad by AdBrite