Dev-PHP2.ig: Quick Install

From Dev-PHP
Jump to: navigation, search

Install PHP-GTK2

  1. Connect to http://devphp.sourceforge.net/
  2. Download the huge version of PiGii and install it. This installer will
    1. 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.
    2. Install and configure the Php-gtk2 extension
    3. Install and configure the Xdebug extension.
    4. 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.

Install Dev-PHP

  1. 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.
  2. Install Dev-PHP in the directory you want.
  3. 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.
  4. Then you are invited to select a folder for your first project.
  5. The program opens with and empty window.

Configure Dev-PHP

  1. Copy in the directory you have choosed a php file and open it in the editor, or create a new one.
  2. Install1.jpg
    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.
  1. Click OK to close the dialog.

Configure Dev-PHP for Xdebug

  1. Install2.jpg
    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 :
  2. 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

  1. Close Dev-PHP and reopen it so that the configuration is loaded.
  2. Open your program, and type F5 (or open Run / Run PHP-GTK). Your program should run.

Test the debugger

  1. Now the Exciting part : First show the Debug toolbar if it is not yet active (Menu View / Debug Toolbar). It is presently greyed.
  2. Type CTRL + F5, or open Run / PHP-GTK + Xdebug. The Debug toolbar is now colored and appear like this : Install3.jpg
  3. Click on the Step into icon Install4.jpg(or type F8). A green triangle appears on the left of the first line of your program.
  4. 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.

Complementary information

For detailed information about the options configured above and the php-cli.ini file, see the documentation : Configuring Dev-PHP