Re: [PHP] how do I use "<" and "<" with eval()?

2001-10-31 Thread Stefan Rusterholz

- Original Message -
From: "John A. Grant" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 31, 2001 11:51 PM
Subject: [PHP] how do I use "<" and "<" with eval()?


> I'm not having an easy time understanding the discussion
> in the doc for eval().
>
> I want to read this string from a file:
> xxx  zzz
>
> and then "run" it.
>
> I tried this code:
>   function somefunc($text,$n)
>  {
> for($i=0;$i<$n;$i++){
> echo $text;
> }
> }
> $string='xxx  zzz';
> eval($string);
> ?>
>
> but I get
> "Parse error:  parse error in eval.php(11) : eval()'d code on line 1
>
> Do I have to use < and > in place of "<" & ">"? I tried
> several combinations, but I still get the same error.
>
> --
> John A. Grant  * I speak only for myself *  (remove 'z' to reply)
> Radiation Geophysics, Geological Survey of Canada, Ottawa
> If you followup, please do NOT e-mail me a copy: I will read it here
>

If you do that this way it looks for php like this:

 zzz';
 #eval($string);
xxx  zzz
 ?>

(as someone before correctly stated)

As you see, for PHP is some HTML-Code in the php-code-zone. To avoid this,
do it that way:
 zzz';
 eval("?>$string");
 ?>

Pay attention to the trailing "?>" in eval. That causes php to change to
HTML-Mode within the eval'd code.

Hope, I could help you

Stefan Rusterholz, [EMAIL PROTECTED]
--
interaktion gmbh
Stefan Rusterholz
Zürichbergstrasse 17
8032 Zürich
--
T. +41 1 253 19 55
F. +41 1 253 19 56
W3 www.interaktion.ch
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Week of month

2001-10-31 Thread Sheni R. Meledath

Hello:

Is there any way to find out the week of the month. Today is in the first 
week of month.

That is, a function like weekofmonth() which displays 1 today & 2 next week.

thanks

Sheni R Meledath
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Secure transfer

2001-10-31 Thread Morten Winkler Jørgensen

Hi php'ers

   I'm about to build a site that allows payment with credit card.
   Of cause the card number, expiration date etc. should be secured
   when transfered. How do I do that?
   I've been looking at the OpenSSL functions in php, but they seem to
   be unsatisfying.

Kind regards,
Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] text into web db interface

2001-10-31 Thread David Robley

On Thu,  1 Nov 2001 14:51, AAustin wrote:
> Hi
>
> Is there a php technique, app, code example..., where users can enter
> normal formatted text with paragraphs etc and the '' or ' ' tags
> (and even 'table') are entered so the text looks ok on an php page.
> This will then mean the end user does not need to know a smattering of
> html code just to enter some text into db.
>
> thanks
> andrew

There is the nl2br() function which will convert end of line characters 
to a .

For tables, you might have to build something based on say tabs as cell 
separators, EOL as row separators, but you would also need some 
indication of where table starts and ends.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Check book: a book with a unhappy ending.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] run php in commandline

2001-10-31 Thread Jason G.

I just did that tonight.

Lookup the predefined variables in the manual.

$argc gives a count of the arguments
$argv is an array of the arguments

Ex:
php -q myscript.php Apple Orange

$argc == 3
$argv[0] == 'php -q myscript.php' or something like that
$argv[1] == 'Apple'
$argv[2] == 'Orange'

-Jason Garber
IonZoft.com

At 03:12 AM 11/1/2001 +0800, JIM wrote:
>hi all,
>i want to know how i can feed a parameter into a php script in commandline?
>eg.
>php getdata.php apple orange
>
>so, i want to get use of "apple" and "orange"...
>any help pls!
>
>jim
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sending email to php script

2001-10-31 Thread David Robley

On Wed, 31 Oct 2001 22:04, Adrian D'Costa wrote:
> On Mon, 29 Oct 2001, David Robley wrote:
> > On Sat, 27 Oct 2001 03:23, JSheble wrote:
> > > A while ago an email came through here about how to parse out email
> > > message from a php script.  The thing that was mostly of interest
> > > to me is the ability to send an email to a php script, I guess
> > > through a sendmail alias?  I asked how to accomplish this, and
> > > never saw an answer come through.  So I'd like to ask again :o)
> > >
> > > Does anybody know what would be required or necessary to send an
> > > email to an address that would run a php script?
> >
> > You say sendmail, so do it thusly:
> >
> > Edit /etc/aliases and add a line like
> >
> > phpmail: "| /pathto/your/php/script"
> >
> > and run newaliases to update your alias database.
>
> Actually, I am still trying to figure this out when I get time.  What I
> did was:
>
> phpmail: "| lynx -dump > /pathto/your/php/script"
>
> But the problem is nothing appears to be capture in the script.  Or
> rather in what format does this mail arrive.  I even tried to write it
> to a file but nothing is written.

The pipe feeds the incoming data to the script as standard input - $DEITY 
knows what lynx would do with that, but black holes seem to be the most 
likely destination. Your script needs to be an executable, standalone 
which reads and parses data from stdin and which is the direct recipient 
of info from the pipe.

> > You'll also need to compile php as a standalone, and put as the first
> > line of your php script
> >
> > #!/path/to/php -q
>
> What if we need both version??

As my colleague on the eastern seaboard has noted already, you can have a 
module and a standalone on the same system.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Catscan: searching for kitty.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Jason G.

I've just been watching the posts regarding this issue.

I can see the following:

You SHOULD test it on *nix JUST to narrow down the problem.
You ask for help from all the *VERY NICE* people on this list, and then 
WILL not do what they say will help???
If you do not like the php smtp implementation, then read RFC821 and 
implement a better one.

Regards,

-Jason Garber
IonZoft.com





At 12:08 PM 10/31/2001 -0500, Matthew Luchak wrote:

>OK.  here's why I think it's in PHP's SMTP support:
>
>There is an address that fails in 4.06 yet functions in 4.04 - exactly
>the same code, same SMTP server, same .ini,  everything the same.
>
>I wouldn't question the class if I hadn't tested my own code and
>settings first.  I've been trying to track this down for the past two
>weeks and have already been advised by someone on this list that PHP's
>SMTP support is not the greatest:
>
> >SMTP code in PHP is not good enough. It needs to be rewritten.
>
> >Yasuo Ohgaki
>
>
>It doesn't do much good to test on a nix box because what I'm looking
>for is a solution to a PHP/SMTP problem.
>
>
>
>Matthew Luchak
>Webmaster
>Kaydara Inc.
>[EMAIL PROTECTED]
>
>
>-Original Message-
>From: Kurt Lieber [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, October 31, 2001 11:57 AM
>To: PHP General List
>Subject: Re: [PHP] defending PHP mail function
>
>
>On Wednesday 31 October 2001 08:40 am, you wrote:
>
> > for now it's PHP that's in question
>
>AFAIK, this is the first I've ever heard of probelms with mail() not
>sending
>to perfectly valid email addresses.  Scalability issues and other
>performance
>problems, sure, but that's a different animal.
>
>Given the number of people that use PHP (and use mail(), especially) I
>would
>certainly think this problem would have been reported before if it were
>a
>real bug.
>
>So, to be blunt, you probably have a problem with your code, your SMTP
>server, the way you've configured PHP, or something other than mail().
>It's
>easy to blame it on mail() and/or PHP, but I think you're barking up the
>
>wrong tree.
>
>Find a forgiving customer who reported the problem, ask for their help
>in
>troubleshooting it and then send some test emails from a completely
>different
>server, preferably on a *nix platform.  (not because *nix is better than
>
>windows, but because *nix PHP doesn't use smtp for mail delivery)
>
>--kurt
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] print on printer

2001-10-31 Thread Luz Lopez

Hi All

I have a php that access to database and show the values in the browser, But 
I need add hte option of print on printer, but that only print the table 
with values.

Somebody can help me?

Thanks in Advanced,

Regards,



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] run php in commandline

2001-10-31 Thread JIM

hi all,
i want to know how i can feed a parameter into a php script in commandline?
eg.
php getdata.php apple orange

so, i want to get use of "apple" and "orange"...
any help pls!

jim





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] run php in commandline

2001-10-31 Thread JIM

hi all,
i want to know how i can feed a parameter into a php script in commandline?
eg.
php getdata.php apple orange

so, i want to get use of "apple" and "orange"...
any help pls!

jim




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] question about variables...

2001-10-31 Thread Jason G.

READ THE MANUAL.

variable variables

$i=1;
$sName = "seat$i";
$value = $$sName;


At 04:40 PM 10/31/2001 +1100, sc wrote:
>Hey all;
>
>If i have a variable say, $seat and i want to go through variables with a
>number, ie. $seat1 , $seat2 etc. how would i go about it? i have one setup
>where $p increments (so then you have $seat$p) but i cant get it to work
>properly (tried all sorts of combinations with ' and " and . etc.)...and
>cant seem to find any info on it (dont really know what to search for)..
>
>Anyone know how one can go about it?
>
>thx.
>
>-sc
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] show png in the browser

2001-10-31 Thread Jason G.

Ever consider reading the online manual?


First, say header("Content-type: image/png");
Second, create image.
third use ImagePNG() function
fourth, destroy image.
fifth, go directly to the php script that generates the image, then you 
will see PHP generated errors.

-Jason Garber
IonZoft.com

At 12:38 AM 10/31/2001 +, Luz Lopez wrote:
>Hi All
>
>I configured the php with thelibrary GD, zlib, jpeg and libpng, I hae a 
>program that generate a image, I can to save this png image but in my 
>borwser I can't to see this image, the browser send me to save to my hard 
>disk this image.
>
>I need to show this image in the browser, How can I do it?
>
>Thanks in Advanced,
>
>Regards,
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] need coments...

2001-10-31 Thread Jason G.

Second comment is that we are not a review board for specific products.


At 10:40 PM 10/30/2001 +0300, you wrote:
>Good day!
>
>I try to wrote Web-interface for DNS. Only simple test version now. I'd like
>to listen your comets to make real good and useful thing. mail me you
>coments
>please
>
>Galkov Vladimir
>ICQ 84873967
>
>
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: paypal instant notification

2001-10-31 Thread CC Zona

In article ,
 [EMAIL PROTECTED] (Sondra Russell) wrote:

> They have provided a perl sample script (see below).
> 
> Mostly I'm just trying to figure out how to replicate the whole 
> "receiving", "sending", and "receiving again" thing in PHP. 



Most of that script can be replicated with fread() 
,fwrite() , a couple of PCRE 
functions , and extract() .  In 
essence, fread() is what does the "receiving" and fwrite() does the 
"sending".

Alternatively, you may want to check script archives like hotscripts.com.  
I'd be surprised if no one's posted a Paypal class yet.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Dynamic update of content

2001-10-31 Thread Galkov Vladimir

Good day!

Well... you can recive access to any tag on HTML page form java-script with
code like this:
 here will be text from selected option 


 .



function some_event()
 {
 objH1  = document.all["razdel"];
 objSelector = document.all["selector"];

 objH1.innerText = objSelector.value;
 }
.

innerText is a content betvin  

Well... don't test that code... so cach only idea... but if you need more
coments mail me I'll send working example.
Have a nice day!
---
Galkov Vladimir
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Dynamic update of content

2001-10-31 Thread Martin

Some time ago I asked for help regarding techniques to provide dynamic 
update of content on a PHP-page.
Someone mentioned a javascript routine which I've forgotten. Anyone here 
might have a clue? What I want to do is that 
User selects and option from a option box, and depending on what that 
selection is the page populates other option boxes.

TIA,

Martin S

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sending email to php script

2001-10-31 Thread Jason Murray

> > You'll also need to compile php as a standalone, and put as 
> > the first line of your php script
> > 
> > #!/path/to/php -q
> 
> What if we need both version??

There's nothing stopping you running both.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sending email to php script

2001-10-31 Thread Adrian D'Costa

On Mon, 29 Oct 2001, David Robley wrote:

> On Sat, 27 Oct 2001 03:23, JSheble wrote:
> > A while ago an email came through here about how to parse out email
> > message from a php script.  The thing that was mostly of interest to me
> > is the ability to send an email to a php script, I guess through a
> > sendmail alias?  I asked how to accomplish this, and never saw an
> > answer come through.  So I'd like to ask again :o)
> >
> > Does anybody know what would be required or necessary to send an email
> > to an address that would run a php script?
> 
> You say sendmail, so do it thusly:
> 
> Edit /etc/aliases and add a line like
> 
> phpmail: "| /pathto/your/php/script"
> 
> and run newaliases to update your alias database.

