Dev-PHP2.ig: Quick Install
- Connect to http://devphp.sourceforge.net/
- Download the huge version of PiGii and install it. This installer will
- Install and configure a PHP 5.2 with the mostly used extensions so you don't have to worry about php.ini to have your MySQL (or other database) working. The main graphic extensions are also included. This should be sufficent for 90% of PHP applications.
- Install and configure the Php-gtk2 extension
- Install and configure the Xdebug extension.
- Install Glade 3.4.3. It will run directly if you have kept the gtk install option checked. If you have already a GTK+ installation somewhere, it could be possible to run Glade with it, but you will probably have some troubles with missing dll. It is more simple to install the full package and your Glade 3 will run out of the box.
All in one !!!
You can generally keep the default settings, but you are free to change them, provided you know what they mean.
- If you are installing for the first time, then get the "IDE + Installer" otherwise there will be missing files. If you are updating, you can download only the exe file, overwrite the old one and you are done.
- Install Dev-PHP in the directory you want.
- When you run Dev-PHP for the first time, you will get a Welcome message indicating that Dev-PHP is creating its configuration files. These files are stored in "Documents and Settings\<user>\Application Data\DevPHP.
- Then you are invited to select a folder for your first project.
- The program opens with and empty window.
- Copy in the directory you have choosed a php file and open it in the editor, or create a new one.
Open the menu Options / General options... / Project : there you will indicate the path to your php.exe file. There are two situations you must clearly distinguish :
- if you want to test a standalone script (typically a php-gtk script), you must choose php.exe and NOT php-cgi.exe which is intended for web based scripts. So, in this tab you will choose the php.exe of your php-gtk2 directory, and you will choose the php-cli.ini file in the second line of the dialog. Please be careful to select the php-cli.ini, this is the ini file used by the php.exe engine of your php-gtk2 installation.
- if you want to test a web-based php script, you must choose php-cgi.exe in your php directory (either the php directory installed by PiGii of another of your choice). Choose also the php.ini file you need. If the file is "php.ini", you don't need to indicate it since it is the default file.
- Click OK to close the dialog.
Configure Dev-PHP for Xdebug
If you have followed the steps above, Xdebug has been automatically configured when you have clicked OK on step 3) c), because the necessary data was preinstalled by PiGii in the php-cli.ini file. To verify this, open again the Options / General options dialog and choose the Debugger tab. You should see the path to the debugger in the first field :
- If you had not followed the above steps (if your php-gtk directory was already installed and you didn't use PiGii, then you must indicate here the path to the Xdebug dll and choose a 5.2 nts version (nts, this is very important, the ts version will not run with php-gtk 2.0.1).
Test your program
- Close Dev-PHP and reopen it so that the configuration is loaded.
- Open your program, and type F5 (or open Run / Run PHP-GTK). Your program should run.
Test the debugger
- Now the Exciting part : First show the Debug toolbar if it is not yet active (Menu View / Debug Toolbar). It is presently greyed.
- Type CTRL + F5, or open Run / PHP-GTK + Xdebug. The Debug toolbar is now colored and appear like this :
- Click on the Step into icon (or type F8). A green triangle appears on the left of the first line of your program.
- Now have fun ! This means Dev-PHP is now ready to debug your script. See the documentation to learn all the features of the debugger.
For detailed information about the options configured above and the php-cli.ini file, see the documentation : Configuring Dev-PHP