php-install Digest 14 May 2002 12:04:44 -0000 Issue 834

Topics (messages 6963 through 6976):

variable problems...
        6963 by: The Gabster

Php-4.2.0 configuration problem [ --with-cyrus ]
        6964 by: Henry Rivera

Re: windows install fails
        6965 by: Henry Rivera

post variable problems.
        6966 by: Lachlan - Talking Tech Enterprises

Is ISAPI production ready
        6967 by: Steen Rabol
        6968 by: Steen Rabol
        6969 by: Steen Rabol
        6970 by: Shrock, Court
        6971 by: Steen Rabol
        6972 by: Shrock, Court
        6973 by: Steen Rabol
        6974 by: LIMBOURG Arnaud
        6975 by: Rasmus Lerdorf

Need help with Apache error
        6976 by: Alan Leff

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 ---
Hello all!

I have a newsletter script that works fine but I receive some undefined
variables errors in Apache's error log:

PHP Notice:  Undefined variable:  action in
C:\Apache\htdocs\easyletter2\easyletter.php on line 73
PHP Notice:  Undefined variable:  action in
C:\Apache\htdocs\easyletter2\easyletter.php on line 100
PHP Notice:  Undefined variable:  pw in
C:\Apache\htdocs\easyletter2\easyletter.php on line 123
PHP Notice:  Undefined variable:  pw in
C:\Apache\htdocs\easyletter2\easyletter.php on line 159
PHP Notice:  Undefined variable:  disp in
C:\Apache\htdocs\easyletter2\easyletter.php on line 159
PHP Notice:  Undefined variable:  found in
C:\Apache\htdocs\easyletter2\easyletter.php on line 75
PHP Notice:  Undefined variable:  pw in
C:\Apache\htdocs\easyletter2\easyletter.php on line 123
PHP Notice:  Undefined variable:  pw in
C:\Apache\htdocs\easyletter2\easyletter.php on line 159

How can I get an undefined variable error for $action, $pw, $disp, $found
when thew do not have to be declared in the script?

And the script is:
<?

# Version 1.1 Debugged, please upgrade older ones...

########################################################################

# Global Settings...

########################################################################

# Set the password for the eMail List editor!

$pass="secret";

# Name of the datafile

$filelocation="subscribers.txt";

# Title of the newsletter, will be displayed in the FROM field of the
mailclient

$lettername="Test";

# Your email, will be the reply-to mail

$youremail="[EMAIL PROTECTED]";

########################################################################

# Displayed Messages

########################################################################

# Welcome message displayed above the form for subscribing/unsubscribing

$welcomemessage = "This is the place to subscribe and unsubscribe for the
Onlinetools.org Newsletter. I will be sending this letter out every time
there are some new tools or changes to the page. Your data will not be given
to anyone and I send out small text mails only.";

# Sorrymessage for failed subscription, will be followed by the email!

$sorrysignmessage = "Sorry, there is already an entry for ";

# Subscribe message, will be displayed when subscribing

$subscribemessage = "Thank you for subscribing to the newsletter, a
confirmation email is on its way!";

# Subscribemail, will be sent when someone subscribes.

$subscribemail = "Thank you for subscribing to the newsletter.";

# Unsubscribemessage for deletion, will be followed by the email!

$unsubscribemessage = "We deleted the following entry: ";

# Unsubscribemessage for failed deletion, will be followed by the email!

$failedunsubscriptionmessage = "Sorry, you cannot unssubscribe as we didn't
find an entry for ";

########################################################################

# Let the code begin...

########################################################################

# Checks if the file exists, if not creates a new one

if (!file_exists($filelocation)) {

$newfile = fopen($filelocation,"w+");

fclose($newfile);

}

# Open the datafile and read the content

$newfile = fopen($filelocation,"r");

$content = fread($newfile, filesize($filelocation));

fclose($newfile);

# Remove the slashes PHP automatically puts before special characters

$content=stripslashes($content);

# Reset the output of the "search result"

$out="";

# Put the entries into the array lines

$lines = explode("%",$content);

for ($key=1;$key<sizeof($lines);$key++){

# when the email is not in the list, add the old entries

if ($lines[$key] != $email){

$out .= "%".$lines[$key];

}

# when it's already in the list, set found

else {

$found=1;

}

}

########################################################################

# Signing in

########################################################################

if ($action=="sign"){

# When there is already a subscription for this email *duh*

if ($found==1){

# Display Sorrymessage

echo "<div
align=\"center\"><b>".$sorrysignmessage.$email."</b></div><br><br>";

$disp="yes";

}

# otherwise, add the email to the list

else {

$disp="no";

$newfile = fopen($filelocation,"a+");

$add = "%".$email;

fwrite($newfile, $add);

fclose($newfile);

# display the message of subscription

echo "<div
align=\"center\"><b>".$subscribemessage.$email."</b></div><br><br>";

# send confirmation Mail

$submailheaders = "From: $lettername subscription form\n";

$submailheaders .= "Reply-To: $youremail\n";

mail ($email,$lettername." subscription",$subscribemail,$submailheaders);

}

}

########################################################################

# Signing out

########################################################################

if ($action=="delete"){

$disp="no";

# If the email is in the list...

if ($found == 1){

$newfile = fopen($filelocation,"w+");

fwrite($newfile, $out);

fclose($newfile);

# display the message for deleted items...

echo "<div
align=\"center\"><b>".$unsubscribemessage.$email."</b></div><br><br>";

$disp="no";

}

# if the email is not in the list

if ($found != 1){

# display the message that tells that...

echo "<div
align=\"center\"><b>".$failedunsubscriptionmessage.$email."</b></div><br><br
>";

$disp="YES";

}

}

########################################################################

# The core for the owner of the letter

########################################################################

if ($pw == $pass){

# When nothing was entered so far, display the form

if ($send != "yes" && $send != "test"){

print'<form method="post"><input type="hidden" name=pw
value='.$pass.'><input type="hidden" name=send value=yes>

<br><b>Newsletter editor:</b><br><br>

Subject:<br>

<input type="text" name="subject" size=20><br>

Message:<br>

<textarea cols=50 rows=10 wrap="virtual" name="message"></textarea><br><br>

<input type="submit" value="send">

</form>';

}

# Predefine the Mail Settings for sending...

$mailheaders = "From: $lettername\n";

$mailheaders .= "Reply-To:$youremail\n";

# add data in bcc fields

# Data was ok, send button is pressed

if ($send == "yes"){

$message=stripslashes($message);

$subject=stripslashes($subject);

$lines = explode("%",$content);

for ($key=1;$key<sizeof($lines);$key++){

mail ($lines[$key],$subject,$message,$mailheaders);

}

print "<b>The following email has been sent!</b>";

print "<pre>$mailheaders\n$subject\n$message</pre>";

}

}



########################################################################

# The Form for the users...

########################################################################

if ($pw != $pass && $disp != "no"){

print $welcomemessage;

print'

<div align="center"><form method="post">

<input type="text" name="email" value="[EMAIL PROTECTED]" size=30>

<input type="radio" name="action" value="sign" checked>subscribe

<input type="radio" name="action" value="delete">unsubscribe<br>

<input type="submit" value="send">

</form></div>

';

}

print "<!-- Easyletter v1.1 Newsletterscript by Chris Heilmann, get yours @
http://www.onlinetools.org/easyletter/ -->";

?>

Thanks a lot,
gabi.


--- End Message ---
--- Begin Message ---
Greetings everyone,