Actually, I am still trying to figure this out when I get time.  What I
did was:
 
phpmail: "| lynx -dump > /pathto/your/php/script"

But the problem is nothing appears to be capture in the script.  Or rather
in what format does this mail arrive.  I even tried to write it to a file
but nothing is written.

> 
> You'll also need to compile php as a standalone, and put as the first 
> line of your php script
> 
> #!/path/to/php -q

What if we need both version??


Adrian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] text into web db interface

2001-10-31 Thread AAustin

Hi

Is there a php technique, app, code example..., where users can enter normal
formatted text with paragraphs etc and the '' or ' ' tags (and even
'table') are entered so the text looks ok on an php page. This will then
mean the end user does not need to know a smattering of html code just to
enter some text into db.

thanks
andrew



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] paypal instant notification

2001-10-31 Thread Sondra Russell

Hi guys!

I'm going to use paypal with my site, and they have a cool "instant 
notification" feature which sends, to a page I preassign, information 
about a transaction as it happens.  My script is supposed to:
a) receive this information (as a "post")
b) send it back to them with a sort of "is this really coming from 
you?" message
c) get a confirmation from them, "yes, this came from us"
d) take the post and insert it into my database or whatever else I'd 
like to do with it.

They have provided a perl sample script (see below).

Mostly I'm just trying to figure out how to replicate the whole 
"receiving", "sending", and "receiving again" thing in PHP.  This is 
especially tricky since I apparently can't test my work without 
actually going through a transaction on paypal (and spending money). 
I sorta have to get it right the first time.

Anyone done this before?

Thanks again!
Sondra

sample perl script:

   # read the post from PayPal system and add 'cmd'
   read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
   $query .= '&cmd=_notify-validate';

   # post back to PayPal system to validate
   use LWP::UserAgent;
   $ua = new LWP::UserAgent;
   $req = new HTTP::Request 'POST','https://www.paypal.com/cgi-bin/webscr';
   $req->content_type('application/x-www-form-urlencoded');
   $req->content($query);
   $res = $ua->request($req);

   # split posted variables into pairs
   @pairs = split(/&/, $query);
   $count = 0;
   foreach $pair (@pairs) {
   ($name, $value) = split(/=/, $pair);
   $value =~ tr/+/ /;
   $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
   $variable{$name} = $value;
   $count++;
   }

   # assign posted variables to local variables
   $receiver_email = $variable{'receiver_email'};
   $item_name = $variable{'item_name'};
   $item_number = $variable{'item_number'};
   $custom = $variable{'custom'};
   $payment_status = $variable{'payment_status'};
   $payment_date = $variable{'payment_date'};
   $payment_gross = $variable{'payment_gross'};
   $payment_fee = $variable{'payment_fee'};
   $txn_id = $variable{'txn_id'};
   $first_name = $variable{'first_name'};
   $last_name = $variable{'last_name'};
   $address_street = $variable{'address_street'};
   $address_city = $variable{'address_city'};
   $address_state = $variable{'address_state'};
   $address_zip = $variable{'address_zip'};
   $address_country = $variable{'address_country'};
   $payer_email = $variable{'payer_email'};
   if ($res->content eq 'VERIFIED') {
   # check transaction for uniqueness
   # process payment
   }
   elsif ($res->content eq 'INVALID') {
   # possible fraud
   }
   else {
   # error
   }




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Text DB's & bbs lists

2001-10-31 Thread Jack Dempsey

Hi Arsen,

I think that'd be a lot of work, and I'm not sure I understand why you can't
use MySQL?
I suppose you could do it, but i think you'll find once starting it, that
its not worth the time it'll need...

Jack

-Original Message-
From: ArsenKirillov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 7:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Text DB's & bbs lists


does anybody hear about
board(bbs or phorum) written oin php wihout using any kind
of SQL DB ? I think of developing one in text db (separated by | fields in
one line)
Did anybody think of this is good idea ? (i have problem in my country -
stupid admins can't run MySQL to be such stable as php4.)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Detecting Languages...

2001-10-31 Thread Arcadius A.

HEllo !
I have a website designed in several languages (En , Fr , Cz) 
My question is :
How to detect the language setting of the the visitor's PC  in order to
redirect him to a specified content ?

Thanks ...

Arcad.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Crating program for access parallel

2001-10-31 Thread Luz Lopez

Hi all

I am creating a program PHP that will be access int the web for many 
persons, this aplication will be permit to insert registry on a data base 
Postgresql, When a person this inserting a registry I need to block that 
table so that another user cannot to access the data base. Exists some form 
in php to do this?

I want to Know how can I save  information on a Data Bse that will
be access
for many persons at the same time.

Thanks in advanced for yuor advices !!!

Regards,

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problems inserting single quote into Oracle database

2001-10-31 Thread Kevin Dewsnup

Thanks David,
I set magic_quotes_sybase to "On" (even though I'm using oracle) and that
did the trick.
php.ini
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = On

I was able to insert data with an apostrophie into the database from a form
and the data looks good.  Seems like Sybase and Oracle treat single quotes
in a similar way.

I wonder why there is no magic_quotes_oracle?

-Kevin
- Original Message -
From: "David Robley" <[EMAIL PROTECTED]>
To: "Kevin Dewsnup" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, October 30, 2001 5:57 PM
Subject: Re: [PHP] Problems inserting single quote into Oracle database


> On Wed, 31 Oct 2001 11:01, Kevin Dewsnup wrote:
> > I am having problems with inserting single quote's
> > into an oracle 8.1.7 database through a form.
> >
> > When inserting 'its' it works fine.
> >
> > When inserting 'it's' I get this error:
> > "OCIParse: ORA-01756: quoted string not properly
> > terminated in blah..."
> >
> > So then I try 'it''s' (which works in SQL*Plus) I get
> > this error:
> > "OCIStmtExecute: ORA-00911: invalid character in
> > blah..."
> >
> > Thank's in advance!
> >
> > -Kevin
>
> Backslash works for mysql. Have a look at the addslashes (for putting
> into Oracle) and stripslashes (for displaying data retrieved) functions,
> also the magic_quotes settings in your php.ini.
>
> --
> David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
> CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA
>
>My lucky color just faded.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Text DB's & bbs lists

2001-10-31 Thread ArsenKirillov

does anybody hear about
board(bbs or phorum) written oin php wihout using any kind
of SQL DB ? I think of developing one in text db (separated by | fields in
one line)
Did anybody think of this is good idea ? (i have problem in my country -
stupid admins can't run MySQL to be such stable as php4.)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Where are lists of PHP's predefined constants andkeywords?

2001-10-31 Thread Philip Olson


More specifically, 'empty' is a language construct and not a function.
Other constructs are unset, isset and, well, there are others :)  For
example:

  $arr = array('mysql_connect' => 'foo',
   'unset' => 'bar',
   'empty' => 'ooh');

  print $arr[mysql_connect]; // Not fatal, gives a Warning
  print $arr[unset]; // Fatal.
  print $arr[empty]; // Fatal.

Of course us good little boys and girls always surround our keys in quotes
so the following all work as expected:

 print $arr['mysql_connect'];
 print $arr['unset'];
 print $arr['empty'];

Not suggesting these names be used as array keys though :) Regarding
reserved words, they can be seen here:

  http://www.php.net/manual/en/reserved.php

Regards,
Philip Olson



On Wed, 31 Oct 2001, CC Zona wrote:

> In article <01A4B59FD1EBD311838100A0C98BE0D9AD5D91@chef>,
>  [EMAIL PROTECTED] (Kirk Johnson) wrote:
> 
> > The manual at http://www.php.net/manual/en/language.types.array.php mentions
> > that "empty" and "default" are "special keywords". Does anyone know of any
> > lists of PHP's predefined constants and keywords? I'm not having any luck
> > finding them.
> 
> The chapter on variables has a page devoted to predefined vars; the 
> predefined constants list is likewise under the constants chapter.  I 
> suspect that the caution on the arrays page may refer to the fact that 
> "empty" is a function name and the "default" keyword is used by the switch 
> control structure.
> 
> -- 
> CC
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] WindowsXP, PHP4 and MS SQL functions

2001-10-31 Thread Andrew Kirilenko

Hello!

Have you specified path to extensions? In my case:
extension_dir = c:/apps/php/extensions/

Best regards,
Andrew Kirilenko. 

> -Original Message-
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 1:41 AM
> To: PHP User Group
> Subject: [PHP] WindowsXP, PHP4 and MS SQL functions
> 
> 
> Hello,
>  
> I am trying to get php4 to use mssql function under WindowsXP.  I don't
> know if this is a problem or not. 
> I uncommented the extensions line in the php.ini file that says:
> extension=php_mssql.dll
>  
> But when I try to use mssql_connect it says call to undifiened function.
> Does anyone know anything I should try to resolve this?>
>  
> Thanks
> Brandon
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Need Mortgage Leads?

2001-10-31 Thread justjumping

Are you a Mortgage Office in need of leads?

We receive refinance requests direct from borrowers 
throughout the United States daily!

Whether your office services one state or multiple states, 
our leads will meet your needs!  

A few features of our program:

*Leads are exclusive---sold ONLY to you!

*Leads contain 30 pieces of information regarding each borrower!

*Leads delivered within 24-48 hours from borrower's original request!

*Leads are sent daily--depending on your needs!

*And best of allpricing to meet your marketing budget!  

Dont forget to ask about our volume discount!


  TO ORDER YOUR LEADS, CALL  (888) 725-9246!


*
Since you have received this message you have either responded to 
one of our offers in the past or your address has been registered with us.
If you wish to be removed please reply mailto:[EMAIL PROTECTED]?subject=remove 
*


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Where are lists of PHP's predefined constants and keywords?

2001-10-31 Thread Mike Eheler

Don't forget true, false, and null. :)

A good place to look might be to grab a syntax definition file for some 
sort of popular editor (like textpad), and just go through it. Not the 
best way, for sure.

The best place to look easily is http://www.php.net/manual/en/

Mike

Johnson, Kirk wrote:

>The manual at http://www.php.net/manual/en/language.types.array.php mentions
>that "empty" and "default" are "special keywords". Does anyone know of any
>lists of PHP's predefined constants and keywords? I'm not having any luck
>finding them.
>
>TIA
>
>Kirk
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php filling apache error log with copies of the server environment

2001-10-31 Thread Liam Hoekenga

Hey -

My php installation is filling my apache error log with copies of the
piece of the environment that PHP knows as HTTP_SERVER_VARS.  It seems to
be caused by imap functions.



doesnt do it... but if i do


I get a bunch of:
REDIRECT_nokeepalive=1
REDIRECT_STATUS=200
REDIRECT_URL=/test.php
REMOTE_ADDR=x.x.x.x
REMOTE_HOST=mojojojo.blah.edu
etc...

in the apache error log.

I'm using PHP 4.0.6 (CGI), Apache 1.3.20, Solaris (SPARC) 2.6

Is there anyway to stop this?  I've tried turning off error loggin in my
php.ini file, to no avail.

thanks
Liam


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Where are lists of PHP's predefined constants and keywords?

2001-10-31 Thread CC Zona

In article <01A4B59FD1EBD311838100A0C98BE0D9AD5D91@chef>,
 [EMAIL PROTECTED] (Kirk Johnson) wrote:

> The manual at http://www.php.net/manual/en/language.types.array.php mentions
> that "empty" and "default" are "special keywords". Does anyone know of any
> lists of PHP's predefined constants and keywords? I'm not having any luck
> finding them.

The chapter on variables has a page devoted to predefined vars; the 
predefined constants list is likewise under the constants chapter.  I 
suspect that the caution on the arrays page may refer to the fact that 
"empty" is a function name and the "default" keyword is used by the switch 
control structure.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] MSSQL functions

2001-10-31 Thread Brandon Orther

Hello,
 
Since I am not able to get msssql functions running.  Can someone please
give me instructions on exactly what I need to do to get the functions
werking?
 
Thanks Brandon



[PHP] WindowsXP, PHP4 and MS SQL functions

