php-general Digest 16 Mar 2001 02:00:40 -0000 Issue 569

Topics (messages 44027 through 44194):

Re: Executing a string with both html and php inside it..
        44027 by: Mark Roedel
        44038 by: Aviv Revach
        44048 by: Christian Reiniger

Re: Function to compare an array with another array
        44028 by: Stewart Taylor
        44031 by: Tim Ward

Re: Dynamic Arrays?
        44029 by: John Guynn
        44030 by: Mark Roedel

mail() function how???
        44032 by: Nilesh Parmar
        44035 by: Knotek Vlastimil

mail() implementation problem
        44033 by: Mathieu Arnold
        44107 by: Mathieu Arnold
        44191 by: Manuel Lemos

List of Directories with in a Directory
        44034 by: Tim Livers
        44050 by: Christian Reiniger

(rac)MCAL, doubt, again
        44036 by: Celestino Roberto Alejandro

Re: Will my script run after redirect?
        44037 by: Johnson, Kirk

Re: SOS !
        44039 by: Julien (support pagespersos Free)

Re: Statistics function
        44040 by: chris.improbable.org

Re: URL / address
        44041 by: Aviv Revach

separate php.ini files
        44042 by: Kevin Porter
        44043 by: Johnson, Kirk
        44044 by: Mark Roedel

forms and databases usinh PHP
        44045 by: Don
        44049 by: Jack Dempsey
        44062 by: Michael Kimsal
        44075 by: Don

gmmktime() woes
        44046 by: David G.

Problem with ereg*_replace and backreference
        44047 by: Alain FORCIOLI

Re: How upload files to protected directories?
        44051 by: Keith Vance
        44139 by: Mig

newbie problem: Hit counter.
        44052 by: Richard Banks
        44059 by: Boaz Yahav

Re: POST Method.
        44053 by: Keith Vance
        44055 by: Nick Davies

Re: that whole system() thing again
        44054 by: Dennis Gearon

Search Engines?
        44056 by: Wee Chua

POST conversion.
        44057 by: Nick Davies
        44071 by: Stewart Taylor
        44073 by: Chris Lee

RE:Dynamic Arrays?
        44058 by: Dennis Gearon

Chat with PHP and MySQL - come and chat about Linux problems...
        44060 by: Marian Vasile

php editors
        44061 by: McShen
        44065 by: Keith Vance
        44175 by: David Robley

FAQ
        44063 by: Rick St Jean
        44068 by: RBL
        44070 by: RBL
        44072 by: Mal McKay
        44074 by: Mal McKay
        44076 by: Rick St Jean
        44091 by: Chris Lee
        44093 by: Rick St Jean
        44095 by: Christopher Allen
        44117 by: eschmid+sic.s.netic.de
        44177 by: David Robley
        44178 by: Keith Vance
        44179 by: Tobias Talltorp
        44182 by: Jason Lotito
        44194 by: Michael Talbot-Wilson

File system or MySQL ?
        44064 by: Marian Vasile
        44069 by: Chris Lee

Php C source code
        44066 by: rui.websolut.net

Re: [PHP-DB] validating checkboxes
        44067 by: Stewart Taylor

String parsing problem
        44077 by: Justin Smith

Help w/Cookie Problem
        44078 by: Jack Sasportas
        44079 by: Jack Dempsey

Re: Finding the depth
        44080 by: Chris Lee

3 situations - PHP Power or... servlet(JSP) power  ?
        44081 by: Marian Vasile
        44090 by: Chris Lee
        44097 by: Pierre-Yves Lemaire
        44100 by: Mark Maggelet
        44102 by: Marian Vasile
        44109 by: Michael Kimsal
        44110 by: Mark Maggelet

Re: newbie php authentication quest.
        44082 by: Chris Lee

Re: Own User authentification
        44083 by: Chris Lee

Re: Creating Files Windows vs Unix
        44084 by: Andrew V. Romero

Re: External file?
        44085 by: Chris Lee

One some problem with uploading
        44086 by: Al

Re: Not Looping...
        44087 by: Chris Lee

Variable value doesn't stay "Null"
        44088 by: Michael Conley
        44089 by: Chris Lee
        44111 by: Michael Conley
        44115 by: Johnson, Kirk
        44120 by: Michael Conley
        44124 by: Web master
        44144 by: NHans

RE:function() for mysql-enum-field-values-to-array
        44092 by: Dennis Gearon

Windows 2000, PHP, mySQL: multiple users and security
        44094 by: Alain Fontaine

Paging a Recordset
        44096 by: James Crowley
        44113 by: Web master
        44190 by: Manuel Lemos

Newbie question: Basic knowledge
        44098 by: Virtual Evil
        44099 by: Rick St Jean
        44108 by: Virtual Evil
        44119 by: Phillip Bow
        44127 by: Virtual Evil
        44128 by: Virtual Evil
        44133 by: eschmid+sic.s.netic.de
        44134 by: Virtual Evil
        44138 by: eschmid+sic.s.netic.de
        44143 by: Lars Falsig

Perl Libraries and PHP
        44101 by: Matthew Hanna

Help needed - search problem
        44103 by: Fang Li
        44105 by: Boget, Chris

Variable problems and strings PHP3
        44104 by: rm

Passing Multilayered Objects, by Reference, to Independent Sub-Objects
        44106 by: Andrew Immerman
        44114 by: Andrew Immerman

Stripping Single Quotes
        44112 by: Elan
        44121 by: CC Zona
        44126 by: Web master

Help! Can't redeclare already declared function in
        44116 by: Jack Sasportas
        44118 by: Johnson, Kirk
        44123 by: Web master
        44150 by: ..s.c.o.t.t.. [gts]
        44153 by: Keith Vance

Error working
        44122 by: Celestino Roberto Alejandro
        44148 by: ..s.c.o.t.t.. [gts]

Reminders
        44125 by: Dale Frohman
        44129 by: Mark Maggelet

error_log creates duplicate entries
        44130 by: Marcel Levy

Re: FAQ Ignor if you are tired of this.
        44131 by: Rick St Jean
        44135 by: Lars Falsig

passing variables from one form to another
        44132 by: Don
        44147 by: ..s.c.o.t.t.. [gts]

MSSQL 2000 in PHP4... Is this possible?
        44136 by: Brandon Orther

fopen to validate a URL
        44137 by: Kenneth R Zink II
        44140 by: Kenneth R Zink II
        44141 by: ..s.c.o.t.t.. [gts]

Re: need some help..
        44142 by: Andreas D. Landmark
        44145 by: ..s.c.o.t.t.. [gts]

PostToHost
        44146 by: Boget, Chris
        44181 by: Tobias Talltorp

Re: How do you keep your scripts secure?
        44149 by: Richard Lynch
        44154 by: ..s.c.o.t.t.. [gts]
        44157 by: Keith Vance
        44161 by: Murph
        44163 by: Jack Dempsey
        44165 by: Johnson, Kirk
        44166 by: Murph
        44167 by: Murph
        44168 by: Keith Vance
        44169 by: Jack Dempsey

Interactive Shells
        44151 by: Clayton Dukes
        44155 by: ..s.c.o.t.t.. [gts]

Has anyone got MSSQL2000 to connect and work properlly?
        44152 by: Brandon Orther
        44156 by: ..s.c.o.t.t.. [gts]

I can't install PHP4
        44158 by: Norberto Rojas
        44159 by: Keith Vance

Executing a CGI script.
        44160 by: Brandon Orther
        44162 by: Jack Dempsey
        44164 by: Jack Dempsey

Call to undefined function
        44170 by: Clayton Dukes
        44171 by: Clayton Dukes
        44172 by: Jack Dempsey
        44174 by: Clayton Dukes

creating array on variable variable (bug?)
        44173 by: Tobias Talltorp
        44176 by: Mahmoud Abu-Wardeh
        44180 by: Tobias Talltorp

Extra Path Info
        44183 by: Jesse Kipp

Passing JavaScript variables
        44184 by: Gary

Request for input...
        44185 by: Mary E Tyler

$REDIRECT_ERROR_NOTES
        44186 by: Paul R. Jackson
        44187 by: David Robley
        44189 by: Paul R. Jackson
        44192 by: David Robley

Help. creating excel file form mysql
        44188 by: Javier Onate

how fast is php
        44193 by: Randy Johnson

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]


----------------------------------------------------------------------


> -----Original Message-----
> From: Aviv Revach [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 13, 2001 5:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Executing a string with both html and php inside it..
> 
> 
> What should I do in order to execute the next string:
>    $str = "<html>\n"
>    $str .= "blabla\n";
>    $str .= "  <?php echo \"hello!\"; ?>\n";
>    $str .= "blabla\n";
>    $str .= "</html>\n";
> 
> When I tried using 'echo' with the string, but the php code 
> didn't work...
> 
> Is there any way of doing this without writing this string to a file
> and include'ing it? (that would be rather slow!)

If you're not going to be writing it out to a file, why wouldn't you
just

    $str = "<html>\n"
    $str .= "blabla\n";
    $str .= "  hello!\n";
    $str .= "blabla\n";
    $str .= "</html>\n";

Is there something i'm missing here?  I'm sure this is an oversimplified
example, but what is it you're actually trying to accomplish?


---
Mark Roedel           | "I know the answer!  The answer lies within the
Systems Programmer    |  heart of all mankind!  The answer is twelve?!?
LeTourneau University |  I think I'm in the wrong building."
Longview, Texas, USA  |           -- Peppermint Patty (Charles Schultz) 




Hey!

I would like to thank you and Mark for your quick reply.

What am I trying to accomplish is the following:

   I have created an engine which separates my website's code and design.
   The code is stored in one file(code.txt) and the design in 
another(design.txt).

   The engine loads up parts of each file in order to create the final 
result, meaning -
     * It prints the "<html><head>" etc..
     * It prints DESIGN.TXT's head
     * It prints CODE.TXT's head
     * It prints "</head><body>" etc..
     * It prints part of DESIGN.TXT's body
     * It prints CODE.TXT's body
     * It prints the second-part of the DESIGN.TXT's body
     * It prints "</body></html>"

   That's the general idea of what the engine does, but it's doing other 
things as well.
   The engine works the way it does because I wanted to have the entire content
   and the entire design all in 2 separate files.
   Most of the engines I've seen so far, used 3 different files for the 
design, and included
   them in different places inside their content. I don't wish to do that..

   Now, all worked fine until a while go, I used the 'echo' command in 
order to print the
   strings that contain content/design HTML code.

   The troubles began when I added PHP code to my content -
   The PHP tags were IGNORED... !


Now, after I've told you all the things you should know, I ask for your 
assistance.
What do you suggest me to do?


Thank you in advance -

   Aviv Revach


At 13:26 15/03/01 +0100, Christian Reiniger wrote:
>On Wednesday 14 March 2001 12:50, you wrote:
>
> > My string contains HTML tags with PHP code inside(in '<?php' and  '?>'
> > tags), not only PHP as eval() requires.
> >
> > Do you have any other suggestion?
>
>AFAIK there's no other way than using include().
>
>Why do you need that anyway?
>
> > > > What should I do in order to execute the next string:
> > > >  $str = "<html>\n"
> > > >  $str .= "blabla\n";
> > > >  $str .= "  <?php echo \"hello!\"; ?>\n";
> > > >  $str .= "blabla\n";
> > > >  $str .= "</html>\n";
> > > >
> > > > When I tried using 'echo' with the string, but the php code didn't
> > > > work...
>
>--
>Christian Reiniger
>LGDC Webmaster (http://sunsite.dk/lgdc/)
>
>Pretty cool, the kind of power information technology puts in our hands
>these days.
>
>- Securityfocus on probing 36000000 hosts for known problems in 3 weeks


     BRILLIANeT Website -
   http://www.brillianet.com/





On Wednesday 14 March 2001 16:26, you wrote:
> Hey!
>
> I would like to thank you and Mark for your quick reply.
>
> What am I trying to accomplish is the following:
>
>    I have created an engine which separates my website's code and
> design. The code is stored in one file(code.txt) and the design in
> another(design.txt).

[...]

> Now, after I've told you all the things you should know, I ask for your
> assistance.
> What do you suggest me to do?

I'd say use another approach. Separating code and design is good, but 
keeping each on only one file will cause more troubles that it's worth.
I keep all my design in one directory, as several files, each a snippet 
of HTML (usually with some <?= $SomeVar ?> statements embedded):

misc_hitcounter_g.html
misc_hitcounter_s.html
page_footer-titel.html
page_footer.html
page_header-titel.html
page_header.html
page_toc-linkmarked.html
page_toc-linkstd.html
page_toc.html
mail_subscribe-failure.html
mail_unsubscribe-failure.html
mail_subscribe-success.html
mail_unsubscribe-success.html
news_item-std.html

news_item-std.html for example looks like this (it's a german site):

          <tr valign="top">
            <td colspan="2" height="2"><img src="/images/transparent.gif" 
width="1" height="1"></td>
          </tr>
          <tr valign="top">
            <td>
              <p class="bb"><?= $PTime ?></p>
            </td>
            <td>
              <p class="bb"><?= $Title ?></p>
            </td>
          </tr>
          <tr valign="top">
<?php if ($Usermode == 'maint') { ?>
            <td><a href='/maintain.php?what=news&amp;id=<?= $ID 
?>&amp;action=edit' class='inbody'>Bearbeiten</a></td>
<?php } else { ?>
            <td>&nbsp;</td>
<?php } ?>
            <td><?= $Body ?></td>
          </tr>

Such an approach is IMHO easy to understand and handle, well-structured 
etc.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks




How about using the array_diff function instead.
  array_diff ($array1,$array2) = elements in $array1 not in $array2;
  array_diff ($array2,$array1) = elements in $array2 not in $array1;

>From manual:
array array_diff (array array1, array array2 [, array ...])


Array_diff() returns an array containing all the values of array1 that are
not present in any of the other arguments. Note that keys are preserved. 

Example 1. Array_diff() example

$array1 = array ("a" => "green", "red", "blue");
$array2 = array ("b" => "green", "yellow", "red");
$result = array_diff ($array1, $array2);

This makes $result have array ("blue");  
 
 


-----Original Message-----
From: Fang Li [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 14:03
To: Tim Ward; 'Jimmy Bäckström'; PHP General List
Subject: RE: [PHP] RE: Function to compare an array with another array


Hi,
I am trying to use the Function ArrayCompare, but it always has an error in
"if(($key = array_search($element, $array2)) == false)", and also I couldn't
get the page of http://www.stivesdirect.com/e-mail-disclaimer.html
Would you please give me a clue? Thanks!

Fang

-----Original Message-----
From: Tim Ward [mailto:[EMAIL PROTECTED]]
Sent: March 5, 2001 5:48 AM
To: 'Jimmy Bäckström'; PHP General List
Subject: [PHP] RE: Function to compare an array with another array


function ArrayCompare($array1, $array2)
{       $answer = new Array()
        foreach ($array1 as $element)
        {       if (($key = array_search($element, $array2)) === false)
                {       $answer[$key] = $array2[$key];
                }
        }
        return $answer;
}

this will return an array that is a copy of the first array with only those
elements that are not in array2. If you only want the first one either just
use the first one( foreach(){ ... break;}) or put a break in the if.

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Jimmy Bäckström [mailto:[EMAIL PROTECTED]]
> Sent: 05 March 2001 06:38
> To: PHP General List
> Subject: Function to compare an array with another array
>
>
> Shu!
> I need some help here.
> I have a script where I want to compare two arrays with
> eachother, and return one value from that does not exists in
> both arrays. I have an array of pictures id number created
> from a database query. I use sessions to save id numbers of
> pictures into an array. I want the first array to be compared
> to the second and return the first key/value-pair that are
> not found in the session array...
> Is there a way I can do this?
>
> Thankful for any help!
> /Broder B
>

--
PHP General 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]




-- 
PHP General 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]




sorry, I've been writing javascript, and also didn't check the validity of
the array_search function ... this works (and is simpler anyway)

<?php
function ArrayCompare($array1, $array2)
{       $answer = Array(); // sorry about the js creeping in here
        foreach ($array1 as $key=>$element)
        {       if (in_array($element, $array2))
                {       $answer[$key] = $element;
                }
        }
        return $answer;
}
?>

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Fang Li [mailto:[EMAIL PROTECTED]]
> Sent: 15 March 2001 14:03
> To: Tim Ward; 'Jimmy Bäckström'; PHP General List
> Subject: RE: [PHP] RE: Function to compare an array with another array
> 
> 
> Hi,
> I am trying to use the Function ArrayCompare, but it always 
> has an error in
> "if(($key = array_search($element, $array2)) == false)", and 
> also I couldn't
> get the page of http://www.stivesdirect.com/e-mail-disclaimer.html
> Would you please give me a clue? Thanks!
> 
> Fang
> 
> -----Original Message-----
> From: Tim Ward [mailto:[EMAIL PROTECTED]]
> Sent: March 5, 2001 5:48 AM
> To: 'Jimmy Bäckström'; PHP General List
> Subject: [PHP] RE: Function to compare an array with another array
> 
> 
> function ArrayCompare($array1, $array2)
> {     $answer = new Array()
>       foreach ($array1 as $element)
>       {       if (($key = array_search($element, $array2)) === false)
>               {       $answer[$key] = $array2[$key];
>               }
>       }
>       return $answer;
> }
> 
> this will return an array that is a copy of the first array 
> with only those
> elements that are not in array2. If you only want the first 
> one either just
> use the first one( foreach(){ ... break;}) or put a break in the if.
> 
>       Tim Ward
>       Senior Systems Engineer
> 
> Please refer to the following disclaimer in respect of this message:
> http://www.stivesdirect.com/e-mail-disclaimer.html
> 
> 
> > -----Original Message-----
> > From: Jimmy Bäckström [mailto:[EMAIL PROTECTED]]
> > Sent: 05 March 2001 06:38
> > To: PHP General List
> > Subject: Function to compare an array with another array
> >
> >
> > Shu!
> > I need some help here.
> > I have a script where I want to compare two arrays with
> > eachother, and return one value from that does not exists in
> > both arrays. I have an array of pictures id number created
> > from a database query. I use sessions to save id numbers of
> > pictures into an array. I want the first array to be compared
> > to the second and return the first key/value-pair that are
> > not found in the session array...
> > Is there a way I can do this?
> >
> > Thankful for any help!
> > /Broder B
> >
> 
> --
> PHP General 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]
> 
> 
> 




My first idea is something like this:

$counter=1

while ($counter <= some maximum number){

$arrayvalue="var".$counter

write $arrayname[$arrayvalue] to database

$counter++;
}

That should get the job done.

One other idea (depending on if you are just storing data or if you need to
manipulate it) is to serialize or implode the array and store the result of
the serialize/implode operation in the database.

John Guynn

This email brought to you by RFCs 821 and 1225.


-----Original Message-----
From: RealGM [mailto:[EMAIL PROTECTED]]
Hi,

I have a bit of a dilemma.

I have a number of array attributes, eg. $arrayname["var1"],
$arrayname["var2"], $arrayname["var2"], etc. up to 58, and I want to write
these into the database.

What I am hoping to do is create a counter that goes through the insert
routine, updating the numerical value of "var".  The problem is.. everything
I have tried hasn't worked.

I have tried things like...

$counter=1;

$arrayname[["var".$counter1]];
$arrayname["var$counter1"];
 
...and variations thereof.  Everything I have tried has failed.

PLEASE can someone help??






> -----Original Message-----
> From: RealGM [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 3:38 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Dynamic Arrays?
> 
> 
> Hi,
> 
> I have a bit of a dilemma.
> 
> I have a number of array attributes, eg. $arrayname["var1"], 
> $arrayname["var2"], $arrayname["var2"], etc. up to 58, and I 
> want to write these into the database.
> 
> What I am hoping to do is create a counter that goes through 
> the insert routine, updating the numerical value of "var".  
> The problem is.. everything I have tried hasn't worked.
> 
> I have tried things like...
> 
> $counter=1;
> 
> $arrayname[["var".$counter1]];
> $arrayname["var$counter1"];
>  
> ...and variations thereof.  Everything I have tried has failed.

How about just

        foreach ($arrayname as $arrayval) {
                do stuff with $arrayval
      }

Or, if it's also important for you to know that you're dealing with the
value of "var1"...

        foreach ($arrayname as $arraykey=>$arrayval) {
                do stuff with $arraykey and $arrayval
        }


---
Mark Roedel           | "I know the answer!  The answer lies within the
Systems Programmer    |  heart of all mankind!  The answer is twelve?!?
LeTourneau University |  I think I'm in the wrong building."
Longview, Texas, USA  |           -- Peppermint Patty (Charles Schultz) 




 Hello !!
   I have insalled php on my windows 98 machine.But the mail() function does
not work.
       Can anyone give me info as to how to use the mail() function in
php.Or rather should  i require any configurations on my machine.
 please help
 thanx in advance
Nilesh Parmar






Hi

You mast have some mail server installed, or an access to one.
Then you have to configure your PHP.ini file:

1. If you are running under Windows:

[mail function]
SMTP                    =       address of the mail server (mailserver.com
or IP address)
sendmail_from   =       [EMAIL PROTECTED]

'from' can be anything you want
'mailserver.com' must be same in both lines

2. If you are running under linux:

;sendmail_path  =       ;may supply arguments as well (default is 'sendmail
-t -i')


K.V.


-----Original Message-----
From: Nilesh Parmar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 4:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mail() function how???


 Hello !!
   I have insalled php on my windows 98 machine.But the mail() function does
not work.
       Can anyone give me info as to how to use the mail() function in
php.Or rather should  i require any configurations on my machine.
 please help
 thanx in advance
Nilesh Parmar



-- 
PHP General 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]




Hi

The actual implementation of the mail fonction use sendmail -t and
relies on sendmail to parse the headers to get the recipients.
It would be great if it was possible to switch from this way of using
sendmail to a more classic 
sendmail -f sender rcpt
it should be quite easy, but I lack time to do it.

-- 
Mathieu Arnold




Hi

The actual implementation of the mail function use sendmail -t and
relies on sendmail to parse the headers to get the recipients.
It would be great if it was possible to switch from this way of using
sendmail to a more classic 
sendmail -f sender rcpt
it should be quite easy, but I lack time to do it.

-- 
Mathieu Arnold




Hello,

Mathieu Arnold wrote:
> 
> Hi
> 
> The actual implementation of the mail fonction use sendmail -t and
> relies on sendmail to parse the headers to get the recipients.
> It would be great if it was possible to switch from this way of using
> sendmail to a more classic
> sendmail -f sender rcpt
> it should be quite easy, but I lack time to do it.

You may want to try this PHP MIME message composing and sending class
that has subclasses for sending messages using directly sendmail, qmail
or even a SMTP server.

http://phpclasses.UpperDesign.com/browse.html/package/9

Manuel Lemos





I am trying to get a list of all directories within a specified
directory.

Any ideas how to do this?

Thanks

Tim




On Thursday 15 March 2001 16:05, you wrote:
> I am trying to get a list of all directories within a specified
> directory.
>
> Any ideas how to do this?

go through all entries of the dir. 
on each entry check if it's a directory.
if it is, list it

For all other questions on this topic check the manual

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 36000000 hosts for known problems in 3 weeks




Hi...
..where i can found documentation abour the use and the installation of MCAL library 
in Solaris plattform?

Robert Celestino.




This will work fine. The script will continue to run after the meta refresh
unless the exit is there.

> -----Original Message-----
> From: Carfield Yim [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 3:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Will my script run after redirect?

> if( $i == 0) 
> { 
>     print "<meta http-equiv=refresh content=\"0;url=$url\">"; 
>     exit;
> } 
> $i++; 
>   
> Will it work? Is it have any side-effect?




Nicolas MERLET a écrit :

>  Please help me ! My problem is that I can't load PHP scripts (.php
> extension) with my personal server. My OS is Windows 95B (but MSIE 5
> update), and I use PWS for Win 95 (not 4.0 for Win 98). My PHP version
> is: 4.0.4pl1 for Win32 I've already done this instructions, I've found
> in the manual: - Updating DCOM- Copying "php.ini" into "c:\windows\"
> directory- Writing correct path for "extension_dir" field (my path is
> "c:\php")- Adding ".php" registry key in
> "HKLM/System/.../W3Svc/Parameters/ScriptMap" with "c:\php\php.exe %s
> %s" value- Adding ".php" extension in "HKCR" registry key (with
> correct parameters, I've tested it, there's no running problem) I
> don't understand why PHP doesn't run on my server. Maybe
> "ScriptMap/.php" registry key value is wrong...I'm waiting for any
> answer... Nicolas Merlet  ____________
> Tel:  +33.674.520.959
> Email:  [EMAIL PROTECTED]




--
Bonjour,

Sorry,but our servers don't support the extension that follows : .php
extension ,only:  .ph3 ,indeed the Free php version is php 3.

Cordialement.
----------------
Free.fr






On Thu, Mar 15, 2001 at 06:10:43AM -0600, Derek Sivers wrote:
> 
> >the connection will close when you hit cancel but the PHP
> >code can continue running if you choose.
> 
> How do you choose to have the PHP script continue even if a browser 
> leaves/dumps?

Check out the ignore_user_abort() function.




Hey!

You could easily use the Environment Variables.

     echo "http://$HTTP_HOST/$PATH_INFO";


will do the trick..


Best Regards -

   Aviv Revach


At 13:45 15/03/01 +0100, Geer wrote:
>Hi there,
>
>Does anyone know how I can read the address of URL the user filled in in
>his/her browser???
>
>
>Greetings,
>
>Geer
>
>
>
>--
>PHP General 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]


XOR-Coders Mega Programming Resource Site! -
         http://members.xoom.com/xorcoders/





Hi,

I need to build two copies of a website on one machine - one for development
and one for a backup. I want to be able to use different php.ini files with
each copy of the site. Can I do this without compiling two Apache/PHP
excutables? ie can it be done with virtual hosting somehow or by any other
means?

thanks,

- Kev

--
http://www.megasoccer.com - World Soccer
http://www.fa-premier.com - English Premier League Football






We just started doing this using Apache's virtual hosting and .htaccess
files to alter php.ini's configuration settings on a per application basis.
Haven't played with it much yet, tho. Looks good so far.

> -----Original Message-----
> From: Kevin Porter [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] separate php.ini files
> 
> 
> Hi,
> 
> I need to build two copies of a website on one machine - one 
> for development
> and one for a backup. I want to be able to use different 
> php.ini files with
> each copy of the site. Can I do this without compiling two Apache/PHP
> excutables? ie can it be done with virtual hosting somehow or 
> by any other
> means?
> 
> thanks,
> 
> - Kev
> 




> -----Original Message-----
> From: Kevin Porter [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 9:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] separate php.ini files
> 
> 
> I need to build two copies of a website on one machine - one 
> for development and one for a backup. I want to be able to use
> different php.ini files with each copy of the site. Can I do
> this without compiling two Apache/PHP excutables? ie can it be
> done with virtual hosting somehow or by any other means?

You can only have one php.ini for each instance of PHP.

However

You can also control the PHP settings for each copy of the site by using
php configuration directives in the relevant sections of your
httpd.conf.


---
Mark Roedel           | "I know the answer!  The answer lies within the
Systems Programmer    |  heart of all mankind!  The answer is twelve?!?
LeTourneau University |  I think I'm in the wrong building."
Longview, Texas, USA  |           -- Peppermint Patty (Charles Schultz) 




Hello,

Has anyone run into problems using PHP to access a database (MySQL) and
build a form.  I am trying to build a form that contains anywhere from
10 to 20 tables.  Each table will contain drop down menus, text boxes
and text areas.  As you may envision, this form can be quite lengthy.

I populate the form by creating a loop and accessing the MySQL
database.  Each iteration returns data (24 fields) from a record in my
Database table).

My problem is that after loading the page, my browser appears to lock up
and any attempt to run other programs gives me a Windows Low Memory
error (and that I should close other programs).

Note: Third may not be a PHP problem but as I am unsure, I have to start
somewhere.
Note2: I have already queried the HTML newsgroup and the feedback I
received was that large forms should not cause this problem.

Thanks,
Don





Hey Don,

I'm sure most of us have experienced problems with PHP and MySQL, but of
a programming error, not usually a "bug". Do you have some code you
could share? I'm using PHP and MySQL with lots of forms and things are
great.

jack

Don wrote:
> 
> Hello,
> 
> Has anyone run into problems using PHP to access a database (MySQL) and
> build a form.  I am trying to build a form that contains anywhere from
> 10 to 20 tables.  Each table will contain drop down menus, text boxes
> and text areas.  As you may envision, this form can be quite lengthy.
> 
> I populate the form by creating a loop and accessing the MySQL
> database.  Each iteration returns data (24 fields) from a record in my
> Database table).
> 
> My problem is that after loading the page, my browser appears to lock up
> and any attempt to run other programs gives me a Windows Low Memory
> error (and that I should close other programs).
> 
> Note: Third may not be a PHP problem but as I am unsure, I have to start
> somewhere.
> Note2: I have already queried the HTML newsgroup and the feedback I
> received was that large forms should not cause this problem.
> 
> Thanks,
> Don
> 
> --
> PHP General 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]






Don wrote:

> Hello,
>
> Has anyone run into problems using PHP to access a database (MySQL) and
> build a form.  I am trying to build a form that contains anywhere from
> 10 to 20 tables.  Each table will contain drop down menus, text boxes
> and text areas.  As you may envision, this form can be quite lengthy.
>
> I populate the form by creating a loop and accessing the MySQL
> database.  Each iteration returns data (24 fields) from a record in my
> Database table).
>
> My problem is that after loading the page, my browser appears to lock up
> and any attempt to run other programs gives me a Windows Low Memory
> error (and that I should close other programs).
>
> Note: Third may not be a PHP problem but as I am unsure, I have to start
> somewhere.
> Note2: I have already queried the HTML newsgroup and the feedback I
> received was that large forms should not cause this problem.

Then I'd have to say that the HTML newsgroup people don't know
what they're talking about, because it's quite simple to make a form
so large as to cause browser issues/crashes/low memory warnings.
Let's see - if you have 32 megs in your system, assume a lot is taken
up by the OS and browser itself.  So creating a 10 meg form
could easily crash your system.

Not suggesting you have a 10 meg form, but it's hard to know how things
are calculated.  Just because you have 30k of HTML doesn't mean it takes
up 30k in your browser's memory, as it has to create internal structures
from your HTML to know how to render stuff, then there's the actual graphic
displaying of what your form is.

We had a client who wanted an inventory form.  They have ~200 items -
creating
a form with all 200 items, each with a pulldown option box with 6 options,
was
causing problems on Windows machines using Netscape with less than 64 megs
of
RAM.  This was only 6 months ago with Win98 and netscape 4.7, so I think
it's safe to say it's definitely possible.  (we had to break the form up
into their
separate product categories - about 7 - so each page only has 20-30 items on
it)

Now, is this what's happening to you?  Could be - could you send a URL for
others to hit to see if we experience the same problem?  If I hit it with
128 megs of
RAM with no problem, and you crash with 32 megs, there's your problem.
BUT...
it might be something more than that.







> Don wrote:
>
> > Hello,
> >
> > Has anyone run into problems using PHP to access a database (MySQL) and
> > build a form.  I am trying to build a form that contains anywhere from
> > 10 to 20 tables.  Each table will contain drop down menus, text boxes
> > and text areas.  As you may envision, this form can be quite lengthy.
> >
> > I populate the form by creating a loop and accessing the MySQL
> > database.  Each iteration returns data (24 fields) from a record in my
> > Database table).
> >
> > My problem is that after loading the page, my browser appears to lock up
> > and any attempt to run other programs gives me a Windows Low Memory
> > error (and that I should close other programs).
> >
> > Note: Third may not be a PHP problem but as I am unsure, I have to start
> > somewhere.
> > Note2: I have already queried the HTML newsgroup and the feedback I
> > received was that large forms should not cause this problem.
>
> Then I'd have to say that the HTML newsgroup people don't know
> what they're talking about, because it's quite simple to make a form
> so large as to cause browser issues/crashes/low memory warnings.
> Let's see - if you have 32 megs in your system, assume a lot is taken
> up by the OS and browser itself.  So creating a 10 meg form
> could easily crash your system.
>
> Not suggesting you have a 10 meg form, but it's hard to know how things
> are calculated.  Just because you have 30k of HTML doesn't mean it takes
> up 30k in your browser's memory, as it has to create internal structures
> from your HTML to know how to render stuff, then there's the actual graphic
> displaying of what your form is.
>
> We had a client who wanted an inventory form.  They have ~200 items - creating
> a form with all 200 items, each with a pulldown option box with 6 options, was
> causing problems on Windows machines using Netscape with less than 64 megs of
> RAM.  This was only 6 months ago with Win98 and netscape 4.7, so I think it's
> safe to say it's definitely possible.  (we had to break the form up into their
> separate product categories - about 7 - so each page only has 20-30 items on
> it)
>
> Now, is this what's happening to you?  Could be - could you send a URL for
> others to hit to see if we experience the same problem?  If I hit it with 128
> megs of RAM with no problem, and you crash with 32 megs, there's your problem.
> BUT... it might be something more than that.

I agree with your analysis.  As I've thought about it more, I realize that I
have no control over the exact number of tables that will exist in my form and
hence, the total number items on the form.  Reason being that this is dynamic
and based on vales returned from a database.

Expecting my clients to have the necessary hardware / memory in order to use it
is ridiculous.  So, I am logically breaking it into two screen, one with the
subject of each table linked that the client can 'click'.  The other, a generic
form that will retrieve values based on the subject clicked on the previous
page.  I guess you can call it "normalizing" my form.

By the way, say that each subject link is a numeric string, will my second page
have access to that string, i.e., can I pass it as a parameter in my <A HREF=>
tag?  The first page will be PHP generated while the second will be HTML with a
PHP script to access the database and build my form.  I have not found any
documentation on how to do this on the HTML docs so I was wondering if there is
a trick to this.

Thanks,
Don





Can anyone tell me why the following code returns 0 instead of 3600 seconds?

<?php
$gmttime = gmmktime(1,0,0,1,1,1970);
echo "gmttime  = $gmttime<br>\n";
?>

However, using mktime() for the same date does produce the correct output,
which for my timezone (CST) is 25200 seconds. Furthermore, running this on a
Linux machine with PHP4 produces the correct result for both cases.

I'm using the php4.0.5 release from www.php4win.de along with an Apache
server on Win2K. I was also seeing this bug in a previous php4 stable
release and thought it had been fixed. Perhaps not...

-david







Hello,

This is a sample php code that doesn't work on my workstation.

<?php
$s = eregi_replace ("a(b)c", "A\\1C", "abc");
echo $s;
?>

The ouptut is "A\1Cbc" instead of  "AbC".

Debian Gnu/Linux 2.2
Apache 1.3.14
php 3.0.18 (apache module)

Thanks for your help.

-- 
Alain FORCIOLI
Risc Technology         mailto:[EMAIL PROTECTED]   http://www.risc.fr/
APRIL                   mailto:[EMAIL PROTECTED]      http://www.april.org/




Can you set, in your script, where the files are uploaded so that the
files can be uploaded into a directory that allows you to do a copy.

Keith

On Wed, 14 Mar 2001, Mig wrote:

> Keith Vance wrote:
>
> > You should be able to do something using PHP, try looking here,
> > http://www.php.net/manual/cs/features.file-upload.php
> > I think there is just a communication problem between you and your hosting
> > company. They don't allow ftp uploads, but as long as you are doing it
> > through http, it should work fine. There is also some good stuff about
> > this on http://www.phpbuilder.com. I do it all the time and my hosting
> > company couldn't care less, but your's may be different and you may have
> > to switch or should switch to someone else if you can't get the http
> > upload to work.
> >
> > Keith
>
> Hello Keith, thanks very much. Sorry because I forgot explain following: picture 
>files really are uploaded to host server, because I check temp file and they are ok 
>(I check $userfile_temp variable). My problem is: I can't move, copy, rename or 
>anything else other than 'open and read' this file. Whenever I try exec copy commands 
>I receive 'copy command denied for /web/.....'.
> You know temp files will be deleted when script terminates, so I die with my 
>pictures in hand.
>
> Thanks again
>
> Mig
>
>





Kathleen Ballard wrote:

> Mig,
> This is some code I was sent when I needed to display images that were
> located outside of the web dir.
>
> ~~~~~~~~~~
> If you want the images outside the web-tree, your image tag would be more
> like this:
>
> <IMG SRC=display.php3?imagefile=happy.gif>
>
> Then display.php3 would look not unlike:
>
> <?php
>   header("Content-type: image/gif");
>   header("Content-length: " . filesize("C:/hide/images/$imagefile"));
>   //Caching headers here.
>   //And Content-disposition
>   //And Content-filename
>   //and so on.
>   readfile("C:/hide/images/$imagefile");
> ?>

Hello Kathleen

Thanks very much, I checked your idea and must say it works nice .... with files, but 
when I need pass strings like parameters for PHP program, things become difficult.
I will follow your clever idea, because I know it will work, but first need solve two 
problems (sorry I am newer to PHP and sometimes confused the way PHP treat variables ).

First problem is: how store content of image file (jpg or gif) into MySql BLOB fields?
Mysql  update command uses variable='value' to update (or insert) values. Image data 
has lot of ' " ' and " ' " in between, so I receive 1054 ERROR when trying to pass 
update image='$image', because $image variable expands before sending data to database.

Second problem is:

how to pass later same string $image recovered from MySql to display.php3 program?

In your example, your are passing file name, a very single string that wouldn't cause 
any confusion, but when passing display.php3?stream-image=$image things will become 
hard.

Probably I will need to reopen Mysql database into display.php3 program and so I would 
pass only record number to display.php3, letting this program to search again record.

Anyway, I modified display.php3 program to execute $image = fread(file...) and then 
echo $image, .... and it works fine.., that's to say, it is just question of string 
treatment, and really GD library is not necessary.

Thanks

Miguel






For some reason the number of hits value is not getting replaced [after
incrementing] into the original counter file.

any help would be appreciated. here is the code :
<?php
$cntfile = "count"; // The filename where the number of hits is stored, if
there isnt one then make it & put the number 0 in it
    $rs = fopen ($cntfile, "rw");

    while (!feof($rs)) {
    $cntr = fgets($rs, 4096);
    echo "counter now is $cntr";
    echo "<br>";
    }
    fclose ($rs);
    $wr = fopen ($cntfile, "rw");
      $cntr+=1;
    fputs($wr, $cntr);


    echo $cntr;
    fclose($wr);
    ?>





Check out :

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1501

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1697

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1359

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1552

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1263


Sincerely

      berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 
-----Original Message-----
From: Richard Banks [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 6:17 PM
To: Php-General
Subject: [PHP] newbie problem: Hit counter.


For some reason the number of hits value is not getting replaced [after
incrementing] into the original counter file.

any help would be appreciated. here is the code :
<?php
$cntfile = "count"; // The filename where the number of hits is stored, if
there isnt one then make it & put the number 0 in it
    $rs = fopen ($cntfile, "rw");

    while (!feof($rs)) {
    $cntr = fgets($rs, 4096);
    echo "counter now is $cntr";
    echo "<br>";
    }
    fclose ($rs);
    $wr = fopen ($cntfile, "rw");
      $cntr+=1;
    fputs($wr, $cntr);


    echo $cntr;
    fclose($wr);
    ?>


-- 
PHP General 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]




You could can "forward" posted data the same way if you wanted to. I don't
know what you mean by forwarding. But if you had one script that was a
form and the action was set to a script called action.php and then you
wanted to pass that data to yet another script, you could pass the values
in the url or a session variable or hidden fields in another form.

Keith

On Thu, 15 Mar 2001, Nick Davies wrote:

>
> How do i forward POST data from a php script.  Obviously GET is simple
> (just script.php?$QUERY_STRING) but how does it work with post?
>
>
> Thanks.
>
> Nick.
>
>
> --
> PHP General 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]
>
>







I'm going to use the curl libs. But FYI i was wanting to forward the data
again using post.

On Thu, 15 Mar 2001, Keith Vance wrote:

> You could can "forward" posted data the same way if you wanted to. I don't
> know what you mean by forwarding. But if you had one script that was a
> form and the action was set to a script called action.php and then you
> wanted to pass that data to yet another script, you could pass the values
> in the url or a session variable or hidden fields in another form.
> 
> Keith
> 
> On Thu, 15 Mar 2001, Nick Davies wrote:
> 
> >
> > How do i forward POST data from a php script.  Obviously GET is simple
> > (just script.php?$QUERY_STRING) but how does it work with post?
> >
> >
> > Thanks.
> >
> > Nick.
> >
> >
> > --
> > PHP General 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]
> >
> >
> 
> 
> 





Is is permissions of the Apache process?

> Well, no, I'm not sure... I, personally, am a graphic designer that used to
> program and somehow got suckered into programming again.. however, the person
> in charge of teh server came to this conclusion for us and wether he is righ
> or wrong, we have to face the fact that the exact same code to make the system
> call used to work and now doesn't. There is no error or warning, and it
> happened right around when we sopped running php as a cgi script and started
> running it as an apache mod... ::shrug:: so, what he says makes some degree of
> sense anyway.
>




Hi everyone,
Could any one tell me what is the search engine you always use? Thank.

Calvin





Hi (again).

        Is there a simple was to take post data from a form and create a
query string out of it? 

        Thanks.

        Nick.





PHPLIB http://phplib.netuse.de/  has a Query class in sql_query.inc which is
used in conjunction with the DB_Sql class.
It can be used to create dynamic insert and update queries by assuming that
global variables exist which map onto a paricular tables field.
You basically name the table and it creates the query for you.

You can also use it to create the select part of your sql queries say to
select all the fields from the table, to fill in a form.


The PEAR library (come with PHP install files) may also have something
similiar but I haven't got it at hand to look at.

-Stewart



-----Original Message-----
From: Nick Davies [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 16:32
To: [EMAIL PROTECTED]
Subject: [PHP] POST conversion.



Hi (again).

        Is there a simple was to take post data from a form and create a
query string out of it? 

        Thanks.

        Nick.


-- 
PHP General 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]




alot of times when people ask this question they are sking the quesion because they 
are coding this logically incorrect, Im sure this isnt that case for you though.

<?php

 function make_args()
 {
  global $HTTP_POST_VARS;

  if (isset($HTTP_POST_VARS))
  {
   foreach($HTTP_POST_VARS as $pos=> $val)
    $args[] = "$pos=$val";
   if (isset($args))
    return urlencode('?'. implode('&', $args));
  }
 }

 echo "
 <form method='post' action='$PHP_SELF'>
 <input type='text' name='form_text' value='". @$form_text ."'>

 <input type='submit' name='done' value='Submit'>
 </form>

 <a href='index.php". make_args() ."'>index</a>
 ";

?>


-- 

 Chris Lee
 [EMAIL PROTECTED]


"Nick Davies" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Hi (again).

Is there a simple was to take post data from a form and create a
query string out of it? 

Thanks.

Nick.


-- 
PHP General 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]






One problem is that you call counter "counter" in one location
and call it "counter1" in another location, otherwise, I don't
think many things happen successfully inside of square brackets.
This problem, and general readability can be enhanced by putting
spaces around '=' in your code.

So,try this, it works for me:

$counter = 1;
$tmp="var".$counter;
$arrayname[$tmp] = blah;

>I have tried things like...
>
>$counter=1;
>
>$arrayname[["var".$counter1]];
>$arrayname["var$counter1"];
> 
>...and variations thereof.  Everything I have tried has failed.
>
>PLEASE can someone help??




The problem I have it's an entire story.
First of all, I will tell you that knows a little more about Linux.

I created a chat software with couple php scripts.
The chat it's using MySQL.
I think the chat software is good (not the best one) but first of all is
easier to use than what I saw on the net. I still have to do couple major
improvments to make, that it will make, definitelly the best chat ever
written in php and mysql.
I'm so proud about this chat because till now I tested a lot of chat's
written in php but not even one is like the one I written.

The main problem I have with my chat is that after some use of it, the
server is going very very slowly.
Someone with (256Mb, 800Mhz and just my chat running (Linux also)) told me
that the chat is still doing this stuff.
The problem he told me about it, it's that the httpd (apache) connections
don't close.

I intend to make this chat free like a bird, and also to be improved by
anyone, anyhow but first of all I need to change my chat to work more than 2
days :o).

Can you put my chat on your server and tell me what exactly it's not working
correctly ?

I attached the rar archive.

I would like to anyone who will take 30 min. from his time and test my chat,
and also I will promise him that I will give every version of it if he will
help with his PRECIOUS advice.. :-)
PS: in the tables.txt you have the structure of tables. In chat_intern you
have to set-up the database name, server etc. (In the future I will create a
setup.oho with all the setup infos)

Yours,
Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro

chat.rar





I am looking for good php editors. Currently, i am using PHP coder. It
highlights syntax and checks my syntax. It's also executes my PHP codes. Are
there any editors like that? I just want a editor that highlights my code
and check my syntax.

regards






I think this discussion just took place, try searching the mailing list
archives for "good php editor"

Keith

On Thu, 15 Mar 2001, McShen wrote:

> I am looking for good php editors. Currently, i am using PHP coder. It
> highlights syntax and checks my syntax. It's also executes my PHP codes. Are
> there any editors like that? I just want a editor that highlights my code
> and check my syntax.
>
> regards
>
>
>
> --
> PHP General 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]
>
>





On Fri, 16 Mar 2001 03:24, McShen wrote:
> I am looking for good php editors. Currently, i am using PHP coder. It
> highlights syntax and checks my syntax. It's also executes my PHP
> codes. Are there any editors like that? I just want a editor that
> highlights my code and check my syntax.
>
> regards

Here goes the Editors advocacy war _again_ And wasn't this question asked 
a couple of days ago? And last week? And the week before....

Check the links page http://au2.php.net/links.php (or your favourite 
mirror), scroll down to PHP Scripts and Programs and then follow the link 

PHP Editors List
A comprehensive list of editors you can use to edit PHP programs

It would probably be nice if this were in the FAQ - if anybody ever read 
the FAQ :-)

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




It is there a list of most frequently asked questions?
It seems that people ask the same questions, again and again,
they do not READ THE MANUAL.  Yes I have asked 2 stupid
questions, but I really did search and I am reading my manuals,
the PHP and the book that I bought.


Also I would like to know if there would be a demand for an
experienced mailing list?  I am just frustrated by the same 3
questions that pop up about once a day. The rest of the posts
are great.

Rick
##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:

> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.
> 
> Rick

I once thought a great product for mail lists (would require an admin
interface, PHP?) would be a way to put into the list mail signature a random
FAQ link. 

Fill that particular FAQ with commonly asked questions and have the FAQ sent
out each month to all subscribers. A decent threaded mail reader would make
this reasonably easy (notice I did not say *simple*) to administer.


Example
-- 
Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Example
-- 
Trouble compiling GD?
(http://php.net/common_questions.html?Q=gdrequirements)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.com






askedagain.com/net/org are available.

on 3/15/01 9:17 AM, RBL at [EMAIL PROTECTED] wrote:

> I once thought a great product for mail lists (would require an admin
> interface, PHP?) would be a way to put into the list mail signature a random
> FAQ link. 
> 
> Fill that particular FAQ with commonly asked questions and have the FAQ sent
> out each month to all subscribers. A decent threaded mail reader would make
> this reasonably easy (notice I did not say *simple*) to administer.
> 


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.com






Or what would be more interesting would be some sort of buffer between you
and the list, ie:
you send an email to the list
the listserv picks the 3 best matches to your email from a database of faqs
AND/OR
the listserv picks the 3 best matches to your email from a database of the
list's threads

and sends these to you in an email. Replying to the email sends your
originial query to the list.

mal

-----Original Message-----
From: RBL [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 17:17
To: Rick St Jean; [EMAIL PROTECTED]
Subject: Re: [PHP] FAQ


on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:

> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.
>
> Rick

I once thought a great product for mail lists (would require an admin
interface, PHP?) would be a way to put into the list mail signature a random
FAQ link.

Fill that particular FAQ with commonly asked questions and have the FAQ sent
out each month to all subscribers. A decent threaded mail reader would make
this reasonably easy (notice I did not say *simple*) to administer.


Example
--
Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Example
--
Trouble compiling GD?
(http://php.net/common_questions.html?Q=gdrequirements)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655
[EMAIL PROTECTED]
http://www.rblc.com



--
PHP General 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]





I'd just like to offset my other email by saying that a faq is often no
substitute for the knowledge and experience of this list's members. In a
strange way, the 'dumb' question this list gets proves the a faq can not be
expected to know the right way to answer a query. A list member out there
just might know _exactly_ what you need to solve your problem.

mal

-----Original Message-----
From: RBL [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 17:17
To: Rick St Jean; [EMAIL PROTECTED]
Subject: Re: [PHP] FAQ


on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:

> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.
>
> Rick

I once thought a great product for mail lists (would require an admin
interface, PHP?) would be a way to put into the list mail signature a random
FAQ link.

Fill that particular FAQ with commonly asked questions and have the FAQ sent
out each month to all subscribers. A decent threaded mail reader would make
this reasonably easy (notice I did not say *simple*) to administer.


Example
--
Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Example
--
Trouble compiling GD?
(http://php.net/common_questions.html?Q=gdrequirements)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655
[EMAIL PROTECTED]
http://www.rblc.com



--
PHP General 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]





Cool idea,

I am going to add that to the spec for the mailing list program we are 
working on.
it is relatively simple if you put it there when you are planning the app.

At 09:17 AM 3/15/01 -0800, RBL wrote:
>on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:
>
> > Also I would like to know if there would be a demand for an
> > experienced mailing list?  I am just frustrated by the same 3
> > questions that pop up about once a day. The rest of the posts
> > are great.
> >
> > Rick
>
>I once thought a great product for mail lists (would require an admin
>interface, PHP?) would be a way to put into the list mail signature a random
>FAQ link.
>
>Fill that particular FAQ with commonly asked questions and have the FAQ sent
>out each month to all subscribers. A decent threaded mail reader would make
>this reasonably easy (notice I did not say *simple*) to administer.
>
>
>Example
>--
>Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>Example
>--
>Trouble compiling GD?
>(http://php.net/common_questions.html?Q=gdrequirements)
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>Dave Goodrich
>Director of Interface Development
>Reality Based Learning Company
>9521 NE Willows Road, Suite 100
>Redmond, WA 98052
>Toll Free 1-877-869-6603 ext. 237
>Fax (425) 558-5655
>[EMAIL PROTECTED]
>http://www.rblc.com
>
>
>
>--
>PHP General 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]

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





people wouldnt use an FAQ, when you see three people ask the exact same question on 
one single day, you know they dont read the other post, or care. if they wont read the 
posts on the same day they wont read an FAQ, they keep posting.


-- 

 Chris Lee
 [EMAIL PROTECTED]




""Mal McKay"" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'd just like to offset my other email by saying that a faq is often no
substitute for the knowledge and experience of this list's members. In a
strange way, the 'dumb' question this list gets proves the a faq can not be
expected to know the right way to answer a query. A list member out there
just might know _exactly_ what you need to solve your problem.

mal

-----Original Message-----
From: RBL [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 17:17
To: Rick St Jean; [EMAIL PROTECTED]
Subject: Re: [PHP] FAQ


on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:

> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.
>
> Rick

I once thought a great product for mail lists (would require an admin
interface, PHP?) would be a way to put into the list mail signature a random
FAQ link.

Fill that particular FAQ with commonly asked questions and have the FAQ sent
out each month to all subscribers. A decent threaded mail reader would make
this reasonably easy (notice I did not say *simple*) to administer.


Example
--
Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Example
--
Trouble compiling GD?
(http://php.net/common_questions.html?Q=gdrequirements)

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655
[EMAIL PROTECTED]
http://www.rblc.com



--
PHP General 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]


-- 
PHP General 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]






The problem is that people are lazy or just to stupid to look for stuff.
Sometimes yes, we just miss something small or it is under another section.
I have done it as recently as tuesday with implode.  But this is getting nuts.

I guess I am frustrated because all the lists I am on are filled with lazy 
people
who whine and want someone else to do all their work for them.  PHP is not 
low level
if you need something simple use iHTML.  It is the simplest scripting 
language out there.


I propose that the first few sentances of the signup message should be...

READ THE MANUAL BEFORE POSTING!!!!!!
READ THE MANUAL BEFORE POSTING!!!!!!
READ THE MANUAL BEFORE POSTING!!!!!!
if you are confused about this... READ THE MANUAL BEFORE POSTING!!!!!!

SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
if you doing understand then SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!

Rick


At 10:22 AM 3/15/01 -0600, Chris Lee wrote:
>people wouldnt use an FAQ, when you see three people ask the exact same 
>question on one single day, you know they dont read the other post, or 
>care. if they wont read the posts on the same day they wont read an FAQ, 
>they keep posting.
>
>
>--
>
>  Chris Lee
>  [EMAIL PROTECTED]
>
>
>
>
>""Mal McKay"" <[EMAIL PROTECTED]> wrote in message 
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>I'd just like to offset my other email by saying that a faq is often no
>substitute for the knowledge and experience of this list's members. In a
>strange way, the 'dumb' question this list gets proves the a faq can not be
>expected to know the right way to answer a query. A list member out there
>just might know _exactly_ what you need to solve your problem.
>
>mal
>
>-----Original Message-----
>From: RBL [mailto:[EMAIL PROTECTED]]
>Sent: 15 March 2001 17:17
>To: Rick St Jean; [EMAIL PROTECTED]
>Subject: Re: [PHP] FAQ
>
>
>on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:
>
> > Also I would like to know if there would be a demand for an
> > experienced mailing list?  I am just frustrated by the same 3
> > questions that pop up about once a day. The rest of the posts
> > are great.
> >
> > Rick
>
>I once thought a great product for mail lists (would require an admin
>interface, PHP?) would be a way to put into the list mail signature a random
>FAQ link.
>
>Fill that particular FAQ with commonly asked questions and have the FAQ sent
>out each month to all subscribers. A decent threaded mail reader would make
>this reasonably easy (notice I did not say *simple*) to administer.
>
>
>Example
>--
>Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>Example
>--
>Trouble compiling GD?
>(http://php.net/common_questions.html?Q=gdrequirements)
>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>Dave Goodrich
>Director of Interface Development
>Reality Based Learning Company
>9521 NE Willows Road, Suite 100
>Redmond, WA 98052
>Toll Free 1-877-869-6603 ext. 237
>Fax (425) 558-5655
>[EMAIL PROTECTED]
>http://www.rblc.com
>
>
>
>--
>PHP General 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]
>
>
>--
>PHP General 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]
>
>
>
>--
>PHP General 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]

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





This is _and_ was _and_ ever shall be the state of mailing lists that help
people.
In the years that I have been on mailing lists, I have never seen a high
volume list that wasnt
filled with request after request for common knowledge.

The problem is not stopping people from asking the same manual Q's over and
over , it's actually taking/assisting the burden
off of the people that answer the Q's.

Thus we get a moderated list....

> The problem is that people are lazy or just to stupid to look for stuff.
> Sometimes yes, we just miss something small or it is under another
section.
> I have done it as recently as tuesday with implode.  But this is getting
nuts.
> I guess I am frustrated because all the lists I am on are filled with lazy
> people
> who whine and want someone else to do all their work for them.  PHP is not

take it easy,

christopher





On Thu, Mar 15, 2001 at 01:40:43PM -0500, Rick St Jean wrote:

> READ THE MANUAL BEFORE POSTING!!!!!!
> READ THE MANUAL BEFORE POSTING!!!!!!
> READ THE MANUAL BEFORE POSTING!!!!!!
> if you are confused about this... READ THE MANUAL BEFORE POSTING!!!!!!

Which manual? BTW your posting looks like you don't know anything about
quoting rules in mailing lists.

-Egon

-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
http://www.php-buch.de/




On Fri, 16 Mar 2001 03:34, Rick St Jean wrote:
> It is there a list of most frequently asked questions?
> It seems that people ask the same questions, again and again,
> they do not READ THE MANUAL.  Yes I have asked 2 stupid
> questions, but I really did search and I am reading my manuals,
> the PHP and the book that I bought.

Seems to me that a significant number of questions arise from people who 
don't have any idea of the concepts behind 'programming', if I may 
overload that term. 'How do I make a loop work' 'How can I print the 
numbers 1 to 5'.

> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.

As has been noted before, there is little purpose in splitting the list 
like that. If the 'newbies' all go to the 'inexperienced' list, from 
whence do they gain wisdom? And then the 'newbies' learnn about the 
'experienced' list and go there and we're back to square one. :-)

Check the archives for _extended_ discussion on that topic.


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




How many times are people going to complain about no-brainer questions
being posted to the list. The fact of the matter is people are going to
post things on the list without reading the manual or the FAQ. It goes
with the territory. It annoys me too, but there is no good solution for
the problem. There is the fact that a lot of people are new and don't
really know where to go to find answers. Even if they go to the web site,
they still may not know that they need to be looking for information on
naming variables with variables or that fopen opens a file or whatever.


K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Fri, 16 Mar 2001, David Robley wrote:

> On Fri, 16 Mar 2001 03:34, Rick St Jean wrote:
> > It is there a list of most frequently asked questions?
> > It seems that people ask the same questions, again and again,
> > they do not READ THE MANUAL.  Yes I have asked 2 stupid
> > questions, but I really did search and I am reading my manuals,
> > the PHP and the book that I bought.
>
> Seems to me that a significant number of questions arise from people who
> don't have any idea of the concepts behind 'programming', if I may
> overload that term. 'How do I make a loop work' 'How can I print the
> numbers 1 to 5'.
>
> > Also I would like to know if there would be a demand for an
> > experienced mailing list?  I am just frustrated by the same 3
> > questions that pop up about once a day. The rest of the posts
> > are great.
>
> As has been noted before, there is little purpose in splitting the list
> like that. If the 'newbies' all go to the 'inexperienced' list, from
> whence do they gain wisdom? And then the 'newbies' learnn about the
> 'experienced' list and go there and we're back to square one. :-)
>
> Check the archives for _extended_ discussion on that topic.
>
>
> --
> David Robley                        | WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet                            | http://auseinet.flinders.edu.au/
>             Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General 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]
>
>





Just something I notices...
At the bottom of the page there is a link to the mailing list (well, not
directly to the list, but anywho):
PHP General Mailing List (http://www.php.net/)

Why not add this aswell:
Before posting, check the PHP Generall Mailing List Archive
(http://marc.theaimsgroup.com/?l=php-general)

I like this one better than the manual to search for problems similar to the
ones I have...

// Tobias Talltorp

"Rick St Jean" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> It is there a list of most frequently asked questions?
> It seems that people ask the same questions, again and again,
> they do not READ THE MANUAL.  Yes I have asked 2 stupid
> questions, but I really did search and I am reading my manuals,
> the PHP and the book that I bought.
>
>
> Also I would like to know if there would be a demand for an
> experienced mailing list?  I am just frustrated by the same 3
> questions that pop up about once a day. The rest of the posts
> are great.
>
> Rick
> ##########################################################
> #  Rick St Jean,
> #  [EMAIL PROTECTED]
> #  President of Design Shark,
> #  http://www.designshark.com/
> #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> #  Tel: 905-684-2952
> ##########################################################
>
>
> --
> PHP General 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]
>






> How many times are people going to complain about no-brainer questions
> being posted to the list. The fact of the matter is people are going to
> post things on the list without reading the manual or the FAQ. It goes
> with the territory. It annoys me too, but there is no good solution for
> the problem. There is the fact that a lot of people are new and don't
> really know where to go to find answers. Even if they go to the web site,
> they still may not know that they need to be looking for information on
> naming variables with variables or that fopen opens a file or whatever.
>
> K E I T H  V A N C E

I think the argument has less to do with people asking questions about PHP
and how it works, and more about people asking basica programming questions
without knowing it.  Fundamental programming concepts, like the scope of a
variable, passing by reference or by value, or even looping are things
newbie's simply do not understand.  Why?  Because they don't know they need
to learn the concepts and theories of programming before learning to
program.  It sounds odd, but that is the way it is.

People asking questions about how a loop works are not usually asking how a
PHP loop works.  The same for arrays.  They are really saying: "This is the
first real programming language I am out to learn, and I don't understand
the concept behind a For/Next Loop."  This isn't a bad thing, heck, we were
all newbies at one point, and in a sense, we are all newbies at something.

I think the argument is that their are many people who don't want to learn
how and why a For/Next Loop works, but instead simply want someone to fix
the problem for them.  That isn't programming.  Programming (and yes, I
know, PHP is technically a scripting language, but lets not jump that fence
as well) is about trial and error, logic, and creativity, but most
importantly, problem solving.  Most of the newbies get into PHP expecting a
tutorial on every topic.  If they can't find a tutorial on how to print out
5 numbers, they expect someone to show them how to do it.  They don't try
and solve the problem themselves, and that is a problem.  I don't mind
assisting where I can, however, I don't like rewriting a script for someone
when they don't even take the time to try and learn the fundamentals.  Most
newbies I have met fall into two categories.  The majority start out wanting
to learn PHP because someone said it was easy to learn, which it is, from a
programmers point of view.  However, when in the second week of learning
their first programming language they can't program that PHP Database
Content Management System with Instant Yahoo News Retrival complete with
User Database, Forums, and Real Time Foo, they start getting upset and say
that PHP sucks.  Those same people may also complain because they can't find
a tutorial on how to create a Forum Database, and all they can find are
tutorials on the basics of Database Design.

I think this is the real problem.  Try to run before they have learned to
crawl and walk.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.






Ye 2001-03-15 20:11 -0800, Jason Lotito skribis:

(someone)
> > How many times are people going to complain about no-brainer questions
> > being posted to the list. The fact of the matter is people are going to
> > post things on the list without reading the manual or the FAQ. It goes
> > with the territory. It annoys me too, but there is no good solution for
> > the problem. There is the fact that a lot of people are new and don't

There is a single solution.  Instantly delete the message.

If you want to flame lamers and delete all followups, that is fine,
too.

What is not fine is to let the response become itself a subject of
discussion. (All this is IMHO).

> > really know where to go to find answers. Even if they go to the web site,
> > they still may not know that they need to be looking for information on
> > naming variables with variables or that fopen opens a file or whatever.

That is why it is preferable to simply delete rather than flame.  But
if they evidently have made nil effort they probably should attract
flames.

It is not your job to educate people who are nowhere near ready to
understand the matter but are simply attracted to what is newsy, or
reputed to be profitable.

I recently saw a message from a "Linux Systems Engineer" who had
upgraded to the Linux 2.4.2 kernel without a clue about the need to
upgrade other software and instead was pleading to the wide world to
help him, although the "Changes" file has been in the Linux kernel
distribution for years.  Don't help idiot imposters.

There are certain things that people need help on.  Typically they are
cases where the development has outrun the documentation, or the
documentation is very bad, written by and for those who already know
the answers.  If you have worked out the solution to the problem,
please share it.  But there is an assumption that you have some kind
of obligation to help lamers, that that is what mailing lists and
newsgroups are for.  It is totally false.

> >
> > K E I T H  V A N C E
> 
> I think the argument has less to do with people asking questions about PHP
> and how it works, and more about people asking basica programming questions
> without knowing it.  Fundamental programming concepts, like the scope of a
> variable, passing by reference or by value, or even looping are things
> newbie's simply do not understand.  Why?  Because they don't know they need
> to learn the concepts and theories of programming before learning to
> program.  It sounds odd, but that is the way it is.
> 
> People asking questions about how a loop works are not usually asking how a
> PHP loop works.  The same for arrays.  They are really saying: "This is the
> first real programming language I am out to learn, and I don't understand
> the concept behind a For/Next Loop."  This isn't a bad thing, heck, we were
> all newbies at one point, and in a sense, we are all newbies at something.

But we don't decide to waste the time and resources of everyone else
to save ourselves the effort of looking into the matter.  It is not
good enough to say, I am a newbie, and therefore I have the right to
waste the time and resources of others, because they were newbies once
or are newbies about something.  If it is not in the PHP documentation
because it is not PHP-specific, ignore the question.  If it IS in the
PHP documentation, ignore the question.

It is definitely a bad thing, strategically destructive of the utility
of mailing lists and newsgroups, which over the last five years has
caused observable degradation of the Internet culture, to help such
lamers.

It is definitely a bad thing to help out people who have never entered
the computer section of a bookshop, are not interested in computer
programming but want to set up commercial PHP sites.

It is definitely a bad thing to help out people who cannot learn
without a helper and so ask passers-by to, for no fee, teach them
highly technical matters, who think you are there waiting to be made a
convenience of, that asking questions of strangers on line is a
complete substitute for studying the matter.

It is a long time since I saw a response saying simply, "RTFM".  I
should be seeing it much, much, much more.

If I ask a question on line and am ignored, I usually continue to
study the matter, and sometimes become embarrassed about having asked
such a dumb question.  It is actually positively helpful to fail to
answer questions.  Probably, conversely, if is positively unhelpful to
answer questions where the documentation is reasonable, as it
certainly is re the separate PHP statements.  You are not doing people
a favor by becoming their crutch.

> I think the argument is that their are many people who don't want to learn
> how and why a For/Next Loop works, but instead simply want someone to fix
> the problem for them.  That isn't programming.  Programming (and yes, I

Yes.

> know, PHP is technically a scripting language, but lets not jump that fence
> as well) is about trial and error, logic, and creativity, but most
> importantly, problem solving.  Most of the newbies get into PHP expecting a
> tutorial on every topic.  If they can't find a tutorial on how to print out
> 5 numbers, they expect someone to show them how to do it.  They don't try
> and solve the problem themselves, and that is a problem.  I don't mind

Yes.

> assisting where I can, however, I don't like rewriting a script for someone
> when they don't even take the time to try and learn the fundamentals.  Most

Yes.

> newbies I have met fall into two categories.  The majority start out wanting
> to learn PHP because someone said it was easy to learn, which it is, from a
> programmers point of view.  However, when in the second week of learning
> their first programming language they can't program that PHP Database
> Content Management System with Instant Yahoo News Retrival complete with
> User Database, Forums, and Real Time Foo, they start getting upset and say
> that PHP sucks.  Those same people may also complain because they can't find
> a tutorial on how to create a Forum Database, and all they can find are
> tutorials on the basics of Database Design.

Yes.  Well put.

> I think this is the real problem.

Only if you turn it into a problem.  Ignore them.

Michael Talbot-Wilson






What is faster for a chat php software ?
To use a file for write or to use a MySQL database ?

Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro 




I would guess that file access is faster, try it out. write a simple app that will 
write data to a file, close it, open it write it etc. compare this to same on a db. 
every computer every server is differnet, test to see what is fast on your system. 
thats ultimitly the most importnat no? that it runs fast on *your* system not someones 
in nowheres land.

A db I think would be easier to access, search, etc. I think personally I would use a 
db. just for convienince sake. lets say on your chat program a user want to ignore 
'updatelee' with a db your looking at a simple select statment, in a file, oi, 
headache.


-- 

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]





""Marian Vasile"" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What is faster for a chat php software ?
To use a file for write or to use a MySQL database ?

Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro 

-- 
PHP General 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]







anyone know were can i have information on how is structured the php C source
code, i was poking around but it is very confusing, and lot of files, the
things i would like to know is just a simple description on how php reads,
parses, and executes php code, when reading from apache or from command line,
what functions are called etc, is there any info about it?! or i'll have to dig
it out myself?!

               Rui Barreiros
          Software Developer

WEBSOLUT - Soluções Internet
Emailto: [EMAIL PROTECTED] 
Personal Info: http://websolut.net/people/rui.html

As informações contidas neste email são confidenciais
e destinam-se apenas à(s) pessoa(s) a quem foi enviado:
http://websolut.net/confidencialidade-responsabilidade.html





The javascript syntax is 

document.form_name.elements['preq[]'][indx]

-Stewart


-----Original Message-----
From: Adv. Systems Design [mailto:[EMAIL PROTECTED]]
Sent: 15 March 2001 15:39
To: PHP List
Subject: [PHP-DB] validating checkboxes


Hello all:

I have to validate that AT LEAST ONE checkbox is
checked in a series of checkboxes...the checkboxes all
use the name=preq[] so that when I process it, it will
go into a php array...the problem is that I want to
validate it using javascript and the [] in the object
name (preq[]) causes problems in traversing the
checkbox values to check if they are =true!!

Any ideas? Validating on the PHP side is not an option
because this page is part of a series of pages and I
encounter the dreaded "post operation reload" problem
if the user has to hit the back button.

Thanks 

Luis

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

-- 
PHP Database 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]




Hello, PHP-type folks.

I'm attempting to parse up search parameters from a user-inputted form into
something I can build a query with.  For example, given the string
"\"grizzly bear\" or tiger and carnivorous mammal", I'd like to split it
into an array like this:

array[0] = array("'grizzly bear'", "badger")
array[1] = "mammal"
array[2] = "carnivorous"

so that ANDed values (explicitely with "and" keyword or implicitely with
whitespace) are separate entries in the main array, with ORed values
together in sub-arrays, preserving double-quoted phrases without ANDing them
and replacing the double-quotes with single quotes.

Quite a mess, I know, and I'm getting knowwhere with my limited regular
expression experience.  Splitting up AND and OR blocks is easy enough with
simple strings "owl and screech or pygmy" but this preservation of quoted
phrases is killing me.  Any help would be appreciated.

Thanks,


Justin Smith
New Mexico Natural Heritage Program
University of New Mexico
Department of Biology
167 Castetter Hall
Albuquerque, New Mexico 87131
505-277-3822 x226
505-277-3844 (fax)
[EMAIL PROTECTED]





If I have a cookie request in a function, and check the value of a
cookie, I get that there is no value, if I check for the value outside
of the function,  I see the value.

What should I do to ?  ( SAMPLE BELOW )

function f_check_security() {
# $c_uas_time is the cookie I want the value of
        if(isset($c_uas_time)) {
#  I tried the above way to just check that it is there, then I tried
the below to check the value
#       if($c_uas_time=="GREEN") {
                        $access="GRANT";

setcookie("c_uas_time","GREEN",(time()+200),'/','domainname.com',0);

                } else {
                        $access="DENY-GREEN";
                }

return($access);
}

I also tried this below to try and get the value ....
echo "HTTP->" . $HTTP_COOKIE_VARS["c_uas_time"];

I appreciate your time....and look forward to stop banging my head
against the wall....    8^)

___________________________________________________________
Jack Sasportas






just looking at what you said quickly, what about scope? if i can't
access something inside a function, its usually because i haven't
declared it global...does this not apply to cookies?

jack

Jack Sasportas wrote:
> 
> If I have a cookie request in a function, and check the value of a
> cookie, I get that there is no value, if I check for the value outside
> of the function,  I see the value.
> 
> What should I do to ?  ( SAMPLE BELOW )
> 
> function f_check_security() {
> # $c_uas_time is the cookie I want the value of
>         if(isset($c_uas_time)) {
> #  I tried the above way to just check that it is there, then I tried
> the below to check the value
> #       if($c_uas_time=="GREEN") {
>                         $access="GRANT";
> 
> setcookie("c_uas_time","GREEN",(time()+200),'/','domainname.com',0);
> 
>                 } else {
>                         $access="DENY-GREEN";
>                 }
> 
> return($access);
> }
> 
> I also tried this below to try and get the value ....
> echo "HTTP->" . $HTTP_COOKIE_VARS["c_uas_time"];
> 
> I appreciate your time....and look forward to stop banging my head
> against the wall....    8^)
> 
> ___________________________________________________________
> Jack Sasportas
> 
> --
> PHP General 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]




ok, this is what you asked for

<?php

 function depth()
 {
  global $PHP_SELF;

  $count = count_chars($PHP_SELF);

  for($c = 0; $c < $count[ord('/')]; $c++)
   $return[] = "..";

  if (isset($return))
   return implode('/', $return);
 }

 echo "
 <img src='". depth() ."/image/back.gif'>
 ";
?>

but why cant you just do this.

    echo "
    <img src='/image/back.gif'>
    ";


-- 

 Chris Lee
 [EMAIL PROTECTED]




"Harshdeep S Jawanda" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Hi all,

To explain my problem, I'll have to draw a directory structure (please
bear with me :-):

  <web-server-document-root>
    |
    +--<dir:common-pics>
    |
    +--<dir:sub-dir1>
    |    |
    |    +--<dir:sub-sub-dir1>
    |
    +--<dir:sub-dir2>
         |
         +--<dir:sub-sub-dir2>
         |    |
         |    +--<dir:sub-sub-sub-dir1>
         |
         +--<dir:sub-sub-dir3>

The directory <common-pics> contains some pictures that will be common
to the whole site. I want to use purely relative links, of the form
../../../<common-pics>/pic1.gif (for files in the directory
<sub-sub-sub-dir1>), to link to these common images (this link will be
../../<common-pics>/pic1.gif for <sub-sub-dir1>, <sub-sub-dir2> and
<sub-sub-dir3> etc.).

How can I (essentially) determine the depth of a document wrt the
document root? Basically, I want to have a funtion (say, findDepth())
that I can use to write out my image tags in the following form:

  <img src="<?echo findDepth();?>/<common-pics>/pic1.gif">

which will produce the correct number of double-dot-slash (../)
strings.

What help can PHP offer me - i.e., how can I write my hypothetical
findDepth() function? Please help!!

COROLLARY 1:

  If the hypothetical function findDepth() returns the appropriate
  string, does it _need_ to be echoed or will just putting
  <?findDepth();?> in the correct place work?

Thanks!

-- 
Regards,
Harshdeep Singh Jawanda.


-- 
PHP General 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]






I have 3 situations and I need an answer about what is faster...

1. A PHP script that it's executed 10 times in a second, and have to update
a a MySQL table.
1. A PERL script that it's executed 10 times in a second, and have to update
a a MySQL table.
1. An servlet(JSP) script that it's executed 10 times in a second, and have
to update a MySQL table.

Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro





try it. everyone will get a differnet answer, the only way we could tell would be to 
write three scripts and time them, you write three scripts and time it and you will 
get different results then us.


-- 

 Chris Lee
 [EMAIL PROTECTED]



""Marian Vasile"" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have 3 situations and I need an answer about what is faster...

1. A PHP script that it's executed 10 times in a second, and have to update
a a MySQL table.
1. A PERL script that it's executed 10 times in a second, and have to update
a a MySQL table.
1. An servlet(JSP) script that it's executed 10 times in a second, and have
to update a MySQL table.

Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro


-- 
PHP General 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]






You know I personnaly speak 3 language, French, English and Spanish.
If you ask me to write a 3 page document, I would do it in french because
I am more comfortable with it. I believe you should base your solutions on
the language you and your team is comfortable with. You will end up with
better code, code that is easier to modify and code that is probably faster
no matter what technology you use.

Pierre-Yves

----- Original Message -----
From: Marian Vasile <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 5:59 PM
Subject: [PHP] 3 situations - PHP Power or... servlet(JSP) power ?


> I have 3 situations and I need an answer about what is faster...
>
> 1. A PHP script that it's executed 10 times in a second, and have to
update
> a a MySQL table.
> 1. A PERL script that it's executed 10 times in a second, and have to
update
> a a MySQL table.
> 1. An servlet(JSP) script that it's executed 10 times in a second, and
have
> to update a MySQL table.
>
> Marian Vasile
> IT Manager
> Schnecker van Wyk & Pearson
> www.investments.ro
>
>
> --
> PHP General 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]
>





On Thu, 15 Mar 2001 19:59:50 +0200, Marian Vasile
([EMAIL PROTECTED]) wrote:
>I have 3 situations and I need an answer about what is faster...
>
>1. A PHP script that it's executed 10 times in a second, and have to
>update
>a a MySQL table.
>1. A PERL script that it's executed 10 times in a second, and have
>to update
>a a MySQL table.
>1. An servlet(JSP) script that it's executed 10 times in a second,
>and have
>to update a MySQL table.

it depends on many things, but in general I'd say the first two are
about the same and the third is about 3-4 times slower.





I don't think that JSP is slower than PHP... really...
In fact I think JSP is a lot more faster just because JSP is compiled than
executed...

Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro

-----Original Message-----
From: Mark Maggelet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 9:11 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] 3 situations - PHP Power or... servlet(JSP) power ?


On Thu, 15 Mar 2001 19:59:50 +0200, Marian Vasile
([EMAIL PROTECTED]) wrote:
>I have 3 situations and I need an answer about what is faster...
>
>1. A PHP script that it's executed 10 times in a second, and have to
>update
>a a MySQL table.
>1. A PERL script that it's executed 10 times in a second, and have
>to update
>a a MySQL table.
>1. An servlet(JSP) script that it's executed 10 times in a second,
>and have
>to update a MySQL table.

it depends on many things, but in general I'd say the first two are
about the same and the third is about 3-4 times slower.


--
PHP General 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]





Agreed.  I think that JSP in some cases would be faster because the JVM is
always running.  Really depends on the structure of the code and what's it's
doing.
The first time a JSP is run it'll compile, so it's slow, but after compilation
exists
its fine.

If you're doing database stuff, that'll probably be the bottleneck anyway.


Marian Vasile wrote:

> I don't think that JSP is slower than PHP... really...
> In fact I think JSP is a lot more faster just because JSP is compiled than
> executed...
>
> Marian Vasile
> IT Manager
> Schnecker van Wyk & Pearson
> www.investments.ro
>
> -----Original Message-----
> From: Mark Maggelet [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 9:11 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] 3 situations - PHP Power or... servlet(JSP) power ?
>
> On Thu, 15 Mar 2001 19:59:50 +0200, Marian Vasile
> ([EMAIL PROTECTED]) wrote:
> >I have 3 situations and I need an answer about what is faster...
> >
> >1. A PHP script that it's executed 10 times in a second, and have to
> >update
> >a a MySQL table.
> >1. A PERL script that it's executed 10 times in a second, and have
> >to update
> >a a MySQL table.
> >1. An servlet(JSP) script that it's executed 10 times in a second,
> >and have
> >to update a MySQL table.
>
> it depends on many things, but in general I'd say the first two are
> about the same and the third is about 3-4 times slower.
>
> --
> PHP General 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]
>
> --
> PHP General 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]

Marian Vasile wrote:

> I don't think that JSP is slower than PHP... really...
> In fact I think JSP is a lot more faster just because JSP is compiled than
> executed...
>
> Marian Vasile
> IT Manager
> Schnecker van Wyk & Pearson
> www.investments.ro





On Thu, 15 Mar 2001 21:36:52 +0200, Marian Vasile ([EMAIL PROTECTED])
wrote:
>I don't think that JSP is slower than PHP... really...
>In fact I think JSP is a lot more faster just because JSP is
>compiled than
>executed...

So is php. Java has some strengths, but speed is definitely not one
of them.

>Marian Vasile
>IT Manager
>Schnecker van Wyk & Pearson
>www.investments.ro
>
>-----Original Message-----
>From: Mark Maggelet [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, March 15, 2001 9:11 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: Re: [PHP] 3 situations - PHP Power or... servlet(JSP) power
>?
>
>
>On Thu, 15 Mar 2001 19:59:50 +0200, Marian Vasile
>([EMAIL PROTECTED]) wrote:
>>I have 3 situations and I need an answer about what is faster...
>>
>>1. A PHP script that it's executed 10 times in a second, and have
to
>>update
>>a a MySQL table.
>>1. A PERL script that it's executed 10 times in a second, and have
>>to update
>>a a MySQL table.
>>1. An servlet(JSP) script that it's executed 10 times in a second,
>>and have
>>to update a MySQL table.
>
>it depends on many things, but in general I'd say the first two are
>about the same and the third is about 3-4 times slower.
>
>
>--
>PHP General 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: php-list-
>[EMAIL PROTECTED]
>
>
>--
>PHP General 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: php-list-
>[EMAIL PROTECTED]






this works for me

<?
 include_once('cookie.egn');
 include_once('database.egn');

 function bad_passwd()
 {
  echo "You have entered an invalid password.<br>\n";
  exit();
 }

 if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r = 
fetch_db_value('people_manager', "WHERE username = '$PHP_AUTH_USER' AND password = 
'$PHP_AUTH_PW' ") )
  $SessionID = $peop_r['peopleID'];
 else
 {
  Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
  Header("HTTP/1.0 401 Unauthorized");
  bad_passwd();
 }
?>


-- 

 Chris Lee
 [EMAIL PROTECTED]





""Christian Boesch"" <[EMAIL PROTECTED]> wrote in message 
016a01c0ad3a$af9bddf0$ae66aac1@cbook">news:016a01c0ad3a$af9bddf0$ae66aac1@cbook...
hi
i want to protect a page (lets say its name is test.php) with
authentication.
therefore i included auth.php as follows:

test.php:
<?php
include "mysql.inc.php";    //open database link
include "auth.php";
authentication();
.....?>

this is auth.php:

<?php
function authentication()
{
  if(!isset($PHP_AUTH_USER))
  {
    Header("WWW-Authenticate: Basic realm=\"test Realm\"");
    Header("HTTP/1.0 401 Unauthorized");
    echo "you canceled the authentication, access denied\n";
    exit;
  }
  else
  {
    $query="select * from users where user='$PHP_AUTH_USER' and
pass='$PHP_AUTH_PW'";
    $result = mysql_query($query,$link);
    $num = mysql_numrows($result);
    if($num==1)
    {
 return;
    }
    else
    {
      echo "wrong user or password";
      exit;
    }
  }
}
?>

the problem is that when i want to open test.php i get the authentication
box, then i enter username and password
and then i get again this box. i can enter the user and passwd 3 times, then
i get the error message "you canceled
the authentication" form my auth.php function.
but when i copy the source code from auth.php to a new file without as
function {} and substitute the return with echo "hi";
it works.
has anyone an idea.
thanks
chris


-- 
PHP General 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]






simple answer dont use .htaccess. anser your looking for, keep the username / password 
the same as your login as htaccess and use php's http authentication to login the 
first time. 

<?
 include_once('cookie.egn');
 include_once('database.egn');

 function bad_passwd()
 {
  echo "You have entered an invalid password.<br>\n";
  exit();
 }

 if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r = 
fetch_db_value('people_manager', "WHERE username = '$PHP_AUTH_USER' AND password = 
'$PHP_AUTH_PW' ") )
  $SessionID = $peop_r['peopleID'];
 else
 {
  Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
  Header("HTTP/1.0 401 Unauthorized");
  bad_passwd();
 }
?>


-- 

 Chris Lee
 [EMAIL PROTECTED]




"Holger Rothaug" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!

I want to have an own user authentification based on a mysql-DB connect.
Afterwards I link the user to the specific directory, the user has been
authentified for. 
This user-specific directory is secured by an .htaccess file and therefor a
authentification window sent by the web server pops up to ask for the login
again.

Is there a way to prevent the 2. window to appear? Can I set the environment
variables manually after my own (first) user authetification?

Any help is appreciated.

Holger




-- 
PHP General 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]






I believe the school does run *nix servers.
I tried changing the permissions for the directory so that everyone (and
their brother) has read write and execute permission, but I still get all the
errors.  Is there any other ideas that I can try?

Christian Reiniger wrote:

> On Thursday 15 March 2001 07:50, you wrote:
>
> > file. In qa.php3 I have the following line which seems to create a file
> > if it does not exist:
> > $answerFile = "$questionFileName-A.txt";  Then I go along and open this
> > later with $wa=fopen("$answerFile","a");
> > In problem shooting I tried uploading a blank file with the name
> > $questionFileName-A.txt and it worked just fine after that, but that
> > will not work for my long term goals  On my home computer with win98,
>
> Ok, Assuming that your school server is an *nix system I think I know the
> solution.
>
> Apparently fopen () works fine if you just append to an existing file,
> but fails if it has to create a new file. So - do you have write
> permissions for the directory you place the file in (creating a file
> means modifying (i.e. writing to) the directory) ?
>
> > To get around this, I supose I need a few lines of code that first test
> > if my file exist and then if it doesn't I will have to create it using
> > the touch command??  Any other ideas?
>
> If I'm right this won't work as well.
>
> --
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
>
> Pretty cool, the kind of power information technology puts in our hands
> these days.
>
> - Securityfocus on probing 36000000 hosts for known problems in 3 weeks
>
> --
> PHP General 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]





I think im not understandting, because your asking a simple question.

<?php

    if ($logged_in)
        include_once('file_where_html_is.html');

?>


-- 

 Chris Lee
 [EMAIL PROTECTED]


<[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Morning,
I have a section of HTML that Is added to a page if a user logs in successfully.
Itis about 30 lines long, and I have included it in each page. What I would like
to do, is to have the HTML on a seperate file, and have the PHP call it if and
when a user logs in.
Is this possible?

Tris...





**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**********************************************************************

-- 
PHP General 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]






I have one script on PHP for uploading files on ftp server.
This source code downloaded from PHP manual help (upload files)
His work not correctable. If i changed Text files for uploading on ftp
server it's work all right . if i changed Binary files to uploading (for
example logo.gif) it's don't work!
Php reporting "Ftp upload has failed!". And in temporary variables
$source_file have got "none".
This is problem with Binnary mode and ASCII mode uploading.
What's problem? I don't understand.
Source code attach with this message.


begin 666 upload.phtml
M/#]P:' -"B\O('-E="!U<"!B87-I8R!C;VYN96-T:6]N#0IR97%U:7)E*")U
M<V5R8V9G+G!H<"(I.PT*)&9T<%]S97)V97(])&9T<'-E<G9E<CL-"B1F='!?
M=7-E<E]N86UE/21L;V=I;CL-"B1F='!?=7-E<E]P87-S/21P87-S=V]R9#L-
M"B1S;W5R8V5?9FEL93TD=7-E<F9I;&4[#0HD9&5S=&EN871I;VY?9FEL93TB
M82YT>'0B.PT*)&QO8V%T:6]N/21L;V=O.PT*)&-O;FY?:60@/2!F='!?8V]N
M;F5C="@B)&9T<%]S97)V97(B*3L@#0H-"B\O(&QO9VEN('=I=&@@=7-E<FYA
M;64@86YD('!A<W-W;W)D#0HD;&]G:6Y?<F5S=6QT(#T@9G1P7VQO9VEN*"1C
M;VYN7VED+" B)&9T<%]U<V5R7VYA;64B+" B)&9T<%]U<V5R7W!A<W,B*3L@
M#0H-"B\O(&-H96-K(&-O;FYE8W1I;VX-"FEF("@H(21C;VYN7VED*2!\?" H
M(21L;V=I;E]R97-U;'0I*2![( T*(" @(" @("!E8VAO(")&=' @8V]N;F5C
M=&EO;B!H87,@9F%I;&5D(2([#0H@(" @(" @(&5C:&\@(D%T=&5M<'1E9"!T
M;R!C;VYN96-T('1O("1F='!?<V5R=F5R(&9O<B!U<V5R("1F='!?=7-E<E]N
M86UE(CL@#0H@(" @(" @(&1I93L@#0H@(" @?2!E;'-E('L-"B @(" @(" @
M96-H;R B0V]N;F5C=&5D('1O("1F='!?<V5R=F5R+"!F;W(@=7-E<B D9G1P
M7W5S97)?;F%M92([#0H@(" @?0T*#0HO+R!U<&QO860@=&AE(&9I;&4-"F5C
M:&\@(G5P;&]A9&5D(&9I;&4Z("1S;W5R8V5?9FEL92([#0HD=7!L;V%D(#T@
M9G1P7W!U="@D8V]N;E]I9"P@(B1D97-T:6YA=&EO;E]F:6QE(BP@(B1S;W5R
M8V5?9FEL92(L($944%]"24Y!4EDI.R -"@T*+R\@8VAE8VL@=7!L;V%D('-T
M871U<PT*:68@*"$D=7!L;V%D*2![( T*(" @(" @("!E8VAO(")&=' @=7!L
M;V%D(&AA<R!F86EL960A(#QB<CXD<V]U<F-E7V9I;&4@=&\@)&9T<%]S97)V
M97(@87,@)&1E<W1I;F%T:6]N7V9I;&4B.PT*(" @('T@96QS92![#0H@(" @
M(" @(&5C:&\@(E5P;&]A9&5D("1S;W5R8V5?9FEL92!T;R D9G1P7W-E<G9E
M<B!A<R D9&5S=&EN871I;VY?9FEL92([#0H@(" @?0T*#0HO+R!C;&]S92!T
M:&4@1E10('-T<F5A;2 -"F9T<%]Q=6ET*"1C;VYN7VED*3L@#0H_/@T*(" @
$(" -"@``
`
end





this question was answered be me only two days ago. it would be nice to see people 
checking before they post.

<?php

 $db = mysql_connect('localhost', 'root', '*****');
 mysql_select_db('indywebdesign', $db);

 $query = 'SELECT * FROM invoices WHERE customerid = $id ORDER BY invoiceid DESC';
 $invoices_result = mysql_query($query);
 
 while($result = mysql_fetch_array($invoices_result))
  $invoices[] = $result;

?>


-- 

 Chris Lee
 [EMAIL PROTECTED]


""WreckRman2"" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am having problems figuring out how to loop to show more then one
record... Any help would be great... All I can get is the first record...

Thanks...

Code:

<?php

$db = mysql_connect("localhost", "root", "*****");
mysql_select_db("indywebdesign",$db);

$invoices_result = mysql_query("select * from invoices WHERE customerid=$id
ORDER BY invoiceid DESC");
$invoices = mysql_fetch_array($invoices_result);

?>

<TR>
    <TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo
$invoices["date"] ?></FONT></TD>
    <TD BGCOLOR="#EAEAEA"><FONT FACE="Tahoma" SIZE="2"><?php echo
$invoices["amount"] ?></FONT></TD>
    <TD BGCOLOR="#EAEAEA" COLSPAN="2"><FONT FACE="Tahoma" SIZE="2"><?php
echo $invoices["description"] ?></FONT></TD>
  </TR>


-- 
PHP General 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]






I put up an HTML page that allows a user to modify some previously entered
information.  The information is taken from a MySQL database and displayed
on the page.  The user can leave the data alone or modify it.  If there is
no information in the database for one of the fields, the input box is
empty.

The problem is that when I submit this information, the page that is called
does not receive the variables from fields with no information as "null".
Instead, it gets them with something other than null, although if I print
the variable, they come out blank.  I check the variable using "is_null" and
they evaluate as not being null.  When my script then enters the information
into the MySQL database, a value of "0" is entered for the numeric fields.  

Having these "0" values in the database gives me the wrong information.  Any
idea why an input field that is populated with a null value would go to the
next page as a not null value (although no value shows up for it until it is
written to the database)?




null is a bad idea. if a value is set to null in a table then that variable will not 
be set.

name        phone        fax            email
chris lee    3771095    5541120    NULL

$result['name'] is 'chris lee'
$result['phone'] is '3771095';
$result['fax'] is '5541120';
$result['email'] is an undefined variable

in php a variable is set or not set. if it set to '' its still set, if a variable is 
undefined, then it is null.


-- 

 Chris Lee
 [EMAIL PROTECTED]




"Michael Conley" <[EMAIL PROTECTED]> wrote in message 
2102328FD2ECD411879E00609737BFD10333E3@FATBOY">news:2102328FD2ECD411879E00609737BFD10333E3@FATBOY...
I put up an HTML page that allows a user to modify some previously entered
information.  The information is taken from a MySQL database and displayed
on the page.  The user can leave the data alone or modify it.  If there is
no information in the database for one of the fields, the input box is
empty.

The problem is that when I submit this information, the page that is called
does not receive the variables from fields with no information as "null".
Instead, it gets them with something other than null, although if I print
the variable, they come out blank.  I check the variable using "is_null" and
they evaluate as not being null.  When my script then enters the information
into the MySQL database, a value of "0" is entered for the numeric fields.  

Having these "0" values in the database gives me the wrong information.  Any
idea why an input field that is populated with a null value would go to the
next page as a not null value (although no value shows up for it until it is
written to the database)?




--------------------------------------------------------------------------------


-- 
PHP General 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]





So how do I get the PHP script that stores the information in the My SQL
database to not store "0"?  a "0" value is a valid value for this variable.
I don't want 0 to be the value of the variable if nothing is entered.  Right
now, the database is populated with 0's for the fields that are not filled
in.

-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variable value doesn't stay "Null"


null is a bad idea. if a value is set to null in a table then that variable
will not be set.

name        phone        fax            email
chris lee    3771095    5541120    NULL

$result['name'] is 'chris lee'
$result['phone'] is '3771095';
$result['fax'] is '5541120';
$result['email'] is an undefined variable

in php a variable is set or not set. if it set to '' its still set, if a
variable is undefined, then it is null.


-- 

 Chris Lee
 [EMAIL PROTECTED]




"Michael Conley" <[EMAIL PROTECTED]> wrote in message
2102328FD2ECD411879E00609737BFD10333E3@FATBOY">news:2102328FD2ECD411879E00609737BFD10333E3@FATBOY...
I put up an HTML page that allows a user to modify some previously entered
information.  The information is taken from a MySQL database and displayed
on the page.  The user can leave the data alone or modify it.  If there is
no information in the database for one of the fields, the input box is
empty.

The problem is that when I submit this information, the page that is called
does not receive the variables from fields with no information as "null".
Instead, it gets them with something other than null, although if I print
the variable, they come out blank.  I check the variable using "is_null" and
they evaluate as not being null.  When my script then enters the information
into the MySQL database, a value of "0" is entered for the numeric fields.  

Having these "0" values in the database gives me the wrong information.  Any
idea why an input field that is populated with a null value would go to the
next page as a not null value (although no value shows up for it until it is
written to the database)?




----------------------------------------------------------------------------
----


-- 
PHP General 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]


-- 
PHP General 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]




You may want to check the field definitions in the database table. If I
recall correctly, some MySQL numeric field types default to "0" when an
empty string gets written to them. The problem (and solution) may not be in
the PHP script at all.

Kirk

> -----Original Message-----
> From: Michael Conley [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 1:01 PM
> To: 'Chris Lee'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable value doesn't stay "Null"
> 
> 
> So how do I get the PHP script that stores the information in 
> the My SQL
> database to not store "0"?  a "0" value is a valid value for 
> this variable.
> I don't want 0 to be the value of the variable if nothing is 
> entered.  Right
> now, the database is populated with 0's for the fields that 
> are not filled
> in.
> 




The default value is null in the database.

-----Original Message-----
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 12:20 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Variable value doesn't stay "Null"


You may want to check the field definitions in the database table. If I
recall correctly, some MySQL numeric field types default to "0" when an
empty string gets written to them. The problem (and solution) may not be in
the PHP script at all.

Kirk

> -----Original Message-----
> From: Michael Conley [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 1:01 PM
> To: 'Chris Lee'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Variable value doesn't stay "Null"
> 
> 
> So how do I get the PHP script that stores the information in 
> the My SQL
> database to not store "0"?  a "0" value is a valid value for 
> this variable.
> I don't want 0 to be the value of the variable if nothing is 
> entered.  Right
> now, the database is populated with 0's for the fields that 
> are not filled
> in.
> 

-- 
PHP General 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]




If you declare the fields as NOT NULL in mysql table, during insert, if 
you are nor insertint the field, it will default to 0 (for numbers) and 
'blank' (for text fields). If you already have a table update column to 
0 or blank and do 'alter table' to make the field not null

Johnson, Kirk wrote:

> You may want to check the field definitions in the database table. If I
> recall correctly, some MySQL numeric field types default to "0" when an
> empty string gets written to them. The problem (and solution) may not be in
> the PHP script at all.
> 
> Kirk
> 
>> -----Original Message-----
>> From: Michael Conley [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, March 15, 2001 1:01 PM
>> To: 'Chris Lee'; [EMAIL PROTECTED]
>> Subject: RE: [PHP] Variable value doesn't stay "Null"
>> 
>> 
>> So how do I get the PHP script that stores the information in 
>> the My SQL
>> database to not store "0"?  a "0" value is a valid value for 
>> this variable.
>> I don't want 0 to be the value of the variable if nothing is 
>> entered.  Right
>> now, the database is populated with 0's for the fields that 
>> are not filled
>> in.
>> 





Assuming that column MY_TABLE.MY_NUMERIC_FIELD allows NULLs:

INSERT INTO MY_TABLE (MY_NUMERIC_FIELD, MY_OTHER_FIELD) VALUES ('',
'some_other_value')
will insert a 0 into the column MY_NUMERIC_FIELD in MySQL and many other
databases.

To insert NULL, the SQL must read
INSERT INTO MY_TABLE (MY_NUMERIC_FIELD, MY_OTHER_FIELD) VALUES (NULL,
'some_other_value')

Hence when you build the SQL statement in PHP, check the value that is to be
inserted into MY_NUMERIC_FIELD. If it is NULL as per your requirement, use
the second form of SQL.

You've said is_null($my_form_variable) returned FALSE though as per your
requirement it should have been NULL. Try using empty():

if (empty($my_form_variable) || ! is_numeric($my_form_variable)) {
    $value_for_sql = 'NULL';
} else {
    $value_for_sql = $my_form_variable;
}
$sql = "INSERT INTO MY_TABLE (MY_NUMERIC_FIELD, MY_OTHER_FIELD) VALUES
($value_for_sql, '$my_other_form_variable')";
mysql_execute($sql);
/* etc */

Hope this helps!






I also have thought about improving that function to make the default
first,or a switch anyway.

>function mysql_fetch_enums( $link,  $table_name, $field_name ){
>  $mysql_datatype_field = 1;
>  if (!$result = mysql_query ("SHOW COLUMNS FROM $table_name LIKE
>'$field_name'", $link ) ){
>    $output=0;
>  } else {
>    $mysql_column_data = mysql_fetch_row( $result );
>    if ( !$enum_data= $mysql_column_data[$mysql_datatype_field] ){
>      $output=0;
>    } else if ( !$buffer_array=explode("'", $enum_data) ){
>      $output = 0;
>    } else {
>     $i = 0;
>      reset ($buffer_array);
>      while (list(, $value) = each ($buffer_array)) {
>        if( $i % 2 ) $output[] = $value;
>        ++$i;
>      }
>    }
>  }
>  return $output;
>}




Hello,

My former school has invited me to teach a small course (32 hours) about web
development, and I will of course teach PHP and mySQL. The question I now
have is the following: How shall I best go about installing PHP and mySQL on
a Windows 2000 computer (no Linux, sorry) so that each of the 16 groups of
students have access to their files, databases, etc, without having problems
with security ? I know how to configure mySQL access rights, so that will be
fine. I can also install a small FTP server so that everyone has access to a
subdirectory of the wwwroot directory. But how about PHP?

If anyone has already done this, I'd be more than happy to hear from you.
Basically, I am in the situation of setting up a "micro hosting provider"
with PHP, mySQL support, running Win2k ;)

Thanks !






Hi,
        I want to spread the results of a recordset over a number of pages. In ASP,
I would have opened a connection with a client-side cursor... but with PHP
(using it's ODBC functions), it only seems to be able to execute an SQL
statement, and return all the results... which isn't very efficient if I
have 500 results with 10 per page!
        Also, how do I change the cursor location?

Regards,

- James

Editor, VB Web
==================
Web   - http://www.vbweb.co.uk
Email - [EMAIL PROTECTED]
ICQ#  - 60612011
==================





you can use 'limit x,y' in MySql.

James Crowley wrote:

> Hi,
>       I want to spread the results of a recordset over a number of pages. In ASP,
> I would have opened a connection with a client-side cursor... but with PHP
> (using it's ODBC functions), it only seems to be able to execute an SQL
> statement, and return all the results... which isn't very efficient if I
> have 500 results with 10 per page!
>       Also, how do I change the cursor location?
> 
> Regards,
> 
> - James
> 
> Editor, VB Web
> ==================
> Web   - http://www.vbweb.co.uk
> Email - [EMAIL PROTECTED]
> ICQ#  - 60612011
> ==================
> 
> 





Hello,

James Crowley wrote:
> 
> Hi,
>         I want to spread the results of a recordset over a number of pages. In ASP,
> I would have opened a connection with a client-side cursor... but with PHP
> (using it's ODBC functions), it only seems to be able to execute an SQL
> statement, and return all the results... which isn't very efficient if I
> have 500 results with 10 per page!
>         Also, how do I change the cursor location?

You may want to look at Metabase, a PHP database abstraction package
does that working similarly when using MySQL LIMIT clause, but it works
with all supported databases including those using ODBC. It is as simple
as calling the function
MetabaseSetSelectedRowRange($database,$first,$limit) before each query.

You may find Metabase here:

http://phpclasses.UpperDesign.com/browse.html/package/20

You may also want to try this PHP Class that displays query results in
HTML tables with links to go back and forth between pages.

http://phpclasses.UpperDesign.com/browse.html/package/130

Manuel Lemos




Hi there!

I'm really newbie and I have a major problem.
I think i've installed the PHP stuff correctly, but I don't know how to
insert a PHP feature into a ordinary HTML page. Actually i've tried to find
it in the faq, but i didn't. so could please somebody tell me how it works,
just combining a php file with the source code. If possible, for example to
give me a very simple example, so that i can understand the basics!

I'm really desperate so please somebody help me!

Thanks a lot


Christian





Ha... you email is Virtual Evil" <[EMAIL PROTECTED] and you  name is 
Christian,
how is that for backwards.


1. make sure you are using the correct extention on the file 
name.  .php   or .php3 ... whatever
you compiled.

2.  use the <? ?> around your php code.

try
<?
date()
?>
  in a file called test.php


Rick

At 07:50 PM 3/15/01 +0100, Virtual Evil wrote:
>Hi there!
>
>I'm really newbie and I have a major problem.
>I think i've installed the PHP stuff correctly, but I don't know how to
>insert a PHP feature into a ordinary HTML page. Actually i've tried to find
>it in the faq, but i didn't. so could please somebody tell me how it works,
>just combining a php file with the source code. If possible, for example to
>give me a very simple example, so that i can understand the basics!
>
>I'm really desperate so please somebody help me!
>
>Thanks a lot
>
>
>Christian
>
>
>--
>PHP General 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]

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





thanks a lot for the feedback, but I must confess it didn't work.
I tried to create a file, named it phpinfo.php, content:

<?
phpinfo();
?>

but W2k doesn't know how to open the file. Nevertheless i installed PHP the
way it is described in the install.txt file. What am I doing wrong?

Please help again!!!

Christian

-----Ursprüngliche Nachricht-----
Von: Todd Pillars [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. März 2001 20:14
An: Virtual Evil
Betreff: RE: [PHP] Newbie question: Basic knowledge


<html>
<head>
<title> My New Page </title>
</head>
<body bgcolor="#FFFFFF">
<p> This is my new web page </p>
<?

echo "Hello to all my new friends";

?>
</body>
</html>

just put your php code between the <? ?> tags

t.

also if you want to know if you set up php correctly cut and paste, and save
as phpinfo.php

<?
phpinfo();
?>

the just type in your url and phpinfo.php and look at the vars

-----Original Message-----
From: Virtual Evil [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 1:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Newbie question: Basic knowledge


Hi there!

I'm really newbie and I have a major problem.
I think i've installed the PHP stuff correctly, but I don't know how to
insert a PHP feature into a ordinary HTML page. Actually i've tried to find
it in the faq, but i didn't. so could please somebody tell me how it works,
just combining a php file with the source code. If possible, for example to
give me a very simple example, so that i can understand the basics!

I'm really desperate so please somebody help me!

Thanks a lot


Christian


--
PHP General 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]





Sounds like your mappings in you Web Server aren't setup correctly.  Which
webserver are you using?
--
phill

""Virtual Evil"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> thanks a lot for the feedback, but I must confess it didn't work.
> I tried to create a file, named it phpinfo.php, content:
>
> <?
> phpinfo();
> ?>
>
> but W2k doesn't know how to open the file. Nevertheless i installed PHP
the
> way it is described in the install.txt file. What am I doing wrong?
>
> Please help again!!!
>
> Christian
>
> -----Ursprüngliche Nachricht-----
> Von: Todd Pillars [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. März 2001 20:14
> An: Virtual Evil
> Betreff: RE: [PHP] Newbie question: Basic knowledge
>
>
> <html>
> <head>
> <title> My New Page </title>
> </head>
> <body bgcolor="#FFFFFF">
> <p> This is my new web page </p>
> <?
>
> echo "Hello to all my new friends";
>
> ?>
> </body>
> </html>
>
> just put your php code between the <? ?> tags
>
> t.
>
> also if you want to know if you set up php correctly cut and paste, and
save
> as phpinfo.php
>
> <?
> phpinfo();
> ?>
>
> the just type in your url and phpinfo.php and look at the vars
>
> -----Original Message-----
> From: Virtual Evil [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 1:51 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie question: Basic knowledge
>
>
> Hi there!
>
> I'm really newbie and I have a major problem.
> I think i've installed the PHP stuff correctly, but I don't know how to
> insert a PHP feature into a ordinary HTML page. Actually i've tried to
find
> it in the faq, but i didn't. so could please somebody tell me how it
works,
> just combining a php file with the source code. If possible, for example
to
> give me a very simple example, so that i can understand the basics!
>
> I'm really desperate so please somebody help me!
>
> Thanks a lot
>
>
> Christian
>
>
> --
> PHP General 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]
>
>
> --
> PHP General 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]
>





sorry, i've just configured that in the Windows 2000 "Internet Services
Manager"
the point: Standard website (i don't know if it is called like that in the
English version, because i'm using the German one)
if you can tell me what's missing, i would be very thankful! I've downloaded
an apache server but the configuration manual says:

>Apache:
>1. Stop the Apache Webserver.
>Edit the httpd.conf and put in these lines, modified to your environment:
>2. Unzip the Package to c:\php, now move php4ts.dll to the
windows/system(32) directory, overwrite any older file!
>
># for the apache module
>LoadModule php4_module c:/php/sapi/php4apache.dll
>AddType application/x-httpd-php .php4
>
[...] and more even this point, AddType... etc where do i have to enter
that?


I know i'm very idiotic, but if you don't help me, who then???
thanks!

-----Ursprüngliche Nachricht-----
Von: Phillip Bow [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. März 2001 21:28
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Newbie question: Basic knowledge


Sounds like your mappings in you Web Server aren't setup correctly.  Which
webserver are you using?
--
phill

""Virtual Evil"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> thanks a lot for the feedback, but I must confess it didn't work.
> I tried to create a file, named it phpinfo.php, content:
>
> <?
> phpinfo();
> ?>
>
> but W2k doesn't know how to open the file. Nevertheless i installed PHP
the
> way it is described in the install.txt file. What am I doing wrong?
>
> Please help again!!!
>
> Christian
>
> -----Ursprüngliche Nachricht-----
> Von: Todd Pillars [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. März 2001 20:14
> An: Virtual Evil
> Betreff: RE: [PHP] Newbie question: Basic knowledge
>
>
> <html>
> <head>
> <title> My New Page </title>
> </head>
> <body bgcolor="#FFFFFF">
> <p> This is my new web page </p>
> <?
>
> echo "Hello to all my new friends";
>
> ?>
> </body>
> </html>
>
> just put your php code between the <? ?> tags
>
> t.
>
> also if you want to know if you set up php correctly cut and paste, and
save
> as phpinfo.php
>
> <?
> phpinfo();
> ?>
>
> the just type in your url and phpinfo.php and look at the vars
>
> -----Original Message-----
> From: Virtual Evil [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 1:51 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie question: Basic knowledge
>
>
> Hi there!
>
> I'm really newbie and I have a major problem.
> I think i've installed the PHP stuff correctly, but I don't know how to
> insert a PHP feature into a ordinary HTML page. Actually i've tried to
find
> it in the faq, but i didn't. so could please somebody tell me how it
works,
> just combining a php file with the source code. If possible, for example
to
> give me a very simple example, so that i can understand the basics!
>
> I'm really desperate so please somebody help me!
>
> Thanks a lot
>
>
> Christian
>
>
> --
> PHP General 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]
>
>
> --
> PHP General 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]
>


--
PHP General 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]





ok, me again... (sorry for that guys)
i added as the file supposed me to, the lines of this install.txt file to my
httpd.conf file, and modified them to my directories. I've even started my
apache server, but it doesn't work.

hell!

-----Ursprüngliche Nachricht-----
Von: Virtual Evil [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. März 2001 21:40
An: Phillip Bow
Cc: [EMAIL PROTECTED]
Betreff: AW: [PHP] Newbie question: Basic knowledge


sorry, i've just configured that in the Windows 2000 "Internet Services
Manager"
the point: Standard website (i don't know if it is called like that in the
English version, because i'm using the German one)
if you can tell me what's missing, i would be very thankful! I've downloaded
an apache server but the configuration manual says:

>Apache:
>1. Stop the Apache Webserver.
>Edit the httpd.conf and put in these lines, modified to your environment:
>2. Unzip the Package to c:\php, now move php4ts.dll to the
windows/system(32) directory, overwrite any older file!
>
># for the apache module
>LoadModule php4_module c:/php/sapi/php4apache.dll
>AddType application/x-httpd-php .php4
>
[...] and more even this point, AddType... etc where do i have to enter
that?


I know i'm very idiotic, but if you don't help me, who then???
thanks!

-----Ursprüngliche Nachricht-----
Von: Phillip Bow [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. März 2001 21:28
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Newbie question: Basic knowledge


Sounds like your mappings in you Web Server aren't setup correctly.  Which
webserver are you using?
--
phill

""Virtual Evil"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> thanks a lot for the feedback, but I must confess it didn't work.
> I tried to create a file, named it phpinfo.php, content:
>
> <?
> phpinfo();
> ?>
>
> but W2k doesn't know how to open the file. Nevertheless i installed PHP
the
> way it is described in the install.txt file. What am I doing wrong?
>
> Please help again!!!
>
> Christian
>
> -----Ursprüngliche Nachricht-----
> Von: Todd Pillars [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. März 2001 20:14
> An: Virtual Evil
> Betreff: RE: [PHP] Newbie question: Basic knowledge
>
>
> <html>
> <head>
> <title> My New Page </title>
> </head>
> <body bgcolor="#FFFFFF">
> <p> This is my new web page </p>
> <?
>
> echo "Hello to all my new friends";
>
> ?>
> </body>
> </html>
>
> just put your php code between the <? ?> tags
>
> t.
>
> also if you want to know if you set up php correctly cut and paste, and
save
> as phpinfo.php
>
> <?
> phpinfo();
> ?>
>
> the just type in your url and phpinfo.php and look at the vars
>
> -----Original Message-----
> From: Virtual Evil [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 1:51 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie question: Basic knowledge
>
>
> Hi there!
>
> I'm really newbie and I have a major problem.
> I think i've installed the PHP stuff correctly, but I don't know how to
> insert a PHP feature into a ordinary HTML page. Actually i've tried to
find
> it in the faq, but i didn't. so could please somebody tell me how it
works,
> just combining a php file with the source code. If possible, for example
to
> give me a very simple example, so that i can understand the basics!
>
> I'm really desperate so please somebody help me!
>
> Thanks a lot
>
>
> Christian
>
>
> --
> PHP General 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]
>
>
> --
> PHP General 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]
>


--
PHP General 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]


--
PHP General 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]





On Thu, Mar 15, 2001 at 09:40:19PM +0100, Virtual Evil wrote:

> I know i'm very idiotic, but if you don't help me, who then???

Ask Erwin Teufel (engl. devil) or radio Eriwan.

-Egon

-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
http://www.php-buch.de/




how funny! Erwin Teufel... deutsche Politiker werden mir da wohl kaum helfen
konnen. Ich verstehe nicht, wieso du hier permanent versuchst Fragen von
neuen Menschen total nieder zu machen. Ich mochte gar nicht wissen, was du
zu einer Zeit als du Anfanger warst fur Fragen gestellt hast, und bestimmt
teils immer noch tust. Eines wei? ich, was Kommunikation an geht, in Bezug
auf Toleranz bist du blutiger Anfanger....

-----Ursprungliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 15. Marz 2001 22:12
An: Virtual Evil; Phillip Bow
Cc: [EMAIL PROTECTED]
Betreff: Re: [PHP] Newbie question: Basic knowledge


On Thu, Mar 15, 2001 at 09:40:19PM +0100, Virtual Evil wrote:

> I know i'm very idiotic, but if you don't help me, who then???

Ask Erwin Teufel (engl. devil) or radio Eriwan.

-Egon

--
http://www.linuxtag.de/
http://php.net/books.php
http://www.concert-band.de/
http://www.php-buch.de/

--
PHP General 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]





On Thu, Mar 15, 2001 at 10:15:49PM +0100, Virtual Evil wrote:
> how funny! Erwin Teufel... deutsche Politiker werden mir da wohl kaum helfen
> konnen. Ich verstehe nicht, wieso du hier permanent versuchst Fragen von
> neuen Menschen total nieder zu machen. Ich mochte gar nicht wissen, was du
> zu einer Zeit als du Anfanger warst fur Fragen gestellt hast, und bestimmt
> teils immer noch tust. Eines wei? ich, was Kommunikation an geht, in Bezug
> auf Toleranz bist du blutiger Anfanger....

Also Anfänger bin ich eigentlich nicht mehr und als Anfänger hab ich auch
vor mehr als 5 Jahren keine Fragen gestellt. Ich finde es nur schade, dass
das deutsche Volk die englische Liste mit so einem Müll zumüllen muss.
Beim php-center.de (sofern es in den nächsten Wochen mal wieder Online
sein sollte) kann man sich für die deutschsprachige Mailingliste
anmelden.

Den Erwin Teufel kenn ich tatsächlich, dem blasen wir immer einen Marsch,
sofern er in Stuttgart-Hohenheim auftaucht.

-Egon

PS: Ein Blick ins Manual würde normalerweise genügen um solche
Scheißhausparolen zu vermeiden.
 
> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 15. Marz 2001 22:12
> An: Virtual Evil; Phillip Bow
> Cc: [EMAIL PROTECTED]
> Betreff: Re: [PHP] Newbie question: Basic knowledge
> 
> 
> On Thu, Mar 15, 2001 at 09:40:19PM +0100, Virtual Evil wrote:
> 
> > I know i'm very idiotic, but if you don't help me, who then???
> 
> Ask Erwin Teufel (engl. devil) or radio Eriwan.
> 
> -Egon
> 
> --
> http://www.linuxtag.de/
> http://php.net/books.php
> http://www.concert-band.de/
> http://www.php-buch.de/
> 
> --
> PHP General 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]
> 
> 
> -- 
> PHP General 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]
> 

-- 
-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
http://www.php-buch.de/




As one of the authors of the official PHP-manual, eschmid could be a bit
more understanding to newbees, instead of scaring people from PHP to ASP !!!

Lars
<[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, Mar 15, 2001 at 10:15:49PM +0100, Virtual Evil wrote:
> > how funny! Erwin Teufel... deutsche Politiker werden mir da wohl kaum
helfen
> > konnen. Ich verstehe nicht, wieso du hier permanent versuchst Fragen von
> > neuen Menschen total nieder zu machen. Ich mochte gar nicht wissen, was
du
> > zu einer Zeit als du Anfanger warst fur Fragen gestellt hast, und
bestimmt
> > teils immer noch tust. Eines wei? ich, was Kommunikation an geht, in
Bezug
> > auf Toleranz bist du blutiger Anfanger....
>
> Also Anfänger bin ich eigentlich nicht mehr und als Anfänger hab ich auch
> vor mehr als 5 Jahren keine Fragen gestellt. Ich finde es nur schade, dass
> das deutsche Volk die englische Liste mit so einem Müll zumüllen muss.
> Beim php-center.de (sofern es in den nächsten Wochen mal wieder Online
> sein sollte) kann man sich für die deutschsprachige Mailingliste
> anmelden.
>
> Den Erwin Teufel kenn ich tatsächlich, dem blasen wir immer einen Marsch,
> sofern er in Stuttgart-Hohenheim auftaucht.
>
> -Egon
>
> PS: Ein Blick ins Manual würde normalerweise genügen um solche
> Scheißhausparolen zu vermeiden.
>
> > -----Ursprungliche Nachricht-----
> > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Gesendet: Donnerstag, 15. Marz 2001 22:12
> > An: Virtual Evil; Phillip Bow
> > Cc: [EMAIL PROTECTED]
> > Betreff: Re: [PHP] Newbie question: Basic knowledge
> >
> >
> > On Thu, Mar 15, 2001 at 09:40:19PM +0100, Virtual Evil wrote:
> >
> > > I know i'm very idiotic, but if you don't help me, who then???
> >
> > Ask Erwin Teufel (engl. devil) or radio Eriwan.
> >
> > -Egon
> >
> > --
> > http://www.linuxtag.de/
> > http://php.net/books.php
> > http://www.concert-band.de/
> > http://www.php-buch.de/
> >
> > --
> > PHP General 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]
> >
> >
> > --
> > PHP General 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]
> >
>
> --
> --
> http://www.linuxtag.de/
> http://php.net/books.php
> http://www.concert-band.de/
> http://www.php-buch.de/
>
> --
> PHP General 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]
>






Howdy All!
I noticed in a FAQ somewhere that it is possible to call Java classes from
PHP using the dl function.  Is there anyway to make this work with Perl libraries?
I work for a company that is moving to PHP.  All their previous stuff are Perl 
scripts.  We are bringing a lot of the Perl code to PHP but there are Perl libraries
that we need but don't have the time to convert to PHP.  It would call for some
serious translating due to the bad programming technique used.  Any advice
would be tremendously appreciated.

Matthew Hanna
[EMAIL PROTECTED]




Hi, all:

Table News
__________________________
NewsID | Keywords  | News
-------|-----------|------
   1   |word1,word2| News1
-------|---------- |------
   2   |  word2    | News2
__________________________

I want to search this table based on the Keywords. the code is:

$split = explode(" ",$keywords);
$Num = 0;
  for($index=0;$index<count($split);$index++){
    $sql = "SELECT * FROM News WHERE Keywords LIKE '%$split[$index]%';
    $result = mysql_query($sql) or die(mysql_error());
    while($myrow = mysql_fetch_array($result)){
      $Num = $Num +1;
      $NewsID = $myrow["NewsID"];
      $News = $myrow["News"];
    echo $Num . ". " . $News . "<br>";
    }//end while
  }//end for

If the keywords inputted from user are: "word2, word1", it will reture News1
twice:
    1. News1
    2. News2
    3. News1
I am trying to use array_diff, but I don't know how to do it, would anyone
please help me? Thanks a lot.

Fang





> If the keywords inputted from user are: "word2, word1", it 
> will reture News1 twice:

That's because you are selecting all the records that match
each single key word individually.

> I want to search this table based on the Keywords. the code is:
> $split = explode(" ",$keywords);
> $Num = 0;
>   for($index=0;$index<count($split);$index++){
>     $sql = "SELECT * FROM News WHERE Keywords LIKE '%$split[$index]%';
>     $result = mysql_query($sql) or die(mysql_error());
>     while($myrow = mysql_fetch_array($result)){
>       $Num = $Num +1;
>       $NewsID = $myrow["NewsID"];
>       $News = $myrow["News"];
>     echo $Num . ". " . $News . "<br>";
>     }//end while
>   }//end for

What you want to do is something like this:

$keyWordsArray = explode( " ", $keywords );
$keyWordsString = implode( "%\" OR \"%", $keyWordsArray );

$sql = "SELECT * FROM News WHERE Keywords LIKE \"$keyWordsString\"";

to make one query that will select all the records with matching keywords.

Depending on what you are exploding on, you could use str_replace()
instead of explode() then implode().

Chris




I have problem maybe someone has a
solution....something like variables within variables.

I have a very long string composed of a number of
variables. for examples

$a= "do"
$b= "do"
$sting= $a." find the info then $b this and that
then".$a." the report";

The problem is the value of $a may change to $a="don't
do " 

I cant use str_replace or ereg_replace becuase I don't
want to change the second do in the above string, the
$b variable. An additional problem is that there are a
number of variables that make up the string, some may
change some may not and some appear at differnt points
in the script.

Is there some way...I don't know, is there something
like a variable placeholder..I mean so that $string =
$a." etc etc etc" but $string doesn't take the value
of $a only that the variable $a exists as part of the
string and if the variable $a changes then the final
value of $string will reflect the new value of $a.


Anyone have any vague idea of what I mean or how to
accomplish this. Right now I'm using arrays to keep
track of the string parts and then the script
assembles the string at the end.

It's an awful lot of code. It would seem there is a
better way.  

rm

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/




Hello,

The example that follows this little description should, as far as my
understanding of PHP goes, demonstrate proper passing of multilayered
objects, by reference, to independent sub-objects.  The more understandable
description, there exists a super-class that has two sub-classes.  The first
sub-class, upon construction, is linked to the second sub-class (via a
parameter passed to the first class' constructor).  The first sub-class'
constructor sets a variable, local to that first sub-class, to be a
reference to the second sub-class.  The second sub-class is comprised only
of a variable that will be changed by functionality defined in the first
sub-class.

The first code snippet does not function properly.  It seems that the first
sub-class does not truly create a reference, but creates a copy of the
second sub-class (as it exists upon construction of the first sub-class).
Therefore, it can not be changed, only read.

The second code snippet functions properly and implements what I label a
hack around.  This code snippet accesses the second sub-class within the
constructor of the first sub-class.  In other words, it seems that PHP does
not create a reference, unless something within that reference is accessed
within the function defining the reference.  <<Confusing, ain't it.>>

Please tell me if there is a more "correct" solution, or if I'm simply
confused to oblivion. =)

--- [FIRST CODE SNIPPET] ---

<?
        class Test0_t
        {
                var $oTest1;
                var $oTest2;

                function Test0_t ()
                {
                        $this->oTest1 = new Test1_t($this);
                        $this->oTest2 = new Test2_t();
                }
        }

        class Test1_t
        {
                var $oLnk;

                function Test1_t ( &$_oLnk )
                {
                        $this->oLnk = &$_oLnk;
                }

                function Test ()
                {
                        echo("0:[".$this->oLnk->oTest2->nVal."]<BR>");
                        $this->oLnk->oTest2->nVal++;
                        echo("1:[".$this->oLnk->oTest2->nVal."]<BR>");
                }
        }

        class Test2_t {
                var $nVal;

                function Test2_t ()
                {
                        $this->nVal = 0;
                }
        }

        $oTest0 = new Test0_t();

        $oTest0->oTest1->Test();

        echo("2:[".$oTest0->oTest2->nVal."]<BR>");
?>

--- [SECOND CODE SNIPPET] ---

<?
        class Test0_t
        {
                var $oTest1;
                var $oTest2;

                function Test0_t ()
                {
                        $this->oTest2 = new Test2_t();
                        $this->oTest1 = new Test1_t($this);
                }
        }

        class Test1_t
        {
                var $oLnk;

                function Test1_t ( &$_oLnk )
                {
                        $this->oLnk = &$_oLnk;
                        $this->oLnk->oTest2->Test();
                }

                function Test ()
                {
                        echo("0:[".$this->oLnk->oTest2->nVal."]<BR>");
                        $this->oLnk->oTest2->nVal++;
                        echo("1:[".$this->oLnk->oTest2->nVal."]<BR>");
                }
        }

        class Test2_t {
                var $nVal;

                function Test2_t ()
                {
                        $this->nVal = 0;
                }

                function Test ()
                {
                }
        }

        $oTest0 = new Test0_t();

        $oTest0->oTest1->Test();

        echo("2:[".$oTest0->oTest2->nVal."]<BR>");
?>

Thank you,
-Andrew Immerman





Thursday, March 15, 2001

Hello,

It seems, from further experimentation, that for such a reference to be
properly established, some functionality/memory, specific to that referenced
object, must be accessed in the same code space that defines the reference.
Additionally, the referenced object must be fully defined and loaded, e.g.,
one can not establish a reference to "$this" within the constructor of that
object -- because "$this" is not fully defined when the constructor is
called.

Signed,
-Andrew Immerman





Hi,

I have a string, "'abc'". How do I convert it to "abc" (i.e. how do I
strip the embedded single quotes) with a minimum of overhead?

(In case you'r wondering: I created the quoted string to store it in
MySQL, now I want to display the same string in a Webpage. Usually the
strings I display do not have embedded single quotes, and I add the
single quotes when I output the string printf("<input type='text'
value='%s'>", $value); That works well enough for strings that don't
already have embedded quotes. But when they do I want to get rid of them
quickly and easily, otherwise I get ...value = ''some value''> and
Netscape doesn't display the value embedded in two single quote
characters).

TIA,

Elan




In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Elan) 
wrote:

> I have a string, "'abc'". How do I convert it to "abc" (i.e. how do I
> strip the embedded single quotes) with a minimum of overhead?

If there's no chance that the string could also contain legit single-quotes 
(such as as an apoostrophe), you can simply use str_replace().

Otherwise, either str_replace() with strpos() -- to search/replace only on 
2nd char and 2nd-to-last character -- or good ol' preg_replace() by itself.

-- 
CC




use the following code
$vals=explode("'", "'abc'");
$your_value=$vals[0]; //I am little confused, if it is not working try 
index1

Elan wrote:

> Hi,
> 
> I have a string, "'abc'". How do I convert it to "abc" (i.e. how do I
> strip the embedded single quotes) with a minimum of overhead?
> 
> (In case you'r wondering: I created the quoted string to store it in
> MySQL, now I want to display the same string in a Webpage. Usually the
> strings I display do not have embedded single quotes, and I add the
> single quotes when I output the string printf("<input type='text'
> value='%s'>", $value); That works well enough for strings that don't
> already have embedded quotes. But when they do I want to get rid of them
> quickly and easily, otherwise I get ...value = ''some value''> and
> Netscape doesn't display the value embedded in two single quote
> characters).
> 
> TIA,
> 
> Elan
> 





I just finished coding everything on a project it was working (all
nighter), and now something I just changed is causing this error

"Can't redeclare already declared function in "

There is no duplication of functions declarations.

The thing is it is basically saying that no matter what functions are in
the file, you will get the error on whatever function is 1st function in
the file of functions, and the line it always points to is the closing
"}" of the function itself...

Tried to get help on php.net, but didn't find anything.
Any Ideas ?

___________________________________________________________
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net






Are the functions declared in an include()'d file? Is this file being
include()'d more than once? That's how I usually provoke this error :)

Kirk

> -----Original Message-----
> From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 1:25 PM
> To: php
> Subject: [PHP] Help! Can't redeclare already declared function in 
> 
> 
> I just finished coding everything on a project it was working (all
> nighter), and now something I just changed is causing this error
> 
> "Can't redeclare already declared function in "
 




I thought it will say, which function it can not redeclare.
How many functions you have in the file?
If it is small number, you could comment out each function and see which 
one is casuing the problem.


Jack Sasportas wrote:

> I just finished coding everything on a project it was working (all
> nighter), and now something I just changed is causing this error
> 
> "Can't redeclare already declared function in "
> 
> There is no duplication of functions declarations.
> 
> The thing is it is basically saying that no matter what functions are in
> the file, you will get the error on whatever function is 1st function in
> the file of functions, and the line it always points to is the closing
> "}" of the function itself...
> 
> Tried to get help on php.net, but didn't find anything.
> Any Ideas ?
> 
> ___________________________________________________________
> Jack Sasportas
> Innovative Internet Solutions
> Phone 305.665.2500
> Fax 305.665.2551
> www.innovativeinternet.com
> www.web56.net
> 
> 
> 





try using include_once() and require_once()
in place of include() and require()

also, make sure you havent defined any functions
that match PHP internal funcs.


> -----Original Message-----
> From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 3:29 PM
> To: php
> Subject: RE: [PHP] Help! Can't redeclare already declared function in 
> 
> 
> Are the functions declared in an include()'d file? Is this file being
> include()'d more than once? That's how I usually provoke this error :)
> 
> Kirk
> 
> > -----Original Message-----
> > From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 15, 2001 1:25 PM
> > To: php
> > Subject: [PHP] Help! Can't redeclare already declared function in 
> > 
> > 
> > I just finished coding everything on a project it was working (all
> > nighter), and now something I just changed is causing this error
> > 
> > "Can't redeclare already declared function in "
>  
> 
> -- 
> PHP General 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]
> 




how about

if (!$included[filename])


On Thu, 15 Mar 2001, ..s.c.o.t.t.. [gts] wrote:

> try using include_once() and require_once()
> in place of include() and require()
>
> also, make sure you havent defined any functions
> that match PHP internal funcs.
>
>
> > -----Original Message-----
> > From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 15, 2001 3:29 PM
> > To: php
> > Subject: RE: [PHP] Help! Can't redeclare already declared function in
> >
> >
> > Are the functions declared in an include()'d file? Is this file being
> > include()'d more than once? That's how I usually provoke this error :)
> >
> > Kirk
> >
> > > -----Original Message-----
> > > From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, March 15, 2001 1:25 PM
> > > To: php
> > > Subject: [PHP] Help! Can't redeclare already declared function in
> > >
> > >
> > > I just finished coding everything on a project it was working (all
> > > nighter), and now something I just changed is causing this error
> > >
> > > "Can't redeclare already declared function in "
> >
> >
> > --
> > PHP General 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]
> >
>
> --
> PHP General 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]
>
>





Hello..i'm veri tired, and i am going to require your help.....
I need to make some operations with a cuadratic curve. But with the current php 
code... 

<?php 
$curve = new Java("java.awt.geom.QuadCurve2D.Double") 
?> 

... i get this error: 

Warning: java.lang.ClassNotFoundException: java.awt.geom.QuadCurve2D.Double 

Can anybody help me? ,
please if you can't, only one person can reply this email, because i write too and 
never, never, reply me, dont know or another problem?
:-)...bye,




this is a PHP list.

your problem is with java, not PHP

> -----Original Message-----
> From: Celestino Roberto Alejandro [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 3:34 PM
> To: Lista PHPGral
> Subject: [PHP] Error working
> 
> 
> Hello..i'm veri tired, and i am going to require your help.....
> I need to make some operations with a cuadratic curve. But with the 
> current php code... 
> 
> <?php 
> $curve = new Java("java.awt.geom.QuadCurve2D.Double") 
> ?> 
> 
> ... i get this error: 
> 
> Warning: java.lang.ClassNotFoundException: java.awt.geom.QuadCurve2D.Double 
> 
> Can anybody help me? ,
> please if you can't, only one person can reply this email, because i write 
> too and never, never, reply me, dont know or another problem?
> :-)...bye,
> 




I have a web interface that will submit entries into a mysql db.  These
entries are things to do at certain times, an organizer.  Is there a way
for php to intelligently keep track of time and when the certain time of
the event hits, to trigger an event - such as an email.  Any help will be
appreciated.

Thanks





Hi,
I'm working on something like this too. I was hoping to be able to
put something like this into an icapd server because my app might
have been able to use mcal. It was too much effort though, so I'm
looking at doing it with cron.

Let me know if you find a more creative way of doing it.

- Mark

On Thu, 15 Mar 2001 15:33:50 -0500 (EST), Dale Frohman
([EMAIL PROTECTED]) wrote:
>I have a web interface that will submit entries into a mysql db.
>These
>entries are things to do at certain times, an organizer.  Is there a
>way
>for php to intelligently keep track of time and when the certain
>time of
>the event hits, to trigger an event - such as an email.  Any help
>will be
>appreciated.
>
>Thanks
>
>
>--
>PHP General 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: php-list-
>[EMAIL PROTECTED]






I get this in my error log:

[Thu Mar 15 12:48:03 2001] [error] Strange
[Thu Mar 15 12:48:03 2001] [error] Strange
[Thu Mar 15 12:48:03 2001] [error] Strange

when I make a single call to error_log():

<?php
error_log("Strange");
?>

I'm running 4.0.3pl1, Apache 1.3.14 on 2.2.16-22smp. Any ideas?

-Marcel

Marcel Levy
[EMAIL PROTECTED]







This was sent off-list. I respect that. And it voices some opinions.
I am not flaming newbie questions.  I am a newbie myself.

I do have a  problem with the same questions coming up 3 times in a row.
With developers asking people to do simple logic.  And people not looking
for answers before they ask.

All I am asking is if you do not have an understanding of programming..
do some tutorials.  I am talking about questions like... how can I make the
page print "1 2 3 4 5" style of questions that come up because php is the
first thing that they looked at. This means the person hasn't even looked for
a basic tutorial.

I love the idea that the list is helpful, I love to answer all the 
questions that I
can, but some people want you to hold their hand.

the "help-Your-friends-forum" is "hold-your-hand-forum" or 
"spoon-feed-me-forum"
  occassionaly.

the manual is http://www.php.net/manual/en/ do a simple search. These guys
did a pretty good job here.

I spent $80 on a book so I can step though the different functions and keep
most of my questions off the list. If you spent time looking say so, I can 
respect
not being able to find something even if it is obvious.. I have done it myself.
I asked about contatination.  I was looking for a strcat function.

Maybe I should invest some time into an site called phpstarter.com and buy 
the domain
name.

I get quite a bit of help from people from this list on and off mailing.  I 
am not flaming
anyone in particular, I am just tired of people not bothering to spend any 
energy because
it is easier to get someone else to give you the answer.  That is what bugs me.


>I'm a newbee too, have search for hours in the online-manual to find certain
>answers. Also looked through the FAQ's, searched on PHPbuilder , Devshead
>and other sites, but didn't find a clue on my problem.
>It's frustrating spending hours one something a Pro would do in 5 secs!!!
>
>If the mailinglists wasn't ment to be a "help-Your-friends-forum" what are
>they then?
>
>The problem with the manual is, that it is VERY hard to understand correct
>for a newbee. For a little experienced developer it's no problem. But the
>rest of us??
>
>
>
>----- Original Message -----
>From: "Rick St Jean" <[EMAIL PROTECTED]>
>Newsgroups: php.general
>Sent: Thursday, March 15, 2001 7:28 PM
>Subject: Re: [PHP] FAQ
>
>
> > The problem is that people are lazy or just to stupid to look for stuff.
> > Sometimes yes, we just miss something small or it is under another
>section.
> > I have done it as recently as tuesday with implode.  But this is getting
>nuts.
> >
> > I guess I am frustrated because all the lists I am on are filled with lazy
> > people
> > who whine and want someone else to do all their work for them.  PHP is not
> > low level
> > if you need something simple use iHTML.  It is the simplest scripting
> > language out there.
> >
> >
> > I propose that the first few sentances of the signup message should be...
> >
> > READ THE MANUAL BEFORE POSTING!!!!!!
> > READ THE MANUAL BEFORE POSTING!!!!!!
> > READ THE MANUAL BEFORE POSTING!!!!!!
> > if you are confused about this... READ THE MANUAL BEFORE POSTING!!!!!!
> >
> > SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> > SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> > SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> > if you doing understand then SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> >
> > Rick
> >
> >
> > At 10:22 AM 3/15/01 -0600, Chris Lee wrote:
> > >people wouldnt use an FAQ, when you see three people ask the exact same
> > >question on one single day, you know they dont read the other post, or
> > >care. if they wont read the posts on the same day they wont read an FAQ,
> > >they keep posting.
> > >
> > >
> > >--
> > >
> > >  Chris Lee
> > >  [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > >""Mal McKay"" <[EMAIL PROTECTED]> wrote in message
> > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > >I'd just like to offset my other email by saying that a faq is often no
> > >substitute for the knowledge and experience of this list's members. In a
> > >strange way, the 'dumb' question this list gets proves the a faq can not
>be
> > >expected to know the right way to answer a query. A list member out there
> > >just might know _exactly_ what you need to solve your problem.
> > >
> > >mal
> > >
> > >-----Original Message-----
> > >From: RBL [mailto:[EMAIL PROTECTED]]
> > >Sent: 15 March 2001 17:17
> > >To: Rick St Jean; [EMAIL PROTECTED]
> > >Subject: Re: [PHP] FAQ
> > >
> > >
> > >on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:
> > >
> > > > Also I would like to know if there would be a demand for an
> > > > experienced mailing list?  I am just frustrated by the same 3
> > > > questions that pop up about once a day. The rest of the posts
> > > > are great.
> > > >
> > > > Rick
> > >
> > >I once thought a great product for mail lists (would require an admin
> > >interface, PHP?) would be a way to put into the list mail signature a
>random
> > >FAQ link.
> > >
> > >Fill that particular FAQ with commonly asked questions and have the FAQ
>sent
> > >out each month to all subscribers. A decent threaded mail reader would
>make
> > >this reasonably easy (notice I did not say *simple*) to administer.
> > >
> > >
> > >Example
> > >--
> > >Need a PHP editor? (http://php.net/common_questions.html?Q=phpeditors)
> > >
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >Example
> > >--
> > >Trouble compiling GD?
> > >(http://php.net/common_questions.html?Q=gdrequirements)
> > >
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >--
> > >Dave Goodrich
> > >Director of Interface Development
> > >Reality Based Learning Company
> > >9521 NE Willows Road, Suite 100
> > >Redmond, WA 98052
> > >Toll Free 1-877-869-6603 ext. 237
> > >Fax (425) 558-5655
> > >[EMAIL PROTECTED]
> > >http://www.rblc.com
> > >
> > >
> > >
> > >--
> > >PHP General 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]
> > >
> > >
> > >--
> > >PHP General 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]
> > >
> > >
> > >
> > >--
> > >PHP General 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]
> >
> > ##########################################################
> > #  Rick St Jean,
> > #  [EMAIL PROTECTED]
> > #  President of Design Shark,
> > #  http://www.designshark.com/
> > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > #  Tel: 905-684-2952
> > ##########################################################
> >
> >
> > --
> > PHP General 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]
> >

##########################################################
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##########################################################





The "flaming" answer was just "getting air".
I've spend the last 2 hours reading ALL 499 postings in these forums. And
learned a LOT more than spending 20 hours in the manual.
Also some basic technics where quite usefull.

Your'e right about simple HTML, but if You want to use input from Your site,
the best wau to treat variables is PHP.

Sometimes Pro's learn from newbees !!!

Lars
"Rick St Jean" <[EMAIL PROTECTED]> skrev i en meddelelse
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> This was sent off-list. I respect that. And it voices some opinions.
> I am not flaming newbie questions.  I am a newbie myself.
>
> I do have a  problem with the same questions coming up 3 times in a row.
> With developers asking people to do simple logic.  And people not looking
> for answers before they ask.
>
> All I am asking is if you do not have an understanding of programming..
> do some tutorials.  I am talking about questions like... how can I make
the
> page print "1 2 3 4 5" style of questions that come up because php is the
> first thing that they looked at. This means the person hasn't even looked
for
> a basic tutorial.
>
> I love the idea that the list is helpful, I love to answer all the
> questions that I
> can, but some people want you to hold their hand.
>
> the "help-Your-friends-forum" is "hold-your-hand-forum" or
> "spoon-feed-me-forum"
>   occassionaly.
>
> the manual is http://www.php.net/manual/en/ do a simple search. These guys
> did a pretty good job here.
>
> I spent $80 on a book so I can step though the different functions and
keep
> most of my questions off the list. If you spent time looking say so, I can
> respect
> not being able to find something even if it is obvious.. I have done it
myself.
> I asked about contatination.  I was looking for a strcat function.
>
> Maybe I should invest some time into an site called phpstarter.com and buy
> the domain
> name.
>
> I get quite a bit of help from people from this list on and off mailing.
I
> am not flaming
> anyone in particular, I am just tired of people not bothering to spend any
> energy because
> it is easier to get someone else to give you the answer.  That is what
bugs me.
>
>
> >I'm a newbee too, have search for hours in the online-manual to find
certain
> >answers. Also looked through the FAQ's, searched on PHPbuilder , Devshead
> >and other sites, but didn't find a clue on my problem.
> >It's frustrating spending hours one something a Pro would do in 5 secs!!!
> >
> >If the mailinglists wasn't ment to be a "help-Your-friends-forum" what
are
> >they then?
> >
> >The problem with the manual is, that it is VERY hard to understand
correct
> >for a newbee. For a little experienced developer it's no problem. But the
> >rest of us??
> >
> >
> >
> >----- Original Message -----
> >From: "Rick St Jean" <[EMAIL PROTECTED]>
> >Newsgroups: php.general
> >Sent: Thursday, March 15, 2001 7:28 PM
> >Subject: Re: [PHP] FAQ
> >
> >
> > > The problem is that people are lazy or just to stupid to look for
stuff.
> > > Sometimes yes, we just miss something small or it is under another
> >section.
> > > I have done it as recently as tuesday with implode.  But this is
getting
> >nuts.
> > >
> > > I guess I am frustrated because all the lists I am on are filled with
lazy
> > > people
> > > who whine and want someone else to do all their work for them.  PHP is
not
> > > low level
> > > if you need something simple use iHTML.  It is the simplest scripting
> > > language out there.
> > >
> > >
> > > I propose that the first few sentances of the signup message should
be...
> > >
> > > READ THE MANUAL BEFORE POSTING!!!!!!
> > > READ THE MANUAL BEFORE POSTING!!!!!!
> > > READ THE MANUAL BEFORE POSTING!!!!!!
> > > if you are confused about this... READ THE MANUAL BEFORE POSTING!!!!!!
> > >
> > > SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> > > SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> > > SEARCH THE ARCHIVES / FAQ BEFORE POSTING!!!!!
> > > if you doing understand then SEARCH THE ARCHIVES / FAQ BEFORE
POSTING!!!!!
> > >
> > > Rick
> > >
> > >
> > > At 10:22 AM 3/15/01 -0600, Chris Lee wrote:
> > > >people wouldnt use an FAQ, when you see three people ask the exact
same
> > > >question on one single day, you know they dont read the other post,
or
> > > >care. if they wont read the posts on the same day they wont read an
FAQ,
> > > >they keep posting.
> > > >
> > > >
> > > >--
> > > >
> > > >  Chris Lee
> > > >  [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > >
> > > >""Mal McKay"" <[EMAIL PROTECTED]> wrote in message
> > > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > >I'd just like to offset my other email by saying that a faq is often
no
> > > >substitute for the knowledge and experience of this list's members.
In a
> > > >strange way, the 'dumb' question this list gets proves the a faq can
not
> >be
> > > >expected to know the right way to answer a query. A list member out
there
> > > >just might know _exactly_ what you need to solve your problem.
> > > >
> > > >mal
> > > >
> > > >-----Original Message-----
> > > >From: RBL [mailto:[EMAIL PROTECTED]]
> > > >Sent: 15 March 2001 17:17
> > > >To: Rick St Jean; [EMAIL PROTECTED]
> > > >Subject: Re: [PHP] FAQ
> > > >
> > > >
> > > >on 3/15/01 9:04 AM, Rick St Jean at [EMAIL PROTECTED] wrote:
> > > >
> > > > > Also I would like to know if there would be a demand for an
> > > > > experienced mailing list?  I am just frustrated by the same 3
> > > > > questions that pop up about once a day. The rest of the posts
> > > > > are great.
> > > > >
> > > > > Rick
> > > >
> > > >I once thought a great product for mail lists (would require an admin
> > > >interface, PHP?) would be a way to put into the list mail signature a
> >random
> > > >FAQ link.
> > > >
> > > >Fill that particular FAQ with commonly asked questions and have the
FAQ
> >sent
> > > >out each month to all subscribers. A decent threaded mail reader
would
> >make
> > > >this reasonably easy (notice I did not say *simple*) to administer.
> > > >
> > > >
> > > >Example
> > > >--
> > > >Need a PHP editor?
(http://php.net/common_questions.html?Q=phpeditors)
> > > >
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > > >To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >Example
> > > >--
> > > >Trouble compiling GD?
> > > >(http://php.net/common_questions.html?Q=gdrequirements)
> > > >
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > > >To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > > >
> > > >
> > > >--
> > > >Dave Goodrich
> > > >Director of Interface Development
> > > >Reality Based Learning Company
> > > >9521 NE Willows Road, Suite 100
> > > >Redmond, WA 98052
> > > >Toll Free 1-877-869-6603 ext. 237
> > > >Fax (425) 558-5655
> > > >[EMAIL PROTECTED]
> > > >http://www.rblc.com
> > > >
> > > >
> > > >
> > > >--
> > > >PHP General 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]
> > > >
> > > >
> > > >--
> > > >PHP General 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]
> > > >
> > > >
> > > >
> > > >--
> > > >PHP General 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]
> > >
> > > ##########################################################
> > > #  Rick St Jean,
> > > #  [EMAIL PROTECTED]
> > > #  President of Design Shark,
> > > #  http://www.designshark.com/
> > > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > > #  Tel: 905-684-2952
> > > ##########################################################
> > >
> > >
> > > --
> > > PHP General 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]
> > >
>
> ##########################################################
> #  Rick St Jean,
> #  [EMAIL PROTECTED]
> #  President of Design Shark,
> #  http://www.designshark.com/
> #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> #  Tel: 905-684-2952
> ##########################################################
>
>
> --
> PHP General 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]
>






Hi,

I have a PHP script (script_one.php) that creates a small form
containing a table of links.  In my script I declare an array,
$myarray[$total_links], of the same size as the number of links.  Each
link is coded as such:

<a href="../phpscript/script_two.php?myvar=' . $myarray[$i] .
'&element=' . $i . '">

This way, I pass the both the value of my array at elemnt "i" and which
element I am accessing to my second script.  This second script opens a
new window and creates another small form with an input field.  I allow
the user to enter information into an text field and close the window.

Question:  How do I pass the results of that information back to my
original script and stuff it into the array at the element chosen?

Thanks,
Don






the same way that you passed information over to the second page.


> -----Original Message-----
> From: Don [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 4:09 PM
> To: php list
> Subject: [PHP] passing variables from one form to another
> 
> 
> Hi,
> 
> I have a PHP script (script_one.php) that creates a small form
> containing a table of links.  In my script I declare an array,
> $myarray[$total_links], of the same size as the number of links.  Each
> link is coded as such:
> 
> <a href="../phpscript/script_two.php?myvar=' . $myarray[$i] .
> '&element=' . $i . '">
> 
> This way, I pass the both the value of my array at elemnt "i" and which
> element I am accessing to my second script.  This second script opens a
> new window and creates another small form with an input field.  I allow
> the user to enter information into an text field and close the window.
> 
> Question:  How do I pass the results of that information back to my
> original script and stuff it into the array at the element chosen?
> 
> Thanks,
> Don




Hello,

I just finished Installing Win2k Advanced Server and And MsSql 2000.  I have
apache as my web server and wanted to know the correct procedures to get
PHP4 connected to a MsSql database.  if anyone has gone through this before
please hook me up with the info.

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





How would I use FOPEN to validate a URL?

here is what I already have and it's not working properly.

$url=$row[url];

echo "Old URL = ".$url."<br>";

$fp = @fopen($url,"r"); 
if ($fp){
echo "Valid URL<br>";
}else{ 
echo "URL IS NOT VALID";
$url="http://";
}

echo "New URL = ".$url."<br>";



Kenneth R Zink II     [EMAIL PROTECTED]    ICQ# 5095094
'87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!  
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!  
http://www.s-series.org/htm/firestorm/firestorm.htm
Racing by the Grace of God!!




Well I changed the code to this expecting a true or false response (1 or 0)

$url=$row[url];
echo "Old URL = ".$url."<br>";

$fp = fopen("$url","r");

echo "fp = ".$fp."<br>";  //Debug line to see what $fp is returning

switch ($fp){
case 1:
echo "Valid URL<br>";
break;
case 0:
echo "URL IS NOT VALID<br>";
$url="http://";
break;
}
echo "New URL = ".$url."<br>";

I get this as a responce on a URL I know is valid (I tested it in my
browser)

Old URL = http://www.warrenbowley.com

Warning: fopen("http://www.warrenbowley.com","r") - Bad file descriptor in
/var/www2/html/members/datacopy.php on line 73
fp =
URL IS NOT VALID
New URL = http://




Kenneth R Zink II     [EMAIL PROTECTED]    ICQ# 5095094
'87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!
http://www.s-series.org/htm/firestorm/firestorm.htm
Racing by the Grace of God!!



> on 3/15/01 04:39 PM, [EMAIL PROTECTED] splat open and thusly melted:
>
> > $url=$row[url];
> >
> > echo "Old URL = ".$url."<br>";
> >
> > $fp = @fopen($url,"r");
> > if ($fp){
> > echo "Valid URL<br>";
> > }else{
> > echo "URL IS NOT VALID";
> > $url="http://";
> > }
> >
> > echo "New URL = ".$url."<br>";
>
> what exactly do you expect to happen, and what actually happens? i have a
> feeling, based on your code, that your $url is missing the "http://" part,
> and the script is failing because of that.






try @fopen(...)

prepending a '@' to the mysql funcs will suppress error
messages by those functions... maybe it'll work for fopen also.
never tried it, though.



> -----Original Message-----
> From: Kenneth R Zink II [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 4:58 PM
> To: PHP
> Subject: Re: [PHP] fopen to validate a URL
> 
> 
> Well I changed the code to this expecting a true or false response (1 or 0)
> 
> $url=$row[url];
> echo "Old URL = ".$url."<br>";
> 
> $fp = fopen("$url","r");
> 
> echo "fp = ".$fp."<br>";  //Debug line to see what $fp is returning
> 
> switch ($fp){
> case 1:
> echo "Valid URL<br>";
> break;
> case 0:
> echo "URL IS NOT VALID<br>";
> $url="http://";
> break;
> }
> echo "New URL = ".$url."<br>";
> 
> I get this as a responce on a URL I know is valid (I tested it in my
> browser)
> 
> Old URL = http://www.warrenbowley.com
> 
> Warning: fopen("http://www.warrenbowley.com","r") - Bad file descriptor in
> /var/www2/html/members/datacopy.php on line 73
> fp =
> URL IS NOT VALID
> New URL = http://
> 
> 
> 
> 
> Kenneth R Zink II     [EMAIL PROTECTED]    ICQ# 5095094
> '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!
> http://www.s-series.org/htm/windstorm/project-windstorm.htm
> '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!
> http://www.s-series.org/htm/firestorm/firestorm.htm
> Racing by the Grace of God!!
> 
> 
> 
> > on 3/15/01 04:39 PM, [EMAIL PROTECTED] splat open and thusly melted:
> >
> > > $url=$row[url];
> > >
> > > echo "Old URL = ".$url."<br>";
> > >
> > > $fp = @fopen($url,"r");
> > > if ($fp){
> > > echo "Valid URL<br>";
> > > }else{
> > > echo "URL IS NOT VALID";
> > > $url="http://";
> > > }
> > >
> > > echo "New URL = ".$url."<br>";
> >
> > what exactly do you expect to happen, and what actually happens? i have a
> > feeling, based on your code, that your $url is missing the "http://" part,
> > and the script is failing because of that.
> 
> 
> 
> -- 
> PHP General 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]
> 




At 14.03.2001 00:44, you wrote:
>Why, Don't you use the ftp functions to ftp everything over, instead of
>reading in all the files.  If you can get telnet access you could ftp them
>straight from your telnet connection.
>
>
>At 06:31 PM 3/13/01 -0500, [EMAIL PROTECTED] wrote:
> >Im moving servers within the week.. and I got about 600mbs worth of stuff
>on
> >there, and me being on 56K its nearly an impossible tasks.
> >
> >I thought up of a solution, but need to get it implemented. Have a script
> >open a directory and fopen all the files from the remote server and
>transfer
> >it to my new one. Anyone ever done something similar to this? is it
>possible?
> >
> >- Thanks


Or use FXP to transfer it straight between the ftp's (if they support it 
though,
if not, go with the ssh/telnet solution.)



--
Andreas D. Landmark / noXtension
PGP ID:0xB2BEAE80 / 4096bits
Fingerprint:654B 3BCD 1130 9B3A 08BB  AB1A BF72 841D B2BE AE80





you could just tar/gzip up the entire tree,
open a regular FTP session and FTP it all over
in one shot.

trying to write the whole thing in PHP is a waste
of time if the sole purpose is to move files as
easily and quickly as possible.



> -----Original Message-----
> From: Andreas D. Landmark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 4:54 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] need some help..
> 
> 
> At 14.03.2001 00:44, you wrote:
> >Why, Don't you use the ftp functions to ftp everything over, instead of
> >reading in all the files.  If you can get telnet access you could ftp them
> >straight from your telnet connection.
> >
> >
> >At 06:31 PM 3/13/01 -0500, [EMAIL PROTECTED] wrote:
> > >Im moving servers within the week.. and I got about 600mbs worth of stuff
> >on
> > >there, and me being on 56K its nearly an impossible tasks.
> > >
> > >I thought up of a solution, but need to get it implemented. Have a script
> > >open a directory and fopen all the files from the remote server and
> >transfer
> > >it to my new one. Anyone ever done something similar to this? is it
> >possible?
> > >
> > >- Thanks
> 
> 
> Or use FXP to transfer it straight between the ftp's (if they support it 
> though,
> if not, go with the ssh/telnet solution.)
> 
> 
> 
> --
> Andreas D. Landmark / noXtension
> PGP ID:0xB2BEAE80 / 4096bits
> Fingerprint:654B 3BCD 1130 9B3A 08BB  AB1A BF72 841D B2BE AE80
> 
> 
> -- 
> PHP General 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]
> 




After hours of searching :/ I was able to find Rasmus'
PostToHost() function.  It's working fine, for the most
part.  It's posting to the page and printing what it gets 
back as part of the page/code that calls the function.
This is most likely expected behavior, just not what I
expected.
However, I'm curious if there is a way to POST data to
a page WHILE redirecting the browser to that particular
page.  You can do this, _sort of_, client side with JavaScript
(OnClick = document.form.submit();)  I'm wondering
if there is a way you can do this server side with PHP?

Thanks.

Chris




I scratched my head for weeks with this problem untill I found a discussion
on this in the archives.

It seems that a post-form MUST be executed from the client side.
Here is the start of the discussion:
http://marc.theaimsgroup.com/?l=php-general&m=97614760211168&w=2

So... It has to be done with JavaScript...

Just a tip:
Check out the cURL-functions in the manual.
They do the stuff that the Post-to-Host does, but much much more...

Regards,
// Tobias Talltorp


""Boget, Chris"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> After hours of searching :/ I was able to find Rasmus'
> PostToHost() function.  It's working fine, for the most
> part.  It's posting to the page and printing what it gets
> back as part of the page/code that calls the function.
> This is most likely expected behavior, just not what I
> expected.
> However, I'm curious if there is a way to POST data to
> a page WHILE redirecting the browser to that particular
> page.  You can do this, _sort of_, client side with JavaScript
> (OnClick = document.form.submit();)  I'm wondering
> if there is a way you can do this server side with PHP?
>
> Thanks.
>
> Chris
>






> So, I've written all this nifty code and I'd like to do what I can from
> having it pilfered.
>
> What do you do to keep your stuff safe?

You could buy the Zend Encoder:

http://www.zend.com/store/products/zend-encoder.php

Either stand-alone or as part of the Developer Suite package deal.

You run your scripts through that, and replace your source files with
Encoded files.  They're essentially binary dumps of compiled PHP code.
About as comprehensible to a human as an .exe or .so file.

You can mix-and-match your encoded/source files, so configuration files can
be left as editable by the end-user.

There's a free trial that dumps out the Zend logo (this tromps on headers
and FRAME pages) and it also intentionally makes the encoded files about
half as fast as the real product, but you can still get a pretty good idea
of what the product does.

There are also discounts for non-profits, educational, etc.

You'll still want a clear licensing agreement with any clients/customers, of
course.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm






since PHP is executed before any otuput is shown to the browser,
all you have to do is keep a server between your code and
the other person.

unless i am horribly mistaken, you can turn off options to
allow people to view PHP source code via their browser.



> -----Original Message-----
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 5:02 PM
> To: Murph; [EMAIL PROTECTED]
> Subject: [PHP] Re: How do you keep your scripts secure?
> 
> 
> > So, I've written all this nifty code and I'd like to do what I can from
> > having it pilfered.
> >
> > What do you do to keep your stuff safe?
> 
> You could buy the Zend Encoder:
> 
> http://www.zend.com/store/products/zend-encoder.php
> 
> Either stand-alone or as part of the Developer Suite package deal.
> 
> You run your scripts through that, and replace your source files with
> Encoded files.  They're essentially binary dumps of compiled PHP code.
> About as comprehensible to a human as an .exe or .so file.
> 
> You can mix-and-match your encoded/source files, so configuration files can
> be left as editable by the end-user.
> 
> There's a free trial that dumps out the Zend logo (this tromps on headers
> and FRAME pages) and it also intentionally makes the encoded files about
> half as fast as the real product, but you can still get a pretty good idea
> of what the product does.
> 
> There are also discounts for non-profits, educational, etc.
> 
> You'll still want a clear licensing agreement with any clients/customers, of
> course.
> 
> --
> Visit the Zend Store at http://www.zend.com/store/
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> 
> 
> 
> -- 
> PHP General 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]
> 




The Zend encoder seems cool, but for $2400? What happened to the Zend
Compiler, is that what the Zend Encoder is? The Zend Encoder would
definetly be worth it if you were selling your code, but I haven't tried
it out.

Keith

On Thu, 15 Mar 2001, ..s.c.o.t.t.. [gts] wrote:

> since PHP is executed before any otuput is shown to the browser,
> all you have to do is keep a server between your code and
> the other person.
>
> unless i am horribly mistaken, you can turn off options to
> allow people to view PHP source code via their browser.
>
>
>
> > -----Original Message-----
> > From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 15, 2001 5:02 PM
> > To: Murph; [EMAIL PROTECTED]
> > Subject: [PHP] Re: How do you keep your scripts secure?
> >
> >
> > > So, I've written all this nifty code and I'd like to do what I can from
> > > having it pilfered.
> > >
> > > What do you do to keep your stuff safe?
> >
> > You could buy the Zend Encoder:
> >
> > http://www.zend.com/store/products/zend-encoder.php
> >
> > Either stand-alone or as part of the Developer Suite package deal.
> >
> > You run your scripts through that, and replace your source files with
> > Encoded files.  They're essentially binary dumps of compiled PHP code.
> > About as comprehensible to a human as an .exe or .so file.
> >
> > You can mix-and-match your encoded/source files, so configuration files can
> > be left as editable by the end-user.
> >
> > There's a free trial that dumps out the Zend logo (this tromps on headers
> > and FRAME pages) and it also intentionally makes the encoded files about
> > half as fast as the real product, but you can still get a pretty good idea
> > of what the product does.
> >
> > There are also discounts for non-profits, educational, etc.
> >
> > You'll still want a clear licensing agreement with any clients/customers, of
> > course.
> >
> > --
> > Visit the Zend Store at http://www.zend.com/store/
> > Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> > Volunteer a little time: http://chatmusic.com/volunteer.htm
> >
> >
> >
> > --
> > PHP General 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]
> >
>
> --
> PHP General 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]
>
>





> the much easier method is to change all your code extensions to be either
parsed or forbidden in httpd.conf
>
>     <Files *.egn>
>         AllowOverride AuthConfig FileInfo Indexes Limit Options
>         Order allow,deny
>         Deny from all
>     </Files>
>
> or
>
>     AddType application/x-httpd-php .inc .php .php3 .phtml .egn .wml
>
> that will protect agains people typing the url in their broswer to get the
code. to prevent people from ftp'ing in and getting others code, not just
their own use protftpd, this will allow every user to have their own root
dir.
>
>         DefaultRoot             ~/wwwroot/
>
> in the users home dir, ie. /home/lee make a symbolic link callred wwwroot
to where ever you want their home ftp dir to be.
>
> ln -s /home/httpd/vhosts/lee.com /home/lee/wwwroot

---


Hi, Chris.  Thanks for the thoughtful response - as always.

I buy hosting service (from Hostway.com, BTW. Great company; I'm a very
satisfied customer.) so much of this isn't an option for me.

What do you mean when you say "people typing the url in their browser to get
the code?" I use MSIE and to get any of my web pages to show up on the
Internet, I always have to type a url into my browser but I never see any
code.

I've seen other people say the same thing about people typing a url and
getting code but I'm afraid I don't quite understand.

Let's say I have some include file somewhere. Do you mean that if someone
knew the name of the include file, they could type that path and file name
and the code would display?

I've never seen that happen so it might be safe to assume that my service is
configured properly, right? Although I know you're going to say, "Murphy,
ask them to be sure."

Thanks for the help.

Murph





<snip>
> that will protect against people typing the url in their broswer to get the
> code.

i'm not sure what you're talking about here...php code is parsed on the
server then the html is sent to the browser....only way to get code is
if there's a .phps copy of the file accessible on the web

> Let's say I have some include file somewhere. Do you mean that if someone
> knew the name of the include file, they could type that path and file name
> and the code would display?

if someone knew the name of your include file, and it was under the
webserver root (for instance, the same folder) then yes, its like any
other file......you can get around this by changing your php.ini
include_path variables and putting the files there, outside the
webserver directory


jack




If the include file has an extension that is not recognized by the server as
being a "PHP" file, the server will simply serve it up as text. So, your
file index.php is recognized as being a PHP file, it gets passed to PHP
which parses and compiles it and returns it to the server, which passes the
output back to the browser. No one can see the source for this file. OTOH,
say you have a file named database.password. The server does not recognize
this as a PHP file, and so simply dumps the contents to the browser as text.
The user sees the raw contents of the file.

Check with your provider to see if they won't setup an .htaccess file for
you. With that file, you can instruct the server not to display any files
with sertain extensions that you specify. Or, as also suggested, put files
with non-PHP extensions outside the document root directory.

Kirk

> What do you mean when you say "people typing the url in their 
> browser to get
> the code?" I use MSIE and to get any of my web pages to show up on the
> Internet, I always have to type a url into my browser but I 
> never see any
> code.
> 
> Let's say I have some include file somewhere. Do you mean 
> that if someone
> knew the name of the include file, they could type that path 
> and file name
> and the code would display?
> 




> if someone knew the name of your include file, and it was under the
> webserver root (for instance, the same folder) then yes, its like any
> other file......you can get around this by changing your php.ini
> include_path variables and putting the files there, outside the
> webserver directory

I'd agree except that I don't leave any code lying around with anything
other than a *.php extension so, like you said, that'd be parsed by the
server before being sent to the browser, right?

I would take this to mean that my code *should* be safe...? <gulp>

I ask because I'm such a jealous S.O.B. I've done such hard work that I'd
hate to think that someone could come along and just use it all for free.
Plus, there's that nastiness of having passwords in there and all that.

Murph





> If the include file has an extension that is not recognized by the server
as
> being a "PHP" file, the server will simply serve it up as text. So, your
> file index.php is recognized as being a PHP file, it gets passed to PHP
> which parses and compiles it and returns it to the server, which passes
the
> output back to the browser. No one can see the source for this file. OTOH,
> say you have a file named database.password. The server does not recognize
> this as a PHP file, and so simply dumps the contents to the browser as
text.
> The user sees the raw contents of the file.


Yeah, that's what I kind of thought. I keep everything as *.php files so I
should be safe.

Would you agree that I can stop reading all this stuff about file
permissions and everything and begin to relax? My head hurts.

Murph





"... hate to think that someone could come along and just use it all for
free" So you don't really care to contribute to the Open Source community?
We would love to have your passwords. I would highly recommend setting an
include path outside the web server document root and store you files with
passwords in there. If you don't have access to the php.ini file, you can
set the include_path in your scripts.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Thu, 15 Mar 2001, Murph wrote:

> > if someone knew the name of your include file, and it was under the
> > webserver root (for instance, the same folder) then yes, its like any
> > other file......you can get around this by changing your php.ini
> > include_path variables and putting the files there, outside the
> > webserver directory
>
> I'd agree except that I don't leave any code lying around with anything
> other than a *.php extension so, like you said, that'd be parsed by the
> server before being sent to the browser, right?
>
> I would take this to mean that my code *should* be safe...? <gulp>
>
> I ask because I'm such a jealous S.O.B. I've done such hard work that I'd
> hate to think that someone could come along and just use it all for free.
> Plus, there's that nastiness of having passwords in there and all that.
>
> Murph
>
>
> --
> PHP General 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]
>
>





yes your code should be safe, at least from people trying to look at it
over the web...people on the server, well, that's another story...anyone
who can get into your www directory, and depending on the perms of your
files (if they have world readable) can view them...
i originally made some files 640 and chown'ed them to nobody.nobody.
That way they can be parsed, but no one else can view them. Anyone have
thoughts on this?

jack

Murph wrote:
> 
> > if someone knew the name of your include file, and it was under the
> > webserver root (for instance, the same folder) then yes, its like any
> > other file......you can get around this by changing your php.ini
> > include_path variables and putting the files there, outside the
> > webserver directory
> 
> I'd agree except that I don't leave any code lying around with anything
> other than a *.php extension so, like you said, that'd be parsed by the
> server before being sent to the browser, right?
> 
> I would take this to mean that my code *should* be safe...? <gulp>
> 
> I ask because I'm such a jealous S.O.B. I've done such hard work that I'd
> hate to think that someone could come along and just use it all for free.
> Plus, there's that nastiness of having passwords in there and all that.
> 
> Murph
> 
> --
> PHP General 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]




Can PHP work with interactive shells such as telnet like Expect does?
 
ie:
waitfor "ogin:"
put $login
waitfor "assword:"
put $password
 
 
etc.
 
 
TIA! :-)
 
 
 
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881




of course.  if it supports sockets then i dont see why it wouldnt
work with a back-n-forth exchange of information over those sockets.

php.net/sockets

look how much smaller that URL is than all the text you typed
out in the message :)  always check the online manual first.

-----Original Message-----
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Interactive Shells


Can PHP work with interactive shells such as telnet like Expect does?

ie:
waitfor "ogin:"
put $login
waitfor "assword:"
put $password


etc.


TIA! :-)




Hello,

I am trying to get PHP4 to connect to Microsoft SQL2000.  All I want to know
is if it is possible on a Win Box and a Linux box for server.

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------







of course it's possible... :)


> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 5:33 PM
> To: PHP User Group
> Subject: [PHP] Has anyone got MSSQL2000 to connect and work properlly?
> 
> 
> Hello,
> 
> I am trying to get PHP4 to connect to Microsoft SQL2000.  All I want to know
> is if it is possible on a Win Box and a Linux box for server.
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
> 
> 
> 
> -- 
> PHP General 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]
> 




Hi:

   I've trying to install PHP4 without good results:
  The steps i follow were:

1:  gzip -d  <  php-4.0.4pl1.tar.gz   | tar xvf -
2: cd php-4.0.4pl1
3: ./configure --with-nsapi=/usr/netscape/server4/ --enable-tracks-vars 
--enable-libgcc (because i want to uset with iplanet web server)
4: make
5: make install
6: add command lines into the files: obj.conf  & mime.type of the iPlanet
7: what else ???? thats all ????

I hoped to find an executable file (maybe "php") or something like that.

I'll appreciate if somebody help me, because  i need to resolve this 
problems just today.
I'm really desperated, so please help me !!





make a file called, test.php
with these lines in it:
<?
 phpinfo();
?>

stick it into your web server directory and point a browser at it, if it
doesn't work send error messages.

Keith

On Thu, 15 Mar 2001, Norberto Rojas wrote:

> Hi:
>
>    I've trying to install PHP4 without good results:
>   The steps i follow were:
>
> 1:  gzip -d  <  php-4.0.4pl1.tar.gz   | tar xvf -
> 2: cd php-4.0.4pl1
> 3: ./configure --with-nsapi=/usr/netscape/server4/ --enable-tracks-vars
> --enable-libgcc (because i want to uset with iplanet web server)
> 4: make
> 5: make install
> 6: add command lines into the files: obj.conf  & mime.type of the iPlanet
> 7: what else ???? thats all ????
>
> I hoped to find an executable file (maybe "php") or something like that.
>
> I'll appreciate if somebody help me, because  i need to resolve this
> problems just today.
> I'm really desperated, so please help me !!
>
>
> --
> PHP General 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]
>
>





Hello,

Is there a way to execute a CGI script while in php?

Brandon Orther




Brandon Orther wrote:
> 
> Hello,
> 
> Is there a way to execute a CGI script while in php?
> 
> Brandon Orther
> 
> --
> PHP General 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]

http://www.php.net/system
you can make a system call to anything, including a cgi...whether this
is desirable or not, depends, but i can be done...other ways include
using exec...check the site


jack




should probably clarify...."call to anything" is kinda vague ;-)
system lets you perform a command like you are on the command line...
http://php.net/manual/en/function.system.php
http://php.net/manual/en/function.virtual.php
check out these pages for more info

jack

Jack Dempsey wrote:
> 
> Brandon Orther wrote:
> >
> > Hello,
> >
> > Is there a way to execute a CGI script while in php?
> >
> > Brandon Orther
> >
> > --
> > PHP General 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]
> 
> http://www.php.net/system
> you can make a system call to anything, including a cgi...whether this
> is desirable or not, depends, but i can be done...other ways include
> using exec...check the site
> 
> jack
> 
> --
> PHP General 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]




Hey everyone,
 
I just upgraded from php v4.03pl1 to php 4.04pl.
Everything seems to work okay except my IMP/Webmail.
 
When I load the url, I get:
Fatal error: Call to undefined function: page_open() in /home/www/websites/horde/imp/index.php3 on line 15
 
Is this something that is no longer available in php v4.04? has anyone else seen this?
 
 
 
 
 
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881




Nevermind.
The php.ini was replaced which changed my include path.






Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

  ----- Original Message ----- 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, March 15, 2001 6:53 PM
  Subject: [PHP] Call to undefined function


  Hey everyone,

  I just upgraded from php v4.03pl1 to php 4.04pl.
  Everything seems to work okay except my IMP/Webmail.

  When I load the url, I get:
  Fatal error: Call to undefined function: page_open() in 
/home/www/websites/horde/imp/index.php3 on line 15


  Is this something that is no longer available in php v4.04? has anyone else seen 
this?





  Clayton Dukes
  CCNA, CCDA, CCDP, CCNP
  Internetwork Solutions Engineer
  Internetwork Management Engineer
  Thrupoint, Inc.
  Tampa, FL
  (c) 904.477.7825
  (h) 904.292.1881



------------------------------------------------------------------------------


  -- 
  PHP General 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]




clayton, 

checking php.net for 'page_open()' gives me nothing....also, why is it
.php3 if you're on php 4.04?

jack

> Clayton Dukes wrote:
> 
> Hey everyone,
> 
> I just upgraded from php v4.03pl1 to php 4.04pl.
> Everything seems to work okay except my IMP/Webmail.
> 
> When I load the url, I get:
> Fatal error: Call to undefined function: page_open() in
> /home/www/websites/horde/imp/index.php3 on line 15
> 
> Is this something that is no longer available in php v4.04? has anyone
> else seen this?
> 
> 
> 
> 
> 
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Internetwork Solutions Engineer
> Internetwork Management Engineer
> Thrupoint, Inc.
> Tampa, FL
> (c) 904.477.7825
> (h) 904.292.1881
> 
>     ---------------------------------------------------------------
> --
> PHP General 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]




it's an older app.

But I got it. Thanks :-)



Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

----- Original Message ----- 
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 7:03 PM
Subject: Re: [PHP] Call to undefined function


> clayton, 
> 
> checking php.net for 'page_open()' gives me nothing....also, why is it
> .php3 if you're on php 4.04?
> 
> jack
> 
> > Clayton Dukes wrote:
> > 
> > Hey everyone,
> > 
> > I just upgraded from php v4.03pl1 to php 4.04pl.
> > Everything seems to work okay except my IMP/Webmail.
> > 
> > When I load the url, I get:
> > Fatal error: Call to undefined function: page_open() in
> > /home/www/websites/horde/imp/index.php3 on line 15
> > 
> > Is this something that is no longer available in php v4.04? has anyone
> > else seen this?
> > 
> > 
> > 
> > 
> > 
> > Clayton Dukes
> > CCNA, CCDA, CCDP, CCNP
> > Internetwork Solutions Engineer
> > Internetwork Management Engineer
> > Thrupoint, Inc.
> > Tampa, FL
> > (c) 904.477.7825
> > (h) 904.292.1881
> > 
> >     ---------------------------------------------------------------
> > --
> > PHP General 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]
> 
> -- 
> PHP General 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]





Hello all.

Howcome I can create an array on a variable variable using array(), but not
in a for-loop (See code below)?

<?
$name = "talltorp";

$$name = array(1,2,3,4);  // <-- this works

for ($i=0; $i<10; $i++) { //
    $$name[] = $i;        // <-- this does not work
}                         //

for ($i=0; $i<sizeof($talltorp); $i++)

    echo $talltorp[$i];
}
?>

In the for-loop I get this error message:
Fatal error: Cannot use [] for reading in
E:\Inetpub\wwwroot\testscript\sessions\test4.php on line 6

Is this a bug or do I have the bugs in my head finally gotten to my thinking
area?

Thanks,
// Tobias Talltorp






try this: (you need to escape the variable part of the variable variable
with {})

<?php
$name = "talltorp";

$$name = array(1,2,3,4);  // <-- this works

for ($i=0; $i<10; $i++) { //
    ${$name}[] = $i;        // <-- this will work now
}                         //

for ($i=0; $i<sizeof($talltorp); $i++){

    echo $talltorp[$i];
}
?>

-----Original Message-----
From: Tobias Talltorp [mailto:[EMAIL PROTECTED]]
Sent: 16 March 2001 00:15
To: [EMAIL PROTECTED]
Subject: [PHP] creating array on variable variable (bug?)


Hello all.

Howcome I can create an array on a variable variable using array(), but not
in a for-loop (See code below)?

<?
$name = "talltorp";

$$name = array(1,2,3,4);  // <-- this works

for ($i=0; $i<10; $i++) { //
    $$name[] = $i;        // <-- this does not work
}                         //

for ($i=0; $i<sizeof($talltorp); $i++)

    echo $talltorp[$i];
}
?>

In the for-loop I get this error message:
Fatal error: Cannot use [] for reading in
E:\Inetpub\wwwroot\testscript\sessions\test4.php on line 6

Is this a bug or do I have the bugs in my head finally gotten to my thinking
area?

Thanks,
// Tobias Talltorp



--
PHP General 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]





Thanks a million man!

This did the trick...

Best Regards,
// Tobias Talltorp

""Mahmoud Abu-Wardeh"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try this: (you need to escape the variable part of the variable variable
> with {})
>
> <?php
> $name = "talltorp";
>
> $$name = array(1,2,3,4);  // <-- this works
>
> for ($i=0; $i<10; $i++) { //
>     ${$name}[] = $i;        // <-- this will work now
> }                         //
>
> for ($i=0; $i<sizeof($talltorp); $i++){
>
>     echo $talltorp[$i];
> }
> ?>
>
> -----Original Message-----
> From: Tobias Talltorp [mailto:[EMAIL PROTECTED]]
> Sent: 16 March 2001 00:15
> To: [EMAIL PROTECTED]
> Subject: [PHP] creating array on variable variable (bug?)
>
>
> Hello all.
>
> Howcome I can create an array on a variable variable using array(), but
not
> in a for-loop (See code below)?
>
> <?
> $name = "talltorp";
>
> $$name = array(1,2,3,4);  // <-- this works
>
> for ($i=0; $i<10; $i++) { //
>     $$name[] = $i;        // <-- this does not work
> }                         //
>
> for ($i=0; $i<sizeof($talltorp); $i++)
>
>     echo $talltorp[$i];
> }
> ?>
>
> In the for-loop I get this error message:
> Fatal error: Cannot use [] for reading in
> E:\Inetpub\wwwroot\testscript\sessions\test4.php on line 6
>
> Is this a bug or do I have the bugs in my head finally gotten to my
thinking
> area?
>
> Thanks,
> // Tobias Talltorp
>
>
>
> --
> PHP General 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]
>
>
> --
> PHP General 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]
>






When I add /text on to the end of the url for a php3 script (as in:
foo.com/script.php3/extratext), it gives me the following message:

Fatal error: Unable to open /home/httpd/html/foo.com/script.php3/extratext
in - on line 0
No input file specified.

Can anybody point me to the documentation explaining this behavior? Is it
the php3 module being activated because of the .php3 extension but then
trying to parse a file named "extratext"?

thanks,
jesse kipp






Is there a way to pass a JavaScript variable to a PHP function?

Thanks, Gary






You might recall that last month I asked for input from people who 
are making a "good living" doing PHP. And if you subscribe to 
Contract Professional's weekly ezine, you might have seen the article 
about Tom Beidler (Hi Tom!).

Based on that article, and the fact that my editor had never heard of 
PHP, she asked me to do a TechWatch piece for the print magazine. For 
that, I need to talk to independent contractors who get paid to 
program in PHP (it does not matter how much or how little). This does 
not have to be your full time profession.

I will be asking "none of anyone's business" questions like "how 
much? how often? how many billable hours?" I will be doing some 
aggregating of information (average rates, regional differences etc) 
and I won't mention anyone's name without permission. Drop me a line 
if you'd like to be involved.

Thanks!
dej
-- 
------------------------------------------------------------------------------
Buy "On the Edge"! http://www.dejahsprivateice.com/PIshop/OTE_order.php3
Puberty has stolen Elayne Smith's chance for Olympic gold. Caught 
between love and lust, despair and determination, a golden boy and a 
troubled man, Elayne is On the Edge.
------------------------------------------------------------------------------
Apply to be a ForeWord Magazine eBook Reviewer! 
mailto:[EMAIL PROTECTED] for application.
------------------------------------------------------------------------------




Hello,

This is my first post to the group so go easy on me.

I am using apache httpd.conf file to redirect 404 errors to a page which
basically displays and error message, amongst other things. It all works
fine but...

I want to be able to find out what the document that they attempted to
access was named, so I can display and log the value to a special log that I
am using for othger purposes.

Should the 'not found' url be in $REDIRECT_ERROR_NOTES ???

This value doesn't seem to be set. And its not in any of the HTTP_ENV_VARS
or HTTP_SERVER_VARS.

I know the answer will be something simple but I cant seem to find much help
anywhere. Any help or push in the direction of a useful web page would be
nice.

Paul






On Fri, 16 Mar 2001 12:04, Paul R. Jackson wrote:
> Hello,
>
> This is my first post to the group so go easy on me.
>
> I am using apache httpd.conf file to redirect 404 errors to a page
> which basically displays and error message, amongst other things. It
> all works fine but...
>
> I want to be able to find out what the document that they attempted to
> access was named, so I can display and log the value to a special log
> that I am using for othger purposes.
>
> Should the 'not found' url be in $REDIRECT_ERROR_NOTES ???
>
> This value doesn't seem to be set. And its not in any of the
> HTTP_ENV_VARS or HTTP_SERVER_VARS.
>
> I know the answer will be something simple but I cant seem to find much
> help anywhere. Any help or push in the direction of a useful web page
> would be nice.
>
> Paul

Check out REQUEST_URI - from that you can build a full URL if you need it.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




>>Check out REQUEST_URI - from that you can build a full URL if you need it.

The REQUEST_URI only has the URI of the error page itself (in my case
/error/404.html) I want the URI of the page that wasn't found.

A php info doesnt show the URI anywhere.

Thanks for the speedy response

Paul

At 12:08 PM 16/3/01 +1030, you wrote:
On Fri, 16 Mar 2001 12:04, Paul R. Jackson wrote:
> Hello,
>
> This is my first post to the group so go easy on me.
>
> I am using apache httpd.conf file to redirect 404 errors to a page
> which basically displays and error message, amongst other things. It
> all works fine but...
>
> I want to be able to find out what the document that they attempted to
> access was named, so I can display and log the value to a special log
> that I am using for othger purposes.
>
> Should the 'not found' url be in $REDIRECT_ERROR_NOTES ???
>
> This value doesn't seem to be set. And its not in any of the
> HTTP_ENV_VARS or HTTP_SERVER_VARS.
>
> I know the answer will be something simple but I cant seem to find much
> help anywhere. Any help or push in the direction of a useful web page
> would be nice.
>
> Paul

Check out REQUEST_URI - from that you can build a full URL if you need it.

--
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA







On Fri, 16 Mar 2001 12:13, Paul R. Jackson wrote:
> >>Check out REQUEST_URI - from that you can build a full URL if you
> >> need it.
>
> The REQUEST_URI only has the URI of the error page itself (in my case
> /error/404.html) I want the URI of the page that wasn't found.
>
> A php info doesnt show the URI anywhere.
>
> Thanks for the speedy response
>
> Paul

Try moving the errordocument 404 /error/404.html from your httpd.conf 
into .htaccess files.

Here's what I use and it mails me an error message as well!

<?php

$admin_email = "[EMAIL PROTECTED]";
$from = "From: [EMAIL PROTECTED]";
$website_url = $SERVER_NAME;
$subject = "404 Error at $REQUEST_URI";
$URL = "http://" . getenv("HTTP_HOST");
$URL .= ereg_replace( "[^!#-9:;=?-Z_a-z~]", "",  
substr(getenv("REQUEST_URI"), 0, 200) );

$body = "WEBSITE--\n$website_url\n
BAD LINK--\n$URL\n\n
PAGE WITH BAD LINK--\n$HTTP_REFERER\n
TYPE--\n404 File Not Found\n\n
WHO WAS ACCESSING--\n$REMOTE_ADDR: $REMOTE_HOST\n
USER AGENT\n$HTTP_USER_AGENT";

mail($admin_email,$subject,$body,$from);
?>

<title>Centre for Injury Studies - File Not Found</title>
</head>
<table border="0" cellspacing="0" cellpadding="10" align="center" 
BGCOLOR="#70DBDB">
<tr><td>
<!-- <h1 align="center">File Not Found </h1> -->
<P ALIGN="CENTER"><IMG SRC="/images/404.gif" WIDTH=321 HEIGHT=120></P>
<p>The requested URL <?php print($URL) ?> was not found on this 
server.</p>
<ul>
<li>If you followed this link form another page on our site, it is 
possible 
that it is inaccurate or outdated. This error has been logged, and we 
will look into it right away. </li>
<li>If you entered the requested URL by hand, check and make sure you 
entered it correctly. Remember, URL's are case-sensitive. Index.html 
is not equal to index.html.</li>
<li>If you followed a link from another web site, try contacting that 
site's webmaster and inform them that their link may be broken.</li>
<LI>As a result of the upgrade of our web site, some URLs have been 
changed. Try 
using the Quick Search option above or our <A 
HREF="/search/search.php">Search Page</A>
to locate the document you are seeking.</LI>
<?php
if(strpos($URL, '3icipc')) {
  echo '<LI STYLE="COLOR:red">';
  }
else {
  echo '<LI>';
}
?>
Program and proceedings of the 3rd International Conference on Injury 
Control and 
Prevention (3ICICP) are no longer available here.</LI>
</ul>
<h3 align="center"><a href="<?php echo $HTTP_SERVER?>">Back to our main 
page.</a></h3>
</TD></tr>
</table>

</html>


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hello,

I need to create excel files from data stored in mysql.
I'm using php in a linux box, so as far as I know I cant
use COM functions.

Is there a way to do what I intend

Tank you

-- 
Javier Onate Mendia
[EMAIL PROTECTED]




I have a question.  can a 1 php script access a mysql database more than 10
times a second....  it's a simple updated statement?   if it can how many
times do you think it can access the database in a second?

thanks randy




Reply via email to