Re: but short names were the culprit.. or at least a solution
| From: | Rubem Pechansky | Date: | Wed, 06 Oct 2004 12:43:01 +0000 |
| Subject: | Re: but short names were the culprit.. or at least a solution | ||
| References: | 1 2 3 4 5 6 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-761@lists.php.net to get a copy of this message | ||
YES!
You got it right, thank you very much. I`m glad you found the answer. Let's
hope it works for everyone.
Best,
-------------------
Rubem Pechansky
WinBinder - The native Windows binding for PHP
http://winbinder.sourceforge.net/
Hypervisual - Advanced Design for IT
http://hypervisual.com/
----- Original Message -----
From: <simon@firepages.org>
To: "Tom Rogers" <trogers@kwikin.com>; "Rubem Pechansky"
<pechansky@hypervisual.com>
Cc: <php-gtk-dev@lists.php.net>
Sent: Wednesday, October 06, 2004 3:57 AM
Subject: [PHP-GTK-DEV] but short names were the culprit.. or at least a
solution
> ok now I finally got the mesage ;)
> can you confirm if this version works (works for me but with my system who
> knows ~)
> http://www.firepages.org/stuff/php_win_short.exe (52kb)
>
> if it does perhaps someone can fix up this code & apply ?
>
> char *args[4], *prog = NULL;
> char binary_file[] = "php.exe";
> char modulepath[_MAX_PATH];
> char shortpath[_MAX_PATH];
> // Look for php.exe in the same directory as php_win.exe
> if (GetModuleFileName(NULL, modulepath, _MAX_PATH)) {
> char *separator_location = strrchr(modulepath, '\\');
> if (separator_location) {
> struct stat statbuf;
> strcpy(separator_location+1, binary_file);
> if (stat(modulepath, &statbuf) == 0) {
> if (((statbuf.st_mode & S_IEXEC) == S_IEXEC)) {
> //>>needs error checking<<//
> GetShortPathName( modulepath, shortpath, _MAX_PATH) ;
> prog = shortpath ;
> }
> }
> }
> }
>
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>