I've been trying to compile php with with --cyrus option with no success.  I
have cyrus-imad-2.0.16 and cyrus-sasl-1.5.19 installed.  I'm sure I'm
setting both CPPFLAGS and LDFLAGS correctly
(CPPFLAGS="-I/usr/local/include/sasl", LDFLAGS="-L/usr/local/lib").  I've
tried LDFLAGS with the -R option also.  After reading through the configure
script it seems it's looking for -lsasl when ldconfig shows -lsasl.8 in it's
output.  I'm not sure if this is an OS incompatibility (FreeBSD 4.5) or
perhaps a version mismatch.  Any help would be greatly appreciated, thanks.

  Henry Rivera
  [EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
This is just a guess, but did you copy php4ts.dll into a directory in your
search path?  I copied the dll into c:\winnt\system32 and Apache started up
just fine for me.  Double check to make sure it's there.  Good luck.

  henroc

"Simon Warner" <[EMAIL PROTECTED]> wrote in message
3CDB807E.6519.DFBB27B@localhost">news:3CDB807E.6519.DFBB27B@localhost...
> >What are the lines for PHP in your httpd.conf?
>
> Here they are
>
> #################################
> ### Start and load the PHP module
> # Added by Simon based on instructions
> # This should install php support for apache
> # But it doesn't work.
> #
> #  LoadModule php4_module c:/winnt/system32/php4apache.dll
> #  LoadModule php4_module e;/php/experimental/apache2filter.dll
> #  I've tried both seperately of the two lines above and both fail
> #   AddModule mod_php4.c
> #   AddType application/x-httpd-php .php
> #
> # When I uncomment these lines
> # Apache refuses to start
> ###
> #################################
>
> --
> Simon Warner
>  in England
>
>
> ------------------------------------------------------
> Spring Harvest
> 14 Horsted Square
> Uckfield
> East Sussex
> TN22 1QG
> A company limited by guarantee
> Registered in England, Registration No. 2724859
> Registered Charity No. 1014540


--- End Message ---
--- Begin Message ---
Hi,
    I just downloaded and installed PHP 4.2.1 on IIS5, and i'm having a problem.

Normally in PHP scripts when you post information to the page, it is accessable in the 
page by accessing the variable $variable_name.  For some unknown reason this is not 
the case on the standard install.

Please tell me how I can make it so that I can access the variables using 
$variable_name in my scripts.

Thanks.
--- End Message ---
--- Begin Message ---
Hi

I've tried several times, without luck but....

Is the php4isapi.dll considered stable enough for production use ?

Steen
--- End Message ---
--- Begin Message ---
Hi

I've tried several times, without luck but....

Is the php4isapi.dll considered stable enough for production use ?

Steen
--- End Message ---
--- Begin Message ---
Hi

I've tried several times, without luck but....

Is the php4isapi.dll considered stable enough for production use ?

Steen
--- End Message ---
--- Begin Message ---
That depends on if you think IIS is stable?

> -----Original Message-----
> From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 14, 2002 12:33 AM
> To: PHP Install
> Subject: [PHP-INST] Is ISAPI production ready
> 
> 
> Hi
> 
> I've tried several times, without luck but....
> 
> Is the php4isapi.dll considered stable enough for production use ?
> 
> Steen
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Hi

Hmm

It was not my intention to start a war, but just a simple question to hear if the 
ISAPI is considered stable.

Steen


"Shrock, Court" <[EMAIL PROTECTED]> wrote:
> That depends on if you think IIS is stable?
> 
> > -----Original Message-----
> > From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 14, 2002 12:33 AM
> > To: PHP Install
> > Subject: [PHP-INST] Is ISAPI production ready
> > 
> > 
> > Hi
> > 
> > I've tried several times, without luck but....
> > 
> > Is the php4isapi.dll considered stable enough for
> production use ?
> > 
> > Steen
> > 
> > -- 
> > PHP Install Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
hehe...just having too much fun burning the midnight oil....yes, I have been
using it in a small-size production environment (7 sites) for ~6 months and
am about to put a medium-size site into production.  IIS 4 on NT 4, but we
are in the process of migration to IIS 5/apache on win2k and apache on
linux.  I prefer apache/linux, but there are those among us that only see a
M$ world, so I must get my hands dirty a little in the IIS arena.  We
haven't used the isapi filter prior to 4.0.6, though.

> -----Original Message-----
> From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 14, 2002 12:53 AM
> To: Shrock, Court
> Cc: PHP Install
> Subject: Re: RE: [PHP-INST] Is ISAPI production ready
> 
> 
> Hi
> 
> Hmm
> 
> It was not my intention to start a war, but just a simple 
> question to hear if the ISAPI is considered stable.
> 
> Steen
> 
> 
> "Shrock, Court" <[EMAIL PROTECTED]> wrote:
> > That depends on if you think IIS is stable?
> > 
> > > -----Original Message-----
> > > From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, May 14, 2002 12:33 AM
> > > To: PHP Install
> > > Subject: [PHP-INST] Is ISAPI production ready
> > > 
> > > 
> > > Hi
> > > 
> > > I've tried several times, without luck but....
> > > 
> > > Is the php4isapi.dll considered stable enough for
> > production use ?
> > > 
> > > Steen
> > > 
> > > -- 
> > > PHP Install Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > 
> > 
> > -- 
> > PHP Install Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
--- End Message ---
--- Begin Message ---
Hi

Thanks.

I don't know which combination is best 'Linux/Unix'/Apache or NT/w2k, I only know the 
fact that my ISP switched from Linux/Apache to W2K/IIS, and therefore I have to have a 
test environment like the one my ISP have, due to the fact that PHP behaves different 
depending on CGI/SAPI/OS/SERVER etc. 

I would prefer a Linux/Apache but IMHO Linux is not as easy at W2k to install/maintain

As far as I know the ISAPI is/should be faster than CGI that's why I would like to 
know if the ISAPI is stable. The readme.txt says no, but I don't think that it's 
uptodate.

Best
Steen

"Shrock, Court" <[EMAIL PROTECTED]> wrote:
> hehe...just having too much fun burning the midnight
> oil....yes, I have been
> using it in a small-size production environment (7 sites)
> for ~6 months and
> am about to put a medium-size site into production.  IIS 4
> on NT 4, but we
> are in the process of migration to IIS 5/apache on win2k and
> apache on
> linux.  I prefer apache/linux, but there are those among us
> that only see a
> M$ world, so I must get my hands dirty a little in the IIS
> arena.  We
> haven't used the isapi filter prior to 4.0.6, though.
> 
> > -----Original Message-----
> > From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 14, 2002 12:53 AM
> > To: Shrock, Court
> > Cc: PHP Install
> > Subject: Re: RE: [PHP-INST] Is ISAPI production ready
> > 
> > 
> > Hi
> > 
> > Hmm
> > 
> > It was not my intention to start a war, but just a simple
> 
> > question to hear if the ISAPI is considered stable.
> > 
> > Steen
> > 
> > 
> > "Shrock, Court" <[EMAIL PROTECTED]> wrote:
> > > That depends on if you think IIS is stable?
> > > 
> > > > -----Original Message-----
> > > > From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, May 14, 2002 12:33 AM
> > > > To: PHP Install
> > > > Subject: [PHP-INST] Is ISAPI production ready
> > > > 
> > > > 
> > > > Hi
> > > > 
> > > > I've tried several times, without luck but....
> > > > 
> > > > Is the php4isapi.dll considered stable enough for
> > > production use ?
> > > > 
> > > > Steen
> > > > 
> > > > -- 
> > > > PHP Install Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > 
> > > 
> > > -- 
> > > PHP Install Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > 
> > 
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
Hello,

I tried to use the isapi version on a win2k/IIS 5, php 4.1.2 but it lasts
about 15 minutes.

After a that i have access violation errors and the procedure to make the
server work again is painful.

I had to switch it back to cgi mode.

Arnaud.

> Hi
> 
> Thanks.
> 
> I don't know which combination is best 'Linux/Unix'/Apache or 
> NT/w2k, I only know the fact that my ISP switched from 
> Linux/Apache to W2K/IIS, and therefore I have to have a test 
> environment like the one my ISP have, due to the fact that 
> PHP behaves different depending on CGI/SAPI/OS/SERVER etc. 
> 
> I would prefer a Linux/Apache but IMHO Linux is not as easy 
> at W2k to install/maintain
> 
> As far as I know the ISAPI is/should be faster than CGI 
> that's why I would like to know if the ISAPI is stable. The 
> readme.txt says no, but I don't think that it's uptodate.
> 
> Best
> Steen
> 
> "Shrock, Court" <[EMAIL PROTECTED]> wrote:
> > hehe...just having too much fun burning the midnight
> > oil....yes, I have been
> > using it in a small-size production environment (7 sites)
> > for ~6 months and
> > am about to put a medium-size site into production.  IIS 4
> > on NT 4, but we
> > are in the process of migration to IIS 5/apache on win2k and
> > apache on
> > linux.  I prefer apache/linux, but there are those among us
> > that only see a
> > M$ world, so I must get my hands dirty a little in the IIS
> > arena.  We
> > haven't used the isapi filter prior to 4.0.6, though.
> > 
> > > -----Original Message-----
> > > From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, May 14, 2002 12:53 AM
> > > To: Shrock, Court
> > > Cc: PHP Install
> > > Subject: Re: RE: [PHP-INST] Is ISAPI production ready
> > > 
> > > 
> > > Hi
> > > 
> > > Hmm
> > > 
> > > It was not my intention to start a war, but just a simple
> > 
> > > question to hear if the ISAPI is considered stable.
> > > 
> > > Steen
> > > 
> > > 
> > > "Shrock, Court" <[EMAIL PROTECTED]> wrote:
> > > > That depends on if you think IIS is stable?
> > > > 
> > > > > -----Original Message-----
> > > > > From: Steen Rabol [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Tuesday, May 14, 2002 12:33 AM
> > > > > To: PHP Install
> > > > > Subject: [PHP-INST] Is ISAPI production ready
> > > > > 
> > > > > 
> > > > > Hi
> > > > > 
> > > > > I've tried several times, without luck but....
> > > > > 
> > > > > Is the php4isapi.dll considered stable enough for
> > > > production use ?
> > > > > 
> > > > > Steen
> > > > > 
> > > > > -- 
> > > > > PHP Install Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > > 
> > > > 
> > > > -- 
> > > > PHP Install Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > 
> > > 
> > 
> > -- 
> > PHP Install Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
It seems to work for some people, but the reality is that it will never be
as stable as the UNIX server modules due to the fact that most of the
developers use UNIX systems.

-Rasmus

On Tue, 14 May 2002, Steen Rabol wrote:

> Hi
>
> I've tried several times, without luck but....
>
> Is the php4isapi.dll considered stable enough for production use ?
>
> Steen
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
I'm trying to run php as a module under Apache 1.3 and I keep getting the
following message in the error log:

[error] Cannot remove module mod_php4.c: not found in module list

I'm using php version 4.2


--- End Message ---

Reply via email to