PHP
  Home arrow PHP arrow Page 3 - Revisited: Building Cross Platform GUI App...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Revisited: Building Cross Platform GUI Apps With PHP-GTK
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2002-11-17

    Table of Contents:
  • Revisited: Building Cross Platform GUI Apps With PHP-GTK
  • What is PHP-GTK?
  • Downloading and installing PHP-GTK
  • Installing PHP-GTK for Linux
  • Building our first PHP-GTK app
  • Registering multiple callback functions
  • Adding GTK widgets to our window
  • Other PHP-GTK widgets
  • A PHP-GTK database app
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Revisited: Building Cross Platform GUI Apps With PHP-GTK - Downloading and installing PHP-GTK


    (Page 3 of 10 )

    As with all GPL licensed software, PHP-GTK is a completely free download. Visit http://gtk.php.net/download.php and choose the appropriate version of PHP-GTK that matches your operation system. At the time of writing this article, you could choose to download the source, windows binary, as well as the concurrent versions system (CVS) download.

    Installing PHP-GTK for Windows

    I'm running Windows 2000 with PHP-GTK, so I'll give you my overview of installing PHP-GTK on Windows. Firstly, make sure you're equipped with an unzipping program such as WinZip. Next, locate the directory where PHP is installed. If you installed PHP using the default options it will be c:\php4.

    Extract all of the files in the downloaded zip file to a directory such as c:\temp. Copy all of the files from the php4 directory to your current PHP extensions directory, which can be found in your php.ini file (typically it's either the directory where you installed PHP, such as c:\php4, or the extensions directory of your PHP installation, such as c:\php4\extensions).

    You'll notice a file called php_win.exe. This executable can be used to run PHP-GTK scripts by simply double clicking on them. Before continuing let's setup Windows so that our PHP-GTK scripts will be run automatically when we double click on them.

    Double click on any PHP script on your computer. When the "Open With..." dialog appears, choose other and browse to c:\php4\php_win.exe. Make sure the "Always use this program" checkbox is ticked and click OK. You'll notice that all of your PHP files now have the PHP-GTK icon.

    Anyhow, back to the installation. The contents of the winnt directory in your PHP-GTK download contains a php.ini file. If you don't have a php.ini file in your windows directory already (which is c:\windows for Windows 95 and 98 and c:\winnt for Windows NT, 2000 and XP), then copy that php.ini file there.

    Next, copy all of the files from the winnt\system32 directory of your download to your Windows system directory, which is c:\windows\system for Windows 95 and 98 users and c:\winnt\system32 for Windows NT, 2000 and XP users.

    Run sysedit (Start -> Run -> "sysedit") and add the following line to the end of your autoexec.bat file:

    path=%path%;c:\php4

    Lastly, copy the test directory to the same directory where PHP is installed. The test directory contains a couple of PHP-GTK scripts that demonstrate how to create and interact with the various PHP-GTK files. Change into the c:\php4\test directory and double click on hello.php. You should see a PHP-GTK window containing one button. If everything worked OK, then you've successfully installed PHP-GTK.

    It might also be a good idea to restart Windows at this point.

    More PHP Articles
    More By Mitchell Harper


     

    PHP ARTICLES

    - Making Usage Statistics in PHP
    - Installing PHP under Windows: Further Config...
    - File Version Management in PHP
    - Statistical View of Data in a Clustered Bar ...
    - Creating a Multi-File Upload Script in PHP
    - Executing Microsoft SQL Server Stored Proced...
    - Code 10x More Efficiently Using Data Access ...
    - A Few Tips for Speeding Up PHP Code
    - The Modular Web Page
    - Quick E-Commerce with PHP and PayPal
    - Regression Testing With JMeter
    - Building an Iterator with PHP
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT