Friday, April 3, 2009

Settings at the php.ini

The php.ini file located at the php home folder ,something like this c:/www/php/php.ini.
Now i have point out some important settings which is highly recommended ::
[note: leading ; (semi-colon) indicates comment line]

1. Php file Upload Settings
;;;;;;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 30M
post_max_size = 100M

2. Database Connectivity settings
; if ur using mysql then enable (remove leading semi-colon)
extension=php_mysql.dll
; if ur using postgreSQL then enable
extension=php_pgsql.dll


Hope , it would help u.

Wednesday, April 1, 2009

Installing PHP 5.2.3, MySql 5.0,Apache2.2 on Windows XP





I am working with WAMP technology . As of my experience newer supposed to be struggle when configure WAMP.Here is the configuration notes of PHP to work with MYSQL and Apache2.2 on a Windows XP machine. These are the steps I took. Hope that they work for you...

I installed PHP and MySQL on Windows XP platform with Apache2.2. Please note that PHP,mySQL and Apache is open source , the first thing I did was search google for "Download Apache2.2 " and go to Apache official site to download and Install it.

Download Apache2.2 from here

(Apache2.2 download link)


* PHP 5.2.9-1 installer [17,304Kb]: Click Here to Download

* Download MySQL 5.0 : Click Here to Download

* Download MySQL 5.0 GUI Tools : MySql 5.0 GUI Tools (Tools to help you administer database)


Installing Apache2.2

  1. If you haven't done so already, download the Apache HTTPD Web Server from the Apache web site . Be sure to download the apache_2.2.11-win32-x86-no_ssl MSI installer here: (http://httpd.apache.org/download.cgi)

  2. Save the file to your Windows Desktop.



  3. Apache Web Server Install Window


    Apache Web Server Install Window

    Double click the msi file saved on your Windows Desktop. You will see a window that looks like this:

  4. Click "Next>".

  5. Click the radio button "I accept the terms in the license agreement"

  6. Click "Next>".

  7. On the next window, again click "Next>".

  8. Next, fill in all the text boxes with the following information:

    1. "Network Domain": localhost

    2. "Server Name": localhost

    3. "Administrator's Email Address": your email address


  9. Make sure the radio button "for all users, on port 80, as a service - recommended" is selected.

  10. Click "Next>".

  11. On the next window, click the radio button "Custom", and then click "Next>".

  12. On the next window highlight "Apache HTTP Server" and click the "change" button.

  13. We are going to install all the packages and scripts in the folder C:\www\Apache2\ (assuming C: is your main hard drive). So in the text box "Folder name:" type in "C:\www\Apache2\". The ending backslash is important.

  14. After you have typed in the path, click "OK" and then click "Next>". At this point, you should see a window that looks like this:


    Apache Ready to Install


    Apache Ready to Install

  15. Click "Install" to begin the installation.

  16. Once the Apache installation software has finished installing all the files on your computer, you will see a final window letting you know the installation was a success. Click the "Finish" button.
Tips::
  • To check that the software was in fact installed successfully, open your favorite browser and type "http://localhost/" into the address bar. You should see a page that looks like this:


    Apache Success


    Apache Success

Installing the PHP

