php-windows Digest 29 May 2002 14:21:58 -0000 Issue 1167
Topics (messages 14002 through 14016):
BTW, does anyone know what has happened to php4win?
14002 by: Michael Davey
Re: IIS Sucks!
14003 by: Matthew Workman
14015 by: Conover, Ryan
Needed: Several short, swift kicks.
14004 by: Mark Filipak
14005 by: Steve Yates
14006 by: Stuart Dallas
gd2 and 4.2.1
14007 by: Olav Bringedal
GD...
14008 by: Brian McGarvie
14009 by: Stuart Dallas
14010 by: Brian McGarvie
14011 by: Stuart Dallas
14012 by: Mark Filipak
14013 by: Stuart Dallas
Email Addresses (was: [PHP-WIN] Re: Needed: Several short, swift kicks.)
14014 by: Mark Filipak
onUnload
14016 by: Sichta Daniel
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I can't seem to get to their site at all...
Mikey
--- End Message ---
--- Begin Message ---
You could save time by using a VMWare session. It would allow you to
setup and mess up windows environments without worry since it is a
virtual operating system. That may not be giving any direct help here,
but it will be something to consider for the future.
Peace.
MW
-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 9:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] IIS Sucks!
I decided to setup IIS instead of Apache to match my clients environment
on both my home and work machine...now I have not been able to get php
working for anything. I have spent almost a week trying to configure
IIS to no avail. I'm locked in security permission hell.
My home machine:
Internet Explorer will no longer spawn new windows, I get a javascript
error saying "access is denied" and worst of all I can't use my Windows
search functionality. I use Homesite for development, under Apache I
remapped my Localhost so I could preview the php docs in my browser. I
reconfigured Homesite for use with IIS and now when I try to preview php
pages in my browser I get and access is denied error. However if I
enter the localhost URI in directly PHP and my COM calls work fine.
My work machine
At work I have a similar setup and I can't even get the test page to
come up and I configured IIS and php exactly the same as my home system.
I just keep getting the "Page Cannot Be Found" error...or a "PHP has
encountered an Access Violation at 01771364."
And to add more insult to injury, I have encountered errors on both
machines after installing the 4.2.1 php release after I setup the config
file to load the MSSQL.DLL and IISFUNC.DLL module I get two errors that
say when I start IIS and everytime php is called:
ERROR 1:
WARNING:
iisfunct: Unable to initialize module
Module complied with debug=0; thread safety=1, module API=20020429 PHP
compiled with debug=0, thread safety=1, module API=20010901 These
options need to match
WARNING:
mssql: Unable to initialize module
Module complied with debug=0; thread safety=1, module API=20020429 PHP
compiled with debug=0, thread safety=1, module API=20010901 These
options need to match
I switched to IIS in order to match my clients work environment, but I'm
now several days behind. Can anyone please offer me some advice or
assistance to get my machines stable and php operational.
PS I have followed the manual to the letter. I tried configuring under
ISAPI (preferrable) and CGI-Binary...neither work.
Please help a stressed developer in need...
Thanks,
Ron
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Make sure your dlls are in the extension defined directory in your php.ini.
Ryan Conover
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.pitt.edu/~rscst25/
-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 9:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] IIS Sucks!
I decided to setup IIS instead of Apache to match my clients environment
on both my home and work machine...now I have not been able to get php
working for anything. I have spent almost a week trying to configure
IIS to no avail. I'm locked in security permission hell.
My home machine:
Internet Explorer will no longer spawn new windows, I get a javascript
error saying "access is denied" and worst of all I can't use my Windows
search functionality. I use Homesite for development, under Apache I
remapped my Localhost so I could preview the php docs in my browser. I
reconfigured Homesite for use with IIS and now when I try to preview php
pages in my browser I get and access is denied error. However if I
enter the localhost URI in directly PHP and my COM calls work fine.
My work machine
At work I have a similar setup and I can't even get the test page to
come up and I configured IIS and php exactly the same as my home system.
I just keep getting the "Page Cannot Be Found" error...or a "PHP has
encountered an Access Violation at 01771364."
And to add more insult to injury, I have encountered errors on both
machines after installing the 4.2.1 php release after I setup the config
file to load the MSSQL.DLL and IISFUNC.DLL module I get two errors that
say when I start IIS and everytime php is called:
ERROR 1:
WARNING:
iisfunct: Unable to initialize module
Module complied with debug=0; thread safety=1, module API=20020429 PHP
compiled with debug=0, thread safety=1, module API=20010901 These
options need to match
WARNING:
mssql: Unable to initialize module
Module complied with debug=0; thread safety=1, module API=20020429 PHP
compiled with debug=0, thread safety=1, module API=20010901 These
options need to match
I switched to IIS in order to match my clients work environment, but I'm
now several days behind. Can anyone please offer me some advice or
assistance to get my machines stable and php operational.
PS I have followed the manual to the letter. I tried configuring under
ISAPI (preferrable) and CGI-Binary...neither work.
Please help a stressed developer in need...
Thanks,
Ron
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello! I just joined the list to ask these questions. I may hang around
to be helped and also to help others. I appologize for dumping these
questions on you, but I need quick answers and this seemed to be the
best way to get them. If you can provide answers, that's fine and I will
be happy. If you'd like some background, I have provided optional
reading below the questions.
(...Please don't shoot me or respond with RTFM. Please DO give me
specific URLs to read if you like, and if you know that they contain the
answers...)
1 - Can PHP be used as a batch processor under MS-Windows?
2 - I downloaded php-4.2.1-installer.exe and php-4.2.1-Win32.zip. I ran
php-4.2.1-installer.exe to the point where I got this dialog:
Title Bar: "Mail Configuration"
Query #1: "Please enter the address of your SMTP server."
Textbox #1: "localhost"
Query #2: "Please enter the 'from' address for the mail function."
Textbox #2: "[EMAIL PROTECTED]"
I don't know what is being asked. What do I do now?
3 - To run PHP for command line scripting, do I need Apache? I think I
do, though here: http://www.php.net/manual/en/installation.php, is found
this: "If you are also interested to use PHP for command line scripting
... you need no server and no browser", but the installer seems to
demand a mail server (see question 2, above), so I'm very confused.
4 - What run time environment does PHP for command line scripting expect
and how much of it, a, is installed by php-4.2.1-installer.exe, and b,
is found in php-4.2.1-Win32.zip?
My Objectives
=============
I seek an alternative to CGI and PHP seems to be just that. I have never
written CGI. I have an e-smith SME server 5 box that I'd like to put on
the net as a general purpose gateway/firewall/www-server/mail-handler
and on which I hope to process PHP-enhanced, server-side HTML. I'd like
to learn PHP under MS-Windows first, and perhaps use it to do useful,
batch type things, bulk processing email 'inbox' files for example,
while traveling the path to PHP enlightenment.
About Me
========
I tried to read the PHP documentation and gave up. I don't have half a
lifetime to figure out merely whether I'm on the right track. I've been
to http://www.php.net/manual/en/features.commandline.php and couldn't
understand it.
I'm 55 years old, and an electronics (hardware) engineer primarily in
the area of system architecture, primarily in Silicon Valley (though I
live in Ohio now). I know most modern languages (C, Java, etc.) and many
(archaic?) ones (spitbol, fortran, etc.). I write a lot of awfully
complex Javascripts using a lot of RegExps and "<var> = <t_or_f> ?
<new_val_if_t> : <new_val_if_f>" constructs, for example.
I have some experience with UNIX System 5, Minix, Theos, and FreeBSD.
All of my experience with *NIX has been bad.
Generally, my experience has not been that there is too little
documentation, but that there is too much, that it is poorly written,
and that it is in desperate need of a competent editor who knows how to
write syntactically correct and logically constructed English -- I tried
to volunteer as an editor to [EMAIL PROTECTED] and got dismissed
as a crackpot. *NIX Man pages make me feel stupid and are generally
unreadable, IMHO. My problem is that I am missing the *NIX gene, a
condition that makes it impossible for me to parse sentences that have
been written by *NIX hackers.
In the last two or three years I have read nearly half of the IETF RFCs
and have understood everything they contained, so I know that my
condition is not fatal.
Thanks Very Much! -- Mark Filipak, Mansfield, Ohio.
--- End Message ---
--- Begin Message ---
"Mark Filipak" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 1 - Can PHP be used as a batch processor under MS-Windows?
I believe so, although that's not its original intent.
> 2 - I downloaded php-4.2.1-installer.exe and php-4.2.1-Win32.zip. I ran
> php-4.2.1-installer.exe to the point where I got this dialog:
>
> Title Bar: "Mail Configuration"
> Query #1: "Please enter the address of your SMTP server."
> Textbox #1: "localhost"
> Query #2: "Please enter the 'from' address for the mail function."
> Textbox #2: "[EMAIL PROTECTED]"
>
> I don't know what is being asked. What do I do now?
It's asking for your mail server info as you point out below. This is
for use under Windows for the mail() command. If you don't intend to send
e-mail from PHP just leave it at the defaults for now, or use your e-mail
address and your ISP's mail server.
> 4 - What run time environment does PHP for command line scripting expect
> and how much of it, a, is installed by php-4.2.1-installer.exe, and b,
> is found in php-4.2.1-Win32.zip?
I believe the installer installs the basic stuff, and the zip file
includes a lot of samples and extra modules.
> I seek an alternative to CGI and PHP seems to be just that. I have never
> written CGI. I have an e-smith SME server 5 box that I'd like to put on
> the net as a general purpose gateway/firewall/www-server/mail-handler
> and on which I hope to process PHP-enhanced, server-side HTML. I'd like
> to learn PHP under MS-Windows first, and perhaps use it to do useful,
> batch type things, bulk processing email 'inbox' files for example,
> while traveling the path to PHP enlightenment.
While I'm all for PHP it sounds like you're trying to find a way to use
your tool rather than evaluate what you want to accomplish. ("When you only
have a hammer everything looks like a nail"). Do you know how to set up a
web server? If so I suggest that trying to use PHP outside of the web
environment first will be more confusing than helpful.
However to get you started put this into a plain text file called
"hello.php" and run "php hello.php" from a command prompt:
<?php
echo "hello world"
?>
The content-type header that prints is for the web server's use.
- Steve Yates
- Drive nail here [.] for new monitor.
/ Taglines by Taglinator - www.srtware.com /
--- End Message ---
--- Begin Message ---
On 29 May 2002 at 0:03, Mark Filipak wrote:
> 1 - Can PHP be used as a batch processor under MS-Windows?
Yes. Just use "php -q c:\path\to\script.php". For the full set of command line
options, type
"php -h" at the command line. The relevant manual page is
http://www.php.net/manual/en/html/features.commandline.html.
> 2 - I downloaded php-4.2.1-installer.exe and php-4.2.1-Win32.zip. I
> ran php-4.2.1-installer.exe to the point where I got this dialog:
>
> Title Bar: "Mail Configuration"
> Query #1: "Please enter the address of your SMTP server."
> Textbox #1: "localhost"
> Query #2: "Please enter the 'from' address for the mail function."
> Textbox #2: "[EMAIL PROTECTED]"
>
> I don't know what is being asked. What do I do now?
If you want to send email from PHP on a Windows box you need to have an SMTP server
available - that's the first value. The second value sets the email address that will
be used
as the envelope address for all emails sent (bounced mail will usually be sent to this
address).
> 3 - To run PHP for command line scripting, do I need Apache? I think I
> do, though here: http://www.php.net/manual/en/installation.php, is
> found this: "If you are also interested to use PHP for command line
> scripting ... you need no server and no browser", but the installer
> seems to demand a mail server (see question 2, above), so I'm very
> confused.
No you don't need Apache to use PHP from the command line. If you want to send email
from PHP using the mail() function you still need to specify an SMTP server. If you
are not
going to be sending email from PHP the values you enter in that installation dialog
are
irrelevant.
> 4 - What run time environment does PHP for command line scripting
> expect and how much of it, a, is installed by php-4.2.1-installer.exe,
> and b, is found in php-4.2.1-Win32.zip?
You need php.exe and php4ts.dll (this needs to be on the path) - that's the minimum.
That
installation package installs most things you could possibly need including a healthy
set of
extensions (none loaded by default IIRC).
> Generally, my experience has not been that there is too little
> documentation, but that there is too much, that it is poorly written,
The PHP manual is extremely comprehensive and (IMHO) quite well-written. However, it
is
written as a reference manual, not a beginners guide. There are lots and lots of good
PHP-
for-beginners books. A good place to start looking for a suitable book is
http://www.php.net/books.php.
I hope that lot helps.
--
Stuart
--- End Message ---
--- Begin Message ---
I'm re-posting as the former attempt got kinda lost in
the mess...
With 4.2.1 (as opposed to 4.2.0), gd2 stopped working.
When i start the service (apache) I get "could not
find freetype.dll" and then "php_gd2.dll module could
not be found".
I tried to search both my config files, pc and via
google for freetype.dll, but could not find anything
of slightest enlightenment.
I also have heard that gs2 is now compiled into the
win distro (zip version), does that mean i doen't have
to uncomment it from the .ini file to use the
functions?
just for the record:
-i got only one .ini file and it is in the path
-everything else (but header()-read earlier post :)),
works perfectly.
-phpinfo at http://jaggu.org/info.php
Thanks in advance!
=====
Olav Bringedal
jaggu.org
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
Right,
Can somone talk me through GD...
I've tried and tried it, using various .dll's and no matter which I use,
the images are never generated, they always show the 'image' for a
missing image in IE etc.
Any Ideas?
--- End Message ---
--- Begin Message ---
Brian McGarvie <[EMAIL PROTECTED]> wrote:
> Any Ideas?
Show us your code and we'll see if we can identify the problem.
Unfortunately we're not mind readers.
--
Stuart
--- End Message ---
--- Begin Message ---
Any configuration points to check out?
Sorry i think I even omitted my set-up...
win2k server, iis5, php 4.2.1...
the code was simply some code found on zend's code site;
<?php
// button.php
/*
define("TextFONT", "3");
function ConvertColor($hexVal){
$ColorVal = array(3);
for($i = 0; $i < 3; $i++)
$ColorVal[$i] = HexDec(substr($hexVal, $i * 2, 2));
return $ColorVal;
}
$width = strlen($txt) * ImageFontWidth(TextFONT);
$offset = 2;
$imgFRAME = ImageCreate($width, ImageFontHeight(TextFONT)+$offset);
list($red, $green, $blue) = ConvertColor($bg);
$bgCOLOR = ImageColorAllocate($imgFRAME, $red, $green, $blue);
list($red, $green, $blue) = ConvertColor($fg);
$fgCOLOR = ImageColorAllocate($imgFRAME, $red, $green, $blue);
ImageFill($imgFRAME, 1, 1, $bgCOLOR);
ImageString($imgFRAME, TextFONT, 1, 1, $txt, $fgCOLOR);
header("Content-type: image/gif");
ImageGIF($imgFRAME);
ImageDestroy($imgFRAME);
?>
called by:
<img src="button.php?fg=990000&bg=ffffff&txt=button two" border="0"><br>
> -----Original Message-----
> From: Stuart Dallas [mailto:[EMAIL PROTECTED]]
> Sent: 29 May 2002 10:03 AM
> To: Brian McGarvie; [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] GD...
>
>
> Brian McGarvie <[EMAIL PROTECTED]> wrote:
> > Any Ideas?
>
> Show us your code and we'll see if we can identify the problem.
> Unfortunately we're not mind readers.
>
> --
> Stuart
>
>
--- End Message ---
--- Begin Message ---
Brian McGarvie <[EMAIL PROTECTED]> wrote:
> Any configuration points to check out?
> win2k server, iis5, php 4.2.1...
Do you have register_globals set to on or off? The code you're using needs
it to be on for it to work. If that is the problem you would be better off
modifying the code to use the new superglobal array $_GET.
> <img src="button.php?fg=990000&bg=ffffff&txt=button two"
> border="0"><br>
What do you get if you go to this URL in a browser directly instead of
embedding it inside a page?
--
Stuart
--- End Message ---
--- Begin Message ---
Howdy.
Brian McGarvie wrote:
>
> Any configuration points to check out?
>
> Sorry i think I even omitted my set-up...
>
> win2k server, iis5, php 4.2.1...
>
> the code was simply some code found on zend's code site;
I'm about as rank a newbie as you could imagine so please forgive me if
I err, but doesn't line 3 below ('/*') comment out the entire PHP code
block?
> <?php
> // button.php
> /*
> define("TextFONT", "3");
>
> function ConvertColor($hexVal){
> $ColorVal = array(3);
> for($i = 0; $i < 3; $i++)
> $ColorVal[$i] = HexDec(substr($hexVal, $i * 2, 2));
> return $ColorVal;
> }
>
> $width = strlen($txt) * ImageFontWidth(TextFONT);
> $offset = 2;
> $imgFRAME = ImageCreate($width, ImageFontHeight(TextFONT)+$offset);
>
> list($red, $green, $blue) = ConvertColor($bg);
> $bgCOLOR = ImageColorAllocate($imgFRAME, $red, $green, $blue);
>
> list($red, $green, $blue) = ConvertColor($fg);
> $fgCOLOR = ImageColorAllocate($imgFRAME, $red, $green, $blue);
>
> ImageFill($imgFRAME, 1, 1, $bgCOLOR);
> ImageString($imgFRAME, TextFONT, 1, 1, $txt, $fgCOLOR);
>
> header("Content-type: image/gif");
> ImageGIF($imgFRAME);
> ImageDestroy($imgFRAME);
> ?>
>
> called by:
>
> <img src="button.php?fg=990000&bg=ffffff&txt=button two" border="0"><br>
>
> > -----Original Message-----
> > From: Stuart Dallas [mailto:[EMAIL PROTECTED]]
> > Sent: 29 May 2002 10:03 AM
> > To: Brian McGarvie; [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] GD...
> >
> >
> > Brian McGarvie <[EMAIL PROTECTED]> wrote:
> > > Any Ideas?
> >
> > Show us your code and we'll see if we can identify the problem.
> > Unfortunately we're not mind readers.
> >
> > --
> > Stuart
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
The most exact clock possible is one that has stopped. It is exactly
correct once (or twice) each day.
_| My resume: http://home.earthlink.net/~filipak/resume |_
_| My music trade pages: http://home.earthlink.net/~filipak/music |_
| Last updated on 14 April 2002 |
--- End Message ---
--- Begin Message ---
Mark Filipak <[EMAIL PROTECTED]> wrote:
> I'm about as rank a newbie as you could imagine so please forgive me
> if I err, but doesn't line 3 below ('/*') comment out the entire PHP
> code block?
>
>> <?php
>> // button.php
>> /*
>> define("TextFONT", "3");
>>
>> <snip>
Erm, yes. I cannot believe that I missed that!!
--
Stuart
--- End Message ---
--- Begin Message ---
Steve Yates wrote:
>
> "Mark Filipak" <filipak @ mrincubator.org> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
and Stuart Dallas wrote:
>
> Mark Filipak <filipak @ mrincubator.org> wrote:
Oh, my. This reply has just changed topics...
>From both replies I assume that this list does not protect, hide, or
munge email addresses -- I added the spaces on either side of the '@'
(at) signs above. Are there no spambots about to worry over?
And from Steve's reply, do I correctly infer that my posts and his are
also going to a news server?
If so, I'm very distressed and shall immediately unsubscribe. Please say
it isn't so. -- Mark
--- End Message ---
--- Begin Message ---
Hi,
apache, php 4.2.0, w2k
problem:
index.php:
<body .... onUnload="window.location.href='killsession.php';">
killsession.php:
session_start();
session_unset();
session_destroy();
When I open index.php in one browser everything works fine - session from
%session.save_path% just disappeared.
But when I open index.php in two or more browsers it just don't work !! All
session files still "sitting" in that directory !!
Can anybody help me plese ?
THX in advance
DAN
--- End Message ---