[PHP] RESOLVED --> RE: [PHP] Mime type prepeded at file upload

2002-03-25 Thread David McInnis

This was a problem with the version of PHP that I had installed.
PHP-4.0.4pl1. Apparently there is a bug that causes this to be written
to the front of the file.

Solution?  Upgrade.

David McInnis

-Original Message-
From: David McInnis [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 25, 2002 11:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mime type prepeded at file upload

When I save a file that has been uploaded through PHP it prepends (adds
to the beginning of the file) the mime type.  This renders the file
unusable when it is downloaded as MS Word cannot open the file and tries
to install some kind of converter.

Any ideas for me?

David McInnis


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



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




[PHP] Cookies

2002-03-25 Thread Chuck \"PUP\" Payne

Can someone point me to a webset that example how to do cookies? I try to do
what the mannual said but, when I go to my temp dir, there no cookie file. I
know it working because my file would print a phrasing error.

Thanks,

 
 | Chuck Payne  |
 | Magi Design and Support  |
 | www.magidesign.com   |
 | [EMAIL PROTECTED]   |
 

BeOS, Macintosh 68K, Classic, and OS X, Linux Support.
Web Design you can afford.

"Never be bullied into silence. Never allow yourself to be made a victim.
Accept no one's definition of your life; define yourself."- Harvey Fierstein



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




Re: [PHP] Regular Expression Challenge

2002-03-25 Thread Matt Moreton

Very nice. I was going to suggest:



But uhhh, your way is much nicer :]

- Original Message -
From: "Richard Archer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 4:04 AM
Subject: Re: [PHP] Regular Expression Challenge


> At 11:30 AM +1000 26/3/02, Cameron Just wrote:
>
> >I was not sure as to whether regexp could do recursive matching and now I
> >know.
>
> This is crazy! There used to be clue on this list!
>
> 
> $test = "wed-thurs 9:35, 14:56, 18:35, 6, :12";
>
> $patt = "/([a-z]+|[0-9]*:*[0-9]+)[ ,-]*/";
>
> if (preg_match_all ($patt, $test, $tok)) {
> while (list($k, $v) = each($tok[1])) {
> echo "\$tok[$k] = $v\n";
> }
> }
>
> ?>
>
> Output:
> $tok[0] = wed
> $tok[1] = thurs
> $tok[2] = 9:35
> $tok[3] = 14:56
> $tok[4] = 18:35
> $tok[5] = 6
> $tok[6] = :12
>
>  ...R.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] File Edit

2002-03-25 Thread Jason Wong

On Tuesday 26 March 2002 10:41, Randy Johnson wrote:
> ok i read all the file into an array,
>
> now do i search each line in the array .

Yes. Based on the fragment of file that you've given, here's some psuedo-code.


initialise 3 arrays, $top, $middle, $bottom;
$found_middle = 0; $found_bottom;
for each $line in input array {
  if ($line not digit) {
if (!$found_middle) { 
  $top[] = $line; }
else { 
  $bottom[] = $line;
}}
  else {
$found_middle = 1;
$middle[] = $line;
  }
}

// Now you have 3 arrays, 
// $top contains all lines before the IPs,
// $middle contains lines with IPs,
// $bottom contains all lines after the IPs

Do what you need to edit $middle then write $top, $middle, $bottom out to the 
file.



> based on my example i do not know how to proceed
> after reading it into the array
>
>
>
> case "$1" in
> start)
> 100.123.456.789
> 321.654.987.231
> 123.45.456.789
> 123.456.789.12
> ;;
>
>  
> - Original Message -
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "Randy Johnson" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, March 25, 2002 9:11 PM
> Subject: Re: [PHP] File Edit
>
> > You read all of it
> >
> > On Mon, 25 Mar 2002, Randy Johnson wrote:
> > > How do I know what part of it to read in the array?
> > > - Original Message -
> > > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> > > To: "Randy Johnson" <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Monday, March 25, 2002 9:03 PM
> > > Subject: Re: [PHP] File Edit
> > >
> > > > You read the entire file into memory (an array using file() perhaps)
>
> and
>
> > > > then edit it in memory and write the entire new file back out.
> > > >
> > > > -Rasmus
> > > >
> > > > On Mon, 25 Mar 2002, Randy Johnson wrote:
> > > > > Hello,
> > > > >
> > > > >
> > > > > I want to be able to edit part of a file.  via a text box using php
>
> how
>
> > > do i read a file and get the part i want to read and edit it and then
>
> write
>
> > > it back to that file here is an example:
> > > > > .
> > > > > case "$1" in
> > > > >   start)
> > > > >
> > > > > 100.123.456.789
> > > > > 321.654.987.231
> > > > > 123.45.456.789
> > > > > 123.456.789.12
> > > > >
> > > > > ;;
> > > > >
> > > > > 
> > > > >
> > > > > In this example I want to be able to be able to pull the
> > > > > ipaddresses
>
> out
>
> > > and edit them and add a new one on to the end and then write the data
>
> back
>
> > > to the file.
> > >
> > > > > Thanks in advance
> > > > >
> > > > >
> > > > > Randy

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




Re: [PHP] php and javascript

2002-03-25 Thread Dennis Moore

Your popup window should be an normal PHP page calling your images in the
database.   You can then setup your form to call the popup windows via
javascript using the window.open() method.

/dkm



- Original Message -
From: "Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 6:13 PM
Subject: [PHP] php and javascript


> I have some image urls that I have stored in a mysql database.  I want to
be
> able to display the images in a popup window using javascript.  But I
haven't
> been able to figure out how to get the get the info to mysql so that the
> image loads when the popup window appears.  Below is an example of the
form
> without any javascript.
>
> 
> 
> ">
> 
>
> Any help appreciated.
> Thanks,
> SW
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Re: Non-Cache in forms?

2002-03-25 Thread eric.coleman

I am putting certin code within comment tags, so it isn't seen...


- Original Message -
From: "David Robley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 11:00 PM
Subject: Re: [PHP] Re: Non-Cache in forms?


> On 25 Mar 2002 at 0:29, [EMAIL PROTECTED] wrote:
>
> > yes, but i send them back to the previous page
> > and it shows the form...
> >
> > What would be a way around this?
> > - Original Message -
> > From: "David Robley" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, March 24, 2002 11:39 PM
> > Subject: [PHP] Re: Non-Cache in forms?
> >
> >
> > > In article <001801c1d38d$6b016eb0$0201a8c0@zaireweb>,
> > > [EMAIL PROTECTED] says...
> > > > Alright,
> > > >
> > > > When I submit a form, and shoot out an error, such as "Please fill
in
> > email address" and then send them back to the form, the form seems to be
> > blank... > > > > Why?  What is happening that the form isn't keeping the
> > previously posted data? > > > > My error function looks like so > > > >
> > function crapout($msg, $hidden_msg = FASE) { > > echo($msg); > >
> > if($hidden_msg != "FALSE") { > > echo(''); >
>
> > } > > exit; > > } > > > > Thanks, > > Eric Coleman > > > > You are aware
> > that exit halts execution of the script? > > -- > David Robley >
Temporary
> > Kiwi! > > Quod subigo farinam > > -- > PHP General Mailing List
> > (http://www.php.net/) > To unsubscribe, visit:
> > http://www.php.net/unsub.php > > >
>
> Please respond to the list as well, as you are more likely to get a timely
and useful
> response that way.
>
> I notice that your error message is in HTML comment tags? Without seeing
more of your
> code, it's a bit hard to tell. But you might try doing a view source and
see if there is
> anything in the source that might assist. Otherwise, post more relevant
parts of your code
> to the list.
>
>
> --
> David Robley
> Temporary Kiwi!
> Quod subigo farinam
>
> "I want this statue to look like the Venus de Milo," said Tom disarmingly.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


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




[PHP] PEAR installation correct?

2002-03-25 Thread lmlweb

How do I know if my web hosting server installed PEAR correctly?

I'm trying to create a Search Engine from the PHP Developer's Cookbook,
and so far, here's what I know:

PHP has the PEAR installed ('--with-pear' according phpinfo.php)

And having telnetted into my server, was able to find the PEAR location
at 

/usr/local/bin/, where it is simply called "pear".

In the Find.php file, I set it so that it calls a require_once
'/usr/local/bin/pear';
Originally it was pear.php, but it didn't find it, so I set it as shown
above.

Now, if I run the file, I get this message:
#!/usr/local/bin/php -Cq 
Fatal error: Failed opening required 'PEAR.php' (include_path='') in
/usr/local/bin/pear on line 45

How do I know if PEAR is installed correctly? (The web hosting hasn't
installed Pear before until I requested it)



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




Re: [PHP] Regular Expression Challenge

2002-03-25 Thread Richard Archer

At 11:30 AM +1000 26/3/02, Cameron Just wrote:

>I was not sure as to whether regexp could do recursive matching and now I
>know.

This is crazy! There used to be clue on this list!

\n";
}
}

?>

Output:
$tok[0] = wed
$tok[1] = thurs
$tok[2] = 9:35
$tok[3] = 14:56
$tok[4] = 18:35
$tok[5] = 6
$tok[6] = :12

 ...R.

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




Re: [PHP] Re: Non-Cache in forms?

2002-03-25 Thread David Robley

On 25 Mar 2002 at 0:29, [EMAIL PROTECTED] wrote:

> yes, but i send them back to the previous page
> and it shows the form...
> 
> What would be a way around this?
> - Original Message -
> From: "David Robley" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 24, 2002 11:39 PM
> Subject: [PHP] Re: Non-Cache in forms?
> 
> 
> > In article <001801c1d38d$6b016eb0$0201a8c0@zaireweb>,
> > [EMAIL PROTECTED] says...
> > > Alright,
> > >
> > > When I submit a form, and shoot out an error, such as "Please fill in
> email address" and then send them back to the form, the form seems to be
> blank... > > > > Why?  What is happening that the form isn't keeping the
> previously posted data? > > > > My error function looks like so > > > >
> function crapout($msg, $hidden_msg = FASE) { > > echo($msg); > >
> if($hidden_msg != "FALSE") { > > echo(''); > >
> } > > exit; > > } > > > > Thanks, > > Eric Coleman > > > > You are aware
> that exit halts execution of the script? > > -- > David Robley > Temporary
> Kiwi! > > Quod subigo farinam > > -- > PHP General Mailing List
> (http://www.php.net/) > To unsubscribe, visit:
> http://www.php.net/unsub.php > > >

Please respond to the list as well, as you are more likely to get a timely and useful 
response that way.

I notice that your error message is in HTML comment tags? Without seeing more of your 
code, it's a bit hard to tell. But you might try doing a view source and see if there 
is 
anything in the source that might assist. Otherwise, post more relevant parts of your 
code 
to the list.


-- 
David Robley
Temporary Kiwi!
Quod subigo farinam

"I want this statue to look like the Venus de Milo," said Tom disarmingly.



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




Re: [PHP] Regular Expression Challenge

2002-03-25 Thread Matt Moreton

You can do recursive matching using the (?R) syntax in preg functions (Perl
Compatible Regular Expression).

- Original Message -
From: "Christopher William Wesley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Cameron Just" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 1:01 AM
Subject: Re: [PHP] Regular Expression Challenge


> You won't be able to do that with a regexp alone.  Recursively matching
> isn't possible.  You'll need a little help from some additional code.
>
>  $string = "wed-thurs 9:35, 14:56, 18:35";  // YOUR STRING
> $regexp = "^([a-z]+)-([a-z]+)[\ ]+(.*)$";
> // GETS (day)-(day) (any/all times)
> $find = ereg( $regexp, $string, $matches );
> $times = explode( ",", $matches[3] );  // BREAK APART (.*)
> print( $matches[1] . "\n" . $matches[2] . "\n" );
> while( list( $key, $val ) = each( $times ) ){
> print( trim( ${val} ) . "\n" );
> }
> ?>
>
> That seems to do the trick.  Hopefully that gets ya closer to where you
> want to go.  If you really needed to regexp match on the times, you can
> do that within the while loop.
>
> g.luck,
> ~Chris /"\
>\ / Microsoft Security
Specialist:
> X  The moron in Oxymoron.
>/ \ http://www.thebackrow.net
>
> On Mon, 25 Mar 2002, Cameron Just wrote:
>
> > Hi,
> >
> > I am trying to pull out the following information via a regular
expression.
> >
> > The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
> >
> > and I want it to retreive
> > wed
> > thurs
> > 9:35
> > 14:56
> > 18:35
> >
> > The regular expression I am using is
> > ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
> >
> > It seems to be grabbing the
> > wed
> > thurs
> > 9:35
> > but I can't seem to retrieve the rest of the times.
> >
> > Anyone have any ideas?
> >
> > BTW
> > There can be any number of 'times' in the string and also the 'times'
can
> > be with or without the colon and the minutes, hence the '}:?[0-9]{0,2}'
> > part of the regexp.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] header and session?

2002-03-25 Thread bob

On Mon, 25 Mar 2002 08:54:27 -0700, [EMAIL PROTECTED] (Johny? ?rk)
wrote:

>Do you have register_globals turned on or off in php.ini? What values are $a
>and $b being set to?
>
>Kirk
>
>> -Original Message-
>> From: bob [mailto:[EMAIL PROTECTED]]
>> Sent: Sunday, March 24, 2002 4:21 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] header and session?
>> 
>> 
>>  1.php?2.php
>> session_start(); session_start();
>> .. ..
>> $_SESSION['a'] =$a; echo $_SESSION['a']; 
>> $_SESSION['b'] =$b; echo $_SESSION['b']; 
>> header("location: 2.php");
>> 
>> after jump to 2.php ,there is an warning: undefined index a ,b
>> 
>> 
>> if i  change 1.php   to
>>  
>> session_start(); 
>> ..  
>> $_SESSION['a'] =$a;
>> $_SESSION['b'] =$b;
>> go on 
>> 
>> it works well!
register_globals is on.$a,$b is set to $_SESSION array,which is
global  in any scope.
the problem is i submit a login form to 1.php,which register some
session variable.then,in 2.php,i fail to print them out.

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




[PHP] Re: Session Variables

2002-03-25 Thread bob

On Mon, 25 Mar 2002 18:18:33 -, [EMAIL PROTECTED] (Chad Gilmer)
wrote:

>Hi There,
>
>I am a beginner to PHP and I am tring to use session variables on my site.
>
>I am trying to use Session Variables in PHP on the iPLANIT.tv site
>
>When I use the following code:
>
> $ses_counter++;
>
> session_register("ses_counter");
>
>?>
>
>I get the following error
>
>Warning: Cannot send session cookie - headers already sent by (output
>started at /home/iplanit/public_html/php/login.php:8) in
>/home/iplanit/public_html/php/login.php on line 11
>
>Warning: Cannot send session cache limiter - headers already sent (output
>started at /home/iplanit/public_html/php/login.php:8) in
>/home/iplanit/public_html/php/login.php on line 11
>
>Any Ideas???
>
>Cheers
>
>Chad
>
put the session_register("") in front of the code.

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




[PHP] Re: HTTP_REFERER

2002-03-25 Thread Jim Koutoumis

Tom,

I sort of do the same here,... think you'll find that index.html is the
'default index' for a directory when a page isn't specified on your web
server and that she's going to http://www.domain.com

Hope this helps.

Jim.

"Tom Hilton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi, I am using the $HTTP_REFERER variable to ensure that users of a
website
> are getting to a certain page through a link from the index.html page, and
> not going straight to the page through a bookmark.
>
> $page=$HTTP_REFERER;
> if ($page!="http://www.somedomain.com/index.html";)
>   {
>   echo "Please log in through the home page";
>   echo " CONTENT='1;URL=http://www.somedomain.com/index.html'>";
>   }
>  This is working fine for most users, but one user is telling me that even
> though she is following the link from the index page, she's still getting
> the error message,  and are being bounced back to the index page.  She is
> using Internet Explorer 6.0.  Are there any security or privacy settings
> that might restrict use of the $HTTP_REFERER variable?  Or is there a
better
> way to make sure users follow links to pages, rather than bookmarking and
> going straight to a page?  Thanks for any help you can give me.
>
>



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




Re: [PHP] XML Comparison?

2002-03-25 Thread Analysis & Solutions

Chris:

On Mon, Mar 25, 2002 at 08:38:16AM -0500, Chris Hilbert wrote:
> I was wondering if anyone would know how I could go about checking two XML
> files for differences, similar to the "diff" command in *nix.  I'm having a
> heck of a time getting a function written to achieve this task.

Which OS are you running on???  Okay, I'll guess Windows.  Ah, yes, your 
mail headers confirm that...

Have you tried the "fc" command?  It does the same thing as the 
"unix" based "cmp" command.

Also, you could pull the contents of both files into variables and then
compare the strings using either a straight "==" evaluation or via one
of the comparison functions such as strcmp(), strncasecmp() or
strcasecmp().

Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y

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




Re: [PHP] Bad Email Addresses

2002-03-25 Thread Analysis & Solutions

Hey Steven:

On Mon, Mar 25, 2002 at 09:40:01AM -0800, Steven Walker wrote:

> I have PHP automated emails sent from my website. Does anybody know a 
> good way to filter returned mail? What I want to do is extract the bad 
> email addresses from returned mail and delete them from my database.

Are you familiar with Procmail?  If you're running on a unix type
system, this will be the best option.  Check out
http://www.zer0.org/procmail/mini-faq.html on how to use it.

Here's a quick sample recipe file I'll call "rc.bounce."  This has NOT
been tested and I'm basing it on some quick assumptions.  You're going
to have to tweak it to conform to your exact conditions.

   # egrep the 'H'eader.
   :0H
   * ^To:.*[EMAIL PROTECTED]
   * ^From:.*<>
   | $HOME/bounce.php

Then, you'll have to write bounce.php to process the incoming mail 
accordingly.

If you don't have procmail, or you don't want to deal with it, you can
direct the returns to a particular mailspool file (aka mailbox).  Write
up a PHP script to parse the file, splitting it up into separate emails,
then gleaning the needed information from each email and update your
database with the relevant data.  Then, whenever you feel like
processing the bounces, run the script.

Here's a regex I use to split mail files (reassemble the linewraps, of
course):