Instructions for installing the PHP Engine.

  1. If you haven’t done so already, download the PHP Windows Binaries - You can download the software from the PHP.net website, (http://www.php.net/downloads.php) Be sure to download PHP 5.0.4 installer Windows installer and PHP 5.0.4 zip package. (Note: the version numbers might be different). Save the files on your Windows Desktop.

  2. On your Windows Desktop, double click the PHP installer file. Once you've done that, you should see a window that looks like this:

    PHP Install Window


    PHP Install Window


  3. Click "Next>".

  4. On the next window, click "I Agree".

  5. On the next window, click the radio button "Advanced", and click "Next>".

  6. We're going to install PHP in our server directory instead of the default PHP directory, so in the "Destination Folder" group, click "Browse".

  7. A browser window will open. Change the destination directory to "C:\www\php". There is no need for a trailing backslash.

  8. Click "OK" on the browser window, and then click "Next>".

  9. Select "Next>" on the next three screens.

  10. On the following window, leave the SMTP defaults as they are, and click "Next>".

  11. If you want, you can enter an email address. This will be used as the "From:" email address when using PHP's mail function.

  12. On the next window, make sure that the radio button "Display all errors warnings and notices" is clicked. Then click "Next>".

  13. On the next window is where you pick which web server software you are using. Since you have installed Apache, pick "Apache" from the list. Then click "Next>".

  14. On the next window make sure that the check box ".php" is checked, and then click "Next>".

  15. Now that you have set all the options, you should see a window that looks like this:


    PHP Ready to Install


    PHP Ready to Install


    PHP is ready to install, so click "Next>" to begin the installation.

  16. If a message window pops up asking, "Do you want to keep your php.ini file", click "NO".

  17. Now a message window should pop up that looks like this:

    Image:apache_configuration.jpg


  18. This is normal. Click "OK". When the PHP installer window pops up, click "OK" again.

  19. Now PHP is installed, but we need to change some of Apache's settings to get everything working the way it should.

  20. In Windows open "My Computer", and browse your way to the folder "C:\www\Apache2\conf".

  21. Double click the file "httpd.conf" so we can edit it. This should open the file in Notepad.

  22. Scroll to the very bottom of the page, and add these lines:

    1. ScriptAlias /php "c:/www/php/"

    2. AddType application/x-httpd-php .php

    3. Action application/x-httpd-php "/php/php-cgi.exe"


  23. You should highlight and copy the text from this page, and then paste it into the httpd.conf page to ensure there are no typos. Hit "Enter" after the last line to ensure there is one blank line at the end of the file.

  24. When we installed PHP, it created the file "C:\Windows\php.ini". We want to move that file to the directory "C:\www\php" so it’s easier to edit when we need to. # Open "My Computer" and browse to "C:\Windows".

  25. Find the file "php.ini" in the windows directory.

  26. Right-click the file and pick "Cut".

  27. Now browse to the directory "C:\www\php".

  28. Right-click an empty area in the window and select "Paste". This moves the "php.ini" file from the Windows directory to the PHP directory.

  29. Now double click the file php-5.0.4-win32.zip that is saved on your desktop. (Note: the version number might be different).

  30. Extract the contents of this file to "C:\www\php".

  31. Using Notepad, open the file "C:\www\php\php.ini".

  32. Find that line that reads: extension_dir = "./" (or something similar, as long as its the line with "extension_dir".

  33. Change the line to: extension_dir = "c:\www\php\ext"

  34. Now find the line that reads: ;extension=php_mysql.dll Delete the ; so that the line now reads: extension=php_mysql.dll

  35. Now open the directory "C:\www\MySQL\bin".

  36. Find the file "libmysql.dll".

  37. Right-click the file and select "Copy".

  38. Browse to the directory "C:\Windows\System32" and Paste the file into that directory.

  39. Now you need to restart Apache to ensure the new lines added to the httpd.conf file have an effect.

  40. On the Windows taskbar click "Start">"All Programs">"Apache HTTP Server">"Control Apache Server">"Restart". This should restart the Apache server. Now we need to create a test PHP to see if everything is working.

  41. Open Notepad (usually found in "Start">"All Programs">"Accessories">"Notepad"), and copy and paste the following lines into a new document: <?PHP phpinfo(); ?>

  42. In Notepad, click "File">"Save". Save this file in the directory "C:\www\Apache2\htdocs" as "phpinfo.php". Notepad has a bad habit of adding .txt to the end of all documents you save, so make sure from the "Save" dialog that comes up in Notepad, change "Save as type" from "Text Documents (*.txt)" to "All Files". Now click the "Save" button to save your new PHP document.

  43. Open your favorite browser and in the address bar type "http://localhost/phpinfo.php". If everything is set up correctly, you should see a page that looks like this:


    PHP Success


  44. PHP is now installed!

Tips

If you want to save your time, use XAMPP software bundle or WITSuite EasyInstaller (WITSuite installation video: http://www.witsuite.com/products/installer/). It is most simple way to install Apache, PHP, MySQL on Windows.

    • Be sure to make these last changes to the Apache configuration file to prevent a 403 FORBIDDEN message when testing to see if PHP has been successfully installed.

  • <Directory "c:/php/">

  • AllowOverride None

  • Options None

  • Order allow,deny

  • Allow from all

  • </Directory>

INSTALLING MYSQL

Step 1: Install MySQL 5.0.

Step 2: Install MySQL 5.0 GUI Tools. These will allow you to view your databases and data structures

Step 3: Configure an Instance: The best way I configured it to work successfully was once it was installed to go into the "MySQL Server Instance Configuration Wizard" and click "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 main password that you remember like "root", Click "Execute!!".


*** Please note your username will be "root" and password will be whatever you typed (in this example "root"). After you hit "Execute", You should see 4 buttons light up with no red 'X's and you know MySql is configured correctly!


Step 4: Open the MySQL Administrator program. Set server host = localhost, username=root and password=root or whatever you set it to. Click on catalogs, if you see "mysql" then that is a main database.

This means that MySQL is installed properly!!

Step 5: I have provided a simple PHP script to test database connection to
MYSQL. Copy and paste this into a file call it for example: "testmysql.php"

and place it into the web root folder (same folder as "phptest.php")

Step 6: If you run this script by typing: http://127.0.0.1/testmysql.php
and it says "Successfully Connected to MySQL Database Manager!" and "Successfully Connected to Database 'MYSQL'" then this means that MySQL is now communicating with PHP and is installed and working properly!!!

Hope it helped!


Installing PHP 5.2.3, MySql 5.0, IIS 6.0 on Windows XP

After hours of trying and re-trying and fustration, I finally installed PHP to work with MYSQL and IIS 6.0 Manager on a Windows XP machine. These are the steps I took. Hope that they work for you...

I installed PHP and MySQL on Windows XP platform with IIS 6.0. Please note if you are running IIS 5.0 Manager that comes with the Windows CD, the first thing I did was search google for "Download Microsoft IIS 6.0 Manager" and go to Microsoft to download and Install it. Once installed IIS 5.1 and IIS 6.0 manager will coexist in "Control Panel -> Administrative Tools".

(I haven't used IIS7 so I cannot comment on it yet)

Also download the following 3 items:
(Read Article Download Disclaimer First)

* PHP 5.2.9-1 installer [17,304Kb]: Click Here to Download

* Download MySQL 5.0 : Click Here to Download

* Download MySQL 5.0 GUI Tools : MySql 5.0 GUI Tools (Tools to help you administer database)



INSTALLING PHP
Step 1: Configure IIS 6.0 to point to a local folder where your webfiles. Don't forget to create a file called "index.htm" (or index.html) add some HTML like a picture or fancy text font. Once you configure it, you should be able to see it by typing http://127.0.0.1/ or http://localhost/ from the URL of Internet Explorer/FireFox.

Step 2: Create a folder on C: called "PHP" and unzip the files from the PHP download into that folder. You should see a a bunch of DLL's and additional sub-folders called "ext", "extras" and "dev" with files in there as well.

Step 3: 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.

*** Here is the Visual Illustration on this Step ***


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


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

Step 6: Reboot the computer.

Once fully rebooted in the URL bar of IE, type "http://127.0.0.1/phptest.php" and you should see it give you information about the PHP version.

If you see this then you know it worked properly and PHP is installed successfully!



INSTALLING MYSQL
Step 1: Install MySQL 5.0.

Step 2: Install MySQL 5.0 GUI Tools. These will allow you to view your databases and data structures

Step 3: Configure an Instance: The best way I configured it to work successfully was once it was installed to go into the "MySQL Server Instance Configuration Wizard" and click "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 main password that you remember like "root", Click "Execute!!".

*** Please note your username will be "root" and password will be whatever you typed (in this example "root"). After you hit "Execute", You should see 4 buttons light up with no red 'X's and you know MySql is configured correctly!

Step 4: Open the MySQL Administrator program. Set server host = localhost, username=root and password=ksbalu or whatever you set it to. Click on catalogs, if you see "mysql" then that is a main database.

This means that MySQL is installed properly!!



CONFIGURING PHP TO WORK WITH 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.
*** Why IIS simply does not read the PHP directory? ...I do not know ***

Step 2: Edit this file "php.ini" that you copied to your C:\WINDOWS folder using a text editor like notepad. Find the line where it says "extension_dir = *something*". Uncomment this line by removing the preceding semi-colon. and set it to say: extension_dir="c:\php\ext"

Step 3: In the same file "php.ini" also un-comment out 2 other lines by removing semi-colon. Find the lines where it says: extension=php_mysql.dll and extension=php_mysqli.dll and uncomment both lines by removing the semi-colon.

Step 4: Reboot the computer

Step 5: I have provided a simple PHP script to test database connection to MYSQL. Copy and paste this into a file call it for example: "testmysql.php"

and place it into the web root folder (same folder as "phptest.php")

Step 6: If you run this script by typing: http://127.0.0.1/testmysql.php
and it says "Successfully Connected to MySQL Database Manager!" and "Successfully Connected to Database 'MYSQL'" then this means that MySQL is now communicating with PHP and is installed and working properly!!!
Hope it helped!



Website Development





We provide professional web services and solutions that are
custom-tailored to best fit the goals designed for long-term success
for you, the client. Our web design services include specializing in
creating, customizing and upgrading web sites. We pride our expertise
in web site design, web site development, graphic design, web site
maintenance, web site re-design, custom logo design, online marketing,
search engine marketing, internet yellow page listings, establishing of
corporate identity, search engine reporting, and ongoing marketing
support.

In standard advertising, we also create promotional materials like
brochures, pamphlets, catalogs, tri-folds, flyers, posters, newspaper
ads, magazine advertisements, postcards, stationary, letterhead,
envelope and business cards.

Specializing in the following areas of Web Design

  • Designing web pages for Personal Portfolios

  • Designing web sites for businesses

  • Creating Websites for online ecommerce stores

  • Developing Transactional Web Interfaces

  • Interfacing Web Pages with multiple databases

  • Creating online schedule based programs

  • Graphics for Web sites are professionally created

  • Design Websites that have animation and sound

  • Logo Development, Brand Identity

  • Media Presentations, Play Video

  • Podcasting - Connecting with your itunes

  • Spam Protection/Hack Protection




Specializing in the following web languages


  • HTML

  • Javascript, VB Script

  • ASP, ASP.NET

  • Cold Fusion MX

  • PHP, CGI-Scripts

  • Flash MX


  • Fireworks

  • Mail Scripts

  • Paintshop Pro

  • Dreamweaver

  • Photoshop


  •