Thread: [Php-qt-users] ..if PHP is not compiled ..?
Status: Beta
Brought to you by:
tm243
From: James E. <jam...@gm...> - 2007-07-09 05:50:38
|
Hi The instructions start "You have a php-5.1.xxx build directory where you have compiled php" I haven't compiled PHP, rather it's installed from Kubuntu Feisty packages, so is there currently a way to install php-qt.deb rather than having to re/compile PHP :) ? e.g $ sudo aptitude install php5-qt ? Thanks James |
From: Ferenc V. <li...@ne...> - 2007-07-09 10:20:22
|
Hi, > The instructions start "You have a php-5.1.xxx build directory where you > have compiled php" > > I haven't compiled PHP, rather it's installed from Kubuntu Feisty > packages, so is there currently a way to install php-qt.deb rather than > having to re/compile PHP :) ? I compile it using php-devel package on Mandriva. This installs the already installed PHP's source code in /usr/src/php*, there I find the "ext" directory, create php_qt in it, and I copy the source code there to build. (chown lion ext/php_qt..) I don't compile PHP itself. > e.g $ sudo aptitude install php5-qt ? Unless there is a binary package by package maintainers, you can't do that. I don't know if Ubuntu comes with php_qt or when it will. Ferenc |
From: James E. <jam...@gm...> - 2007-07-11 02:16:50
|
Hi Ferenc Thanks, was able to install php_qt -- here is what I did on Kubuntu if anyone is interested. Not sure if i needed the php5-dev package (source) after all? 1. download php_qt 2. put in home dir somewhere 3. $ tar -xzvf php_qt-0.0.3.tar.gz 4. $ cd php_qt 5. $ phpize 6. $ ./configure --with-php_qt=/usr/include/qt4 --with-qtlib=/usr/lib/qt4 --with-php-config=/usr/bin/php-config 7. $ make 8. $ sudo make install I noticed php_qt.so turned up in my extensions directory (/usr/lib/php5/20060613+lfs) with execute permissions whereas all the others had rw permission only. Is that right? I've had a few problems with the tests, here is an example of test 2 (native) and 3 (with the QFont::Bold commented out) I'm using PHP 5.2.1 and QT 4.2. Test 1 works. Test 2 ====== $ php t2.php Fatal error: Undefined class constant 'Bold' in /xxx/t2.php on line 20 Reflection output, note "0" constants: Class [ <internal:php_qt> class QFont ] { - Constants [0] { } - Static properties [0] { } - Static methods [9] { Method [ <internal> static public method insertSubstitution ] { } Method [ <internal> static public method removeSubstitution ] { } Method [ <internal> static public method substitute ] { ... Test 3 ====== $ php t3.php Fatal error: Non-static method QObject::connect() cannot be called statically in /xxx/t3.php on line 25 here is the line: QObject::connect(&$quit,SIGNAL('clicked()'), &$app, SLOT('quit()')); Reflection output: Class [ <internal:php_qt> class QObject ] { - Constants [0] { } - Static properties [0] { } - Static methods [2] { Method [ <internal> static public method disconnect ] { } Method [ <internal> static public method tr ] { } } - Properties [2] { Property [ <default> private $parent ] Property [ <default> protected $objectName ] } - Methods [28] { Method [ <internal, ctor> public method __construct ] { } ..... Any ideas? I tried the svn version but that failed to build (probably me doing something wrong) Cheers James On 7/9/07, Ferenc Veres <li...@ne...> wrote: |
From: Katrina N. <kn...@il...> - 2007-07-11 11:03:33
|
Le Tuesday 10 July 2007 09:16:42 pm James Ellis, vous avez =C3=A9crit=C2=A0: > I noticed php_qt.so turned up in my extensions directory > (/usr/lib/php5/20060613+lfs) with execute permissions whereas all the > others had rw permission only. Is that right? It shouldn't make any difference to my knowledge. > I tried the svn version but that failed to build (probably me > doing something wrong) Most of these problems (if not all) have been corrected in the SVN version,= to=20 install from SVN do the following (note this is very different than with=20 older versions): 1) download from the svn link on the PHP-Qt homepage (it changed recently=20 because it's now in the KDE SVN) 2) change into the PHP-Qt directory and run ./prepare_svn.sh this will=20 download the latest versions of several libraries 3) in the PHP-Qt directory create a directory named "build" and change to t= hat=20 directory 4) run cmake, normally "cmake .." will work, but if you have more than one= =20 version of Qt installed you way need to run cmake=20 like: "cmake -DQT_QMAKE_EXECUTABLE=3D/usr/lib/qt4/bin/qmake .."=20 replacing /usr/lib/qt4/bin/qmake if your qt4 qmake is in a different=20 directory 5) run make 6) run make install 7) edit your php.ini file to add 'extension=3Dphp_qt.so' and you should have a working copy of the latest version :-) =2D Katrina Niolet |
From: Mark C. <ma...@re...> - 2007-07-11 12:46:34
|
On Wednesday 11 July 2007 21:02:57 Katrina Niolet wrote: > 1) download from the svn link on the PHP-Qt homepage (it changed recently > because it's now in the KDE SVN) svn co svn://anonsvn.kde.org/home/kde/trunk/playground/bindings/phpqt > 2) change into the PHP-Qt directory and run ./prepare_svn.sh this will > download the latest versions of several libraries > 3) in the PHP-Qt directory create a directory named "build" and change to that > directory > 4) run cmake, normally "cmake .." will work, but if you have more than one > version of Qt installed you way need to run cmake > like: "cmake -DQT_QMAKE_EXECUTABLE=/usr/lib/qt4/bin/qmake .." > replacing /usr/lib/qt4/bin/qmake if your qt4 qmake is in a different > directory > 5) run make > 6) run make install > 7) edit your php.ini file to add 'extension=php_qt.so' Great, thanks Katrina for such a simple guide. Works here on an ArchLinux system using qt4 4.3.0, php 5.2.3 and cmake 2.4.6. I'll try and upload an ArchLinux PKGBUILD to aur.archlinux.org. --markc |
From: Thomas M. <tm...@ph...> - 2007-07-11 13:17:38
|
On Wednesday 11 July 2007 14:46:27 Mark Constable wrote: > Great, thanks Katrina for such a simple guide. Works here on an > ArchLinux system using qt4 4.3.0, php 5.2.3 and cmake 2.4.6. Thx for your report. I'm trying to install a bunch of virtual machines for testing compilation of php-qt. There is a script 'phpqt_from_scratch.sh' in the 'tests' directory for automated compiling, it has some instructions in the head comment. Of course, its not the official way and might fail, but it helps me a lot because it downloads everything needed, compiles it, set all pathes to the current directory and runs and installs everything within this 'sandbox' directory. So after deleting the current directory the system is clean as before. > I'll try and upload an ArchLinux PKGBUILD to aur.archlinux.org. Cool :) -- Thomas |