$Emails = preg_split("/[\n\r]+From\s*[^\s]*\s*
   (Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*
   (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*\d{1,2} 
   \d{2}:\d{2}:\d{2} (19|20)\d{2}[\n\r]+/", $ContentString);


Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y

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




Re: [PHP] FTP RAW

2002-03-25 Thread Analysis & Solutions

Hi Chris:

On Mon, Mar 25, 2002 at 02:05:30PM -0700, Chris wrote:
> Can anyone help me with the command I need for a RAW FTP file upload?
> I can create connections and they empty file, but I have no idea how to get
> the data into the file and I have tried everything.

Have you tried first creating the file on your system using the fopen(), 
fputs() and fclose() functions?  Once that's done, then you can use 
PHP's FTP functions.

Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y

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




Re: [PHP] File Edit

2002-03-25 Thread Randy Johnson

ok i read all the file into an array,

now do i search each line in the array .

based on my example i do not know how to proceed
after reading it into the array



case "$1" in
start)
100.123.456.789
321.654.987.231
123.45.456.789
123.456.789.12
;;

 
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Randy Johnson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 9:11 PM
Subject: Re: [PHP] File Edit


> You read all of it
>
> On Mon, 25 Mar 2002, Randy Johnson wrote:
>
> > How do I know what part of it to read in the array?
> > - Original Message -
> > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> > To: "Randy Johnson" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Monday, March 25, 2002 9:03 PM
> > Subject: Re: [PHP] File Edit
> >
> >
> > > You read the entire file into memory (an array using file() perhaps)
and
> > > then edit it in memory and write the entire new file back out.
> > >
> > > -Rasmus
> > >
> > > On Mon, 25 Mar 2002, Randy Johnson wrote:
> > >
> > > > Hello,
> > > >
> > > >
> > > > I want to be able to edit part of a file.  via a text box using php
how
> > do i read a file and get the part i want to read and edit it and then
write
> > it back to that file here is an example:
> > > >
> > > > .
> > > > case "$1" in
> > > >   start)
> > > >
> > > > 100.123.456.789
> > > > 321.654.987.231
> > > > 123.45.456.789
> > > > 123.456.789.12
> > > >
> > > > ;;
> > > >
> > > > 
> > > >
> > > > In this example I want to be able to be able to pull the ipaddresses
out
> > and edit them and add a new one on to the end and then write the data
back
> > to the file.
> > > >
> > > >
> > > > Thanks in advance
> > > >
> > > >
> > > > Randy
> > > >
> > > >
> > > >
> > >
> >
> >
>



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




[PHP] Find if a html tag was closed

2002-03-25 Thread Julio Nobrega

  Hi all,

  I am trying to build a regex to check if an array of allowed html tags
were closed. For example:

Wrong:
text
  Should give me something like: Tag  was not closed.

  Here's what I came up so far:

$tags_to_check = Array('a','b','i','p');
foreach ($tags_to_check as $tag_check) {
if (eregi("<". $tag_check . ">(.*)[^]",$_POST['form_field'])) {
?> Tag '); ?> not
closed
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] File Edit

2002-03-25 Thread Rasmus Lerdorf

You read all of it

On Mon, 25 Mar 2002, Randy Johnson wrote:

> How do I know what part of it to read in the array?
> - Original Message -
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "Randy Johnson" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, March 25, 2002 9:03 PM
> Subject: Re: [PHP] File Edit
>
>
> > You read the entire file into memory (an array using file() perhaps) and
> > then edit it in memory and write the entire new file back out.
> >
> > -Rasmus
> >
> > On Mon, 25 Mar 2002, Randy Johnson wrote:
> >
> > > Hello,
> > >
> > >
> > > I want to be able to edit part of a file.  via a text box using php  how
> do i read a file and get the part i want to read and edit it and then write
> it back to that file here is an example:
> > >
> > > .
> > > case "$1" in
> > >   start)
> > >
> > > 100.123.456.789
> > > 321.654.987.231
> > > 123.45.456.789
> > > 123.456.789.12
> > >
> > > ;;
> > >
> > > 
> > >
> > > In this example I want to be able to be able to pull the ipaddresses out
> and edit them and add a new one on to the end and then write the data back
> to the file.
> > >
> > >
> > > Thanks in advance
> > >
> > >
> > > Randy
> > >
> > >
> > >
> >
>
>


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




[PHP] which php book 2 buy ?

2002-03-25 Thread Septic Flesh

I wanna buy a book from amazon . . .but don't know which one..
Do you know where I will find examples of shopping carts ? (which book ?)

thanks..


--


Sapilas@/dev/pinkeye





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




Re: [PHP] File Edit

2002-03-25 Thread Randy Johnson

How do I know what part of it to read in the array?
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Randy Johnson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 9:03 PM
Subject: Re: [PHP] File Edit


> You read the entire file into memory (an array using file() perhaps) and
> then edit it in memory and write the entire new file back out.
>
> -Rasmus
>
> On Mon, 25 Mar 2002, Randy Johnson wrote:
>
> > Hello,
> >
> >
> > I want to be able to edit part of a file.  via a text box using php  how
do i read a file and get the part i want to read and edit it and then write
it back to that file here is an example:
> >
> > .
> > case "$1" in
> >   start)
> >
> > 100.123.456.789
> > 321.654.987.231
> > 123.45.456.789
> > 123.456.789.12
> >
> > ;;
> >
> > 
> >
> > In this example I want to be able to be able to pull the ipaddresses out
and edit them and add a new one on to the end and then write the data back
to the file.
> >
> >
> > Thanks in advance
> >
> >
> > Randy
> >
> >
> >
>



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




Re: [PHP] File Edit

2002-03-25 Thread Rasmus Lerdorf

You read the entire file into memory (an array using file() perhaps) and
then edit it in memory and write the entire new file back out.

-Rasmus

On Mon, 25 Mar 2002, Randy Johnson wrote:

> Hello,
>
>
> I want to be able to edit part of a file.  via a text box using php  how do i read a 
>file and get the part i want to read and edit it and then write it back to that file 
>here is an example:
>
> .
> case "$1" in
>   start)
>
> 100.123.456.789
> 321.654.987.231
> 123.45.456.789
> 123.456.789.12
>
> ;;
>
> 
>
> In this example I want to be able to be able to pull the ipaddresses out and edit 
>them and add a new one on to the end and then write the data back to the file.
>
>
> Thanks in advance
>
>
> Randy
>
>
>


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




[PHP] File Edit

2002-03-25 Thread Randy Johnson

Hello,


I want to be able to edit part of a file.  via a text box using php  how do i read a 
file and get the part i want to read and edit it and then write it back to that file 
here is an example:

.
case "$1" in
  start)

100.123.456.789
321.654.987.231
123.45.456.789
123.456.789.12

;;



In this example I want to be able to be able to pull the ipaddresses out and edit them 
and add a new one on to the end and then write the data back to the file.


Thanks in advance


Randy





[PHP] Re: Database connection problem

2002-03-25 Thread Cameron Just

Hi,

Genenally you can use 'localhost' as the hostname username 'root' and the
password is blank.
I beleive this is a default user when mysql is installed.

The details about how to connect are in the database 'mysql' and the
table 'user'. You should probably add a new user specifically for your php
scripts to this table.

NOTE: If you do add a new user you will need to restart mysql before it can
be accessed via the new user.

Hope that helps.

> Hi, can anyone help me with this problem.
> I'm trying to connect to a MySQL database on my computer, I don't have
> a hostname for it, so I just insert the IP, something like this.
>
> ...
> mysql_cos?
> Thanks.
> -Chris




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




RE: [PHP] Database connection problem

2002-03-25 Thread Demitrious S. Kelly

I have no idea what you meant to ask... but instead of an ip address I
would use the hostname 'localhost' which most servers are setup by
default to understand as 127.0.0.1 (loopback). And you can add an entry
to /etc/hosts or C:\windows\hosts or c:\winnt\(?system(?32?)\?)hosts

But that's just me...

-Original Message-
From: Omland Christopher m [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 25, 2002 5:55 PM
To: Cameron Just
Cc: [EMAIL PROTECTED]
Subject: [PHP] Database connection problem

Hi, can anyone help me with this problem.
I'm trying to connect to a MySQL database on my computer, I don't have a
hostname for it, so I just insert the IP, something like this.

...
mysql_cos?
Thanks.
-Chris


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





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




[PHP] Database connection problem

2002-03-25 Thread Omland Christopher m

Hi, can anyone help me with this problem.
I'm trying to connect to a MySQL database on my computer, I don't have a
hostname for it, so I just insert the IP, something like this.

...
mysql_cos?
Thanks.
-Chris


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




RE: [PHP] mail() function returns TRUE but no email is sent

2002-03-25 Thread Demitrious S. Kelly

I would check the mail logs on the smtp server ?(if you have access)
or... try this and see if ANY mail is bveing sent to you (assumes a unix
server with sendmail (or compatible) binary installed)

 $fp=fopen('./tmp', 'w');
 fputs($fp, 'Subject: '.$reportsubject.chr(10));
 fputs($fp, $reportmail);
 fclose($fp);
 foreach($reportaddr as $addr) {
`cat ./tmp | $sendmail $addr`;
 }
 unlink('./tmp');

(taken from a script I wrote for a server which didn't have mail() due
to an annoying problem 

http://www.apokalyptik.com/watchtower/watchtower-1.0.phps

)

-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 25, 2002 4:26 PM
To: php-general-list
Subject: [PHP] mail() function returns TRUE but no email is sent

Anyone run into this problem before?  I've got a simple email parser
that I've set up for our clients to access from their websites.  It just
uses the simple mail() function to send the parsed HTML to their
account.  The mail() function is returning TRUE  but the email no email
is being received.  How does the mail() function check if the email has
actually been sent?  Is it possible that the mail() function could be
given the proper signals to return TRUE but then the server not send the
email?
 
Thanks,
Kevin



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




Re: [PHP] Regular Expression Challenge

2002-03-25 Thread Cameron Just

Brilliant. (Sort of)

Thats the answer I needed thankyou.
I was not sure as to whether regexp could do recursive matching and now I
know.

Thankyou for your help.

> You won't be able to do that with a regexp alone.  Recursively matching
> isn't possible.  You'll need a little help from some additional code.
>
> $string = "wed-thurs 9:35, 14:56, 18:35";  // YOUR STRING
>$regexp = "^([a-z]+)-([a-z]+)[\ ]+(.*)$";
>   // GETS (day)-(day) (any/all times)
>$find = ereg( $regexp, $string, $matches );
>$times = explode( ",", $matches[3] );  // BREAK APART (.*)
>print( $matches[1] . "\n" . $matches[2] . "\n" );
>while( list( $key, $val ) = each( $times ) ){
>print( trim( ${val} ) . "\n" );
>}
> ?>
>
> That seems to do the trick.  Hopefully that gets ya closer to where you
> want to go.  If you really needed to regexp match on the times, you can
> do that within the while loop.
>
>   g.luck,
>~Chris /"\
>   \ / Microsoft Security
>   Specialist:
>X  The moron in Oxymoron.
>   / \ http://www.thebackrow.net
>
> On Mon, 25 Mar 2002, Cameron Just wrote:
>
>> Hi,
>>
>> I am trying to pull out the following information via a regular
>> expression.
>>
>> The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
>>
>> and I want it to retreive
>> wed
>> thurs
>> 9:35
>> 14:56
>> 18:35
>>
>> The regular expression I am using is
>> ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
>>
>> It seems to be grabbing the
>> wed
>> thurs
>> 9:35
>> but I can't seem to retrieve the rest of the times.
>>
>> Anyone have any ideas?
>>
>> BTW
>> There can be any number of 'times' in the string and also the 'times'
>> can be with or without the colon and the minutes, hence the
>> '}:?[0-9]{0,2}' part of the regexp.




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




[PHP] RE: Does anyone use UltrDev?

2002-03-25 Thread Jerry Artman

Just gave it up for GoLive6 :)

The php model never worked well.

I even purchased impAKT and Nextensio.
The 1.1 version somewhat worked, the 1.2 was DOA.

Most of those features are in the GL6.
Samples illustrate edit in lists and list and edit areas on same page.

Sessions not as easy.

MacOSX NATIVE!

Jerry
Interactivemedianet.com


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




Re: [PHP] Regular Expression Challenge

2002-03-25 Thread Christopher William Wesley

You won't be able to do that with a regexp alone.  Recursively matching
isn't possible.  You'll need a little help from some additional code.

\n" . $matches[2] . "\n" );
while( list( $key, $val ) = each( $times ) ){
print( trim( ${val} ) . "\n" );
}
?>

That seems to do the trick.  Hopefully that gets ya closer to where you
want to go.  If you really needed to regexp match on the times, you can
do that within the while loop.

g.luck,
~Chris /"\
   \ / Microsoft Security Specialist:
X  The moron in Oxymoron.
   / \ http://www.thebackrow.net

On Mon, 25 Mar 2002, Cameron Just wrote:

> Hi,
>
> I am trying to pull out the following information via a regular expression.
>
> The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
>
> and I want it to retreive
> wed
> thurs
> 9:35
> 14:56
> 18:35
>
> The regular expression I am using is
> ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
>
> It seems to be grabbing the
> wed
> thurs
> 9:35
> but I can't seem to retrieve the rest of the times.
>
> Anyone have any ideas?
>
> BTW
> There can be any number of 'times' in the string and also the 'times' can
> be with or without the colon and the minutes, hence the '}:?[0-9]{0,2}'
> part of the regexp.


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




[PHP] Re: PHPTriad Error in Windows XP.

2002-03-25 Thread Peter Ruan

I did started MySQL server first.
"Avdija A . Ahmedhodzic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED]
> says...
> > Hi,
> >   I installed PHPTriad under Windows XP and I keep gettting the
> > following error:
> >
> > Warning: MySQL Connection Failed: Can't connect to MySQL server on
> > 'localhost' (10061) in C:\apache\htdocs\phpmyadmin\lib.inc.php on
line
> > 255
> >
> >
> > It worked before under Windows ME.  WinMySQLadmin1.0 works fine as
well
> > as MySQL when I ran it in the cmd-line mode.  What's the remedy?
> >
> > Thanks in advance,
> > -Peter
> >
> >
> >
> you should start MySQL first.
> --
> Prevencija putem edukacije
> http://www.narkomanija.com/



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




RE: [PHP] what's "undefined index" ?

2002-03-25 Thread Martin Towell

Just a follow up - I've been doing some debugging of my own code and here
are the three different errors to do with undefined varariables:

Undefined variable  - variable not set/declared
Undefined offset- numeric index doesn't exist
Undefined index - alphanumeric index doesn't exist

(I may have missed out on one/some)

I didn't think about "offset" with I sent my first reply to this thread

Hope that helps someone
Martin


-Original Message-
From: Kai Schaetzl [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 11:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] what's "undefined index" ?


Your message of Mon, 25 Mar 2002 09:39:06 -0700:

> The error message refers to the "KundeRemark" in $val["KundeRemark"], not
> "$KundeRemark" which you are trying to assign the result to.  The former
is
> (if it existed) an index, the latter is a variable.
>

Oh, yeah, I see. Stupid me. Thanks!


Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




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

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




Re: [PHP] User validation and Session management

2002-03-25 Thread Justin French

There is a pretty good tutorial on a simular topic on Site Point... it deals
with restricting SOME pages of a website, and would be reasonably easy to
adapt to work with a permissions table -- although I'd keep the user_id in a
session, and check if *THIS USER* has permission for *THIS PAGE*, rather
than checking if *THIS SESSION* has permission.

http://www.WebmasterBase.com/article/319


It depends how you want to structure your permissions, but I've got a few
ideas on how to extend/modify the code to suit your needs -- feel free to
contact me off list.

I used this tutorial and code base as the basis of my own session management
and user login stuff, which is functioning well.

Note: it does use cookies, which you may or may not consider an issue.


Justin French

Creative Director
http://Indent.com.au




on 26/03/02 1:42 AM, javier ([EMAIL PROTECTED]) wrote:

> I would like to know how can I do with php to keep user track
> and let him or not access to specified pages.
> 
> I thought about validating (u/p) first and then giving a session
> variable. And then on each script I would check sessionID with
> a permissions table.
> 
> Is there any tutorial that talk about above?


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




Re: [PHP] what's "undefined index" ?

2002-03-25 Thread Kai Schaetzl

Your message of Mon, 25 Mar 2002 09:39:06 -0700:

> The error message refers to the "KundeRemark" in $val["KundeRemark"], not
> "$KundeRemark" which you are trying to assign the result to.  The former is
> (if it existed) an index, the latter is a variable.
>

Oh, yeah, I see. Stupid me. Thanks!


Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




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




Re: [PHP] getenv and ISAPI: solution?

2002-03-25 Thread Kai Schaetzl

Your message of Mon, 25 Mar 2002 09:42:11 -0800 (PST):

Ah, I see, thanks for the quick response. Reminds me, that I should 
possibly switch off global registering, anyway ...
Ahm, comparing (count($HTTP_GET_VARS)) with my expression below

(!$HTTP_POST_VARS)

shouldn't then

(!$HTTP_GET_VARS)

do exactly the same tricks for GET variables ?