2001-10-31 Thread Brandon Orther

Hello,
 
I am trying to get php4 to use mssql function under WindowsXP.  I don't
know if this is a problem or not. 
I uncommented the extensions line in the php.ini file that says:
extension=php_mssql.dll
 
But when I try to use mssql_connect it says call to undifiened function.
Does anyone know anything I should try to resolve this?>
 
Thanks
Brandon



[PHP] Re: how do I use "<" and "<" with eval()?

2001-10-31 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (John A. Grant) wrote:

> I tried this code:
>   function somefunc($text,$n)
>  {
> for($i=0;$i<$n;$i++){
> echo $text;
> }
> }
> $string='xxx  zzz';
> eval($string);
> ?>
> 
> but I get
> "Parse error:  parse error in eval.php(11) : eval()'d code on line 1

eval() treats the passed argument as if it were inline PHP code.  You're 
effectively doing this:

 zzz 
?>

So the extra set of PHP tags is a problem, and xxx and zzz must both be 
valid code (i.e. terminating statements with semi-colons, concatenating 
strings with a period...)

I'm guessing what you really want is:

eval('somefunc("yyy",3);')

In that case, you could use a regex to extract the portion of your text 
string that's enclosed by PHP tags.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how do I use "<" and "<" with eval()?

2001-10-31 Thread John A. Grant

I'm not having an easy time understanding the discussion
in the doc for eval().

I want to read this string from a file:
xxx  zzz

and then "run" it.

I tried this code:
 zzz';
eval($string);
?>

but I get
"Parse error:  parse error in eval.php(11) : eval()'d code on line 1

Do I have to use < and > in place of "<" & ">"? I tried
several combinations, but I still get the same error.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: Re[3]: [PHP] split array in 2 halfs

2001-10-31 Thread Matthew Loff


More generally, this should work:

$smallarray1=array_slice($bigarray, 0, sizeof($bigarray) / 2);
$smallarray2=array_slice($bigarray, sizeof($bigarray) / 2);

I haven't tested it though...

-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 31, 2001 4:32 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re[3]: [PHP] split array in 2 halfs


$smallarray1=array_slice($bigarray,0,3);
$smallarray2=array_slice($bigarray,3,3);

On Wed, 31 Oct 2001 23:25:55 -0800, Daniel Harik wrote:
>Want to split it in half
>
>1 Big array:
>
>1
>2
>3
>4
>5
>6
>
>Want to make
>
>
>1 Small array:
>
>1
>2
>3
>
>2 Small array:
>4
>5
>6
>
>Thank You
>
>


-- 
Mark, [EMAIL PROTECTED] on 10/31/2001



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: parsing a string

2001-10-31 Thread John A. Grant

"Yz James" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey John,
> something like this might work:
>
> 
> $string = "This is a string with an embedded image [bird.gif,this is a
> bird]";
>
> $string = preg_replace("/\[(.*?\.)(gif|jpg),(.*?)\]/i", " alt=\"\\3\">", $string);
>
> echo $string;
>
> ?>

Great!. I love it when I see stuff like this written by someone
who knows regex better than I.  The ability to insert the
pieces that are recognized/extracted via \1, \2 is pretty cool.
Thanks.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] parsing a string

2001-10-31 Thread John A. Grant

"Dl Neil" <[EMAIL PROTECTED]> wrote in message
042101c157f6$4cd9fb90$c014100a@jrbrown">news:042101c157f6$4cd9fb90$c014100a@jrbrown...

> Two inter-dependent problems:
> 1 a means of identifying a cipher within the text
> 2 a means of replacing the cipher with HTML code
Succinctly stated.

>space+bird.gif"this is a bird"

This is a possibility, but it requires a bit trickier code to
recognize & split it. I was hoping for something easier
to identify and parse, so maybe:
#bird.gif|some text#
That should be easy enough to find & explode()

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] parsing a string

2001-10-31 Thread John A. Grant

"Mike Eheler" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Beyond that, why not keep it conforming to HTML, and use an  tag,
> for example:
>
> This is some text .
>
> That way if you need to view the page "as-is" in a browser or whatever,
> it'd still look fine.. go grab yourself some good free html parser code,
> and analyse the options. If processat="server" then do your thing, and
> re-write the  tag. :)

I think I want something more simple. The idea is to let
the machine do all of the dirty work, not just in looking up
the image size, but also formatting the output.

For example, I'm already using functions like:
emitlink("http://www.microsoft.com","Microsoft";);
so I will have a similar function:
emitimg("bird.gif","this is a bird");
that will do all of the  stuff, not just some of it.

--
John A. Grant  * I speak only for myself *  (remove 'z' to reply)
Radiation Geophysics, Geological Survey of Canada, Ottawa
If you followup, please do NOT e-mail me a copy: I will read it here





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] basic mcrypt questions

2001-10-31 Thread Scott

I'm working on my first shopping cart web application (done in php) and have 
started to look into ways to secure it.  After reading up a little bit on 
mcrypt I have some basic questions about it:

1.  If I use mcrypt to encrypt user input before storing it in a database,  
do I have to use it in conjunction with a utility like PGP, or is mcrypt a 
self-contained encryption and decryption tool.

2.  One article I read almost immediately started talking about public and 
private keys, another did not mention them at all.  Does mcrypt require the 
use of 3rd party keys?

3.  If php scripts are used to decrypt data, where are these scripts kept?

Thanks,
SW

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Liz Fulghum

Correction:

$count = count($array);
$count = $count/2;
$count = round($count,0);


"Liz Fulghum" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You could also grab the midpoint of the array:
>
> $count = round(count($array), 0);
>
> then populate your new arrays by using a foreach loop:
>
> $x = 0;
> foreach($array as $key => $value) {
> if ($x <=$count) {
> $array1[] = $value;
> } else {
> $array2[] = $value;
> }
> $x++;
> }
>
>
>
> "Daniel Harik" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Want to split it in half
> >
> > 1 Big array:
> >
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> >
> > Want to make
> >
> >
> > 1 Small array:
> >
> > 1
> > 2
> > 3
> >
> > 2 Small array:
> > 4
> > 5
> > 6
> >
> > Thank You
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Philip Olson

You may find this helpful:

  $arr = array('a','b','c','d','e'); 
  $second_half = array_splice($arr,floor(sizeof($arr)/2));
 
  print_r($arr); // Array ( [0] => a [1] => b )
  print_r($second_half); // Array ( [0] => c [1] => d [2] => e )

In the above, $second_half will be one larger then $arr if the number
of elements is odd, otherwise they'll be equally sized halves.  Using
ceil() as opposed to floor() will make $second_half the smaller of the
two.

Regards,
Philip Olson

On Wed, 31 Oct 2001, Daniel Harik wrote:

> Want to split it in half
> 
> 1 Big array:
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 
> Want to make
> 
> 
> 1 Small array:
> 
> 1
> 2
> 3
> 
> 2 Small array:
> 4
> 5
> 6
> 
> Thank You
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Liz Fulghum

You could also grab the midpoint of the array:

$count = round(count($array), 0);

then populate your new arrays by using a foreach loop:

$x = 0;
foreach($array as $key => $value) {
if ($x <=$count) {
$array1[] = $value;
} else {
$array2[] = $value;
}
$x++;
}



"Daniel Harik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Want to split it in half
>
> 1 Big array:
>
> 1
> 2
> 3
> 4
> 5
> 6
>
> Want to make
>
>
> 1 Small array:
>
> 1
> 2
> 3
>
> 2 Small array:
> 4
> 5
> 6
>
> Thank You
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] A way to simulate modem speeds?

2001-10-31 Thread Brent Rieck

On Wed, 2001-10-31 at 10:23, Michael Hall wrote:
> I'm looking for a way to clamp down a network machine (we're on a T1) to
> modem speeds (28 to 52 K) for testing purposes.
> 
> Is there software (preferably for Windows) that would do this?  Better yet,
> would this software be free?

I've not used it, but you might checkout:
  http://www.dallaway.com/sloppy/

--Brent

www.spek.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread DL Neil

Or do you really want: First array:
1
3
5

Second array
2
4
6

Corresponding to the two columns across the screen, and controlled by the same 
iteration index?
=dn

- Original Message - 
From: "Daniel Harik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 01 November 2001 07:25
Subject: Re[2]: [PHP] split array in 2 halfs


> Want to split it in half
> 
> 1 Big array:
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 
> Want to make
> 
> 
> 1 Small array:
> 
> 1
> 2
> 3
> 
> 2 Small array:
> 4
> 5
> 6
> 
> Thank You
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[3]: [PHP] split array in 2 halfs

2001-10-31 Thread Mike Frazer

Don't forget that you should clear out that memory space, especially if it's
an array of arrays or an array of objects or something along those lines:

unset($bigarray);

Just good programming practice, that's all.  I doubt it would ever be a
problem on today's servers, but it's still a good idea.

Mike



"Mark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
$smallarray1=array_slice($bigarray,0,3);
$smallarray2=array_slice($bigarray,3,3);

On Wed, 31 Oct 2001 23:25:55 -0800, Daniel Harik wrote:
>Want to split it in half
>
>1 Big array:
>
>1
>2
>3
>4
>5
>6
>
>Want to make
>
>
>1 Small array:
>
>1
>2
>3
>
>2 Small array:
>4
>5
>6
>
>Thank You
>
>


--
Mark, [EMAIL PROTECTED] on 10/31/2001





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[3]: [PHP] split array in 2 halfs

2001-10-31 Thread Mark

$smallarray1=array_slice($bigarray,0,3);
$smallarray2=array_slice($bigarray,3,3);

On Wed, 31 Oct 2001 23:25:55 -0800, Daniel Harik wrote:
>Want to split it in half
>
>1 Big array:
>
>1
>2
>3
>4
>5
>6
>
>Want to make
>
>
>1 Small array:
>
>1
>2
>3
>
>2 Small array:
>4
>5
>6
>
>Thank You
>
>


--
Mark, [EMAIL PROTECTED] on 10/31/2001



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Jim Lucas

take a look at the manual 
http://www.php.net/manual/en/function.array-slice.php  
it will show you the right way to do it

jim
- Original Message - 
From: "Daniel Harik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 31, 2001 11:25 PM
Subject: Re[2]: [PHP] split array in 2 halfs


> Want to split it in half
> 
> 1 Big array:
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 
> Want to make
> 
> 
> 1 Small array:
> 
> 1
> 2
> 3
> 
> 2 Small array:
> 4
> 5
> 6
> 
> Thank You
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Daniel Harik

Want to split it in half

1 Big array:

1
2
3
4
5
6

Want to make


1 Small array:

1
2
3

2 Small array:
4
5
6

Thank You


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] split array in 2 halfs

2001-10-31 Thread Jack Dempsey

Based on what criteria? if you just want to split the array at element 30,
you could use array_splice to get the necessary data...
- Original Message -
From: "Daniel Harik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 2:16 AM
Subject: [PHP] split array in 2 halfs


> Good evening
>
> I was wondering how can I split, array that has 60 elements in it,
> into 2 arrays with 30 elements each?
>
>
> Thank You very much and have a good night :-)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] split array in 2 halfs

2001-10-31 Thread Daniel Harik

Good evening

I was wondering how can I split, array that has 60 elements in it,
into 2 arrays with 30 elements each?


Thank You very much and have a good night :-)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] spliting results into 2 colomns

2001-10-31 Thread Daniel Harik

I't just came into my mind, if 1 simple split that arrey in to 2
arrays, it would be much simplier and wouldn't need second loop, i
just wanted to know how can i split 1 array in 2 arrays

Thank You


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-10-31 Thread Andrew Hill

Kraa,

Sorry for the confusion; we should have that component available by the end
of the week.

Best regards,
Andrew


