Archive for category PHP

php abouts on your server

Is your php working?

Used Text Editor: Netbeans

Note: make a “new folder” under  wamp/www.

1. Create ProjectName:
File->New Project->select PHP->next->Project name: info_php,  Source Folder:  browse new folder you created on under wamp/www.  Finish

2. Make a new php file. Right click on info_php . Give a file name , say Php_info

3. Add php info function.

<?php
phpinfo();
?>

4. Check it on browser:  http://localhost/info_php/php_info.php

Note: Quick test to make sure if php is running or not.  It also shows the information about php in your web server.

 

Installing Wamp and Setting up MySQL

PLATFORM: WINDOWS

To begin:

  1. Download wamp package : www.wampserver.com/en/index.php

-During installation:

*Browse For Folder – Select “www” (this is where php file will go) and click OK
*SMTP server-localhost
*Default

Note: This will download Apache, mysql and php.

2. Start all services of wamp server ( Find wamp icon and click on Start all services).

3. Start MySQL Console- Click wamp icon from taskbar. Select->  MySQL ->  MySQL Console

-Prompts ->   Enter password:  [ *by default its blank so just hit enter]

[ If you want to set up a root password  :  (Type as shown below)

use  mysql [-shows Database Changed]
update mysql.user SET password=password(“YOUR_NEW_Password”) [ hit enter]
where user=”root”; [hit enter]
[Shows Query OK]

flush Privileges;
[shows Query OK]
quit [hit enter]

NOTE: Now start your MySQL console, you are now required to enter your new password.

4. Install Text Editor Netbeans or Dreamweaver or Zend Studio or Komodo Edit

Note: we are using netbeans. http://www.netbeans.com/downloads/index.html
[ click on download  that says PHP in a column]

5. Test if the web server is running or not.

On your browser (iexplorer/firefox/chrome)  ->   http://localhost/