Home arrow PHP arrow Page 2 - Programming with PHP and GTK, Part 1

Installing PHP-GTK - PHP

Have you ever thought of writing a PHP application for client side execution without having a web server present? Learn the basics of creating a front end for PHP using PHP-GTK.

  1. Programming with PHP and GTK, Part 1
  2. Installing PHP-GTK
  3. A Test Run
  4. A PHP-GTK Window
  5. Widgets
  6. A Simple Program
By: Vinu Thomas
Rating: starstarstarstarstar / 40
August 16, 2004

print this article



How Do I Install PHP-GTK?

The present version of PHP-GTK is version 1.0.0, which works with PHP4 and GTK+ 1.x. You can download the latest version from http://gtk.php.net/download.php. The present version is supported on Windows and Linux. Here's how you can install it on your system.

Installing PHP-GTK in Windows

This installation method should work for Windows NT, 2000 and XP. I'm assuming that you have not installed PHP on your system prior to this. Download the zip file with the latest version of PHP-GTK to your system. Use a program like Winzip to extract the files to a temporary folder. For ease of explanation, let's say you extract the zip file to C:TEMP. When you go to C:TEMP you'll find 3 folders which have been extracted:

  • PHP4
  • TEST

The PHP4 folder contains an installation of PHP and GTK libraries required to run PHP-GTK. Copy the PHP4 folder to your C: drive so the path of your PHP4 directory becomes c:php4. The folder c:tempwinnt contains the configuration file for PHP: php.ini. Copy php.ini to your windows directory, either c:windows or c:winnt, depending on your version of Windows. The folder c:temptest contains some test programs for PHP-GTK. You can copy this folder under c:php4. So your test programs will be accessible under c:php4test

If you have a prior installation of PHP, do not copy the php.ini file to your windows folder. You'll have to manually copy the changes in the supplied php.ini to your original configuration file.The rest of the installation remains the same.

Add C:PHP4 to your file path in the environment variables. Here's how you get to the environment variables:

Start>Settings>Control Panel>System>Advanced>Environment Variables

We do this so we can call a execute a php script by calling "php script.php" instead of having to supply the path to php.exe every time. If you don't wish to add the path to PHP4 in the environment variable, you'll need to call php by using the full path like so - "c:php4php script.php"

>>> More PHP Articles          >>> More By Vinu Thomas

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: