php-windows Digest 27 Dec 2001 20:00:35 -0000 Issue 922

Topics (messages 11143 through 11154):

Re: Problem...
        11143 by: Craig Morrison
        11144 by: Zack Saadi

Re: Real dumb newbie question...
        11145 by: LaserJetter

String performance tuning?
        11146 by: Peter Illes

HTTP Referer
        11147 by: Mihail Bota
        11151 by: Jim Lucas [php]
        11152 by: Mihail Bota
        11153 by: Jim Lucas [php]
        11154 by: Mihail Bota

Re: Login and select Query in Mysql
        11148 by: Svensson, B.A.T. (HKG)
        11149 by: Jeremy Reed

includes problem
        11150 by: Asendorf, John

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 ---

It looks like Zack has a module loaded that hasn't been compiled to work with
PHP 4.1.0..

There was a structure change made between 4.0.6 and 4.1.0 that will make
extension modules incompatible between the two versions..

> >
> > Warning: Unknown persistent list entry type in module shutdown (11) in
> > Unknown on line 0

-- 

Craig Morrison
  MTS Professional @ http://www.mtsprofessional.com/
  A Win32 Email server that works for _you_.
--- End Message ---
--- Begin Message ---
Thats exactly what I did and thats exactly what I got (error.txt).

http://www.sumservices.com/phpinfo.php



"Alain Samoun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Zack:
> I'm not too sure that you understood what we need to help you:
> Let say that you have the following script called test.php :
> <?php
> phpinfo();
> ?>
> Save this script in the directory where your php.exe is (Assuming c:\php\)
> Then start a DOS cession from the Start button.
> You should see the prompt C:\windows>
> type: cd.. and <enter>   You should see the prompt c:\>
> type: cd php and <enter> You should see the prompt c:\php>
> type: php test.php
> Then tell us what you are seeing...
> A+
> Alain
>
> -----Original Message-----
> From: Zack Saadi [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 25, 2001 11:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Problem...
>
>
> This is what I got...
>
> Please see the attached error.txt file
>
>
> "Alain Samoun" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Try to run your script in a DOS window (php yourscript.php) starting in
> > the directory of php.exe, and tell us what is the error there.
> > A+
> > Alain
> >
> > -----Original Message-----
> > From: Zack Saadi [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 25, 2001 10:57 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Problem...
> >
> >
> > Hi,
> >
> > I have just upgraded to the latest verion of PHP and since then getting
> this
> > message:
> >
> > Warning: Unknown persistent list entry type in module shutdown (11) in
> > Unknown on line 0
> >
> > Please help and thanks in advance!
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>


--- End Message ---
--- Begin Message ---
Lines that start with a # have been commented out so the Apache will just
ignore these.
The lines which start with AddType need to be added but so you can just
delete the # from the start of the lines below ehere it says "For PHP 4.x".
Any of the extensions in the list at the end of the line will be recognised
as PHP files. As you can see, all .html files will be processed by the PHP
application as well. Although this will work, you might like to delete .html
from the list and let apache handle these.
You can also add extensions to that list and any file ending in that will be
processed as if it was a PHP file e.g. you could add .eeek and all files
that end in .eeek would be processed by PHP!
I think that you may have to add another line to the configuration file as
well to tell it to use c:\php\php.exe for PHP files. This should be
mentioned in the install.txt if you do (I used the server module thing, not
the CGI program).
If this line isnt added to httpd.conf, I think you can add a line at the
start of every PHP file to tell it what program to use. Its something like
#!c:/php/php.exe (as you do in perl scripts) but look it up somewhere
because I'm not sure.

Hope this helps a bit!

"Laserjetter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Its nothing to do with the browser, you need to tell Apache that .php
files
> need to be sent to a browser and are not downloaded.
> By default, Apache handles .htm and .html files but you need to tell it to
> send .php files to the PHP program. Apache then sends the output from PHP
to
> the browser window as it would with a normal web page.
>
> There is a section in the install.txt file which tells you how to change
the
> apache/conf/httpd.conf file
>
>
> "Vivoant" <[EMAIL PROTECTED]> wrote in message
> 003901c18dda$c3d2bec0$5bc3e60c@VivoAnt">news:003901c18dda$c3d2bec0$5bc3e60c@VivoAnt...
> I'm totally new to this PHP thing... (and apache...) so I tried doing one
of
> those tutoral thingies... I stuck stuck on some problem that is like this:
>
> I try to access the page on my own server (phpinfo.php) and for some
reason
> instead of loading it on IE6.0 it tries to download it from my own
> harddrive... How do I prevent this? (It worked just fine before...) I can
> still load PHP pages from other sites on the net except the one I made...
I
> tried deleting it and making a new PHP page but it still does the same
> thing... Any help is appreciated :)))
>
> (I'm on MSN Messenger too... [EMAIL PROTECTED])
>
>
>


--- End Message ---
--- Begin Message ---
Hi,

I wonder if there is any performance tuning newsgroup/faq/whatever related
to PHP. I searchead to no avail...

Anyway, my current mind boggler is: we are accumulating a large (~400k) XML
response in a string before sending it out by adding little pieces a time
(like 10-20 chars). Now this results in  very bad performance -- most
probably due to the fact that the string is enlarged/re-allocated thousands
of times. I would love to pre-allocate a big buffer for the string so that
performance gets better (something like SetLength() in Delphi). How can I do
this?

Xuse me if the answer is much too trivial, I'm a newbie in PHPland :-)

Thanks for any suggestion,

Peter


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

I am trying to use the HTTP_Referer (or any of its variants: SERVER_VARS,
ENV_VARS) to keep track of the URL of pages that are passed through forms.
Any of these variables do not work, as it is clearly stated in the
documentation, when one uses forms. Is there any way to see the URL, even
though I am using forms?

I use W2k and IIS 5

Thanks.


Mihai

--- End Message ---
--- Begin Message ---
you might want to see if track_vars is on?  I know that I don't have
problems with those _VARS when I use a form.  Are you sure the they are in
the right scope?

Jim Lucas
----- Original Message -----
From: "Mihail Bota" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 27, 2001 7:38 AM
Subject: [PHP-WIN] HTTP Referer


> Hello,
>
> I am trying to use the HTTP_Referer (or any of its variants: SERVER_VARS,
> ENV_VARS) to keep track of the URL of pages that are passed through forms.
> Any of these variables do not work, as it is clearly stated in the
> documentation, when one uses forms. Is there any way to see the URL, even
> though I am using forms?
>
> I use W2k and IIS 5
>
> Thanks.
>
>
> Mihai
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
Yes, I think those are on, because when I use the phpinfo, the
HTTP_REFERER givces the URL of the previous link... even though I passed
through the form.

Anyway, now I am scrambling to adjust all forms in such a way that the
scripts will run only when I am moving forward, and not backward...
Thanks


Mihai
On Thu, 27 Dec 2001, Jim Lucas [php] wrote:

> you might want to see if track_vars is on?  I know that I don't have
> problems with those _VARS when I use a form.  Are you sure the they are in
> the right scope?
>
> Jim Lucas
> ----- Original Message -----
> From: "Mihail Bota" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 27, 2001 7:38 AM
> Subject: [PHP-WIN] HTTP Referer
>
>
> > Hello,
> >
> > I am trying to use the HTTP_Referer (or any of its variants: SERVER_VARS,
> > ENV_VARS) to keep track of the URL of pages that are passed through forms.
> > Any of these variables do not work, as it is clearly stated in the
> > documentation, when one uses forms. Is there any way to see the URL, even
> > though I am using forms?
> >
> > I use W2k and IIS 5
> >
> > Thanks.
> >
> >
> > Mihai
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>

--- End Message ---
--- Begin Message ---
it still does that even though you are saying $GLOBALS[HTTP_REFERER]  ??

----- Original Message -----
From: "Mihail Bota" <[EMAIL PROTECTED]>
To: "Jim Lucas [php]" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, December 27, 2001 11:26 AM
Subject: Re: [PHP-WIN] HTTP Referer


> Yes, I think those are on, because when I use the phpinfo, the
> HTTP_REFERER givces the URL of the previous link... even though I passed
> through the form.
>
> Anyway, now I am scrambling to adjust all forms in such a way that the
> scripts will run only when I am moving forward, and not backward...
> Thanks
>
>
> Mihai
> On Thu, 27 Dec 2001, Jim Lucas [php] wrote:
>
> > you might want to see if track_vars is on?  I know that I don't have
> > problems with those _VARS when I use a form.  Are you sure the they are
in
> > the right scope?
> >
> > Jim Lucas
> > ----- Original Message -----
> > From: "Mihail Bota" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, December 27, 2001 7:38 AM
> > Subject: [PHP-WIN] HTTP Referer
> >
> >
> > > Hello,
> > >
> > > I am trying to use the HTTP_Referer (or any of its variants:
SERVER_VARS,
> > > ENV_VARS) to keep track of the URL of pages that are passed through
forms.
> > > Any of these variables do not work, as it is clearly stated in the
> > > documentation, when one uses forms. Is there any way to see the URL,
even
> > > though I am using forms?
> > >
> > > I use W2k and IIS 5
> > >
> > > Thanks.
> > >
> > >
> > > Mihai
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> >
>
>

--- End Message ---
--- Begin Message ---
Yes, this is working. Thanks!!


Mihai
On Thu, 27 Dec 2001, Jim Lucas [php] wrote:

> it still does that even though you are saying $GLOBALS[HTTP_REFERER]  ??
>
> ----- Original Message -----
> From: "Mihail Bota" <[EMAIL PROTECTED]>
> To: "Jim Lucas [php]" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, December 27, 2001 11:26 AM
> Subject: Re: [PHP-WIN] HTTP Referer
>
>
> > Yes, I think those are on, because when I use the phpinfo, the
> > HTTP_REFERER givces the URL of the previous link... even though I passed
> > through the form.
> >
> > Anyway, now I am scrambling to adjust all forms in such a way that the
> > scripts will run only when I am moving forward, and not backward...
> > Thanks
> >
> >
> > Mihai
> > On Thu, 27 Dec 2001, Jim Lucas [php] wrote:
> >
> > > you might want to see if track_vars is on?  I know that I don't have
> > > problems with those _VARS when I use a form.  Are you sure the they are
> in
> > > the right scope?
> > >
> > > Jim Lucas
> > > ----- Original Message -----
> > > From: "Mihail Bota" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, December 27, 2001 7:38 AM
> > > Subject: [PHP-WIN] HTTP Referer
> > >
> > >
> > > > Hello,
> > > >
> > > > I am trying to use the HTTP_Referer (or any of its variants:
> SERVER_VARS,
> > > > ENV_VARS) to keep track of the URL of pages that are passed through
> forms.
> > > > Any of these variables do not work, as it is clearly stated in the
> > > > documentation, when one uses forms. Is there any way to see the URL,
> even
> > > > though I am using forms?
> > > >
> > > > I use W2k and IIS 5
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > Mihai
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> >
> >
>
>

--- End Message ---
--- Begin Message ---
From: Jack

>Dear all
>I want to provide a login page to the user when they want to visit my
>website, i got no idea what should i used.

[Specification cut away]

>Could someone pls give me a idea how i should make this system work??

I duno if you are a programmer or not. But if you are:

Check out the manual pages for php at www.php.net, I am confident that they
will provide you will all the help and support you need for you design.

If you are not: 

You gave a relative good general top level overview of the specifications.
And the task is more or less a routine task for a skilled programmer, so why
not just hire some one that could do the programming from you
specifications?
--- End Message ---
--- Begin Message ---
It is usually wise to search through old posts before posting a question
that's been answered before all over again.  Here is a previous answer given
by myself to someone who asked the same question as you:

The easiest way is to use cookies.
=========CODE============
<?php
require 'auth_functions.php';
if (authenticateUser($form_username, $form_password)){
   setcookie("cookie_passwd",$form_password);
   setcookie("cookie_user",$form_username);
   header("Location:http://$SERVER/index2.php";);
   exit();
} else {
header("Location:http://$SERVER/error.html";);
}
?>

This code takes in input from a form as simple as this:
<form name="form1" method="post" action="index.php">
  Login: <input type="text" name="form_username"><br>
  Password:
  <input type="password" name="form_password"> <br>
  <input type="submit" name="Submit" value="Login">
</form>
Checks it against the database values using the function 'authenticateUser',
returns TRUE or FALSE.
If true, sends the user onto the correct page, if false, sends them to some
error page.

Now, in each other file, you'll need to check the cookies.  The values for
the cookies are sent automatically by the user's browser.  In this
particular examples, the cookie variables are named '$cookie_user' and
'$cookie_passwd'.  You can see in the example how those are set.

You will check the cookies using the exact same 'authenticateUser' function.
Except in these files, you will use the cookie values as the parameters to
the function instead of the form values.  I.e.
authenticateUser($cookie_user,$cookie_passwd);

Hope this helps.

Best regards,

Jeremy Reed

"Jack" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear all
> I want to provide a login page to the user when they want to visit my
> website, i got no idea what should i used.
> First i have a login.php page which got two input box, one for username
and
> one for password.
> Then i have a login table with mysql database which contain the valid user
> and password.
> And i have a index.htm which let the user browse my website.This index.htm
> is consist of three frame, top, left and main. Each frame contain
different
> page(.php).
>
> Task :
> User will login first through login.php, then the username and password
> provided by user will need to match the table called login.
> Once the username and password is correct, the username will be hold in a
> place for the further use inside the website(eg: when user want to see the
> leave history records, it will only show it's own record by select the
query
> using the username section).
> then user will direct into index.htm.
>
> Could someone pls give me a idea how i should make this system work??
>
> Thx
> Jack
> [EMAIL PROTECTED]
>
>


--- End Message ---
--- Begin Message ---
I have three files:

adodb.inc.php  -  a database abstract class
soldier_db.inc.php  -  a specific include for the databases I am working
with
index.php  -  a page that displays lots of different things...

soldier_db.inc.php has the include line for adodb.inc.php and establishes a
connection to a mysql batabase called $connection

index.php includes soldier_db.inc.php and then tries to use some of the
class elements from adodb.inc.php and $connection **from**
soldier_db.inc.php

The debugging shows the connection as valid while echoing from the
soldier_db.inc.php but dead when echoing from the index.php

for example, this code reports "OK" while in the soldier_db.inc.php but
"Dead" in the index.php portion....  exact same code, soldier_db.inc.php
included above this code in index.php

if (!$connection) {
        echo "Dead";
}
else {
        echo "OK";
}

Does anyone have an idea why this is happening?  None of these items are in
functions, so I guess I wouldn't think that it's a globals issue. (and I've
tried establishing $connection as a global variable to no change in results)

If anyone wants the code itself, I'll pull it out and send it.

Thanks in advance,

John
        






---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
--- End Message ---

Reply via email to