Re: problems with php_gtk.exe from cweiske.de

From: Date: Wed, 06 Apr 2005 17:38:19 +0000
Subject: Re: problems with php_gtk.exe from cweiske.de
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5748@lists.php.net to get a copy of this message
Doug - Thanks for your suggestions. I should have thought to try php.exe on the association and then I would have seen the problem right away. Also, the page you gave does have a user note on this, but I will elaborate the problem here. NOTE to the list: I realize this is more a PHP issue, than a PHP-Gtk one, but it can be a major problem for anyone starting out, so I thought I'd post it anyway. Our php.ini sets the extension directory as '/app/php4'. This works just fine when we run via batch files, changing to <drive>:/app/php4 before calling the program, either for php.exe, php_win.exe or php_gtk.exe. But with an association, when the file is on a different drive, which it was in this case, the php.ini can't find the extension directory - the error for which you can see when you change the association 'Open' to php.exe. So, I moved Francisco's .php-gtk to the php4 drive, and it ran just fine, with any of the .exe's. Then I moved the files back to a different drive and set the Windows path to include the php4 directory. It still froze or error'd out. I also tried using a batch file at the association, instead of the exe. The php.exe (and php_win.exe) worked this way; the php_gtk.exe did not. So I can see only two remaining solutions on associations that will work with all the exe's: (1) all code files on the same drive as your php4, with '/php4' as the extension directory (not a likely scenario), or (2) change the ini file to specify the extension drive, as in 'c:/app/php4'. The latter wouldn't work well for us, because we are installing on all kinds of systems, with network drives, etc. And those drives frequently change, depending on the local setup. Right now, we can use one ini file, rather than 14 different ones. At the same time, it's working better for us to use batch files, so it's not an immediate issue here. But it does seem like a pain - especially w/ path and/or the associated batch file not working. Madeleine D. At 08:27 PM 4/5/05 -0500, Doug Burkhalter wrote: >I've used it like that before without problems, there's just a lot you >have to make sure is right. Mind you, this is all for dealing with the >orignal PHP-GTK binaries, not the versions from cweiske.de; I've never >dealt with those. > >First off, if you use php_win that doesn't show a console, any prints >(that would be sent to the console) crashes the program. It might have >been fixed in Christian's program, I don't know. > >Secondly, you have to make sure you use the right ini file. I used to >have the whole command-line string, but I'm not on my home computer >right now. But, I think this is what I used: >c:\gtk\php4\php.exe -q -c c:\gtk\php4\php.ini -f c:\gtk\samples\simple.php > >Of course, cd c:\gtk\php4\php.exe needs to be the PHP-GTK binary. the >-q keeps PHP from reporting HTTP header info. -c points to the INI >file you use; *make sure* this is the one for php-gtk! If there is >another php.ini anywhere in your path (for instance, in c:\windows for >a server's php), it gets top priority and will probably crash your >program! > >And then, -f specifies the script you want to run. > >That *should* work from a file association; just make sure it uses the >right INI file and you replace the last bit (after -f) with %1 to fill >in the file you want. > >Also, some details off of >http://gtk.php.net/manual/en/installusage.php might be of use to >you. > >As far as php-win.exe, I don't know how well all this will work with >it. I personally recommend using php.exe instead; to me, a small >console window is well worth knowing what's going on. After all, you >can easily ignore the console; it even closes when you close out the >main program. > >Again, all this is not for the version off of cweiske.de; but, unless >I'm mistaken, that program simply runs the other binaries. This should >do the same thing, just a bit more direct. >

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