php-windows Digest 10 Jul 2003 07:13:48 -0000 Issue 1818

Topics (messages 20750 through 20757):

Problem finding OCI.dll when starting Apache.
        20750 by: Delacruz, Antonio M [ITS]

PHP on Windows
        20751 by: Delacruz, Antonio M [ITS]

cookies problem
        20752 by: Mark Anderson
        20753 by: Stephen March
        20754 by: Nick H. - Network Operations
        20755 by: Stephen March
        20756 by: Delacruz, Antonio M [ITS]

Subject: Re: Forms-PHP-and-errors
        20757 by: Neil Smith

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 have installed php 4.3, Oracle 8.1.7 client, and Apache 2.0, in that
order.  I am running this on a dell poweredge 4300 with windows 2000
server.  I have my <drive>:/oracle/ora81/bin path in my PATH statement
in my environment variables.  When I try to start Apache I get this
error, "the dynamic link library OCI.dll could not be found" and then it
spits out my PATH statement with <apache home>.; in front of it.  I have
the php_oci8.dll in the winnt/system32 directory.  I have the LoadModule
php4_module c:/PHP/sapi/php4apache2.dll line in my httpd.conf file.  I
have the extension=php_oci8.dll line in my php.ini file Uncommented.
Now, please help.

Antonio DeLaCruz
IT AD CAM OSC ETS Capabilities
Office: 913-794-6483
PCS: 816-665-6999

Microsoft solves problems, Linux prevents them.


--- End Message ---
--- Begin Message ---
I was able to get Apache to recognize my oci.dll.  Now, anytime I want
to connect to a database, any database (postgres, oracle, mysql) I get a
page not found error.  I have the same configuration as on another box.
The only difference is I am on windows 2000 server on this box and the
other one that works I am on windows 2k pro.  Any ideas?

Antonio DeLaCruz
IT AD CAM OSC ETS Capabilities
Office: 913-794-6483
PCS: 816-665-6999

Microsoft solves problems, Linux prevents them.


--- End Message ---
--- Begin Message ---
Hi everybody:
I have php 4.3.2 running as a isapi module on WinXP with IIS 5.1. 
When I run the following script:

setcookie("auth_login",$cookie_val['auth_login'],time() + 3600);
or
setcookie("auth_level",$cookie_val['auth_level'],time() + 3600);

it fails to set the cookie in browsers different of netscape 
navigator. ie opera or internet explorer. nevertheless it works 
localy with internet explorer. I have check all kind of privacy 
settings in this browsers and it remains the same... does someone 
have a clue about this?

Thanks in advance

Mark



Sent by Medscape Mail: Free Portable E-mail for Professionals on the Move   
http://www.medscape.com

--- End Message ---
--- Begin Message --- Mark,

I've run in to this problem - first noticing this with PHP Nuke. This cookie problem seems to be a result of a server configuration issue with the Windows operating system.

At work I have 2 Win-2k servers, both running PHP 4.3.2, our production web-server can set cookies no problem. On our dev-web server, cookies can not be set. This is cause of the "admin loop" error of PHP Nuke - if you're doing any reading on the forums. This is web-server independant, you'll notice if you install Apache on the system, you will have the same issue of cookies not being set. Now, something I will try is setting Apache up in CGI mode to see if that has the same problems?

Internet explorer 5.0 should work for you, however versions of 5.5+ (and some of the other browsers such as Opera), require a domain to
be set as part of the cookie, and as such error out.


I've been tracking this problem on our dev server for a while, and it seems to be part of the Win 2k hardening proceedures that Microsoft
recommends. Using the exact same PHP configuration on the exact same web-servers (same patch levels to the T), one works and one does not


