Re: compiling php-gtk on PCLinuxOS ..

From: Date: Wed, 30 Aug 2006 06:48:10 +0000
Subject: Re: compiling php-gtk on PCLinuxOS ..
References: 1 2 3  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7138@lists.php.net to get a copy of this message
We really ought to merge that page to the manual... I'm in some danger of getting free time next week. Ron, if you can tarball some of the more useful Wiki files and stick them online somewhere (or mail me a zip/tarball) I'll get around to it, if nobody else beats me there. Cheers! - Steph ----- Original Message ----- From: "Ron Tarrant" <rtarrant@sympatico.ca> Cc: <php-gtk-general@lists.php.net> Sent: Wednesday, August 30, 2006 7:22 AM Subject: Re: [PHP-GTK] compiling php-gtk on PCLinuxOS ..
suomaf wrote:
Hey Adrian, I read somewhere that you need to have another php install usually under /opt/php. There was a page from the wiki that i used to install php-gtk2, but i can't seem to find it now. That page also mentions something like most php distributions might not be suitable for php-gtk.
I had a copy of that page on my hard drive. Here's a reproduction of it. Hope it helps: Building PHP-Gtk 2 on *nix ------------------------------------------------------------------------ Index 1. Notes <cid:part1.00010906.03090702@sympatico.ca> 2. Installing PHP 5.1 <cid:part2.02000905.07000501@sympatico.ca> 3. Installing PHP-GTK 2 <cid:part3.03010901.01070005@sympatico.ca> ------------------------------------------------------------------------ Notes
     Notes on requirements
You should check whether your system has the required software (and versions) to build PHP and PHP-GTK. As this depends on the extensions you may want to build, a quick read of the README files is recommended. As a side note, checking your distribution's packaging system (YUM, APT, etc...) or CD-Roms for the needed packages is probably the quickest way of getting the required software.
     Notes on PHP-GTK 2
PHP-Gtk 2 is WORK IN PROGRESS. It's currently in an alpha-stage, with new features (and occasionally bugs) being written every day. This means that the version you retrieve from CVS might build perfectly one day, and be seriously broken in the next! Check the php-gtk mailing lists in the resource section <http://gtk.php.net/resources.php> to get involved in the process! Also, note that PHP-Gtk isn't a server-friendly extension, as it's meant for desktop applications. This means you shouldn't integrate PHP-Gtk with a version of PHP that is being used with a web server, so we'll be installing PHP in a non-standard folder, to avoid conflicts.
     Notes on the procedure
This guide assumes you have some knowledge on the basics of compiling and installing software, and know how to install the required tools for these operations. If you don't, then you should check other sites for specific help on that topic. In case you're not too fond of doing some reading, you can always wait that binaries for your system become available, though I'd assume you're into a bit of a waiting. (top <cid:part4.06080402.05050101@sympatico.ca>) ------------------------------------------------------------------------ Installing PHP 5.1 The first thing you need to get PHP-Gtk 2 running is PHP 5.1. As far as I know, no other version will work, so either search for a pre-compiled binary for your system (good luck on that one...) or you'll have to build it from CVS. We'll go for the CVS approach here, so we can count on the latest fixes! The installation process is very well documented on PHP's site <http://www.php.net/anoncvs.php>, but note that we'll be installing in a custom folder (|/opt/php_5_1|). You may change if you wish, but remember to also change the instructions as required. * To get your very own copy of PHP, open a console terminal, and type:
     |$ cvs -d :pserver:cvsread@cvs.php.net:/repository login|
* When asked for a password, use *phpfi*. Then, retrieve the 5.1
     branch:
     |$ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r
     PHP_5_1 php-src|
* After the checkout is finished, let's build and install PHP:
     | $ su
     # cd php-src
     # ./buildconf
     # ./configure --prefix=/opt/php_5_1 --disable-cgi
     # make
     # make install
     # echo extension=php_gtk2.so >> /opt/php_5_1/lib/php.ini
     # /opt/php_5_1/bin/php-config --extension-dir |xargs echo \
     'extension_dir='>>/opt/php_5_1/lib/php.ini |
This went smoothly for me the first time around, so if you happen to stumble on an error, double check you match all the requirements, and read the README files. (top <cid:part4.06080402.05050101@sympatico.ca>) ------------------------------------------------------------------------ Installing Php-Gtk 2 With PHP 5.1 in place, we're ready to retrieve and install PHP-Gtk 2. Once more, check that you meet the requirements (found in the README files and such) before proceeding. As a last resource in case you can't get the required software, you can disable some features during configure. For instance, in case it complains about libglade, and you're growing desperate, use |./configure --disable-libglade| . * Proceeding from where we left off, let's get a copy of PHP-Gtk2
     from CVS:
     | # cd ..
     # cvs -d :pserver:cvsread@cvs.php.net:/repository co php-gtk|
* After that is done, let's build and install:
     | # cd php-gtk
     # ./buildconf --with-phpize=/opt/php_5_1/bin/phpize
     # ./configure --with-php-config=/opt/php_5_1/bin/php-config
     # make
     # make install |
* Optionally, you may wish to create a link to the php executable:
     | # ln -s /opt/php_5_1/bin/php /usr/bin/php-gtk |
* To check whether everything went fine, you can try:
     | $ php-gtk -m | grep php-gtk |
The output should be a line stating "|php-gtk|". You can also try running the phpgtk2-demo.php script under /demos (under the php-gtk CVS checkout), it should be whooping! (top <cid:part4.06080402.05050101@sympatico.ca>) -- Ron Tarrant Blog:<A HREF="http://www.writingup.com/blog/phpgtk2">PHP-Gtk2</A> __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com
--------------------------------------------------------------------------------
suomaf wrote: Hey Adrian, I read somewhere that you need to have another php install usually under /opt/php. There was a page from the wiki that i used to install php-gtk2, but i can't seem to find it now. That page also mentions something like most php distributions might not be suitable for php-gtk. I had a copy of that page on my hard drive. Here's a reproduction of it. Hope it helps: Building PHP-Gtk 2 on *nix -------------------------------------------------------------------------------- Index 1.. Notes 2.. Installing PHP 5.1 3.. Installing PHP-GTK 2 -------------------------------------------------------------------------------- Notes Notes on requirements You should check whether your system has the required software (and versions) to build PHP and PHP-GTK. As this depends on the extensions you may want to build, a quick read of the README files is recommended. As a side note, checking your distribution's packaging system (YUM, APT, etc...) or CD-Roms for the needed packages is probably the quickest way of getting the required software. Notes on PHP-GTK 2 PHP-Gtk 2 is WORK IN PROGRESS. It's currently in an alpha-stage, with new features (and occasionally bugs) being written every day. This means that the version you retrieve from CVS might build perfectly one day, and be seriously broken in the next! Check the php-gtk mailing lists in the resource section to get involved in the process! Also, note that PHP-Gtk isn't a server-friendly extension, as it's meant for desktop applications. This means you shouldn't integrate PHP-Gtk with a version of PHP that is being used with a web server, so we'll be installing PHP in a non-standard folder, to avoid conflicts. Notes on the procedure This guide assumes you have some knowledge on the basics of compiling and installing software, and know how to install the required tools for these operations. If you don't, then you should check other sites for specific help on that topic. In case you're not too fond of doing some reading, you can always wait that binaries for your system become available, though I'd assume you're into a bit of a waiting. (top) -------------------------------------------------------------------------------- Installing PHP 5.1 The first thing you need to get PHP-Gtk 2 running is PHP 5.1. As far as I know, no other version will work, so either search for a pre-compiled binary for your system (good luck on that one...) or you'll have to build it from CVS. We'll go for the CVS approach here, so we can count on the latest fixes! The installation process is very well documented on PHP's site, but note that we'll be installing in a custom folder (/opt/php_5_1). You may change if you wish, but remember to also change the instructions as required. a.. To get your very own copy of PHP, open a console terminal, and type: $ cvs -d :pserver:cvsread@cvs.php.net:/repository login b.. When asked for a password, use phpfi. Then, retrieve the 5.1 branch: $ cvs -d :pserver:cvsread@cvs.php.net:/repository checkout -r PHP_5_1 php-src c.. After the checkout is finished, let's build and install PHP: $ su # cd php-src # ./buildconf # ./configure --prefix=/opt/php_5_1 --disable-cgi # make # make install # echo extension=php_gtk2.so >> /opt/php_5_1/lib/php.ini # /opt/php_5_1/bin/php-config --extension-dir |xargs echo \ 'extension_dir='>>/opt/php_5_1/lib/php.ini This went smoothly for me the first time around, so if you happen to stumble on an error, double check you match all the requirements, and read the README files. (top) -------------------------------------------------------------------------------- Installing Php-Gtk 2 With PHP 5.1 in place, we're ready to retrieve and install PHP-Gtk 2. Once more, check that you meet the requirements (found in the README files and such) before proceeding. As a last resource in case you can't get the required software, you can disable some features during configure. For instance, in case it complains about libglade, and you're growing desperate, use ./configure --disable-libglade . a.. Proceeding from where we left off, let's get a copy of PHP-Gtk2 from CVS: # cd .. # cvs -d :pserver:cvsread@cvs.php.net:/repository co php-gtk b.. After that is done, let's build and install: # cd php-gtk # ./buildconf --with-phpize=/opt/php_5_1/bin/phpize # ./configure --with-php-config=/opt/php_5_1/bin/php-config # make # make install c.. Optionally, you may wish to create a link to the php executable: # ln -s /opt/php_5_1/bin/php /usr/bin/php-gtk d.. To check whether everything went fine, you can try: $ php-gtk -m | grep php-gtk The output should be a line stating "php-gtk". You can also try running the phpgtk2-demo.php script under /demos (under the php-gtk CVS checkout), it should be whooping! (top) -- Ron Tarrant Blog:<A HREF="http://www.writingup.com/blog/phpgtk2">PHP-Gtk2</A> __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


« previous php.gtk.general (#7138) next »