Re: Cygwin/Apache with PHP CGI

2002-05-17 Thread Stipe Tolj

Sam Edge wrote:
 
 (I appreciate that CGI is a sub-optimal way of using PHP in Apache but
 at least this /is/ working for me and allows me to check my code more
 easily before uploading to my service provider's Apache/PHP server.)

I wouldn't be to hard this way. At least anything else except the
phpinfo() apache section seem to work very stable from my testings.

So in a development or production area output of phpinfo() won't be of
interest.

I'd like you still to consider using it if possible and we'll check to
make it then work even for the apache module infos.

Stipe

[EMAIL PROTECTED]
---
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: [EMAIL PROTECTED]
Internet: http://www.wapme-systems.de
---
wapme.net - wherever you are

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cygwin/Apache with PHP CGI

2002-05-17 Thread Stipe Tolj

Graeme Merrall wrote:
 
 Sam, your mail keeps bouncing. It makes it hard to want to help you when
 you cannot be emailed.
 
 Sam Edge wrote:
  Instead I've downloaded the latest 4.2.0 Win32 native PHP ZIP file and
  unzipped this into its own directory.
 
 I have a patched version of PHP-4.2.0 (actually RC4) for Cygwin you can
 use.
 There's is no XML support which is a bit of a stumbling block so if
 anyone can give me a hint as to why I get this error compiling PHP
 against expat-1.95.2 I'd very very appreciative. I know about PHP, not
 compiling against Cygwin :)

yep, expat defines dllimport somewhere for the native Win32 port. This
has to be taken out in a !defined(__CYGWIN__) compile condition style.

Stipe

[EMAIL PROTECTED]
---
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: [EMAIL PROTECTED]
Internet: http://www.wapme-systems.de
---
wapme.net - wherever you are

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cygwin/Apache with PHP CGI

2002-05-17 Thread Sam Edge

Stipe Tolj wrote in [EMAIL PROTECTED]
in gmane.os.cygwin on Fri, 17 May 2002 13:45:47 +0200:

 I wouldn't be to hard this way. At least anything else except the
 phpinfo() apache section seem to work very stable from my testings.
 So in a development or production area output of phpinfo() won't be of
 interest.
 I'd like you still to consider using it if possible and we'll check to
 make it then work even for the apache module infos.

I've reverted to using the 4.2.0 module. It's still seg-faulting in
phpinfo() but some other simple scripts appear to be working okay.

By the way, PHP 4.2.1 is now available. Would it make sense to port
this to Cygwin first before attempting a debug?

-- 
Sam Edge

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cygwin/Apache with PHP CGI

2002-05-10 Thread Sam Edge

Graeme Merrall wrote in [EMAIL PROTECTED]
in gmane.os.cygwin on Fri, 10 May 2002 16:09:13 +1000:

 Sam, your mail keeps bouncing. It makes it hard to want to help you when 
 you cannot be emailed.

Odd. My From header is spam-trapped with ZZZ because this is a public
place but your e-mail client should be using Reply-To in preference to
that. Reply-To is set to [EMAIL PROTECTED] so that it goes to the
mailing list and not just to me.

 I have a patched version of PHP-4.2.0 (actually RC4) for Cygwin you can 
 use.

For the moment I'm happy with the native version. (All I wanted it for
is to be able to test PHP code before sending it to my - pretty basic
- hosting server.)

Thanks anyway.

-- 
Sam Edge

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Cygwin/Apache with PHP CGI

2002-05-09 Thread Sam Edge

Further to my problems with the Apache PHP module package I've given
up for the moment.

Instead I've downloaded the latest 4.2.0 Win32 native PHP ZIP file and
unzipped this into its own directory.

I've then made sure php-cli.exe, sapi\php.exe and php4ts.dll are in my
Windows PATH and copied php.ini-recommended to C:\WINNT\php.ini to get
the command line PHP working.

Finally, to use this from Cygwin/Apache I've commented out the PHP
LoadModule and AddModule lines and created a cgi-bin shell script to
run PHP via an Action line in htppd.conf.

httpd.conf:
...
#LoadModule php4_module lib/apache/libphp4.dll
...
#AddModule mod_php4.c
...
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php-cgi
...

/var/www/cgi-bin/php-cgi: (or wherever your cgi-bin actually lives)
#!/bin/sh
export PATH=/bin:$PATH
win_page=`cygpath -w $PATH_TRANSLATED`
export PATH_TRANSLATED=$win_page
php 21

The crucial bit is converting PATH_TRANSLATED from Cygwin/Posix format
to Windows native for PHP.EXE to read.

Your PHP script will have to be written with the Windows native filing
system in mind so there are a few other variables that might benefit
from translation too if your script uses them. Cygwin is automatically
translating PATH but DOCUMENT_ROOT and SCRIPT_FILENAME might be needed
too. (Although I can't think why.)

(I appreciate that CGI is a sub-optimal way of using PHP in Apache but
at least this /is/ working for me and allows me to check my code more
easily before uploading to my service provider's Apache/PHP server.)

-- 
Sam Edge

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cygwin/Apache with PHP CGI

2002-05-09 Thread Graeme Merrall


Sam, your mail keeps bouncing. It makes it hard to want to help you when 
you cannot be emailed.

Sam Edge wrote:
 Instead I've downloaded the latest 4.2.0 Win32 native PHP ZIP file and
 unzipped this into its own directory.

I have a patched version of PHP-4.2.0 (actually RC4) for Cygwin you can 
use.
There's is no XML support which is a bit of a stumbling block so if 
anyone can give me a hint as to why I get this error compiling PHP 
against expat-1.95.2 I'd very very appreciative. I know about PHP, not 
compiling against Cygwin :)

dlltool: Syntax error in def file .libs/cygexpat-0.dll-def:0
Warning: resolving _rl_line_buffer by linking to __imp__rl_line_buffer 
(auto-import)
Warning: resolving _rl_point by linking to __imp__rl_point (auto-import)
Warning: resolving _rl_end by linking to __imp__rl_end (auto-import)
Warning: resolving _rl_mark by linking to __imp__rl_mark (auto-import)
Warning: resolving _rl_done by linking to __imp__rl_done (auto-import)
Warning: resolving _rl_pending_input by linking to 
__imp__rl_pending_input (auto
-import)
Warning: resolving _rl_prompt by linking to __imp__rl_prompt (auto-import)
Warning: resolving _rl_terminal_name by linking to 
__imp__rl_terminal_name (auto-import)
Warning: resolving _rl_library_version by linking to 
__imp__rl_library_version (auto-import)
Warning: resolving _rl_readline_name by linking to 
__imp__rl_readline_name (auto-import)
Warning: resolving _rl_attempted_completion_function by linking to 
__imp__rl_attempted_completion_function (auto-import)
Warning: resolving _stdscr by linking to __imp__stdscr (auto-import)
Warning: resolving _COLS by linking to __imp__COLS (auto-import)
./.libs/libphp4.a(xml.o): In function `zm_info_xml':
/home/Administrator/src/php-4.2.0RC4/ext/xml/xml.c:236: undefined 
reference to `_imp__XML_ExpatVersion'
./.libs/libphp4.a(xml.o): In function `xml_parser_dtor':
/home/Administrator/src/php-4.2.0RC4/ext/xml/xml.c:300: undefined 
reference to `_imp__XML_ParserFree'

and so on...

Cheers,
  Graeme


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/