> -Original Message-
> From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 2:50 PM
> To: '[EMAIL PROTECTED]'; Php-General (E-mail)
> Subject: RE: [PHP] Desperate: odbc_connect() does not work! Please help!
>
>
> Hi,
>
> The problem is that a Progress 9.1c is not available at
> openlinksw.com for:
>
> Client:   Linux glibc2.1 (x86)
> Server:   UnixWare 7 (x86)
>
> Only Progress 8.3b is supported.
>
> So you are saying that a setting in the .ini files or some environment
> variable could be missing.
>
> I will have a look at it.
>
> Thanks,
>
> Simon.
>
> > -Original Message-
> > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > Sent: woensdag 31 oktober 2001 20:25
> > To: Kraa de Simon; Php-General (E-mail)
> > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > Please help!
> >
> >
> > Kraa,
> >
> > I'm not sure why the two sample apps are using different
> > connection calls;
> > It's not terribly relevant - both are legal.
> >
> > Driver manager and driver are not typically dependent on each
> > other, no.
> > The fact that the connection fails in odbctest is probably
> > due to a missing
> > parameter that iODBC wants in the DSN or the environment
> > variables. You can
> > look at error messages for the Merant driver - I'm not going
> > to get into
> > debugging it :)
> >
> > If you want to try OpenLink's ODBC drivers, you will find
> > they work fine
> > with PHP and Progress.
> > I suggest you download the Multi-Tier driver from our site -
> > they comes free
> > with a 2 user connection.  I would also suggest that you
> > compile --with-iodbc, as it is in greater use and has been
> > more thoroughly
> > tested with PHP.
> >
> > Free support is available as well if you have difficulties, at:
> > http://www.openlinksw.com/support/suppindx.htm.
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > OpenLink Software  http://www.openlinksw.com
> > Universal Data Access & Data Integration Technology Providers
> >
> > > -Original Message-
> > > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, October 31, 2001 1:59 PM
> > > To: '[EMAIL PROTECTED]'; Php-General (E-mail)
> > > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > Please help!
> > >
> > >
> > > Hi Andrew,
> > >
> > > I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC
> > drivers and they
> > > seem to be working fine when I try their test C program. I
> > can connect to
> > > the Progress database en retrieve data.
> > >
> > > I'm using their driver manager as well (--with-custom-odbc).
> > >
> > > The test C program uses:
> > >
> > > SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
> > >
> > > SQLConnect is executed without problems. A connection can be made.
> > >
> > > When I try odbctest (from iODBC / odbcsdk) the connect fails
> > > (same drivers,
> > > same odbc.ini, same odbcinst.ini).
> > >
> > > SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS,
> > (UCHAR *) buf,
> > > sizeof (buf), &buflen, SQL_DRIVER_COMPLETE);
> > >
> > > SQLDriverConnect returns -1. A connection cannot be made.
> > >
> > > Why is the first program using SQLConnect() and the other
> > > SQLDriverConnect()?
> > >
> > > Are ODBC driver and ODBC driver manager dependent on each other?
> > >
> > > Or can I use the iODBC driver manager and the Merant ODBC drivers
> > > together?
> > >
> > > Are there alternatives to the Merant ODBC drivers?
> > >
> > > I am connect a Progress 9.1c database on SCO UnixWare 7.1.1
> > from Red Hat
> > > Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC
> > drivers and ODBC
> > > driver manager.
> > >
> > > Any ideas?
> > >
> > > Regards,
> > >
> > > Simon.
> > >
> > > > -Original Message-
> > > > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > > > Sent: woensdag 31 oktober 2001 16:12
> > > > To: Kraa de Simon; Php-General (E-mail)
> > > > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > > > Please help!
> > > >
> > > >
> > > > Kraa,
> > > >
> > > > The 01000 error is a 'General Error', probably at connect time.
> > > > This suggest that your DSN settings might be bad or not being
> > > > passed into
> > > > PHP.
> > > > Is your DSN named "results" and is that the one you are using
> > > > in your tests?
> > > >
> > > > Also, are you setting your environment variables as
> > appropriate? e.g.:
> > > > setenv("ODBCINI=/path/to/odbc.ini");
> > > > setenv("LD_LIBRARY_PATH=/path/to/your/driver/manager/lib");
> > > >
> > > > You may also which to try this connection with odbctest, a sample
> > > > application available in the iODBC SDK at www.iodbc.org.
> > > >
> > > > HTH!
> > > >
> > > > Best regards,
> > > > Andrew Hill
> > > > Director of Technology Evangelism
> > > > OpenLink Software  http://www.openlinksw.com
> > > > Universal Data A

RE: [PHP] PHP and qmail

2001-10-31 Thread Nathan Cassano


If you have installed Qmail and removed Sendmail create symlinks to the
qmail sendmail wrapper and you should not have to edit you php.ini. Read
the qmail INSTALL file for more.

# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

-Original Message-
From: Suleyman Kuran [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 31, 2001 12:22 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] PHP and qmail


Hi list,
 
I have recently installed qmail-1.03 now what settings should I make in
php.ini file to send email with mail() function. Thanks.
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: $ENV{'REMOTE_ADDR'}

2001-10-31 Thread Liz Fulghum

if ($REMOTE_ADDR=="127.0.0.1") {
do something
} elseif ($REMOTE_ADDR=="remote.somewhere.com") {
do something else
} else {
eeks! its the end
}

List of all the predefined variables:
http://www.php.net/manual/en/language.variables.predefined.php

--
Liz Fulghum
--
http://www.lipstickalley.com/ - Be Popular!
Want to learn PHP?
http://webdeveloper.earthweb.com/scripting/article/0,,12014_900521,00.html
--

"Jtjohnston" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> In perl I do something like this:
>
> if (!($ENV{'REMOTE_ADDR'} =~ /\b(132\.210)/))
> or
> ... $ENV{'REMOTE_HOST'}
>
> PHP is not Perl. So how do I parse the user's remote address or host to
> display one thing if IP = 127.0.0.1, another if = 209.247.2.3 another if
> host = "remote.somewhere.com" else echo Blah";
>
> John
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP and qmail

2001-10-31 Thread Suleyman Kuran

Hi list,
 
I have recently installed qmail-1.03 now what settings should I make in
php.ini file to send email with mail() function. Thanks.
 



[PHP] $ENV{'REMOTE_ADDR'}

2001-10-31 Thread jtjohnston

In perl I do something like this:

if (!($ENV{'REMOTE_ADDR'} =~ /\b(132\.210)/))
or
... $ENV{'REMOTE_HOST'}

PHP is not Perl. So how do I parse the user's remote address or host to
display one thing if IP = 127.0.0.1, another if = 209.247.2.3 another if
host = "remote.somewhere.com" else echo Blah";

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: File upload

2001-10-31 Thread Liz Fulghum

Your files are being uploaded to the pre-defined temporary directory.
$userfile contains the name of the temporary file the file was uploaded as.
After you run all the checks on the file to make sure its valid, you should
use copy() to move the file to its permament home in your file system, then
use unlink() to remove the temporary file.

http://www.php.net/manual/en/features.file-upload.php contains a whole bunch
of information on the topic that may be useful

--
Liz Fulghum
--
http://www.lipstickalley.com/ - Be Popular!
Want to learn PHP?
http://webdeveloper.earthweb.com/scripting/article/0,,12014_900521,00.html
--

"Andrzej Roszkowski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hi!
>
> Where is file upload function? ;) From begining: some time I've found
somewhere
> this handler:
> clearing_report_file is the input that is user sends to me.
>
> if(!isset($clearing_report_file))
> {
> pp_xfer_trans();
> }
> else
> {
> if (!@copy($clearing_report_file, $CFG["local_uri"]."/cfd-" . $batch
> .".txt")) {
> echo("\nSomething barfed, check the path to and the
permissions
> for the upload directory");
> }else
> {
> // do domething
> exit();
> }
>
> }
>
>
> but now, in php 4.0.5 this function don't want to work ;( i have allways
> something barfed message, even if i try to wrote to /tmp directory
>
> now i have this in phpinfo:
>
> HTTP_POST_FILES["userfile"]
>
> Array
> (
> [name] => helyjon
> [type] =>
> [tmp_name] => none
> [size] => 0
> )
>
> where is my file? $variables shows the same values, where are my contents?
>
> 
> Code reviews are like sex, just anyone can do it, but skill and training
> can make you a lot better at it." - LJ
> Thomas
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-10-31 Thread Kraa de Simon

Hi,

The problem is that a Progress 9.1c is not available at openlinksw.com for:

Client: Linux glibc2.1 (x86)
Server: UnixWare 7 (x86)

Only Progress 8.3b is supported.

So you are saying that a setting in the .ini files or some environment
variable could be missing.

I will have a look at it.

Thanks,

Simon.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: woensdag 31 oktober 2001 20:25
> To: Kraa de Simon; Php-General (E-mail)
> Subject: RE: [PHP] Desperate: odbc_connect() does not work! 
> Please help!
> 
> 
> Kraa,
> 
> I'm not sure why the two sample apps are using different 
> connection calls;
> It's not terribly relevant - both are legal.
> 
> Driver manager and driver are not typically dependent on each 
> other, no.
> The fact that the connection fails in odbctest is probably 
> due to a missing
> parameter that iODBC wants in the DSN or the environment 
> variables. You can
> look at error messages for the Merant driver - I'm not going 
> to get into
> debugging it :)
> 
> If you want to try OpenLink's ODBC drivers, you will find 
> they work fine
> with PHP and Progress.
> I suggest you download the Multi-Tier driver from our site - 
> they comes free
> with a 2 user connection.  I would also suggest that you
> compile --with-iodbc, as it is in greater use and has been 
> more thoroughly
> tested with PHP.
> 
> Free support is available as well if you have difficulties, at:
> http://www.openlinksw.com/support/suppindx.htm.
> 
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers
> 
> > -Original Message-
> > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 31, 2001 1:59 PM
> > To: '[EMAIL PROTECTED]'; Php-General (E-mail)
> > Subject: RE: [PHP] Desperate: odbc_connect() does not work! 
> Please help!
> >
> >
> > Hi Andrew,
> >
> > I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC 
> drivers and they
> > seem to be working fine when I try their test C program. I 
> can connect to
> > the Progress database en retrieve data.
> >
> > I'm using their driver manager as well (--with-custom-odbc).
> >
> > The test C program uses:
> >
> > SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
> >
> > SQLConnect is executed without problems. A connection can be made.
> >
> > When I try odbctest (from iODBC / odbcsdk) the connect fails
> > (same drivers,
> > same odbc.ini, same odbcinst.ini).
> >
> > SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS, 
> (UCHAR *) buf,
> > sizeof (buf), &buflen, SQL_DRIVER_COMPLETE);
> >
> > SQLDriverConnect returns -1. A connection cannot be made.
> >
> > Why is the first program using SQLConnect() and the other
> > SQLDriverConnect()?
> >
> > Are ODBC driver and ODBC driver manager dependent on each other?
> >
> > Or can I use the iODBC driver manager and the Merant ODBC drivers
> > together?
> >
> > Are there alternatives to the Merant ODBC drivers?
> >
> > I am connect a Progress 9.1c database on SCO UnixWare 7.1.1 
> from Red Hat
> > Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC 
> drivers and ODBC
> > driver manager.
> >
> > Any ideas?
> >
> > Regards,
> >
> > Simon.
> >
> > > -Original Message-
> > > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > > Sent: woensdag 31 oktober 2001 16:12
> > > To: Kraa de Simon; Php-General (E-mail)
> > > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > > Please help!
> > >
> > >
> > > Kraa,
> > >
> > > The 01000 error is a 'General Error', probably at connect time.
> > > This suggest that your DSN settings might be bad or not being
> > > passed into
> > > PHP.
> > > Is your DSN named "results" and is that the one you are using
> > > in your tests?
> > >
> > > Also, are you setting your environment variables as 
> appropriate? e.g.:
> > > setenv("ODBCINI=/path/to/odbc.ini");
> > > setenv("LD_LIBRARY_PATH=/path/to/your/driver/manager/lib");
> > >
> > > You may also which to try this connection with odbctest, a sample
> > > application available in the iODBC SDK at www.iodbc.org.
> > >
> > > HTH!
> > >
> > > Best regards,
> > > Andrew Hill
> > > Director of Technology Evangelism
> > > OpenLink Software  http://www.openlinksw.com
> > > Universal Data Access & Data Integration Technology Providers
> > >
> > > > -Original Message-
> > > > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, October 31, 2001 8:44 AM
> > > > To: Php-General (E-mail)
> > > > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > > Please help!
> > > >
> > > >
> > > > So desperate I even forgot the attachment...
> > > >
> > > > > -Original Message-
> > > > > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > > > > Sent: woensdag 31 oktober 2001 14:40
> > > > > To: Php-General (E-mail)
> > > > > Subject: [PHP] Desperate: odbc_connect() does not work!
> > > Please help!

RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-10-31 Thread Andrew Hill

Kraa,

I'm not sure why the two sample apps are using different connection calls;
It's not terribly relevant - both are legal.

Driver manager and driver are not typically dependent on each other, no.
The fact that the connection fails in odbctest is probably due to a missing
parameter that iODBC wants in the DSN or the environment variables. You can
look at error messages for the Merant driver - I'm not going to get into
debugging it :)

If you want to try OpenLink's ODBC drivers, you will find they work fine
with PHP and Progress.
I suggest you download the Multi-Tier driver from our site - they comes free
with a 2 user connection.  I would also suggest that you
compile --with-iodbc, as it is in greater use and has been more thoroughly
tested with PHP.

Free support is available as well if you have difficulties, at:
http://www.openlinksw.com/support/suppindx.htm.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -Original Message-
> From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 1:59 PM
> To: '[EMAIL PROTECTED]'; Php-General (E-mail)
> Subject: RE: [PHP] Desperate: odbc_connect() does not work! Please help!
>
>
> Hi Andrew,
>
> I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC drivers and they
> seem to be working fine when I try their test C program. I can connect to
> the Progress database en retrieve data.
>
> I'm using their driver manager as well (--with-custom-odbc).
>
> The test C program uses:
>
> SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
>
> SQLConnect is executed without problems. A connection can be made.
>
> When I try odbctest (from iODBC / odbcsdk) the connect fails
> (same drivers,
> same odbc.ini, same odbcinst.ini).
>
> SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS, (UCHAR *) buf,
> sizeof (buf), &buflen, SQL_DRIVER_COMPLETE);
>
> SQLDriverConnect returns -1. A connection cannot be made.
>
> Why is the first program using SQLConnect() and the other
> SQLDriverConnect()?
>
> Are ODBC driver and ODBC driver manager dependent on each other?
>
> Or can I use the iODBC driver manager and the Merant ODBC drivers
> together?
>
> Are there alternatives to the Merant ODBC drivers?
>
> I am connect a Progress 9.1c database on SCO UnixWare 7.1.1 from Red Hat
> Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC drivers and ODBC
> driver manager.
>
> Any ideas?
>
> Regards,
>
> Simon.
>
> > -Original Message-
> > From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> > Sent: woensdag 31 oktober 2001 16:12
> > To: Kraa de Simon; Php-General (E-mail)
> > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > Please help!
> >
> >
> > Kraa,
> >
> > The 01000 error is a 'General Error', probably at connect time.
> > This suggest that your DSN settings might be bad or not being
> > passed into
> > PHP.
> > Is your DSN named "results" and is that the one you are using
> > in your tests?
> >
> > Also, are you setting your environment variables as appropriate? e.g.:
> > setenv("ODBCINI=/path/to/odbc.ini");
> > setenv("LD_LIBRARY_PATH=/path/to/your/driver/manager/lib");
> >
> > You may also which to try this connection with odbctest, a sample
> > application available in the iODBC SDK at www.iodbc.org.
> >
> > HTH!
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > OpenLink Software  http://www.openlinksw.com
> > Universal Data Access & Data Integration Technology Providers
> >
> > > -Original Message-
> > > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, October 31, 2001 8:44 AM
> > > To: Php-General (E-mail)
> > > Subject: RE: [PHP] Desperate: odbc_connect() does not work!
> > Please help!
> > >
> > >
> > > So desperate I even forgot the attachment...
> > >
> > > > -Original Message-
> > > > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > > > Sent: woensdag 31 oktober 2001 14:40
> > > > To: Php-General (E-mail)
> > > > Subject: [PHP] Desperate: odbc_connect() does not work!
> > Please help!
> > > >
> > > >
> > > > Hi,
> > > >
> > > > When I execute:
> > > >
> > > > 
> > > >
> > > > I get error:
> > > >
> > > > Warning: SQL error: , SQL state 01000 in SQLConnect in
> > > > /usr/local/apache/htdocs/odbc.php on line 1
> > > >
> > > > See attachment for phpinfo().
> > > >
> > > > BTW 1
> > > >
> > > > The ODBC config itself works fine. I can make a connection
> > > > and retrieve data
> > > > from the database using a test C program.
> > > >
> > > > BTW 2
> > > >
> > > > I used --with-custom-odbc and set env var CUSTOM_ODBC_LIBS to
> > > > the lib dirs
> > > > and env var CFLAGS to the include dirs.
> > > >
> > > > Met vriendelijke groet / With kind regards,
> > > >
> > > > ICL Nederland B.V.  Simon de Kraa
> > > > e-Applications / Logistic Systems   Systems Architect
> > > > Het Kwadrant

Re: [PHP] A way to simulate modem speeds?

2001-10-31 Thread Shane Wright


duno about for windows, but there's quite a bit around on packet shaping for 
Linux and *BSD which amounts to the same thing - could be worthwhile sticking 
an old server in the middle with some different rules on different ports 
(i.e. port 81 set up for 14k4 equiv, 82 for 28k8 equiv, etc..)

sorry aint got any URLs but some googling should get you somewhere...

Shane

On Wednesday 31 October 2001 6:23 pm, Michael Hall wrote:
> I apologize for the only-vaguely-PHP-related nature of this, but I'm
> endlessly impressed with the knowledge here.
>
> I'm looking for a way to clamp down a network machine (we're on a T1) to
> modem speeds (28 to 52 K) for testing purposes.
>
> Is there software (preferably for Windows) that would do this?  Better yet,
> would this software be free?
>
> I don't want much, do I?
>
> Thanks.

-- 
Shane

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread turtle

.
Thank you Kurt,

The day for the server to be move from Cal to Fla is the 31st  (today)
I would image that it is somewhere in transit at the present time...

Will send you an email with another address you can respond to...

Thanks for all of your help
Mike


"Kurt Lieber" <[EMAIL PROTECTED]> wrote in message
E15yy3N-0005qE-00@z8">news:E15yy3N-0005qE-00@z8...
> On Wednesday 31 October 2001 07:45 am, turtle wrote:
> > 
>
> Glad we could help.  Also, you can re-write the above so you don't have to
> define two sets of  tags by doing the following:
>
> 
> print "";
>
> ?>
>
>
> Not a big deal here, but if you start writing multiple lines of HTML code,
> you probably don't want to enclose each PHP variable in its own set of
 ?> tags.
>
> Also, I tried to send you a couple suggestions off-list last night, but
your
> email bounces -- I'm guessing the new owner of netobjects doesn't have
their
> mail server set up to accept the correct email address.  Just FYI.
>
> --kurt



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-10-31 Thread Kraa de Simon

Hi Andrew,

I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC drivers and they
seem to be working fine when I try their test C program. I can connect to
the Progress database en retrieve data.

I'm using their driver manager as well (--with-custom-odbc).

The test C program uses:

SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);

SQLConnect is executed without problems. A connection can be made.

When I try odbctest (from iODBC / odbcsdk) the connect fails (same drivers,
same odbc.ini, same odbcinst.ini).

SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS, (UCHAR *) buf,
sizeof (buf), &buflen, SQL_DRIVER_COMPLETE);

SQLDriverConnect returns -1. A connection cannot be made.

Why is the first program using SQLConnect() and the other
SQLDriverConnect()?

Are ODBC driver and ODBC driver manager dependent on each other?

Or can I use the iODBC driver manager and the Merant ODBC drivers together?

Are there alternatives to the Merant ODBC drivers?

I am connect a Progress 9.1c database on SCO UnixWare 7.1.1 from Red Hat
Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC drivers and ODBC
driver manager.

Any ideas?

Regards,

Simon.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: woensdag 31 oktober 2001 16:12
> To: Kraa de Simon; Php-General (E-mail)
> Subject: RE: [PHP] Desperate: odbc_connect() does not work! 
> Please help!
> 
> 
> Kraa,
> 
> The 01000 error is a 'General Error', probably at connect time.
> This suggest that your DSN settings might be bad or not being 
> passed into
> PHP.
> Is your DSN named "results" and is that the one you are using 
> in your tests?
> 
> Also, are you setting your environment variables as appropriate? e.g.:
> setenv("ODBCINI=/path/to/odbc.ini");
> setenv("LD_LIBRARY_PATH=/path/to/your/driver/manager/lib");
> 
> You may also which to try this connection with odbctest, a sample
> application available in the iODBC SDK at www.iodbc.org.
> 
> HTH!
> 
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Data Integration Technology Providers
> 
> > -Original Message-
> > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 31, 2001 8:44 AM
> > To: Php-General (E-mail)
> > Subject: RE: [PHP] Desperate: odbc_connect() does not work! 
> Please help!
> >
> >
> > So desperate I even forgot the attachment...
> >
> > > -Original Message-
> > > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > > Sent: woensdag 31 oktober 2001 14:40
> > > To: Php-General (E-mail)
> > > Subject: [PHP] Desperate: odbc_connect() does not work! 
> Please help!
> > >
> > >
> > > Hi,
> > >
> > > When I execute:
> > >
> > >   
> > >
> > > I get error:
> > >
> > >   Warning: SQL error: , SQL state 01000 in SQLConnect in
> > > /usr/local/apache/htdocs/odbc.php on line 1
> > >
> > > See attachment for phpinfo().
> > >
> > > BTW 1
> > >
> > > The ODBC config itself works fine. I can make a connection
> > > and retrieve data
> > > from the database using a test C program.
> > >
> > > BTW 2
> > >
> > > I used --with-custom-odbc and set env var CUSTOM_ODBC_LIBS to
> > > the lib dirs
> > > and env var CFLAGS to the include dirs.
> > >
> > > Met vriendelijke groet / With kind regards,
> > >
> > > ICL Nederland B.V.  Simon de Kraa
> > > e-Applications / Logistic Systems   Systems Architect
> > > Het Kwadrant 1  Tel. +31 346 598865
> > > Postbus 4000Fax  +31 346 562703
> > > 3600 KA  MAARSSEN
> > > The Netherlands 
> mailto:[EMAIL PROTECTED]
> > >
> > > ---
> > >
> > > Progress 9.1c, Roundtable 9.1c, NuSphere Pro Advantage 2.3.1
> > > @ MS Windows
> > > 2000 5.00.2195 SP 2
> > > Progress 9.1b @ SCO UnixWare 7.1.1
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> >
> >
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] A way to simulate modem speeds?

2001-10-31 Thread Duncan Hill

On Wed, 31 Oct 2001, Michael Hall wrote:

> I'm looking for a way to clamp down a network machine (we're on a
> T1) to modem speeds (28 to 52 K) for testing purposes.

Well, mod_throttle on the server side will do this for you.  Client 
side.. hrum.  A linux box with bandwidth controls, a packeteer.  There 
is throttling software for Win, I've seen it in use - I just have no 
clue what it was called.

-- 

Sapere aude
My mind not only wanders, it sometimes leaves completely.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] A way to simulate modem speeds?

2001-10-31 Thread Michael Hall

I apologize for the only-vaguely-PHP-related nature of this, but I'm
endlessly impressed with the knowledge here.

I'm looking for a way to clamp down a network machine (we're on a T1) to
modem speeds (28 to 52 K) for testing purposes.

Is there software (preferably for Windows) that would do this?  Better yet,
would this software be free?

I don't want much, do I?

Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Weird caching problem with PHP4/Apache -- THE SAGA CONTINUES

2001-10-31 Thread René Fournier

Yes!  That's it!  I added that srand function, and it works great.  Thanks!

..Rene

> -Original Message-
> From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 10:58 AM
> To: René Fournier
> Cc: Php-General
> Subject: Re: [PHP] Re: Weird caching problem with PHP4/Apache -- THE
> SAGA CONTINUES
>
>
> On Wednesday 31 October 2001 18:18, René Fournier wrote:
> > Here's what I've got, starting at the top...
> >
> > ==
> >  > header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');// Date in
> > the past header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . '
> > GMT'); // always modified header ('Cache-Control: no-cache,
> > must-revalidate');  // HTTP/1.1 header ('Pragma: no-cache');
> >   // HTTP/1.0 ?>
> > 
> > Title
> > 
> > 
> >
> > [SNIP]
> >
> >  > function randbg() {
> > $num_of_bgs = 5;
> > $the_one = rand(1,$num_of_bgs);
> > echo "bg".$the_one.".jpg";
> > }
> > ?>
> >
> > [SNIP]
> >
> >  > randbg(); ?>> ==
> Ah, so you have bg1.jpg, bg2.jpg and so on till 5.
> And want to show one of them selected by a random value?
>
> So when you click on browser's refresh button, what happens?
> You always get the same page as before with for example bg1.jpg?
>
> Do you seed the random number generator (srand()) before you use
> rand() function?
>
>   Arpi
>
> > Here's why I think it's PHP4:  If I look at these pages on my local
> > machine (WinME, Apache 1.3.20, PHP4.06 module, MySQL 3.23.14 (not
> > that it matters, right?)), the randbg() function works as it
> > should--I get a random background image everytime.  But if I look
> > at these EXACT SAME pages on Fatcow (Linux/Apache, I believe,
> > PHP4...), the randbg() function executes the first time, then
> > [seemingly] fails to execute again--it never generates a different,
> > random bakground.  (Or maybe I'm looking at one hell of a
> > coincidence :-)
> >
> > So my question is, who is caching what, where?
> >
> > ...Rene
> >
> > > -Original Message-
> > > From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, October 31, 2001 7:24 AM
> > > To: René Fournier; Hugh Danaher
> > > Cc: Php-General
> > > Subject: Re: [PHP] Re: Weird caching problem with PHP4/Apache
> > >
> > > On Wednesday 31 October 2001 14:48, René Fournier wrote:
> > > > Nope, unfortunately, nothing.  It's a really weird problem.
> > > > It's like the PHP function I wrote for generating the random
> > > > image will only work the first time.
> > >
> > > I think it is not php that caches it. As I undertsand you wrote a
> > > script that generates an image, and give it back to the browser
> > > in an  html tag. Am I right?
> > > I hope I am, so I continue :))
> > > Images can be cached in many places (proxies, browser), but
> > > definietly not in php. Your script that generates in the image
> > > and should be called every time by the  html tag, won't ever
> > > called again if the previous image were stored somewhere. You
> > > should send "pragma no-cache" and other http headers (many posts
> > > were on this "cache headers" topic) from the script that
> > > generates and gives back the image.
> > > Or another sollution is that you can call your script with a
> > > random number or better with the current date and time, so you
> > > images's name won't be the same, and caches can't give back the
> > > old image. for example:
> > >  > > "\">";?>
> > >
> > >   Arpi
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > > [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread Jason Brooke

> Really?  No good at all, huh?  I would think that would answer the
question
> right there if it was an SMTP problem or a problem that lies elsewhere.
If
> you take SMTP out of the equation, and the problem still occurs, then you
> know that's not the issue.  If the problem does go away, then you've
isolated
> it to either PHP SMTP code (probably) or your SMTP server (not as likely,
but
> still a possibilty)

He already stated that the same code worked with a previous version. He also
made it clear that he was using Win32/SMTP. We all know it will probably
work on a Unix box with sendmail or similar because so many of us use it on
a daily basis with no such problem - that won't help his situation.

I think probing the guy a bit on the premise that he might be mistakenly
loking at Php as the problem is fair enough, but beginning an inquisition
certainly isn't warranted   ;)

jason




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Weird caching problem with PHP4/Apache -- THE SAGA CONTINUES

2001-10-31 Thread Tamas Arpad

On Wednesday 31 October 2001 18:18, René Fournier wrote:
> Here's what I've got, starting at the top...
>
> ==
>  header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');// Date in
> the past header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . '
> GMT'); // always modified header ('Cache-Control: no-cache,
> must-revalidate');  // HTTP/1.1 header ('Pragma: no-cache');   
>   // HTTP/1.0 ?>
> 
> Title
> 
> 
>
> [SNIP]
>
>  function randbg() {
>   $num_of_bgs = 5;
>   $the_one = rand(1,$num_of_bgs);
>   echo "bg".$the_one.".jpg";
>   }
> ?>
>
> [SNIP]
>
>  randbg(); ?>> ==
Ah, so you have bg1.jpg, bg2.jpg and so on till 5.
And want to show one of them selected by a random value?

So when you click on browser's refresh button, what happens?
You always get the same page as before with for example bg1.jpg?

Do you seed the random number generator (srand()) before you use 
rand() function?

Arpi

> Here's why I think it's PHP4:  If I look at these pages on my local
> machine (WinME, Apache 1.3.20, PHP4.06 module, MySQL 3.23.14 (not
> that it matters, right?)), the randbg() function works as it
> should--I get a random background image everytime.  But if I look
> at these EXACT SAME pages on Fatcow (Linux/Apache, I believe,
> PHP4...), the randbg() function executes the first time, then
> [seemingly] fails to execute again--it never generates a different,
> random bakground.  (Or maybe I'm looking at one hell of a
> coincidence :-)
>
> So my question is, who is caching what, where?
>
> ...Rene
>
> > -Original Message-
> > From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, October 31, 2001 7:24 AM
> > To: René Fournier; Hugh Danaher
> > Cc: Php-General
> > Subject: Re: [PHP] Re: Weird caching problem with PHP4/Apache
> >
> > On Wednesday 31 October 2001 14:48, René Fournier wrote:
> > > Nope, unfortunately, nothing.  It's a really weird problem. 
> > > It's like the PHP function I wrote for generating the random
> > > image will only work the first time.
> >
> > I think it is not php that caches it. As I undertsand you wrote a
> > script that generates an image, and give it back to the browser
> > in an  html tag. Am I right?
> > I hope I am, so I continue :))
> > Images can be cached in many places (proxies, browser), but
> > definietly not in php. Your script that generates in the image
> > and should be called every time by the  html tag, won't ever
> > called again if the previous image were stored somewhere. You
> > should send "pragma no-cache" and other http headers (many posts
> > were on this "cache headers" topic) from the script that
> > generates and gives back the image.
> > Or another sollution is that you can call your script with a
> > random number or better with the current date and time, so you
> > images's name won't be the same, and caches can't give back the
> > old image. for example:
> >  > "\">";?>
> >
> > Arpi
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 09:08 am, you wrote:
> It doesn't do much good to test on a nix box because what I'm looking
> for is a solution to a PHP/SMTP problem.

Really?  No good at all, huh?  I would think that would answer the question 
right there if it was an SMTP problem or a problem that lies elsewhere.  If 
you take SMTP out of the equation, and the problem still occurs, then you 
know that's not the issue.  If the problem does go away, then you've isolated 
it to either PHP SMTP code (probably) or your SMTP server (not as likely, but 
still a possibilty) 

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Weird caching problem with PHP4/Apache -- THE SAGA CONTINUES

2001-10-31 Thread René Fournier

Here's what I've got, starting at the top...

==


Title



[SNIP]



[SNIP]

>
==

Here's why I think it's PHP4:  If I look at these pages on my local machine
(WinME, Apache 1.3.20, PHP4.06 module, MySQL 3.23.14 (not that it matters,
right?)), the randbg() function works as it should--I get a random
background image everytime.  But if I look at these EXACT SAME pages on
Fatcow (Linux/Apache, I believe, PHP4...), the randbg() function executes
the first time, then [seemingly] fails to execute again--it never generates
a different, random bakground.  (Or maybe I'm looking at one hell of a
coincidence :-)

So my question is, who is caching what, where?

...Rene


> -Original Message-
> From: Tamas Arpad [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 7:24 AM
> To: René Fournier; Hugh Danaher
> Cc: Php-General
> Subject: Re: [PHP] Re: Weird caching problem with PHP4/Apache
>
>
> On Wednesday 31 October 2001 14:48, René Fournier wrote:
> > Nope, unfortunately, nothing.  It's a really weird problem.  It's
> > like the PHP function I wrote for generating the random image will
> > only work the first time.
> I think it is not php that caches it. As I undertsand you wrote a
> script that generates an image, and give it back to the browser in an
>  html tag. Am I right?
> I hope I am, so I continue :))
> Images can be cached in many places (proxies, browser), but
> definietly not in php. Your script that generates in the image and
> should be called every time by the  html tag, won't ever called
> again if the previous image were stored somewhere. You should send
> "pragma no-cache" and other http headers (many posts were on this
> "cache headers" topic) from the script that generates and gives back
> the image.
> Or another sollution is that you can call your script with a random
> number or better with the current date and time, so you images's name
> won't be the same, and caches can't give back the old image.
> for example:
>  "\">";?>
>
>   Arpi
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Matthew Luchak


OK.  here's why I think it's in PHP's SMTP support:

There is an address that fails in 4.06 yet functions in 4.04 - exactly
the same code, same SMTP server, same .ini,  everything the same.

I wouldn't question the class if I hadn't tested my own code and
settings first.  I've been trying to track this down for the past two
weeks and have already been advised by someone on this list that PHP's
SMTP support is not the greatest:

>SMTP code in PHP is not good enough. It needs to be rewritten.

>Yasuo Ohgaki


It doesn't do much good to test on a nix box because what I'm looking
for is a solution to a PHP/SMTP problem. 


 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 11:57 AM
To: PHP General List
Subject: Re: [PHP] defending PHP mail function


On Wednesday 31 October 2001 08:40 am, you wrote:

> for now it's PHP that's in question 

AFAIK, this is the first I've ever heard of probelms with mail() not
sending 
to perfectly valid email addresses.  Scalability issues and other
performance 
problems, sure, but that's a different animal.

Given the number of people that use PHP (and use mail(), especially) I
would 
certainly think this problem would have been reported before if it were
a 
real bug.

So, to be blunt, you probably have a problem with your code, your SMTP 
server, the way you've configured PHP, or something other than mail().
It's 
easy to blame it on mail() and/or PHP, but I think you're barking up the

wrong tree.

Find a forgiving customer who reported the problem, ask for their help
in 
troubleshooting it and then send some test emails from a completely
different 
server, preferably on a *nix platform.  (not because *nix is better than

windows, but because *nix PHP doesn't use smtp for mail delivery)

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: defending PHP mail function

2001-10-31 Thread Manuel Lemos

Hello,

> Matthew Luchak wrote:
> 
> Recently I have had to defend the use of PHP in light of a number of
> screw-ups with the mail function in 4.0+.  It seems that some email

If you are using Windows, that seems to be a problem that the mail()
function implementation does not handle
SMTP servers that return multi-line responses. The problem was reported
a long time ago. I don't think it was ever fixed.


> addresses will simply "not work" with mail.  I have been shopping
> around for a smtp direct class (
> http://www.zend.com/codex.php?id=347&single=1 ) looks pretty good to
> me and was wondering if anyone has any experiences, shortcuts etc. to
> this kind of problem with mail.

That class does not handle multi-line responses either. Try this one:

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

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 08:40 am, you wrote:

> for now it's PHP that's in question 

AFAIK, this is the first I've ever heard of probelms with mail() not sending 
to perfectly valid email addresses.  Scalability issues and other performance 
problems, sure, but that's a different animal.

Given the number of people that use PHP (and use mail(), especially) I would 
certainly think this problem would have been reported before if it were a 
real bug.

So, to be blunt, you probably have a problem with your code, your SMTP 
server, the way you've configured PHP, or something other than mail().  It's 
easy to blame it on mail() and/or PHP, but I think you're barking up the 
wrong tree.

Find a forgiving customer who reported the problem, ask for their help in 
troubleshooting it and then send some test emails from a completely different 
server, preferably on a *nix platform.  (not because *nix is better than 
windows, but because *nix PHP doesn't use smtp for mail delivery)

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Matthew Luchak



>Well hey, if mail() won't send to those addresses, what's wrong with us
>testing them? :-)

;)


>Can you send to those addresses from a regular email client? If so, can
you
>do it from the command line with your MTA?

Of course I am talking about valid addresses, in fact there is at least
one address that "works" with 4.04 but not with 4.06.

I apologize about being vague with the addresses that fail but I
obviously can't be sending out my client's email addresses for testing -
for now it's PHP that's in question - if I send out the client's
addresses well... management might just decide to kill two birds with
one stone.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Jon Haworth

Well hey, if mail() won't send to those addresses, what's wrong with us
testing them? :-)



Can you send to those addresses from a regular email client? If so, can you
do it from the command line with your MTA?

jon@maya~$ sendmail [EMAIL PROTECTED]
hello there
.

Cheers
Jon


-Original Message-
From: Matthew Luchak [mailto:[EMAIL PROTECTED]]
Sent: 31 October 2001 16:17
To: Php-General (E-mail)
Subject: RE: [PHP] defending PHP mail function



The addresses I know about are clients that are already a little peeved
with me so I can't send them out for testing but I have found at least 4
addresses that will "not work" (no error message, just dead air) with
Mail().   It is something about the string of letters that does it
because if I try "[EMAIL PROTECTED]" it doesn't mail.  If I try
"[EMAIL PROTECTED]", or the like, it mails.

I first noticed this problem when inserting addresses into the "From:"
field and have now found it happening (not) in the "To:" field.

 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-Original Message-
From: Jason Brooke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 11:10 AM
To: Matthew Luchak; Php-General (E-mail)
Subject: Re: [PHP] defending PHP mail function


Which addresses won't work? 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 08:16 am, you wrote:
> The addresses I know about are clients that are already a little peeved
> with me so I can't send them out for testing but I have found at least 4
> addresses that will "not work" (no error message, just dead air) with
> Mail().   It is something about the string of letters that does it
> because if I try "[EMAIL PROTECTED]" it doesn't mail.  If I try
> "[EMAIL PROTECTED]", or the like, it mails.

Not that I doubt you, but I do suspect a problem other than PHP, such as a 
strange, non-printing character getting inserted in the email address 
somewhere (like at the end) or a newline character.  It could also be a 
problem with the SMTP server that you're using. 

I highly recommend that you try this out on another, totally different PHP 
server (esp. one that runs on Apache/*nix, since that doesn't use SMTP to 
transport mail)  That will help you isolate the exact area where the problem 
occurs.

If you want to contact me off list, I'd be happy to help out with some simple 
tests.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Matthew Luchak


The addresses I know about are clients that are already a little peeved
with me so I can't send them out for testing but I have found at least 4
addresses that will "not work" (no error message, just dead air) with
Mail().   It is something about the string of letters that does it
because if I try "[EMAIL PROTECTED]" it doesn't mail.  If I try
"[EMAIL PROTECTED]", or the like, it mails.

I first noticed this problem when inserting addresses into the "From:"
field and have now found it happening (not) in the "To:" field.

 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-Original Message-
From: Jason Brooke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 11:10 AM
To: Matthew Luchak; Php-General (E-mail)
Subject: Re: [PHP] defending PHP mail function


Which addresses won't work? 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Jon Haworth

I'd be interested to see an example of an address that will "not work"

Which MTA are you using? On which OS?  More info!

(obPeeve): Please don't post in HTML.

Cheers
Jon


-Original Message-
From: Matthew Luchak [mailto:[EMAIL PROTECTED]]
Sent: 31 October 2001 16:04
To: Php-General (E-mail)
Subject: [PHP] defending PHP mail function


Recently I have had to defend the use of PHP in light of a number of
screw-ups with the mail function in 4.0+.  It seems that some email
addresses will simply "not work" with mail.  I have been shopping around for
a smtp direct class ( http://www.zend.com/codex.php?id=347&single=1 ) looks
pretty good to me and was wondering if anyone has any experiences, shortcuts
etc. to this kind of problem with mail.
 
Matthew Luchak 
Webmaster 
Kaydara Inc. 
[EMAIL PROTECTED] 


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread ReDucTor

thats wierd it added blank infront of it all...wierd

it might have been the smtp server its self that had rules or something...

- Original Message - 
From: "Matthew Luchak" <[EMAIL PROTECTED]>
To: "Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 2:09 AM
Subject: RE: [PHP] defending PHP mail function


> WIN 2000
> 
> 
> 
> 
> Blankwhat os was it?!?!?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 07:45 am, turtle wrote:
> 

Glad we could help.  Also, you can re-write the above so you don't have to 
define two sets of  tags by doing the following:

";

?>


Not a big deal here, but if you start writing multiple lines of HTML code, 
you probably don't want to enclose each PHP variable in its own set of  tags.

Also, I tried to send you a couple suggestions off-list last night, but your 
email bounces -- I'm guessing the new owner of netobjects doesn't have their 
mail server set up to accept the correct email address.  Just FYI.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Nathan Cassano


My favorite email libraries are .. 

SMTP class
http://www.phpguru.org/download.php?script_id=10

And working in conjunction with SMTP class ..

HTML Email Class
http://www.phpguru.org/download.php?script_id=4

-Original Message-
From: Matthew Luchak [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 31, 2001 8:04 AM
To: Php-General (E-mail)
Subject: [PHP] defending PHP mail function


Recently I have had to defend the use of PHP in light of a number of
screw-ups with the mail function in 4.0+.  It seems that some email
addresses will simply "not work" with mail.  I have been shopping around
for a smtp direct class ( http://www.zend.com/codex.php?id=347&single=1
) looks pretty good to me and was wondering if anyone has any
experiences, shortcuts etc. to this kind of problem with mail.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread Jason Brooke

Which addresses won't work? 


- Original Message - 
From: "Matthew Luchak" <[EMAIL PROTECTED]>
To: "Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, November 01, 2001 2:04 AM
Subject: [PHP] defending PHP mail function


Recently I have had to defend the use of PHP in light of a number of
screw-ups with the mail function in 4.0+.  It seems that some email
addresses will simply "not work" with mail.  I have been shopping around
for a smtp direct class ( http://www.zend.com/codex.php?id=347
 &single=1 ) looks pretty
good to me and was wondering if anyone has any experiences, shortcuts
etc. to this kind of problem with mail.

 
Matthew Luchak 
Webmaster 
Kaydara Inc. 
[EMAIL PROTECTED] 

 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] defending PHP mail function

2001-10-31 Thread Matthew Luchak

WIN 2000




Blankwhat os was it?!?!?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] defending PHP mail function

2001-10-31 Thread ReDucTor

Blankwhat os was it?!?!?
- Original Message -
From: Matthew Luchak
To: Php-General (E-mail)
Sent: Thursday, November 01, 2001 2:04 AM
Subject: [PHP] defending PHP mail function


Recently I have had to defend the use of PHP in light of a number of
screw-ups with the mail function in 4.0+.  It seems that some email
addresses will simply "not work" with mail.  I have been shopping around for
a smtp direct class ( http://www.zend.com/codex.php?id=347&single=1 ) looks
pretty good to me and was wondering if anyone has any experiences, shortcuts
etc. to this kind of problem with mail.

Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] defending PHP mail function

2001-10-31 Thread Matthew Luchak
Title: Blank



Recently I have had to defend the use of PHP 
in light of a number of screw-ups with the mail function in 4.0+.  It seems 
that some email addresses will simply "not work" with mail.  I have been 
shopping around for a smtp direct class ( http://www.zend.com/codex.php?id=347&single=1 ) 
looks pretty good to me and was wondering if anyone has any experiences, 
shortcuts etc. to this kind of problem with mail.
 Matthew 
Luchak Webmaster Kaydara 
Inc. [EMAIL PROTECTED] 
 


Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread turtle

.
Thank you for the heads up on using like.  I was wondering since there will
be 2 similar variables from each page var1 var2 (identical except for the
number).  I programmed in DataFlex for about 6 years back in the late 80's
early 90's but have not done anything db wise in over 8 years  I still
do not know where the problem was (maybe syntax or spelling)

Again, thank you for all of your help...

Mike

"Kurt Lieber" <[EMAIL PROTECTED]> wrote in message
E15yxVD-0005ls-00@z8">news:E15yxVD-0005ls-00@z8...
> On Wednesday 31 October 2001 02:32 am, you wrote:
> > So, I'd recommend giving that a try.  From my understanding (limited) of
> > MySQL, use = in the case of $id=2, and LIKE in the case of firstName
> > LIKE "justin".
>
> Um...you *can* do that, but I don't think you want to.  Using LIKE means
that
> MySQL has to do a lot more searching on all your database records.
Instead
> of searching for an exact match, where it can look at things like string
> length, first characters and other simple criteria, it now has to evaluate
> the entire contents of the field in case there's a possible match
somewhere
> in the string.  Much, much slower.
>
> So, yes it works, but you pay a performance price for it.
>
> --kurt



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] User Authentication against remote authentication serve r [ LDAP ]

2001-10-31 Thread Johnson, Kirk

Thanks very much, Stig, very helpful! We are just scouting the technology
right now, so my more precise questions will come later ;) We will be using
SSL. Given that, it looks to me like "decision maker" mode is the way to go?

Kirk

> -Original Message-
> From: Stig Venaas [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 3:06 AM
> To: Johnson, Kirk
> Cc: PHP General List
> Subject: Re: [PHP] User Authentication against remote authentication
> serve r [ LDAP ]
> 
> 
> On Mon, Oct 29, 2001 at 04:54:37PM -0700, Johnson, Kirk wrote:
> > Thanks for the link, Kurt. Can you also point to any 
> authentication code
> > examples, or further discussion? The user comments in the 
> manual suggest
> > there are at least a couple ways to code stuff, 
> ldap_compare vs ldap_bind.
> > Any additional help appreciated.
> 
> I might be able to help if you have some more precise questions, but
> basically there are two ways LDAP can be used. You can either use it
> as a data store or you can have LDAP make the authentication decision
> for you. If you want the user to supply username and password, the
> authentication can be done as follows:
> 
> As data store:
> 
> Hopefully the passwords are stored encrypted. Then there are two ways.
> If the password is stored encrypted with some unknown salt where the
> salt is stored together with the password (like the traditional UNIX
> way), your PHP script retrieves the encrypted password from LDAP,
> checks the salt, encrypts the user supplied password using the salt,
> and compare the two. If you don't use a salt you can encrypt the
> password from the user and just do an ldap_compare to check that it's
> the same as in the LDAP server. You get better security by 
> not allowing
> people to read the encrypted passwords from LDAP. To store passwords
> "encrypted" in LDAP, SHA1 might be a good choice, PHP has this.
> 
> As decision maker:
> 
> You can simply bind to the server on behalf of the user, you use the
> user supplied username and password as arguments to ldap_bind(). If
> the bind succeeds, you let the user access your stuff. In this case
> you should consider using SSL/TLS for talking to the server.
> 
> There are other ways to authenticate with LDAP, RFC 2829 gives a good
> overview. You can find it at for instance
> http://www.ietf.org/rfc/rfc2829.txt
> 
> I could go into more detail, but to write a complete general overview
> would be a lot of work. You might also have a look at a really short
> presentation I've made at
> http://www.uninett.no/info/seminar/gnomis/ldapauth.pdf
> 
> Stig
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread turtle

.
Thanks to Kurt and Justin for the help offered on this simple (now that it
is working) problem.

I do not know where my stumbling block was but after a good nights rest and
some coffee this morning I have this and the GetImageSize function
incorporated..  I will list the code incase someone finds problems or a
simpler way to go with it but it does seem to work well (at least on the
local host)



Display within the html doc is:



Again thanks for all of your patience and help

Mike




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP-arnings

2001-10-31 Thread Julio Nobrega

  Yeah, I got these kind of warning when I set error_reporting(E_ALL);

  Anyway, this shouls do it:



  The point is when you get 'non defined var', just define it before, even
empty (i.e, $x = '') or check it with isset();..

--


  Julio Nobrega.

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

"Harald Witt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have a hopefully simple problem. Look at the following simple script:
>
>if  ($x) {
> echo $x;
>   }
> ?>
>
> This script runs properly on my productive system (Linux, Apache, PHP
> 4.0.3pl1). But on my Development-System (W2k Server, Apache 1.3.20, PHP
4.0.6) I
> always get a Warning, that variable x in not definded.
> Ok, thats true. But how can I suppress that Messages??? They destroy my
> HTML-Code. I've searched in the PHP.INI file, but I can't find anything,
that
> looks like warning-suppression.
>
> Thanx for your help
>
> Harald
>
> --
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problems with pages generated by Apache's AddLanguage directive

2001-10-31 Thread Clint Gilders

Hi
Just yesterday I installed Apache 1.3.22/PHP 4.0.6 to replace an
ancient install of Apache 1.3.9/PHP 3.0.12.  This is on FreeBSD 3.2.  

I have several sites which display content in different languages using
Apache's AddLanguage, and LanguagePriority directives (page.php.en,
page.php.fr, page.php.de, etc).  This worked fine for my php pages in
the old install and I was able to use variables contained in the query
string.  Now in the new install the variables in the query sting are no
longer getting passed to the php pages.  Whether used bare ($variable)
or in the context of $HTTP_GET_VARS ($HTTP_GET_VARS[variable]) they
don't get passed to the script.

Any idea what is causing this?  A remedy?

Thanks

-- 
Clint Gilders
Servermaster OnlineHobbyist, Inc.
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP+MySQL=Help(?)

2001-10-31 Thread Kurt Lieber

On Wednesday 31 October 2001 02:32 am, you wrote:
> So, I'd recommend giving that a try.  From my understanding (limited) of
> MySQL, use = in the case of $id=2, and LIKE in the case of firstName
> LIKE "justin".

Um...you *can* do that, but I don't think you want to.  Using LIKE means that 
MySQL has to do a lot more searching on all your database records.  Instead 
of searching for an exact match, where it can look at things like string 
length, first characters and other simple criteria, it now has to evaluate 
the entire contents of the field in case there's a possible match somewhere 
in the string.  Much, much slower.

So, yes it works, but you pay a performance price for it. 

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: setting member variables out of class

2001-10-31 Thread Mike Frazer

I believe you would be getting a number echoed to the screen or dumpfile,
but you want the values, correct?

$telefono is declared as an array.  Calling an echo statement on an array
won't give you the values of the array elements.  In order to have them all
printed to screen, try:

foreach ($telefono as $tele) {  // $tele is just a tempo variable, name it
what you want
print "$telefono\n";  //  for screen formatting, \n for
source formatting
}

Mike


"Silvia Mahiques" <[EMAIL PROTECTED]> wrote in message
004401c16219$b50eb930$1a9cd29b@tscpc6">news:004401c16219$b50eb930$1a9cd29b@tscpc6...
Hello,
I want to set member variables out of their class. The code class is:




I access to this class from another php file and want to set this member
variable:

$c = new translator();
echo $c->telefono;   /* this member isn't set but in constructor method
has been set*/


I have written too:

echo $c->$telefon;
echo "{$c->telefon}";

but is not correct.


Can anybody help me?

Thanks


Silvia Mahiques





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Distributed Data Base

2001-10-31 Thread Luis Corea

Hello,
I want to Know how can I save  information on a Data Bse that will be access 
for many persons at the same time.

I use Postgressql

Thanks.

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: I rest my case

2001-10-31 Thread Mike Frazer

Apache has a high learning curve.  PHP isn't terribly hard to pick up on if
you already know the basics of programming.

Also, you may want to check out the newsgroup
comp.infosystems.www.servers.unix for help with Apache if you continue to
have problems.  It appears from all the info you gave us that the problem is
Apache and not PHP.

Mike



"J W W L Berg" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OK, there goes any pretense of intelligence that I may have been able to
> muster ;-)
>
> The AddType tag was found inside another as follows:
>
> 
>
> Is there some way I can check if this module is present, otherwise what
> you're saying is that the AddType isn't being executed if the 
is
> false, yes?
>
> What a pillock. I can see this is going to be some learning curve.
> Warwick
>
>
>
> Jason Brooke wrote:
>
> > John, Jason didn't literally mean for you to search for the exact string
> > '' - he was telling you to look through the various types of
> >  tags found in your httpd.conf file, such as
> > ,  etc etc
> >
> >
> >> There is no  element in the httpd.conf. Is that where I should
be
> >> looking?
> >> Warwick
> >>
> >>
> >> Jason Murray wrote:
> >>
> >> >> Hey thanks guys for the help, but it's still not happening.
> >> >> Apache had already the AddType lines mentioned by y'all.
> >> >
> >> > It's possible the AddType lines are inside a container that
> >> > will ensure they're not executed. Backtrack to the 
> >> > element that the AddType lines are in, and see what it does.
> >> >
> >> > Jason
> >
> >
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-10-31 Thread Andrew Hill

Kraa,

The 01000 error is a 'General Error', probably at connect time.
This suggest that your DSN settings might be bad or not being passed into
PHP.
Is your DSN named "results" and is that the one you are using in your tests?

Also, are you setting your environment variables as appropriate? e.g.:
setenv("ODBCINI=/path/to/odbc.ini");
setenv("LD_LIBRARY_PATH=/path/to/your/driver/manager/lib");

You may also which to try this connection with odbctest, a sample
application available in the iODBC SDK at www.iodbc.org.

HTH!

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -Original Message-
> From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 8:44 AM
> To: Php-General (E-mail)
> Subject: RE: [PHP] Desperate: odbc_connect() does not work! Please help!
>
>
> So desperate I even forgot the attachment...
>
> > -Original Message-
> > From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
> > Sent: woensdag 31 oktober 2001 14:40
> > To: Php-General (E-mail)
> > Subject: [PHP] Desperate: odbc_connect() does not work! Please help!
> >
> >
> > Hi,
> >
> > When I execute:
> >
> > 
> >
> > I get error:
> >
> > Warning: SQL error: , SQL state 01000 in SQLConnect in
> > /usr/local/apache/htdocs/odbc.php on line 1
> >
> > See attachment for phpinfo().
> >
> > BTW 1
> >
> > The ODBC config itself works fine. I can make a connection
> > and retrieve data
> > from the database using a test C program.
> >
> > BTW 2
> >
> > I used --with-custom-odbc and set env var CUSTOM_ODBC_LIBS to
> > the lib dirs
> > and env var CFLAGS to the include dirs.
> >
> > Met vriendelijke groet / With kind regards,
> >
> > ICL Nederland B.V.  Simon de Kraa
> > e-Applications / Logistic Systems   Systems Architect
> > Het Kwadrant 1  Tel. +31 346 598865
> > Postbus 4000Fax  +31 346 562703
> > 3600 KA  MAARSSEN
> > The Netherlands mailto:[EMAIL PROTECTED]
> >
> > ---
> >
> > Progress 9.1c, Roundtable 9.1c, NuSphere Pro Advantage 2.3.1
> > @ MS Windows
> > 2000 5.00.2195 SP 2
> > Progress 9.1b @ SCO UnixWare 7.1.1
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Bug ? Script download problem if user abort download

2001-10-31 Thread Gianluca Morello

I retry using the following snuppet:

...
while (!connection_aborted() && !feof($fp) )
 {
  echo fread($fp, 1000);
  }

but nothing change.
I try also with connection_status() and ignore_user_abort(false) but nothign
change.
If the user abort the download progress, the php process hang.



"Gianluca Morello" <[EMAIL PROTECTED]> ha scritto nel messaggio
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a download script on IIS 5 and Php 4.0.6 as cgi:
>
>  $filename=PDF_PATH.$codfile.".pdf";
>   $fp=fopen($filename,"rb");
>   if ($fp)
>   {
>header("Content-type: application/octet-stream\n" );
>header("Content-transfer-encoding: binary\n");
>header("Content-length: " . filesize($filename) . "\n");
>header("Content-disposition: attachment; filename=".$codfile.".pdf\n");
>$contents="";
>while (!feof($fp))
>{
> $contents .= fread($fp, 1000);
>}
>fclose($fp);
>print($contents);
>
>
> the script works very well.
> But if the user press the Cancel button in the browser download dialog,
the
> current php process stop working. If i try to load a new page another php
> process is spawned, but do nothing.
> If i look in the task manager i see my php processes running (without
doing
> nothing).
> When the timeout occurs the php engine continue wotking correctly.
>
> If i close the browser while php is hang, and i start a new browser
session
> the php pages are correctly processed.
>
>
> I try several other methods :
> readfile,fpassthru,fread($fp,filesize),read and print a small chunks of
> data, but nothing change, when the user abort the download operation the
php
> hang.
>
> This behaviour is very similar to the following bug:
> http://bugs.php.net/?id=8215 , that appears to be closed
>
>
>
>
>
> --
> Gianluca Morello
> Editek S.r.l.
> http://www.editek.it
> Via Vitruvio, 43 - Milano
> Mail: [EMAIL PROTECTED]
> Tel. : 02-671166208
> Fax : 02-67493766
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Array of classes

2001-10-31 Thread Mike Frazer

Try something like this (you'll need to populate it afterward):

$this->array = array();

Then populate it with the data.

Mike Frazer



"Andrzej Roszkowski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hi!
>
> I have to create array of classes.
>
> When I do it this way:
>
> f add($sth)
> $this->array[] = $sth;
>
> it doesn't work :( when i'm trying to get class from there it says that
this is not an object.
>
> How to do it rigth way?
>
>
> 
> Code reviews are like sex, just anyone can do it, but skill and training
> can make you a lot better at it." - LJ
> Thomas
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] setting member variables out of class

2001-10-31 Thread Matt Williams


> Hello,
> I want to set member variables out of their class. The code class is:
>
> 
> class translator {
>
>  var $nombre;
>  var $departamento;
>  var $despacho;
>  var $telefono;
>  var $correo_electronico;
>  var $pagina_personal;
>
>  function translator(){
>   $nombre = array("Nombre","Name");
>   $departamento = array("Departamento","Department");
>   $despacho = array("Despacho","Office");
>   $telefono = array("Teléfono","Phone");
>   $correo_electronico = array("Correo Electrónico","E-mail");
>   $pagina_personal = array("Página Personal","Personal HomePage");
>  }
> }
> ?>
>
>
> I access to this class from another php file and want to set this
> member variable:
>
> $c = new translator();
> echo $c->telefono;   /* this member isn't set but in
> constructor method has been set*/

So what error message do you get?

$c->telefono is an array so you will not be able to echo it straight out.
It will echo 'Array'.

Is this what you're getting?
If so, read up on arrays from the manual, specifically each

M:


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PEAR DB Results

2001-10-31 Thread Jeremy Allen

Based on the snippet you have sent us you need
to at least start by enclosing your column names
in your accesses to the associative array containing
your results.

Each line just use print_r or var_dump:

while($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
{
print_r($row);
}


This will show you exactly what is going on. Verify
that your results are actually there as well.

As a final note the actual problem appears to
be that you are not accessing the associative
array elements with quotes:

echo $row["wwwpages.name"];

Instead of:

echo $row[wwwpages.name];

This should show you what is going on and help you
easier determine what is going wrong, it is possible
you are not returning any data with your query as
well.

Thanks

Jeremy Allen


-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 5:07 AM
To: PHP General Mailing List
Subject: [PHP] PEAR DB Results


I am trying to do a joined query using PEAR DB? My code looks something like
this:

$sql = "SELECT wwwpages.pid,wwwpages.name,media.pid,media.name FROM
wwwpages, media WHERE wwwpages.pid = '$pid'";

if(DB::isError($result = $db->query($sql))){
echo "ERROR:" . DB::errorMessage($result);
} else {

while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)){
echo $row[wwwpages.name];
echo $row[media.name]
}
}

When I specify '$row[wwwpages.name]' I get a blank result, and if I try
'$row[name]',  I am obviously not specifying a table therefore it results in
name for wwwpages table. How do I go about displaying both?


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP-arnings

2001-10-31 Thread nico_oreka

If defined ($x) ???

If !empty ($x) ???

...Well ...

- Original Message -
From: Martín Marqués <[EMAIL PROTECTED]>
To: Harald Witt <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, October 31, 2001 3:43 PM
Subject: Re: [PHP] PHP-arnings


> On Mié 31 Oct 2001 11:17, you wrote:
> > Hi,
> >
> > I have a hopefully simple problem. Look at the following simple script:
> >
> >  >   if  ($x) {
> > echo $x;
> >   }
> > ?>
> >
> > This script runs properly on my productive system (Linux, Apache, PHP
> > 4.0.3pl1). But on my Development-System (W2k Server, Apache 1.3.20, PHP
> > 4.0.6) I always get a Warning, that variable x in not definded.
> > Ok, thats true. But how can I suppress that Messages??? They destroy my
> > HTML-Code. I've searched in the PHP.INI file, but I can't find anything,
> > that looks like warning-suppression.
>
> Yes the error reporting.
>
> --
> Porqué usar una base de datos relacional cualquiera,
> si podés usar PostgreSQL?
> -
> Martín Marqués  |[EMAIL PROTECTED]
> Programador, Administrador, DBA |   Centro de Telematica
>Universidad Nacional
> del Litoral
> -
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >