Re: Trying Hard - Getting Nowhere

From: Date: Sun, 11 Mar 2001 21:06:37 +0000
Subject: Re: Trying Hard - Getting Nowhere
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-685@lists.php.net to get a copy of this message
Martin Cameron writes: > Further to my lass missive, I should have said that when I try to run > hello.php (from the test sub-directory) in a browser, I get this error: > > Warning: Unable to load dynamic library './php_gtk.so' - > ./php_gtk.so: cannot open shared object file: No such file or > directory in /home/httpd/htdocs/hello.php on line 6 > > Fatal error: Cannot instantiate non-existent class: gtkwindow > in /home/httpd/htdocs/hello.php on line 40 > > > Which tends to suggest that I haven't compiled properly. When run from > the command line I get this: Well, it isn't really related--but typically it wouldn't make much sense to run PHP-GTK scripts via a browser. The above error actually just means that your dl('php_gtk.so') can't find php_gtk.so to load it. Make sure that if your php.ini is present in /usr/local/lib (or whereever; this is just the default location) and that its extension_dir directive is OK. For instance, my PHP-GTK didn't work until I put this in php.ini: extension_dir = /usr/local/lib/php/extensions ; Of course, you will also want to make sure that your php_gtk.so is in that directory. :) > %./hello.php > > ./hello.php: ?: No such file or directory > ./hello.php: syntax error near unexpected token > `(strtoupper(substr(' > ./hello.php: ./hello.php: line 3: `if > (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')' > > I know that there will some of you hitting your forehead right now > thinking that this guy shouldn't be in charge of a computer but ... > didn't we all start somewhere? Um...may we see part of the script? That sort of thing helps. ;) Not me, man. After the capsule crashlanded in Saskatchewan a poor farming couple raised me and taught me to build computers out of old Russian tractors and baling twine. > Regadrs > Martin Cameron > > PS Before starting on php-gtk, I thought I was competent in PHP, PERL, > C++, SQL ... Now I feel like a real newbie. Yeah, I get delusions of adequacy every so often too. Don't worry: it goes away after a while. ;) Cheers, Torben -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Adcore Finland| |http://www.coastnet.com/~torben http://www.adcore.com| |Ph: 1.604.709.0506 torben@adcore.com| +----------------------------------------------------------------+

« previous php.gtk (#685) next »