> if(count($HTTP_GET_VARS))
> 
> On Mon, 25 Mar 2002, Kai Schaetzl wrote:
> 
> > I transferred an application from Linux/Apache to .NET/IIS6 and it
> > appeared to be working fine, first. A bit later I found that it
> > wouldn't switch to most functions derived from a GET variable. The
> > reason being that $query seems to be empty, so it always defaults to
> > this action:
> >
> > $query = getenv("QUERY_STRING");
> > if(((!$HTTP_POST_VARS) and (!$query))
>



Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




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




Re: [PHP] mail() function returns TRUE but no email is sent

2002-03-25 Thread Rasmus Lerdorf

Sure, it just passes it off to the MTA.  If the MTA drops the ball later
on we don't know about it.  Check your logs.

On Mon, 25 Mar 2002, Kevin Stone wrote:

> Anyone run into this problem before?  I've got a simple email parser
> that I've set up for our clients to access from their websites.  It just
> uses the simple mail() function to send the parsed HTML to their
> account.  The mail() function is returning TRUE  but the email no email
> is being received.  How does the mail() function check if the email has
> actually been sent?  Is it possible that the mail() function could be
> given the proper signals to return TRUE but then the server not send the
> email?
>
> Thanks,
> Kevin
>


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




[PHP] mail() function returns TRUE but no email is sent

2002-03-25 Thread Kevin Stone

Anyone run into this problem before?  I've got a simple email parser
that I've set up for our clients to access from their websites.  It just
uses the simple mail() function to send the parsed HTML to their
account.  The mail() function is returning TRUE  but the email no email
is being received.  How does the mail() function check if the email has
actually been sent?  Is it possible that the mail() function could be
given the proper signals to return TRUE but then the server not send the
email?
 
Thanks,
Kevin



RE: [PHP] Mime type prepeded at file upload

2002-03-25 Thread Miguel Cruz

In that case, I don't think I understand what you're asking.

Are you saying that the file stored on the server's filesystem after a 
multipart/form-data POSTing has the MIME type added to its content? 
Because our servers handle thousands of such transactions daily and it's 
certainly not happening here.

If you're saying that you're running an obsolete version of PHP, well, 
updating should be a prerequisite to posting with problems.

miguel

On Mon, 25 Mar 2002, David McInnis wrote:

> I have no such statements in my code.  This is looking like a known
> issue in PHP.  I gather that is taken care of in later releases.
> 
> 
> David McInnis
> 
> -Original Message-
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, March 25, 2002 3:47 PM
> To: David McInnis
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Mime type prepeded at file upload
> 
> On Mon, 25 Mar 2002, David McInnis wrote:
> > When I save a file that has been uploaded through PHP it prepends
> (adds
> > to the beginning of the file) the mime type.  This renders the file
> > unusable when it is downloaded as MS Word cannot open the file and
> tries
> > to install some kind of converter.
> 
> My recommendation would be to take out the statements you added to your 
> PHP program that prepend the MIME type.
> 
> miguel
> 
> 
> 


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




RE: [PHP] Mime type prepeded at file upload

2002-03-25 Thread David McInnis

I have no such statements in my code.  This is looking like a known
issue in PHP.  I gather that is taken care of in later releases.


David McInnis

-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 25, 2002 3:47 PM
To: David McInnis
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Mime type prepeded at file upload

On Mon, 25 Mar 2002, David McInnis wrote:
> When I save a file that has been uploaded through PHP it prepends
(adds
> to the beginning of the file) the mime type.  This renders the file
> unusable when it is downloaded as MS Word cannot open the file and
tries
> to install some kind of converter.

My recommendation would be to take out the statements you added to your 
PHP program that prepend the MIME type.

miguel


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



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




Re: [PHP] how to compile a dynamic extension

2002-03-25 Thread Thalis A. Kalfigopoulos

Maybe I'm missing something, but if you mean that you want to add some new 
functionality into your PHP module e.g. for the GD image library, then you create the 
libphp.so all over again (don't you?)

--t.


On Mon, 25 Mar 2002, Charmaine Tian wrote:

> Hi there,
> 
> I have my own extension and I need to compile it with PHP. I was able to use
> the automatic build system to compile it as a static module (--with-mymodule
> or --enable-mymodule). However, I cannot find any documentation on how to
> compile it as a shared module. Can anybody enlgihten me how to generate
> mymodule.so and how to integrate it in the PHP build system? A step by step
> description would be most helpful.
> 
> Your help is highly appreciated. Thanks in advance.
> 
> --Charmaine
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




Re: [PHP] Regular Expression Challenge

2002-03-25 Thread Cameron Just


No luck on any of those suggestions people but thanks anyway :(

I had a feeling it was a bit too complex for a regexp.


> Oh, I didnt read the bit at the bottom about the times appearing any
> number of times.  Off the top of my head I think this should work...
>
> PREG:
>
> "/'([a-z]+)-([a-z]+)\s(?:([0-9]+(?::[0-9]+|))(?:,\s)?)*'/"
>
> --
> Matt
>
> - Original Message -
> From: "Cameron Just" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 25, 2002 6:15 AM
> Subject: [PHP] Regular Expression Challenge
>
>
>> Hi,
>>
>> I am trying to pull out the following information via a regular
> expression.
>>
>> The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
>>
>> and I want it to retreive
>> wed
>> thurs
>> 9:35
>> 14:56
>> 18:35
>>
>> The regular expression I am using is
>> ([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
>>
>> It seems to be grabbing the
>> wed
>> thurs
>> 9:35
>> but I can't seem to retrieve the rest of the times.
>>
>> Anyone have any ideas?
>>
>> BTW
>> There can be any number of 'times' in the string and also the 'times'
>> can be with or without the colon and the minutes, hence the
>> '}:?[0-9]{0,2}' part of the regexp.
>>
>>
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php




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




Re: [PHP] Program control question

2002-03-25 Thread Miguel Cruz

On Mon, 25 Mar 2002, Brad Harriger wrote:
> I'm trying to debug a program written by someone else.  There are two 
> files that I'm having problems with.  File A uses require_once to call 
> file B.  Near the beginning of File B is a Header("Location:") that 
> calls  File A.  Can anyone tell me if the part of file B that comes 
> after the Header("Location:") is ever read by File A?

require_once() is processed by the PHP interpreter.

A 'Location:" header is processed by the browser, long after the PHP
interpreter has finished and forgotten about the page.

So everything in file B is processed and handled and executed, then the
Location header is eventually sent to the browser, when then probably
ignores all the other things sent after the headers.

miguel


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




[PHP] how to compile a dynamic extension

2002-03-25 Thread Charmaine Tian

Hi there,

I have my own extension and I need to compile it with PHP. I was able to use
the automatic build system to compile it as a static module (--with-mymodule
or --enable-mymodule). However, I cannot find any documentation on how to
compile it as a shared module. Can anybody enlgihten me how to generate
mymodule.so and how to integrate it in the PHP build system? A step by step
description would be most helpful.

Your help is highly appreciated. Thanks in advance.

--Charmaine



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




Re: [PHP] Mime type prepeded at file upload

2002-03-25 Thread Miguel Cruz

On Mon, 25 Mar 2002, David McInnis wrote:
> When I save a file that has been uploaded through PHP it prepends (adds
> to the beginning of the file) the mime type.  This renders the file
> unusable when it is downloaded as MS Word cannot open the file and tries
> to install some kind of converter.

My recommendation would be to take out the statements you added to your 
PHP program that prepend the MIME type.

miguel


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




Re[4]: [PHP] [newbie] Something is messed up, anybody can help?

2002-03-25 Thread Miguel Cruz

On Mon, 25 Mar 2002, Mantas Kriauciunas wrote:
> Well it didn't work with $_session["logged"]

$_session is not the same thing as $_SESSION

miguel


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




Re: [PHP] Is there anyway to save a file into Mysql database

2002-03-25 Thread Miguel Cruz

On Mon, 25 Mar 2002, Jack wrote:
> Can someone pls tell me is php will be able to grep text from MS Word and
> then save that word file into MYSQL database? Which means is MYSQL will be
> able to store files into it's table?

You can pipe the Word document through a program like catdoc 
(http://www.ice.ru/~vitus/catdoc/) and then save it in a TEXT field in 
MySQL.

miguel


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




[PHP] Re: Include Error on PHP 4.1.2

2002-03-25 Thread Julio Nobrega

ini_set ('include_path', '/new/path').

  Change '/new/path' to (usually) your website root.

  Beleza?

  ;-)

--
Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

"Alberto Wagner" <[EMAIL PROTECTED]> wrote in message
LI41WQTNUO1TTQHGHBGEGBBAWVWUB0E.3ca4d9dd@alberto">news:LI41WQTNUO1TTQHGHBGEGBBAWVWUB0E.3ca4d9dd@alberto...
> I can't include anything on my php scripts
>
> Failed opening 'Pagina_Inicial.php' for inclusion
(include_path='c:\php4\pear')
>
> How to fix it?
>
>
>



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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

The problem is that exec() is looking for an immediate output and since I am
calling a command line program it doesn't return fast enough for it (I
think).  The popen or fopen looks like it would work, but I don't understand
how to execute the command.  Ie.



 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 4:30 PM
To: 'Darren Gamble'; 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec() can capture ALL output from a command if you supply an array as the
second argument to it

-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:58 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


Good day,

exec() isn't very good at capturing output.  It will only return the last
line of output, which is designed mostly to capture error conditions.

You would be best off using popen() and attaching a pipe to the output, and
then just read from the pipe.  More information can be found about popen()
with PHP's documentation.

Try that instead.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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

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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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




[PHP] php and javascript

2002-03-25 Thread Scott

I have some image urls that I have stored in a mysql database.  I want to be 
able to display the images in a popup window using javascript.  But I haven't 
been able to figure out how to get the get the info to mysql so that the 
image loads when the popup window appears.  Below is an example of the form 
without any javascript.



">


Any help appreciated.
Thanks, 
SW

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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

exec() can capture ALL output from a command if you supply an array as the
second argument to it

-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:58 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


Good day,

exec() isn't very good at capturing output.  It will only return the last
line of output, which is designed mostly to capture error conditions.

You would be best off using popen() and attaching a pipe to the output, and
then just read from the pipe.  More information can be found about popen()
with PHP's documentation.

Try that instead.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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

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

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




[PHP] Private Data and Methods for Classes

2002-03-25 Thread Rick Emery

The following is directed to the PHP development team.

I would like to suggest a capability be added to PHP's class implementation.
Specifically, provide the capability to segregate class data and methods
into private methods and data from those that are available for direct
invocation from the object declaration.  This would provide functionality
similar to C++.  Private methods and data may be accessed ONLY by the
methods in the class definition.  I would envision implementation to look
something like one of these options:


OPTION A ==
declare private data and methods first

class MyClass
{
var varA;
var varB;
var varC;

function func1()
{
}

function func2()
{
}

public:
var varX;
var varY;
var varZ;

function funcM()
{
$this->varA = $this->func2();
$this->varX = $this->funcN();
return $this->varA;
}

function funcN()
{
}
}


OPTION B ===
declare public methods and data first

class MyClass
{:
var varX;
var varY;
var varZ;

function funcM()
{
$this->varA = $this->func2();
$this->varX = $this->funcN();
return $this->varA;
}

function funcN()
{
}

private:
var varA;
var varB;
var varC;

function func1()
{
}

function func2()
{
}
}


OPTION C =
declare private methods and data with "private" keyword

class MyClass
{
private var varA;
private var varB;
private var varC;

private function func1()
{
}

private function func2()
{
}

var varX;
var varY;
var varZ;

function funcM()
{
$this->varA = $this->func2();
$this->varX = $this->funcN();
return $this->varA;
}

function funcN()
{
}
}

In each of the above, data varX, varY, varZ and methods funcM() and funcN()
could be invoked directly by the object.  Data varA, varB, varC and methods
func1() and func2() could not.  Example:

$example = new MyClass;
$example->varX = 10;
$example->varY = $b + $example->varX;
$example->funcM();
$example->varZ = $example->varX + $example->funcN();

$q = $example->varA;// illegal - varA is private
$example->func1();  // illegal - method func1() is private
$example->varX = $example->varY + $example->varA;   // illegal - varA is
private


FYI:   some day, I'll ask for method overload.  but that awaits another day.



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




[PHP] PHP 4.1.2 as napi

2002-03-25 Thread Donald McKnight

Hi

php compiled fine but when i restarted the webserver I recieved this error
msg.

conf_init: Error running init function load-modules: dlopen of
/SuperPages/ns-home/bin/libphp4.so failed (ld.so.1: ns-httpd: fatal:
relocation error: file /usr/local/lib/libsablot.so.0: symbol
__pure_virtual: referenced symbol not found)

any idea thanks ahead

Donald



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




RE: [PHP] what's "undefined index" ?

2002-03-25 Thread Martin Towell

$KundeRemark   = stripslashes($val["KundeRemark"]);
  ^^^
\ This is fine, you're assigning TO this   \ It's this bit
that's undefined

as you said:

> which is a field from a SQL result which currently doesn't exist...

so, in a way, you answered your own question.

HTH
Martin
 

-Original Message-
From: Kai Schaetzl [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 3:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] what's "undefined index" ?


Your message of Mon, 25 Mar 2002 11:35:57 +1100:

> "undefined variable" is when you try to use a variable before you set it,
eg
> $foobar
> "undefined index" is when you try to reference an array index before you
set
> it, eg $foobar[10]
>

Hi, thank you both for the explanation. It's clear why I get the
"undefined", 
these variables *are* for various reasons undefined at the moment. However, 
there are NO arrays involved, f.i. "KundeRemark" is NOT an array it's a
simple 
string variable created by

$KundeRemark   = stripslashes($val["KundeRemark"]);

which is a field from a SQL result which currently doesn't exist because I 
changed the connection to a different db where this field is named 
differently. So, it's undefined, fine. But why is it called "undefined
index" 
where it should be "undefined variable" ?

> Warning: Undefined index: KundeRemark in
> 
> C:\Server\www\conadmin\admin-beta\lib\kunden_functions.inc on line
> 
> 138
>



Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




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

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




[PHP] FTP RAW

2002-03-25 Thread Chris

Can anyone help me with the command I need for a RAW FTP file upload?
I can create connections and they empty file, but I have no idea how to get
the data into the file and I have tried everything.

Chris



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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Darren Gamble

Good day,

exec() isn't very good at capturing output.  It will only return the last
line of output, which is designed mostly to capture error conditions.

You would be best off using popen() and attaching a pipe to the output, and
then just read from the pipe.  More information can be found about popen()
with PHP's documentation.

Try that instead.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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

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




[PHP] Re: Another Session Question

2002-03-25 Thread javier

Have you got the url?


John Fishworld wrote:
> I've seen various tutorials on sessions where they specify the session id
> instead of just using one
> generated by php !
> 
> Why ?
> 
> 



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




Re[4]: [PHP] [newbie] Something is messed up, anybody can help?

2002-03-25 Thread Mantas Kriauciunas

Hey PHP General List,

Well it didn't work with $_session["logged"]

and now i found one more interesting thing. it works if i do like
this:

.
$row = mysql_fetch_row($result);
$session["uzeriz"]=$uzr_name;
$session["logged"]=1;
.
then i pass:
.
draw_admin_menu($session["uzeriz"]);
.

and it works so why does $row["user"] is empty? when i pass like
this:
.
$row = mysql_fetch_row($result);
$session["uzeriz"]=$row["user"];
$session["logged"]=1;
.

???

P.S thanks to people who is helping me out.

:
Got your email on:Monday, March 25, 2002, 1:12:03 PM writing:

:
eczc> maybe you need $_session["logged"] instead of $session["logged"]

eczc> Eric

eczc> - Original Message -
eczc> From: "Mantas Kriauciunas" <[EMAIL PROTECTED]>
eczc> To: "PHP General List" <[EMAIL PROTECTED]>
eczc> Sent: Monday, March 25, 2002 5:59 PM
eczc> Subject: Re[2]: [PHP] [newbie] Something is messed up, anybody can help?


>> Hey PHP General List,
>>
>> Well thanks for helping but still i get nothing and i have no idea
>> why. I changed the line as you said to:
>>
>> if( $session["logged"]==1 )
>> {
>>   draw_admin_menu($uzeriz);
>> }
>>
>> and took out that while.
>> It shows the box but the $uzeriz that i pass doesn't show up :/
>>
>> maybe anybody see more mistakes?
>>
>> :
>>
>> Got your email on:Monday, March 25, 2002, 5:45:49 AM writing:
>>
>> :
>> RE> 1.  Just pass uzeriz to the function, not session("uzeriz");
>>
>> RE> 2.  FYI: you don't need this construct:  while($row =
>> RE> mysql_fetch_row($result)){
>> RE> Based upon the previous tests, there is ONLY 1 entry.  Therefore, go
eczc> with:
>> RE> $row = mysql_fetch_row($result);
>>
>>
>> RE> -Original Message-
>> RE> From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
>> RE> Sent: Monday, March 25, 2002 6:39 AM
>> RE> To: PHP General List
>> RE> Subject: [PHP] [newbie] Something is messed up, anybody can help?
>>
>>
>> RE> Hey PHP General List,
>>
>> RE> Intro:
>> RE> I am creating small login script and few things doesn't work right.
>> RE> Code is hare:
>>
>> RE> admin.php
>>
>> RE> if(isset($subm_login))
>> RE> {
>> RE> $session["logged"]=0;
>> RE> $session["uzeriz"]="";
>> RE> $result = mysql_query("select * from uzer where
eczc> user='$uzr_name' and
>> RE> pass='$uzr_passwd'");
>> RE>  if(!$result)   {
>> RE>  echo "This error should not be hare. But it sayes
eczc> that it
>> RE> could not search for your user";
>> RE>  } else {
>> RE>   if(mysql_num_rows($result)!=1) {
>> RE>echo "Login Not Found";
>> RE> } else {
>> RE>   while($row = mysql_fetch_row($result)){
>> RE>   $session["uzeriz"]=$row["user"];
>> RE>   $session["logged"]=1;
>> RE>
eczc> $session["pass"]=$row["pass"];
>> RE>   }
>> RE> }
>> RE>  }
>> RE>  session_register("session");
>> RE> }
>>
>> RE> if( $session["logged"]==1 )
>> RE> {
>> RE>   draw_admin_menu($session["uzeriz"]);
>> RE> }
>> RE> if( $session["logged"]==0 )
>> RE> {
>> RE> draw_login_box();
>> RE> }
>>
>> RE> --
>> RE> adm_func.php (this file is included in admin.php)
>>
>> RE> function draw_admin_menu($uzer)
>> RE> {
>> RE> global $session;
>> RE> echo "User Logged In\n";
>> RE> echo "--\n";
>> RE> echo "$uzer\n";
>> RE> }
>>
>> RE> --
>>
>> RE> Problem:
>> RE> the problem is that i cant see $uzer its empty. nothing is
>> RE> therewhat i am doing wrong? all table names and everything is
>> RE> correct but i get empty thing.
>>
>> RE> If that is dumb question im sorry :) i am kinda new in this :)
>>
:



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread heinisch

At 25.03.2002  14:26, you wrote:
>
>Perhaps it is how I am calling the $lines in a while loop.?  I have tried
>`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
>system(), shell_exec().  None of them let me capture the STDOUT from the
>program.  There has to be a way to do this.   Anyone?
>
>Thanx
>
>exec()
>
>
>I just realized why nothing I was trying for the regular expressions wasn't
>working.  The command I am running is a C program on the command line of a
>Linux box.  I can't capture the output, it just gets output onto the screen.
>I just echo'd $output after the command was run and it was empty.  Any
>ideas?

even if think your output must come to $output,
an alternative, whenever not so elegant is
exec("your_program_name > tmp.file");
the output will be redirected '>' to the file tmp.file.
then you can open the file using the known fopen(*) command,
and read, processed conventional.
HTH Oliver


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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

Do this.

Execute the command at the command line and re-direct output to a file: xxx.

Open file xxx with an editor, such as vi.  Is there a blank line, or line
with JUST a carriage-return (\n) as the last line?

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:09 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


No.  I think there is a carriage return (\n), but there is not a blank line
at the end.

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 3:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

When the exec'd program executes from the command line, does it output a
blank line as its last line?

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on 

Re: [PHP] upload forms, how much was uploaded before upload fails..

2002-03-25 Thread Rasmus Lerdorf

There is only an upload_tmp_dir.  Not sure where you think this second
tmpdir is coming from.  Once the upload is finished the file is written to
the upload_tmpdir and you then have to do something with the file from
there.

-Rasmus

On Mon, 25 Mar 2002, Gerhard Hoogterp wrote:

> On Sunday 24 March 2002 23:14, Rasmus Lerdorf wrote:
> > You'll probably need PHP 4.2 for uploads that big to work well.  Before
> > 4.2 uploads were buffered in ram, so no, you have no way to recover a
> > broken upload.
>
> But what, in that case, is the use or purpose of upload_tmp_dir ?? Moving
> from upload -> tmpdir -> realdir seems to  me like one step to many..
>
> Gerhard
>
> --
> ICQ: 4502226
>


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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

No.  I think there is a carriage return (\n), but there is not a blank line
at the end.

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 3:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

When the exec'd program executes from the command line, does it output a
blank line as its last line?

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE N

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

When the exec'd program executes from the command line, does it output a
blank line as its last line?

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that an

Re: [PHP] oracle exec

2002-03-25 Thread heinisch

At 25.03.2002  15:10, you wrote:
>
>
>hi.. is there any way to use the php oracle function to check to see if
>there are any records in the selected set before calling ora_fetch?
>ora_exec doesn't error if ther are no records, and ora_num_rows doesn't
>return the numbe of rows in the set.,
>
>thanks!
>matt
Seems that there´s no short way,
just have a 'select count(your_id_col) from footable where ...'
This will bring the number of records.
As a tip, use this var to get your results in an for() statement,
as there is no way tho catch errors if you use while(..).
(OCI functions, PHP3)

HTH Oliver


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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

Sorry.  Yes. It looks exactly like it should.  And I see the ouput from the
command like it should on the screen, I just can't capture it in the script.

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:59 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

Again, I ask:

Does $mycmd contain the command you expect to see
$mycmd = "$prog $cmdline $trimline &";
print $mycmd;
$output = exec($mycmd);


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:56 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


The cmd is running running correctly as I see the output on the screen (this
is being run from a command line).  The command output is seen on the screen
and nothing gets set to $output.

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:50 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec() works for me.

Remember, though, it returns only the LAST line.  Have you tried the
following to ensure it's constructing the command you think it is:

$mycmd = "$prog $cmdline $trimline &";
print $mycmd;
$output = exec($mycmd);

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:27 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


Perhaps it is how I am calling the $lines in a while loop.?  I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec().  None of them let me capture the STDOUT from the
program.  There has to be a way to do this.   Anyone?

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec()

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/des

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

Again, I ask:

Does $mycmd contain the command you expect to see
$mycmd = "$prog $cmdline $trimline &";
print $mycmd;
$output = exec($mycmd);


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:56 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


The cmd is running running correctly as I see the output on the screen (this
is being run from a command line).  The command output is seen on the screen
and nothing gets set to $output.

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:50 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec() works for me.

Remember, though, it returns only the LAST line.  Have you tried the
following to ensure it's constructing the command you think it is:

$mycmd = "$prog $cmdline $trimline &";
print $mycmd;
$output = exec($mycmd);

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:27 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


Perhaps it is how I am calling the $lines in a while loop.?  I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec().  None of them let me capture the STDOUT from the
program.  There has to be a way to do this.   Anyone?

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec()

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information 

Re[2]: [PHP] [newbie] Something is messed up, anybody can help?

2002-03-25 Thread Mantas Kriauciunas

Hey PHP General List,

Well thanks for helping but still i get nothing and i have no idea
why. I changed the line as you said to:

if( $session["logged"]==1 )
{
  draw_admin_menu($uzeriz);
}

and took out that while.
It shows the box but the $uzeriz that i pass doesn't show up :/

maybe anybody see more mistakes?

:

Got your email on:Monday, March 25, 2002, 5:45:49 AM writing:

:
RE> 1.  Just pass uzeriz to the function, not session("uzeriz");

RE> 2.  FYI: you don't need this construct:  while($row =
RE> mysql_fetch_row($result)){
RE> Based upon the previous tests, there is ONLY 1 entry.  Therefore, go with:
RE> $row = mysql_fetch_row($result);


RE> -Original Message-
RE> From: Mantas Kriauciunas [mailto:[EMAIL PROTECTED]]
RE> Sent: Monday, March 25, 2002 6:39 AM
RE> To: PHP General List
RE> Subject: [PHP] [newbie] Something is messed up, anybody can help?


RE> Hey PHP General List,

RE> Intro:
RE> I am creating small login script and few things doesn't work right.
RE> Code is hare:

RE> admin.php

RE> if(isset($subm_login))
RE> {
RE> $session["logged"]=0;
RE> $session["uzeriz"]="";
RE> $result = mysql_query("select * from uzer where user='$uzr_name' and
RE> pass='$uzr_passwd'");
RE>  if(!$result)   {
RE>  echo "This error should not be hare. But it sayes that it
RE> could not search for your user";
RE>  } else {
RE>   if(mysql_num_rows($result)!=1) {
RE>echo "Login Not Found";
RE> } else {
RE>   while($row = mysql_fetch_row($result)){
RE>   $session["uzeriz"]=$row["user"];
RE>   $session["logged"]=1;
RE>   $session["pass"]=$row["pass"];
RE>   }
RE> }
RE>  }
RE>  session_register("session");
RE> }

RE> if( $session["logged"]==1 )
RE> {
RE>   draw_admin_menu($session["uzeriz"]);
RE> }
RE> if( $session["logged"]==0 )
RE> {
RE> draw_login_box();
RE> }

RE> --
RE> adm_func.php (this file is included in admin.php)

RE> function draw_admin_menu($uzer)
RE> {
RE> global $session;
RE> echo "User Logged In\n";
RE> echo "--\n";
RE> echo "$uzer\n";
RE> }

RE> --

RE> Problem:
RE> the problem is that i cant see $uzer its empty. nothing is
RE> therewhat i am doing wrong? all table names and everything is
RE> correct but i get empty thing.

RE> If that is dumb question im sorry :) i am kinda new in this :)

RE> :--:
RE> Have A Nice Day! 
RE>  Mantas Kriauciunas A.k.A mNTKz

RE> Contacts:
RE> [EMAIL PROTECTED]
RE> Http://mntkz-hata.visiems.lt



:--:
Have A Nice Day! 
 Mantas Kriauciunas A.k.A mNTKz

Contacts:
[EMAIL PROTECTED]
Http://mntkz-hata.visiems.lt



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




[PHP] Program control question

2002-03-25 Thread Brad Harriger

I'm trying to debug a program written by someone else.  There are two 
files that I'm having problems with.  File A uses require_once to call 
file B.  Near the beginning of File B is a Header("Location:") that 
calls  File A.  Can anyone tell me if the part of file B that comes 
after the Header("Location:") is ever read by File A?

Thanks in advance,

Brad


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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

The cmd is running running correctly as I see the output on the screen (this
is being run from a command line).  The command output is seen on the screen
and nothing gets set to $output.

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:50 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec() works for me.

Remember, though, it returns only the LAST line.  Have you tried the
following to ensure it's constructing the command you think it is:

$mycmd = "$prog $cmdline $trimline &";
print $mycmd;
$output = exec($mycmd);

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:27 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


Perhaps it is how I am calling the $lines in a while loop.?  I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec().  None of them let me capture the STDOUT from the
program.  There has to be a way to do this.   Anyone?

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec()

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender adv

RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

exec() works for me.

Remember, though, it returns only the LAST line.  Have you tried the
following to ensure it's constructing the command you think it is:

$mycmd = "$prog $cmdline $trimline &";
print $mycmd;
$output = exec($mycmd);

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:27 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


Perhaps it is how I am calling the $lines in a while loop.?  I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec().  None of them let me capture the STDOUT from the
program.  There has to be a way to do this.   Anyone?

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec()

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the i

[PHP] New Chat interface on weberdev to the #PHP channel

2002-03-25 Thread Boaz Yahav

Hi
 
One of the ways to get PHP support is from IRC channels that exist for
this purpose (you can see them listed on http://www.php.net).
If you don't have a way to connect to the IRC servers for any reason, or
just prefer a web based client, try the ActiveX client (assuming you are
using IE) 
on  http://www.weberdev.com. The chat is accessed from the left menu.
 
P.S. I suggest you stick to PHP and don't mention the word ActiveX on
that channel since the people there have a VERY
short temper and love to kick others out :), specially if they say words
that are not PHP / UNIX related...
 
Enjoy
 
Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

Perhaps it is how I am calling the $lines in a while loop.?  I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec().  None of them let me capture the STDOUT from the
program.  There has to be a way to do this.   Anyone?

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

exec()

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


-- 
PHP General Mailing List (http://www.ph

[PHP] oracle exec

2002-03-25 Thread matthew clay shultz


hi.. is there any way to use the php oracle function to check to see if
there are any records in the selected set before calling ora_fetch?
ora_exec doesn't error if ther are no records, and ora_num_rows doesn't
return the numbe of rows in the set.,

thanks!
matt


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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

exec()

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!


I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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

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




Re: [PHP] HTTP_REFERER

2002-03-25 Thread Erik Price


On Monday, March 25, 2002, at 02:52  PM, tom hilton wrote:

>  This is working fine for most users, but one user is telling me that 
> even
> though she is following the link from the index page, she's still 
> getting
> the error message,  and are being bounced back to the index page.  She 
> is
> using Internet Explorer 6.0.  Are there any security or privacy settings
> that might restrict use of the $HTTP_REFERER variable?  Or is there a 
> better
> way to make sure users follow links to pages, rather than bookmarking 
> and
> going straight to a page?  Thanks for any help you can give me.

I'm not sure about Internet Explorer 6's use of HTTP headers, but the 
"referer" header in the HTTP protocol is not required by any user 
agent.  Legally, IE6 can choose not to send it, and still be in complete 
compliance with HTTP.

There may not be an easy way to do what you want.  One possible solution 
is to make the typical "calls itself" PHP page and display certain 
content based on certain variables being present, and use POST variables 
so that they do not appear in the URL.  The problem with this is that it 
requires a ton of code to "wrap" your content in the 'protective' 
index.html layer, and also you would have to use form buttons rather 
than hyperlinks (unless you used post_to_host(), see archives if you're 
not sure what I mean).


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] HTTP_REFERER

2002-03-25 Thread Dan Harrelson

Have you checked that your user is indeed coming from
"http://www.somedomain.com/index.html";?  There are lots of other ways
to load your homepage:

"http://xxx.xxx.xxx.xxx/index.html"; (ip address, not domain)
"http://www.somedomain.com/";
"http://www.somedomain.com";
"http://xxx.xxx.xxx.xxx";
"http://xxx.xxx.xxx.xxx/";

You'll have to check for all of them

-Dan


--- tom hilton <[EMAIL PROTECTED]> wrote:
> Hi, I am using the $HTTP_REFERER variable to ensure that users of a
> website
> are getting to a certain page through a link from the index.html
> page, and
> not going straight to the page through a bookmark.
> 
> $page=$HTTP_REFERER;
> if ($page!="http://www.somedomain.com/index.html";)
>   {
>   echo "Please log in through the home page";
>   echo " CONTENT='1;URL=http://www.somedomain.com/index.html'>";
>   }
>  This is working fine for most users, but one user is telling me that
> even
> though she is following the link from the index page, she's still
> getting
> the error message,  and are being bounced back to the index page. 
> She is
> using Internet Explorer 6.0.  Are there any security or privacy
> settings
> that might restrict use of the $HTTP_REFERER variable?  Or is there a
> better
> way to make sure users follow links to pages, rather than bookmarking
> and
> going straight to a page?  Thanks for any help you can give me.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

I just realized why nothing I was trying for the regular expressions wasn't
working.  The command I am running is a C program on the command line of a
Linux box.  I can't capture the output, it just gets output onto the screen.
I just echo'd $output after the command was run and it was empty.  Any
ideas?

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions?  Help!

well, ya might try:
$my_array = explode( "\" ",$output);

this would set:
$my_vars[0] = "variable1:\"some text info\""
$my_vars[1] = "variable2:\"some text info\""

then, you can do an explode on each of the my_vars

another, which might work:


WHEN EXECUTED DISPLAYS THIS:

C:\>php -q zz.php\
output = variable1:"some information" variable2:"some information"
variable1:"some information" variable2:"some information" - 0
variable1 - 1
some information - 2
variable2 - 3
some information - 4

-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:31 PM
To: 'Rick Emery'
Subject: RE: [PHP] Regular Expressions? Help!


There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

There will be a specific number of variables returned.  I just wanted to set
all the output to a string and just run through it to grab the variables.

Thanx

 -Original Message-
From:   Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent:   Monday, March 25, 2002 1:28 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions?  Help!

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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




[PHP] PHP and Oracle

2002-03-25 Thread Scarbrough, Jeb (ISS Atlanta)

Is it possible to create a transaction the involves multiple pages using PHP
and oracle.  For example, can I log onto oracle using OCIPLogon on one page
named master, insert information, go to the next page named detail, insert
information and commit both transactions at the same time?

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




[PHP] HTTP_REFERER

2002-03-25 Thread tom hilton

Hi, I am using the $HTTP_REFERER variable to ensure that users of a website
are getting to a certain page through a link from the index.html page, and
not going straight to the page through a bookmark.

$page=$HTTP_REFERER;
if ($page!="http://www.somedomain.com/index.html";)
  {
  echo "Please log in through the home page";
  echo "";
  }
 This is working fine for most users, but one user is telling me that even
though she is following the link from the index page, she's still getting
the error message,  and are being bounced back to the index page.  She is
using Internet Explorer 6.0.  Are there any security or privacy settings
that might restrict use of the $HTTP_REFERER variable?  Or is there a better
way to make sure users follow links to pages, rather than bookmarking and
going straight to a page?  Thanks for any help you can give me.



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




[PHP] Mime type prepeded at file upload

2002-03-25 Thread David McInnis

When I save a file that has been uploaded through PHP it prepends (adds
to the beginning of the file) the mime type.  This renders the file
unusable when it is downloaded as MS Word cannot open the file and tries
to install some kind of converter.

Any ideas for me?

David McInnis


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




Re: [PHP] upload forms, how much was uploaded before upload fails..

2002-03-25 Thread Gerhard Hoogterp

On Sunday 24 March 2002 23:14, Rasmus Lerdorf wrote:
> You'll probably need PHP 4.2 for uploads that big to work well.  Before
> 4.2 uploads were buffered in ram, so no, you have no way to recover a
> broken upload.

But what, in that case, is the use or purpose of upload_tmp_dir ?? Moving
from upload -> tmpdir -> realdir seems to  me like one step to many.. 

Gerhard

-- 
ICQ: 4502226

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




RE: [PHP] Regular Expressions? Help!

2002-03-25 Thread Rick Emery

With there be a specifc number of variables returne?  Or can the number of
variables vary?


-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!


I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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

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




[PHP] Regular Expressions? Help!

2002-03-25 Thread Walker, Roy

I am trying to do a match for an expression and it to a variable from the
output of a command: 



How can look through $output to set the information returned as different
variables the output would look like:
variable1:"some information" variable2:"some information"

I want to set each variable to a string and write it to a file.

Thank You for you help.
Roy


** PLEASE NOTE **
This E-Mail/telefax message and any documents accompanying this transmission
may contain privileged and/or confidential information and is intended
solely for the addressee(s) named above.  If you are not the intended
addressee/recipient, you are hereby notified that any use of, disclosure,
copying, distribution, or reliance on the contents of this E-Mail/telefax
information is strictly prohibited and may result in legal action against
you. Please reply to the sender advising of the error in transmission and
immediately delete/destroy the message and any accompanying documents.
Thank you. 


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




RE: [PHP] Session Variables

2002-03-25 Thread Rick Emery

it means you've already output some HTML or a blank line


-Original Message-
From: Chad Gilmer [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 12:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Session Variables


Hi There,

I am a beginner to PHP and I am tring to use session variables on my site.

I am trying to use Session Variables in PHP on the iPLANIT.tv site

When I use the following code:



I get the following error

Warning: Cannot send session cookie - headers already sent by (output
started at /home/iplanit/public_html/php/login.php:8) in
/home/iplanit/public_html/php/login.php on line 11

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/iplanit/public_html/php/login.php:8) in
/home/iplanit/public_html/php/login.php on line 11

Any Ideas???

Cheers

Chad



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

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




[PHP] Session Variables

2002-03-25 Thread Chad Gilmer

Hi There,

I am a beginner to PHP and I am tring to use session variables on my site.

I am trying to use Session Variables in PHP on the iPLANIT.tv site

When I use the following code:



I get the following error

Warning: Cannot send session cookie - headers already sent by (output
started at /home/iplanit/public_html/php/login.php:8) in
/home/iplanit/public_html/php/login.php on line 11

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/iplanit/public_html/php/login.php:8) in
/home/iplanit/public_html/php/login.php on line 11

Any Ideas???

Cheers

Chad



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




[PHP] Re: Debugging tool

2002-03-25 Thread Julio Nobrega Trabalhando

http://www.google.com/search?q=php+debugger&sourceid=opera&num=0&ie=utf-8&oe
=utf-8

  Google good! ;-)

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Morten Nielsen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> Can anybody tell me if it is possible to use a debugger with PHP? And what
> is the name of it?
>
> Regards,
> Morten
>
>



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




Re: [PHP] reg-ex

2002-03-25 Thread Rasmus Lerdorf

"^[ A-Za-z---]*$"

On Mon, 25 Mar 2002, John Fishworld wrote:

> How can I change this to accept spaces as well ?
>
> (ereg("^[A-Za-zÀ-ÖØ-öø-ÿ]*$", $str))
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] GIF support in PHP

2002-03-25 Thread Rasmus Lerdorf

Depends on whether you have GD without GIF enabled already built into your
PHP already.  Check with phpinfo().  If you don't you have build a shared
gd extension against a version of GD that has GD support and add that
dynamically without recompiling PHP.  If you do have GD in there already
you have to recompile PHP.

-Rasmus

On Mon, 25 Mar 2002, Todor Stoyanov wrote:

> Is there a way to add GIF support in PHP without recompiling?
> Just adding as an extension.
>
> Tanks a lot.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Debugging tool

2002-03-25 Thread Morten Nielsen

Hi,
Can anybody tell me if it is possible to use a debugger with PHP? And what
is the name of it?

Regards,
Morten



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




Re: [PHP] date ("j") not working on Unix - any ideas

2002-03-25 Thread Rasmus Lerdorf

Because 'j' was probably added somewhere in between the two versions...

On Mon, 25 Mar 2002, geoff wrote:

> Any ideas why  date ("j")   doesn't  appear to work when I use it on my ISP
> that has a Unix Server, but on my Windows ISP , it works fine ?  The other
> date() functions Y,m,d etc all work fine on both systems.
>
> (I'm using PHP3 by the way.)
>
> Any help would be very much appreciated.
>
> Thanks
>
> Geoff
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Re: Login displays the pass and user in url

2002-03-25 Thread Martha S

You have to add an extra tag into the form tag (method="post"), it should
read as follows:

("

"David Orn Johannsson" <[EMAIL PROTECTED]> wrote in message
003001c1d418$7126b3f0$6500640a@gandalf">news:003001c1d418$7126b3f0$6500640a@gandalf...
Can I some how prevent the browser from displayin
index.php?passwd=pass&user=user in the url when I use this script I
wrote.

  ");
print("");
print("");
print("Notendanafn:");
print("Lykilorð:");
print(" ");
print("");
}
else{

include("db_connect.php");
$query = "select id,
passwd, system from users where username = '$check_username'";
$mysql_result =
mysql_query($query, $db);
$row =
mysql_fetch_row($mysql_result);

if((crypt($check_passwd,
'dominos') == $row[1]) && (($system == 0 || $system == 1 ))){
$sid =
session_id();
$uid =
$row[0];
print("[Fréttir]");
print("[SMS - Auglýsingar]");
}
else if($session ==
session_id()){
print("[Fréttir]");
print("[SMS - Auglýsingar]");
}
else{
print("Þú
verður að skrá þig inn. [Skrá inn]");
}
}
  ?>

  
Davíð Örn Jóhannssson
Vefforritari

Atómstöðin hf.
Garðastræti 37
101 Reykjavík

sími: 595-3643
fax: 595-3649
  [EMAIL PROTECTED]
  http://www.atom.is






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




Re: [PHP] getenv and ISAPI: solution?

2002-03-25 Thread Rasmus Lerdorf

if(count($HTTP_GET_VARS))

On Mon, 25 Mar 2002, Kai Schaetzl wrote:

> I transferred an application from Linux/Apache to .NET/IIS6 and it
> appeared to be working fine, first. A bit later I found that it
> wouldn't switch to most functions derived from a GET variable. The
> reason being that $query seems to be empty, so it always defaults to
> this action:
>
> $query = getenv("QUERY_STRING");
> if(((!$HTTP_POST_VARS) and (!$query))
>
> Now, checking getenv in the online docs gives a reason for this
> behavior:
>
> > Note: This function does not work in ISAPI mode.
>
> So, I *can* grab all of the GET variables, but I can't check in
> general if there are any?
>
> Is there a workaround (other than checking for a specific variable)?
>
>
> Kai
>
> --
>
> Kai Schätzl, Berlin, Germany
> Get your web at Conactive Internet Services: http://www.conactive.com
> IE-Center: http://ie5.de & http://msie.winware.org
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] mimeexplode counterpart in php?

2002-03-25 Thread Jimmy Lantz

Hi!
I wonder if there's such a thing as a counterpart in PHP for MimeExplode in 
PERL?
MimeExplode takes a email and splits the attachments and text so that you 
can save it automatically to a certain dir
by using .forward files.
Or something alike to it in PHP. I've been looking at IMAP functions but 
dont see how it would be possible to do the same thing.
Cheers
Jimmy


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




[PHP] Bad Email Addresses

2002-03-25 Thread Steven Walker

Hi,

I have PHP automated emails sent from my website. Does anybody know a 
good way to filter returned mail? What I want to do is extract the bad 
email addresses from returned mail and delete them from my database.

For now I have the return path sent to me, and I manually weed the bad 
ones out, but it's tedious and won't last in the long term.

Thanks,

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


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




[PHP] RE: [PHP-WIN] How to Pass the Username which from Windows Login

2002-03-25 Thread Vail, Warren

Are you referring to the userid on the machine where your web application
runs (your server) or the userid of the user who connects to your website
with his browser?  I suspect you mean the latter and would be very
interested in how this could be done as well.

Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 24, 2002 10:26 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-WIN] How to Pass the Username which from Windows Login


Dear all
I want to prevent user to make another login before they can browse the
Intranet, so is there anyway that php can grep the username from the windows
Login or Domain Login?
Which means if a user can login to the Windows NT, then he/she will have the
right to browse the Intranet!

Thx a lot
Jack
[EMAIL PROTECTED]



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

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




RE: [PHP] undefined variable when using if ($var) {}

2002-03-25 Thread Darren Gamble

Good day.

What is this message that you get, that you don't want?

A cursory glance of the code reveals two "else" statements attached to the
same "if" statement.  You should address that.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Martha S [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 9:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] undefined variable when using if ($var) {}


I'm rather new to PHP, so this should be fairly easy to answer. I checked
the manual and FAQ already.

I'm using the following code, and I get the following message if $id has
nothing in the var (i have it set to a default of  type int, not null in
mysql). Is there a way around this or something I'm missing?

Thanks :)

-- code---

if ($id) {

   $result = mysql_query("SELECT * FROM entries WHERE id=$id",$db);

   $myrow = mysql_fetch_array($result);

   printf("\n");
   printf("%s", $myrow["title"]);
   printf("%s | ", $myrow["id"]);
   printf("%s", $myrow["posted"]);
   printf("%s\n", $myrow["post"]);
   printf("\n");

   printf("all");

   } else {

do {

printf("%s %s\n", $myrow["id"], $PHP_SELF,
$myrow["id"], $myrow["title"], $myrow["post"]);

  } while ($myrow = mysql_fetch_array($result));

} else {

  // no records to display

  echo "Sorry, no records were found!";

}




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

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




[PHP] getenv and ISAPI: solution?

2002-03-25 Thread Kai Schaetzl

I transferred an application from Linux/Apache to .NET/IIS6 and it 
appeared to be working fine, first. A bit later I found that it 
wouldn't switch to most functions derived from a GET variable. The 
reason being that $query seems to be empty, so it always defaults to 
this action:

$query = getenv("QUERY_STRING");
if(((!$HTTP_POST_VARS) and (!$query))

Now, checking getenv in the online docs gives a reason for this 
behavior: 

> Note: This function does not work in ISAPI mode.

So, I *can* grab all of the GET variables, but I can't check in 
general if there are any?

Is there a workaround (other than checking for a specific variable)?


Kai

--

Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
IE-Center: http://ie5.de & http://msie.winware.org




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




RE: [PHP] list(), each()

2002-03-25 Thread Rick Emery

change to:
list( $policy_num, $policy_year, $application_reference ) = explode( "--",
$policy ); 


-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 11:22 AM
To: PHP General
Subject: [PHP] list(), each()


Ok, I've got to be doing something wrong here.  I've been
beating my head up against the wall for some time and I 
just cannot figure out what it is.  Before I say it's a bug with
list(), could someone tell me what I'm doing wrong?

\n";

// fine
$policy = explode( "--", $policy );
echo $policy[0] . "\n";
echo $policy[1] . "\n";
echo $policy[2] . "\n";

?>

Why isn't list() assigning the value properly?  For the first echo
statement, I'm
getting:  

"list( 0, 1016726726, ) = each( explode( "--", 1016726726--1--1016643856
));"

but the others, where I'm echoing out the individual elements, it's working
fine.

What's going on?

Chris



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

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




Re: [PHP] e-mail list app

2002-03-25 Thread Dan Harrelson


Check out Ciao EmailList Manager:
http://www.technobreeze.com/php/emaillist/

-Dan


--- "Michael A. Peters" <[EMAIL PROTECTED]> wrote:
> Anyone know of a free app that allows users to submit-
> 
> name, nickname, e-mail addy
> 
> app sends a url confirm to e-mail addy.
> upon confirm, the info gets stored in a mysql database with the email
> encrypted.
> 
> addresses should only be decryptable with a key that does not need to
> be
> stored on the machine.
> Thanks.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




Re: [PHP] list(), each()

2002-03-25 Thread Chris Boget

> Why do you put each(explode()) ?  Just list() = explode() is what you
> want.

I did that because I thought they were complimentary functions?  Just about
every example I've seen of list() uses each().  Just using explode() makes it
work.  Obviously I'm going to have to go back and read more about list().

thnx,
Chris


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




  1   2   >