https://wiki.uniformserver.com/index.php?title=PHP_PORTABLE_IDE:_Introduction&feed=atom&action=historyPHP PORTABLE IDE: Introduction - Revision history2024-03-28T18:41:18ZRevision history for this page on the wikiMediaWiki 1.41.0https://wiki.uniformserver.com/index.php?title=PHP_PORTABLE_IDE:_Introduction&diff=4999&oldid=prevBobS: Fix grammatical problems; clarify sentences.2010-12-08T12:51:56Z<p>Fix grammatical problems; clarify sentences.</p>
<a href="https://wiki.uniformserver.com/index.php?title=PHP_PORTABLE_IDE:_Introduction&diff=4999&oldid=4988">Show changes</a>BobShttps://wiki.uniformserver.com/index.php?title=PHP_PORTABLE_IDE:_Introduction&diff=4988&oldid=prevRic: New page: {{Uc nav PHP PORTABLE IDE}} '''''Uniform Server portable PHP IDE''''' This step-by-step design guide shows how to create a simple portable PHP IDE (integrated development environment). I...2010-12-02T11:27:58Z<p>New page: {{Uc nav PHP PORTABLE IDE}} '''''Uniform Server portable PHP IDE''''' This step-by-step design guide shows how to create a simple portable PHP IDE (integrated development environment). I...</p>
<p><b>New page</b></p><div>{{Uc nav PHP PORTABLE IDE}}<br />
'''''Uniform Server portable PHP IDE'''''<br />
<br />
This step-by-step design guide shows how to create a simple portable PHP IDE (integrated development environment).<br />
<br />
Included are steps for converting this IDE to run as a Uniform Server plugin. For completeness the guide includes mini tutorials.<br />
<br />
'''''Portable PHP IDE Features'':'''<br />
{|<br />
|-valign="top"<br />
|<br />
* Self-contained<br />
* Edit PHP CLI scripts<br />
* Debug PHP CLI scripts<br />
* Only Open Source components used<br />
* Includes Notepad++ - Core<br />
* Includes Notepad++ plugin NppExec<br />
* Includes Notepad++ plugin DBGp <br />
|<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
|<br />
* Portable run from UDB memory stick<br />
* Edit PHP web pages running on local server (Uniform Server)<br />
* Debug PHP web pages running on local server (Uniform Server)<br />
* Easily converted to a Uniform Server plugin<br />
* Includes PHP XDebug - CLI and Server debugging<br />
* Includes PHP 5.3.3 - CLI<br />
* PHP CLI Easily upgraded <br />
|}<br />
<br />
== Background ==<br />
Some time ago I was asked the following question "''Is there an easy way to develop and run PHP CLI scripts from a USB memory stick''"? <br />
<br />
It transpires this user was learning PHP and wanted an easy way to run code snippets. Reason for running from a USB stick, he/she did not want to install PHP and a full-blown IDE on their PC.<br />
<br />
My reply was, use Notepad++ install the NppExec plugin add core binaries from PHP. To run currently displayed script write a small NppExec command script. You can create a shortcut key that runs this command script. For greater flexibility consider adding XDebug which will allow you to debug both CLI and server side scripts. <br />
<br />
Response was not unexpected! "''Can you supply a complete idiots guide''?" <br />
<br />
== Guide Tutorial Breakdown ==<br />
This guide is split across several pages each page builds on previous pages to construct the final IDE. Pages and topics covered are as follows:<br />
<br />
{|<br />
|-valign="top"<br />
|<br />
'''''Page'''''<br />
|<br />
'''''Content'''''<br />
|-valign="top"<br />
|<br />
Introduction<br />
|<br />
This page<br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Notepad++ | Notepad++]]<br />
|<br />
Step-by-step guide creating IDE folder structure. Install and reduce size of Notepad++ ('''core component'''). Batch file to start Notepad++ <br />
* Install '''NppExec''' plugin - Provides console window<br />
* Install '''DBGp''' Plugin - Debugging client and control window<br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Install PHP | Install PHP]]<br />
|<br />
Install PHP for running CLI scripts. You can decide which version of PHP to use<br />
* [[PHP PORTABLE IDE: Install PHP#PHP Install Method 1 | PHP Install Method 1]] - Extracts PHP binaries from Uniform Server 6.0.5-Carbo<br />
* [[PHP PORTABLE IDE: Install PHP#PHP Install Method 2 | PHP Install Method 2]] - Extracts PHP binaries from PHP 5.3.3 distribution <br />
* [[PHP PORTABLE IDE: Install PHP#Configuration file for PHP | Configuration file for PHP]] - Configuration file for running CLI<br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: NppExec Configuration | NppExec configuration]]<br />
|<br />
This page covers the following:<br />
* How to [[PHP PORTABLE IDE: NppExec Configuration#Copy and Paste (console window) | copy and paste]] in console window.<br />
* Use [[PHP PORTABLE IDE: NppExec Configuration#Environment variables | environment variables]] for absolute paths to Notepad++'s folders.<br />
* Using the above Environment variables [[PHP PORTABLE IDE: NppExec Configuration#Run Script Displayed | run script]] currently displayed in Notepad++<br />
* Several commands can be saved as a [[PHP PORTABLE IDE: NppExec Configuration#Save NppExec command script | command list]] and [[PHP PORTABLE IDE: NppExec Configuration#Run a command script | run collectively]].<br />
* A [[PHP PORTABLE IDE: NppExec Configuration#Assign shortcut key | shortcut key] can be assigned to run the above saved command script. <br />
* Output in a console window may be [[PHP PORTABLE IDE: NppExec Configuration#NppExec Console Filters | filtered to highlight errors]]. Double clicking this highlighted text takes you to that line of code in the edit window. <br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: PHP extensions | PHP extensions]]<br />
|<br />
This page shows how to enable PHP extensions in the CLI configuration and ensure correct file is being picked up.<br />
* Running CLI scripts the PHP interpreter needs to know [[PHP PORTABLE IDE: PHP extensions#Update NppExec command script |what configuration file to use]] also true when run via a command script.<br />
* Checking correct configuration file is being picked up you can put a [[PHP PORTABLE IDE: PHP extensions#PHP configuration file - php_cli_ide.ini | dummy line]] in the configuration file to produce an error or use the [[PHP PORTABLE IDE: PHP extensions#PHP INFO | PHP info function]]. <br />
* How to enable PHP extensions using the [[PHP PORTABLE IDE: PHP extensions#Enabling extensions | WinBinder extension]] as an example.<br />
* Generally when a file is double clicked you expect that file to be run with the correct application. Interestingly this can lead to some confusion especially for PHP files see [[PHP PORTABLE IDE: PHP extensions#Double clicking PHP file problem | Double clicking PHP file problem]]<br />
* Want to preserve file associations for example .php is associated with a PHP editor and you want to run that script on a server when double clicked use a [[PHP PORTABLE IDE: PHP extensions#PHP CLI redirect script | redirection file]]! <br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Run Menu | Run Menu]]<br />
|<br />
This page looks at automating functionality using Notepad++ menu system.<br />
* After editing a PHP script it is advisable to run a [[PHP PORTABLE IDE: Run Menu#PHP Syntax check | syntax check]]. This functionality is assigned to a menu item.<br />
* Similarly running a [[PHP PORTABLE IDE: Run Menu#Run PHP web page on server | page on a local web server]] is assigned to a [[PHP PORTABLE IDE: Run Menu#Edit Notepad++ file shortcuts.xml | menu item]]. This runs a [[PHP PORTABLE IDE: Run Menu#PHP CLI redirect script | PHP script]] that indirectly (via a browser) runs a script on a local server. A server may be configured to pass files with any extension hence the PHP redirection makes no distinction. <br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Notepad++ XDebug 1 | XDebug 1]]<br />
|<br />
XDebug 1 covers setting up our IDE for PHP CLI debugging using the XDebug extension<br />
* Majority of material seems to be Linux orientated hence a quick [[PHP PORTABLE IDE: Notepad++ XDebug 1#Overview | overview]] for Windows users<br />
* [[PHP PORTABLE IDE: Notepad++ XDebug 1#XDebug download and install | Downloading and installing]] XDebug is very easy.<br />
* To run XDebug a separate [[PHP PORTABLE IDE: Notepad++ XDebug 1#PHP Configuration file | configuration file] specific to PHP CLI is required. <br />
* Similarly [[PHP PORTABLE IDE: Notepad++ XDebug 1#Notepad++ DBGp client configuration | configuration of Notepad++’s client]] plugin is easy requiring only a few mouse clicks.<br />
* Our IDE requires both console and debugging windows to be open however there is an issue when these are docked [[PHP PORTABLE IDE: Notepad++ XDebug 1#Docking Problem | solution]] is to undock them.<br />
* Adding a [[PHP PORTABLE IDE: Notepad++ XDebug 1#New NppExec script | new command script]] to run PHP CLI debugging requires only minor changes to an existing script.<br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Notepad++ Debugging 1 | Debugging 1]]<br />
|<br />
* PHP CLI debugging is covered on this page.<br />
* [[PHP PORTABLE IDE: Notepad++ Debugging 1#Debugging overview | Debugging overview]] shows complete sequence for debugging CLI scripts.<br />
* A powerful feature is the ability to [[PHP PORTABLE IDE: Notepad++ Debugging 1#Change Value of a variable | change a variable]] while debugging.<br />
* Interested in tracking a small number of variables then add them as [[PHP PORTABLE IDE: Notepad++ Debugging 1#Watches | watches]]. <br />
* How to use [[PHP PORTABLE IDE: Notepad++ Debugging 1#Xdebug Break function | Xdebug Break function]] useful for initiating a break point in included pages.<br />
* Notepad++'s integrated console window may be of limited use for your application alternative is to use an [[PHP PORTABLE IDE: Notepad++ Debugging 1#Alternative Console Window | external cmd window]] for debugging. <br />
<br />
<br />
<br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Notepad++ XDebug 2 | XDebug 2]]<br />
|<br />
XDebug 2 covers setting up our IDE for running and debugging PHP web pages using the XDebug extension<br />
* Again majority of material seems to be Linux orientated hence a quick [[PHP PORTABLE IDE: Notepad++ XDebug 2#Overview | overview]] for Windows users<br />
* This section covers [[PHP PORTABLE IDE: Notepad++ XDebug 2#XDebug download and install | downloading and installing]] XDebug on Uniform Server.<br />
* Running XDebug on Uniform Server requires modifications to the [[PHP PORTABLE IDE: Notepad++ XDebug 2#PHP Configuration file | PHP configuration file]]. <br />
* Similarly [[PHP PORTABLE IDE: Notepad++ XDebug 2#Notepad++ DBGp client configuration | configuration of Notepad++’s client]] plugin is easy requiring only a few mouse clicks.<br />
* Our IDE requires both console and debugging windows to be open however there is an issue when these are docked [[PHP PORTABLE IDE: Notepad++ XDebug 2#Docking Problem | solution]] is to undock them.<br />
* At this stage you will have noticed duplication between pages XDebug 1 and XDebug 2 this is intentional see [[PHP PORTABLE IDE: Notepad++ XDebug 2#Important Commonality | Important Commonality]]. <br />
<br />
|-valign="top"<br />
|<br />
[[PHP PORTABLE IDE: Notepad++ Debugging 2 | Debugging 2]]<br />
|<br />
This page provides a recap of material already covered and provides an [[PHP PORTABLE IDE: Notepad++ Debugging 2#New redirection script | updated redirect script]].<br />
* Recap example. Debuggining initiated useing a browser and from Notepad++<br />
* Add menu items to Context Menu<br />
* Run Script On Server<br />
* [[PHP PORTABLE IDE: Notepad++ Debugging 2#Plugin |Plugin]] design and what requires changing.<br />
<br />
|}<br />
'''''[[#top | Top]]'''''<br />
<br />
== Download and Install ==<br />
After reading this design tutorial why not download either the finished Portable IDE or Plugin.<br />
<br />
Download and Install details are provided on this page: [[Uniform Server PHP IDE: Introduction | Uniform Server PHP IDE]]<br />
<br />
'''''[[#top | Top]]'''''<br />
<br />
== Summary ==<br />
First page introduces the core component [[PHP PORTABLE IDE: Notepad++ | '''Notepad++''']] <br />
<br />
'''''[[#top | Top]]'''''<br />
<br />
----<br />
<br />
[[Category: Tutorials]]<br />
[[Category: How To]]<br />
[[Category: Uniform Server 5.0-Nano]]</div>Ric