Posts

Showing posts with the label PHP

Create Virtual Host in IIS Server

Image
1)  Open Command Prompt using Administrative Rights 2)  Flush the cache of ARP (Address resolution protocol) a) C:\Windows\system32> netsh interface ip delete arpcache b) C:\Windows\system32> arp -a 3)  Open IE (Internet Explorer) a)  Open Internet Options window from settings b)  Click on Connections Tab -> Click on LAN Settings button c)  Uncheck all checkbox but make sure to check the "Bypass proxy server for local address." 4)  Open Hosts file from C:\Windows\System32\drivers\etc Folder (Make sure is it have write permission) It will look like this # localhost name resolution is handled within DNS itself. # 127.0.0.1       localhost # ::1                 localhost Add these lines at bottom of this file (You can add multiple names) 127.0.0.1 mysite.com 127.0.0.1 maheshbokkisam.com 5)  Now check is these virtual host/domain names are working a)  Go to Command Prompt and run this commands 5.a.1)  ping mysite.c

Find the php.ini or php installed path in windows from command line prompt

How to find .ini file OR php path OR php version OR any other details of PHP. If you installed   PHP   in windows directly or using webplotform installer. Open command prompt and go to C Drive type C:\> php -v The result will be like this in my system, it may differ to you based on PHP version PHP 5.4.24 (cli) (built: Jan  8 2014 20:26:10) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies C:\>php --ini Configuration File (php.ini) Path: C:\Windows Loaded Configuration File:         C:\Program Files (x86)\iis express\PHP\v5.4\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed:      (none) If you want search/find using particular key word you can use this command C:\>php -i | findstr php.ini Configuration File (php.ini) Path => C:\Windows Loaded Configuration File => C:\Program Files (x86)\iis express\PHP\v5.4\php.ini C:\>php -i | findstr version System => Win

Basic CRUD operations using php, mongodb and knockoutjs with validation

Image
1) I used knockout simplegrid for table data with DELETE, EDIT action and pagination support 2) THE CRUD operations are using XHR/AJAX 3) I used Twitter Booststarp Framework. You can Download/Fork from the github.com  basics_of_php_mongodb_knockoutjs Before trying this we need to install PHP, Apache webserver/Any HTTP server and MongoDB second download mongodb.dll file (php mongodb driver) and keep this file extension if you are using windows OS. These are JavaScript files required <!-- Just for debugging purposes. Don't actually copy this line! --> <!--[if lt IE 9]><script src="js/ie8-responsive-file-warning.js"></script><![endif]--> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]>  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>  <script src="https://oss.maxcdn.com/li