>8(

Frustrating indeed!
~Steve



Mark Anderson wrote:

Hi everybody:
I have php 4.3.2 running as a isapi module on WinXP with IIS 5.1. When I run the following script:


setcookie("auth_login",$cookie_val['auth_login'],time() + 3600);
or
setcookie("auth_level",$cookie_val['auth_level'],time() + 3600);

it fails to set the cookie in browsers different of netscape navigator. ie opera or internet explorer. nevertheless it works localy with internet explorer. I have check all kind of privacy settings in this browsers and it remains the same... does someone have a clue about this?

Thanks in advance

Mark



Sent by Medscape Mail: Free Portable E-mail for Professionals on the Move http://www.medscape.com







--- End Message ---
--- Begin Message ---
This is just an odd suggestion.. but did you check permissions on the
c:\php\sessiondata (or whatever folder it is)?  IUSR_Machine needs to have
modify on that folder in order to store it's session data...   Of course,
you can change that path in the .ini to point wherever you want, but by
default it's in the same dir as the .exe.  I have noticed that on some
installs of php (wether with the .exe or .msi or whatever) it fails to set
the proper permissions on the folder.  I haven't played with PHP-Nuke on
Windows NT in near a year, but if I remember correctly, that's how I fixed
the admin loop issue on a box I run =\



Regards,
Nick H.
Network Operations Center
[EMAIL PROTECTED]

Please rate my performance! http://www.supportteam.net/rate.php3
Please submit all new support requests to
http://ticketmonster.hostingsupport.com/

-------------------------------------------
Privileged/Confidential Information may be contained in this message.  If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone.  In such case, you should destroy this message and kindly
notify the sender by reply email.  Please advise immediately if you or your
employer do not consent to Internet email for messages of this kind.
Opinions, conclusions and other information in this message that do not
relate to the official business of my firm shall be understood as neither
given nor endorsed by it.

----- Original Message -----
From: "Stephen March" <[EMAIL PROTECTED]>
To: "Mark Anderson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 11:23 PM
Subject: Re: [PHP-WIN] cookies problem


: Mark,
:
:    I've run in to this problem - first noticing this with PHP Nuke.
:  This cookie problem seems to be a result of a server configuration
: issue with the Windows operating system.
:
: At work I have 2 Win-2k servers, both running PHP 4.3.2, our production
: web-server can set cookies no problem.     On our dev-web server,
: cookies can not be set.    This is cause of the "admin loop" error of
: PHP Nuke - if you're doing any reading on the forums.  This is
: web-server independant, you'll notice if you install Apache on the
: system, you will have the same issue of cookies not being set.    Now,
: something I will try is setting Apache up in CGI mode to see if that has
: the same problems?
:
: Internet explorer 5.0 should work for you, however versions of 5.5+
:  (and some of the other browsers such as Opera), require a domain to
: be set as part of the cookie, and as such error out.
:
: I've been tracking this problem on our dev server for a while, and it
: seems to be part of the Win 2k hardening proceedures that Microsoft
: recommends.    Using the exact same PHP configuration on the exact same
: web-servers  (same patch levels to the T), one works and one does not
:
:  >8(
:
: Frustrating indeed!
: ~Steve
:
:
:
: Mark Anderson wrote:
:
: >Hi everybody:
: >I have php 4.3.2 running as a isapi module on WinXP with IIS 5.1.
: >When I run the following script:
: >
: >setcookie("auth_login",$cookie_val['auth_login'],time() + 3600);
: >or
: >setcookie("auth_level",$cookie_val['auth_level'],time() + 3600);
: >
: >it fails to set the cookie in browsers different of netscape
: >navigator. ie opera or internet explorer. nevertheless it works
: >localy with internet explorer. I have check all kind of privacy
: >settings in this browsers and it remains the same... does someone
: >have a clue about this?
: >
: >Thanks in advance
: >
: >Mark
: >
: >
: >
: >Sent by Medscape Mail: Free Portable E-mail for Professionals on the Move
: >http://www.medscape.com
: >
: >
: >
:
:
:
:
: --
: PHP Windows Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message --- Nick,

I'm not 100% sure, but I believe I checked that. If I remember correctly the default php.ini has it pointing to /tmp which was c:\winnt\temp (everyone has modify on the temp dir). I'll be cruising in to work tomorrow to check it (around 3:00pm Mountain time), since I have 1-box that works, and 1-that doesn't I'll also be able to compare the permissions & their affects on the admin loop problem.

Stay tuned >8)

Cheers,
~Steve



Nick H. - Network Operations wrote:

This is just an odd suggestion.. but did you check permissions on the
c:\php\sessiondata (or whatever folder it is)?  IUSR_Machine needs to have
modify on that folder in order to store it's session data...   Of course,
you can change that path in the .ini to point wherever you want, but by
default it's in the same dir as the .exe.  I have noticed that on some
installs of php (wether with the .exe or .msi or whatever) it fails to set
the proper permissions on the folder.  I haven't played with PHP-Nuke on
Windows NT in near a year, but if I remember correctly, that's how I fixed
the admin loop issue on a box I run =\



Regards,
Nick H.
Network Operations Center
[EMAIL PROTECTED]

Please rate my performance! http://www.supportteam.net/rate.php3
Please submit all new support requests to
http://ticketmonster.hostingsupport.com/

-------------------------------------------
Privileged/Confidential Information may be contained in this message.  If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone.  In such case, you should destroy this message and kindly
notify the sender by reply email.  Please advise immediately if you or your
employer do not consent to Internet email for messages of this kind.
Opinions, conclusions and other information in this message that do not
relate to the official business of my firm shall be understood as neither
given nor endorsed by it.

----- Original Message -----
From: "Stephen March" <[EMAIL PROTECTED]>
To: "Mark Anderson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 11:23 PM
Subject: Re: [PHP-WIN] cookies problem


: Mark, : : I've run in to this problem - first noticing this with PHP Nuke. : This cookie problem seems to be a result of a server configuration : issue with the Windows operating system. : : At work I have 2 Win-2k servers, both running PHP 4.3.2, our production : web-server can set cookies no problem. On our dev-web server, : cookies can not be set. This is cause of the "admin loop" error of : PHP Nuke - if you're doing any reading on the forums. This is : web-server independant, you'll notice if you install Apache on the : system, you will have the same issue of cookies not being set. Now, : something I will try is setting Apache up in CGI mode to see if that has : the same problems? : : Internet explorer 5.0 should work for you, however versions of 5.5+ : (and some of the other browsers such as Opera), require a domain to : be set as part of the cookie, and as such error out. : : I've been tracking this problem on our dev server for a while, and it : seems to be part of the Win 2k hardening proceedures that Microsoft : recommends. Using the exact same PHP configuration on the exact same : web-servers (same patch levels to the T), one works and one does not : : >8( : : Frustrating indeed! : ~Steve : : : : Mark Anderson wrote: : : >Hi everybody: : >I have php 4.3.2 running as a isapi module on WinXP with IIS 5.1. : >When I run the following script: : > : >setcookie("auth_login",$cookie_val['auth_login'],time() + 3600); : >or : >setcookie("auth_level",$cookie_val['auth_level'],time() + 3600); : > : >it fails to set the cookie in browsers different of netscape : >navigator. ie opera or internet explorer. nevertheless it works : >localy with internet explorer. I have check all kind of privacy : >settings in this browsers and it remains the same... does someone : >have a clue about this? : > : >Thanks in advance : > : >Mark : > : > : > : >Sent by Medscape Mail: Free Portable E-mail for Professionals on the Move : >http://www.medscape.com : > : > : > : : : : : -- : PHP Windows Mailing List (http://www.php.net/) : To unsubscribe, visit: http://www.php.net/unsub.php







--- End Message ---
--- Begin Message ---
Mark,

You might try using sessions instead of cookies.  The following code
checks the session and credentials.

<?php
error_reporting(0);

session_start();

print("<HTML><HEAD><TITLE>Login Page One</TITLE></HEAD>\n<BODY>\n"); //
Start the session system

error_reporting(0);
session_start();

// if the login form was posted and the uid was set (and valid)

if($_POST['logon'] and $_POST['password'] and
!isset($_SESSION['logon'])){
      // set our session vars.
      $mysql_user = "root";
          $mysql_password = "";

          $link = mysql_connect("localhost", $mysql_user,
$mysql_password)
                        or die("Error, your username and/or password is
not correct");

          $first = mysql_query("select * from time.main where logon_id =
'$logon'")
                        or die("Invalid query");

          while ($row = mysql_fetch_array($first, MYSQL_NUM)) {
                $pass = $row[7];
                }

        mysql_free_result($first);

        if ($_POST['password'] == $pass)
        {
        $_SESSION['logon'] = $_POST['logon'];
            $_SESSION['logged_in'] = true;
        }
        else
        {
                header("Location: sessionerror.php");
        }
}

// if the logoff was clicked...
if($_GET['logoff']){
    print("<p>Bye, Bye {$_SESSION['logon']}.  Thanks for stopping
by!</p>");
    session_unset();    // clean out the session
    session_destroy();  // delete the record,file,etc
}
if($_SESSION['logged_in'])
{
        print ("Page One");
        print ("<br><a href='session2.php'>Go To Page Two</a><br>");
        print("<a href='session.php?logoff=true'>[logoff]</a><br>");

} else {
    header("Location: sessionstart.php");
}

print("</BODY></HTML>");

?>

You could try the following cookie code if sessions won't work.

<?php

$cookie_name = "cookiename";
if(empty($HTTP_COOKIE_VARS[$cookie_name])) {

$user_time=time();
$user_ip=$HTTP_SERVER_VARS["REMOTE_ADDR"];
$uid=$user_time.$user_ip;
$expiretime=time()+7600;

$c_name = $cookie_name;          # cookie name
$c_data = "PHPSESSID".$uid."";   # cookie data
$c_path= "/";                         # "/"= all directories or
"/php/"=named path
$c_domain = "";                       # leaving empty covers all domains
$c_secure = 0;                        # secure server? 1=true,0=false

setCookie("$c_name","$c_data","$expiretime","$c_path","$c_domain","$c_se
cure");

?>
<html><head><title>php unique number cookie</title>
</head><body>
 <h2>PHP UNIQUE NUMBERED COOKIE DATA</h2>

<?php

echo"<b>Cookie Name:</b> $c_name<br>";
echo"<b>Data: </b>$c_data<br>";
echo"<b>Unix Time:</b> $c_time<br>";
echo"<b>Converted time: </b><br>";
echo"<b>Path Accepted:</b> $c_path<br>";
echo"<b>Domain Accepted:</b> www.yourwebserver.com<br>";
echo"<b>Secure (Yes=1 No=0):</b> $c_secure<br>";

?> 
<body></html>

-----Original Message-----
From: Mark Anderson [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2003 10:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] cookies problem


Hi everybody:
I have php 4.3.2 running as a isapi module on WinXP with IIS 5.1. 
When I run the following script:

setcookie("auth_login",$cookie_val['auth_login'],time() + 3600); or
setcookie("auth_level",$cookie_val['auth_level'],time() + 3600);

it fails to set the cookie in browsers different of netscape 
navigator. ie opera or internet explorer. nevertheless it works 
localy with internet explorer. I have check all kind of privacy 
settings in this browsers and it remains the same... does someone 
have a clue about this?

Thanks in advance

Mark



Sent by Medscape Mail: Free Portable E-mail for Professionals on the
Move   
http://www.medscape.com

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message --- jh :

uklinux.net run with register globals off , as well as several other safe mode enhancements. So you will need in any case to learn how to do this properly to run on their servers.

Contact me off list if you want a full rundown on their capabilities, as I have been with them 2 years and am very familiar with the server config.

If you have problems on the live site, contact Lance, he's very helpful

Cheers - Neil Smith.

At 16:54 09/07/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
Date: Wed, 09 Jul 2003 09:03:22 +0100
From: "jh" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Subject: Re: Forms-PHP-and-errors

Hi,
     Thanks for reply.
        I have wrapped your code in <?php    ?> like so:-
<?php
if !isset($title) {
  // Title contains no valid data
  $title = ""
}

if !isset($firstname) {
  // Title contains no valid data
  $firstname = ""
}

if !isset($lastname) {
  // Title contains no valid data
  $lastname = ""
}
>
?>

called it p-6-2.php and this is the error I get:-
Parse error: parse error, unexpected '!', expecting '(' in D:\web\myforms\p-6-2.php on line 4


I have used my own form which uses javascript to validate the fname and surname fields, but it still outputs the same error messages!
------------------------------------------------------------------------
Notice: Undefined variable: title in D:\web\myforms\p-6-2.php on line 11


Title is required.
Notice: Undefined variable: fname in D:\web\myforms\p-6-2.php on line 17

First name is required.
Notice: Undefined variable: surname in D:\web\myforms\p-6-2.php on line 23

Last name is required.

Please use your browser's back button to return to the form, correct the errors, and re-submit the form.

-----------------------------------------------------
If I send the output of my form to phpinfo() , I get all my form fields listed in ' PHP Variables ' in ' get ' and ' post ' and the data entered into my form is there also.
In php.ini, globles is set off, like so:- register_globals=Off
Like I say, I am new to php, so I haven't a clue what to do!


Thanks
jh


--- End Message ---

Reply via email to