[PHP] assert in php.ini setting.

2002-03-22 Thread S.Murali Krishna


can any one tell me what is this 

;assert.active= On  ; assert(expr); active by default
;assert.warning   = On  ; issue a PHP warning for each failed
;assert.bail= Off ; don't bail out by default.
;assert.callback  = 0 ; user-function to be called if an assertion
;assert.quiet_eval  = 0 ; eval the expression with current


setting in my php.ini file, I don't know what it is for, and it has been
commented. 

Help would be appreciated.



<[EMAIL PROTECTED]>
---
We must use time wisely and forever realize that the time is 
always ripe to do right."

-- Nelson Mandela
---


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




[PHP] Stripslashes & addslashes question ...

2002-03-22 Thread John Kelly

Hi, can someone tell me why the following results in evaluated variables
with 2 slashes in front of apostrophys instead of one and how I can modify
it to only add 1? Thanks!

foreach($_POST as $k=>$v){
if (get_magic_quotes_gpc()){
$_POST[$k] = stripslashes($v);
}
$_POST[$k] = addslashes($v);
eval( "\$$k = \"$_POST[$k]\";" );
}



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 3/14/02

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




Re: [PHP] Re: Tool to remove comments??

2002-03-22 Thread Michael A. Peters

there's also two tools called sed and grep that are available on any unix
system. and probably easily gettable on windblows.

That can probably remove most comments.

Why you would want to remove comments, I don't know.
They are very useful in the future when fixing something or changing
something.
Good Code == Commented Code
Well, Good Code is at least a subset of commented code ;)

If you don't want a customer to see them, use the Zend Encoder and hide
all your source.

On Sat, 23 Mar 2002 04:38:40 -0300
"Julio Nobrega" <[EMAIL PROTECTED]> mentioned:

>   There's an php obfuscator, http://pobs.mywalhalla.net/, and one of the
> options is to remove comments.
> 
> --
> Julio Nobrega.
> 
> Um dia eu chego lá:
> http://sourceforge.net/projects/toca
> 
> Ajudei? Salvei? Que tal um presentinho?
> http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
> "Oliver Heinisch" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi Folks,
> > does anybody know a tool for removing comments out of PHP scripts?
> >
> > I mean // this is a comment
> > and /* this is also a comment */
> >
> > it should also handle  something like
> > echo'http://somewher.somecom/somepage'; // this goes to somewhere
> > and multiline comment like
> > /*
> > ..blah
> > */
> > maybe anybody has an awk script, that he/she will share with me.
> > TIA Oliver
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP] Re: Tool to remove comments??

2002-03-22 Thread Julio Nobrega

  There's an php obfuscator, http://pobs.mywalhalla.net/, and one of the
options is to remove comments.

--
Julio Nobrega.

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

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"Oliver Heinisch" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Folks,
> does anybody know a tool for removing comments out of PHP scripts?
>
> I mean // this is a comment
> and /* this is also a comment */
>
> it should also handle  something like
> echo'http://somewher.somecom/somepage'; // this goes to somewhere
> and multiline comment like
> /*
> ..blah
> */
> maybe anybody has an awk script, that he/she will share with me.
> TIA Oliver
>



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




[PHP] Re: [newman] Whats wrong with this MySql Statement?

2002-03-22 Thread Julio Nobrega

mysql_query("UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP =
'$proxy_ip'");

  Singles quotes around $proxy_ip?

--
Julio Nobrega.

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

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"Philip J. Newman" <[EMAIL PROTECTED]> wrote in message
001301c1d21b$61c42900$0401a8c0@philip">news:001301c1d21b$61c42900$0401a8c0@philip...


mysql_query("UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP =
$proxy_ip");


is there anything wrong with this?

Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012




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




[PHP] Configure PHP during RPM install

2002-03-22 Thread David McInnis

I have installed PHP using the RPM packages from RedHat.  Now I need to
reconfigure PHP to include more options.  Is there a way to include
these options when reinstalling the RPM or do I need to ditch the RPM
and compile from the source files?

David McInnis


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




Re: [PHP] Perl NewsGroup?

2002-03-22 Thread Don Read


On 23-Mar-2002 David Duong wrote:
> I didn't put mailing list I meant Usenet lists.
> 

comp.lang.perl.misc

This is not a newbie froup. Read the FAQ, and post your code, or prepare to
be flamed to a crackly crunch.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It is necessary for me to learn from others' mistakes. I 
   will not live long enough to make them all by myself.

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




Re: [PHP] Advice needed

2002-03-22 Thread Daniel Tryba

On Sat, Mar 23, 2002 at 05:19:05AM +, James Newkid wrote:
> so if $Quantity1 is 10
> and $Price1 is $1.00
> that means each "unit" is .10
> 
> so the output would be
> q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q10
> 0  0  0  0  .10 .10 .10 .10 .10 .10  .10  .10  .10  .10
> 
> Now the tricky part is $Quantity2 can either be blank or have a value
> and if $Quantity2 has a value then $Quantity3 can either be blank or have a 
> value
> 
> SO If $Quantity2 is 500
> and $Price2 is $40.00
> the output would now be
> q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q10
> 0  0  0  0  .10 .10 .10 .10 .10 .10  .10  .08  .08  .08
> 

This had 7 people stumped? Fire them :)

I think you had something like this in mind:

8<-
=$quantity)
  {
 $ppu[$i]=$price/$quantity;
  }
   }
}

$quant=array(1,2,3,5,10,15,20,25,50,100,300,500,600,1);

$Quantity1=10;
$Price1=1;
$Quantity2=500;
$Price2=40;

$ppu=array();
for($i=0;$i
8<-

Output:
|1|2|3|5|10|15|20|25|50|100|300|500|600|1
|0|0|0|0|0.1|0.1|0.1|0.1|0.1|0.1|0.1|0.08|0.08|0.08


-- 

  Daniel Tryba
  PGP public key: http://www.stack.nl/~muaddib/pgp.txt

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




[PHP] this mailing list

2002-03-22 Thread Liam

How much data (in Kilobytes) would I receive on 
average per month from this list?
 
cheers,
Liam



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




[PHP] Retreiving website contents

2002-03-22 Thread Liam

Hi, I've asked this before but I'm still ost.
How can I receive the contents of a remote website through PHP and only display one section of it?
 
Someone said something about curl. 
What is it, where could I get it?
 
 
Thanks for your help,
Liam



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




[PHP] Re: Drawing graphs - opinions

2002-03-22 Thread michael kimsal

Lee P Reilly wrote:
> Hi,
> 
> I see there a number of PHP scripts/libraries out there for the purpose
> of graphing data. Which one is considered to be the best, most powerful
> / easiest to use? I need to plot X/Y graphs for some data sets with
> vertical error margin lines going along the y-axis. Any recommendations?
> 


By far the strongest I've seen/used is jpgraph.  Others here
have picked it up faster than I have - I can't say it's the easiest to 
learn, but definitely very powerful (rotated 3d pie charts?!)

Have you looked at it?  Is there something it's missing?


--
Michael Kimsal
http://www.phphelpdesk.com
Guaranteed PHP support
734-480-9961


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




[PHP] Re: Advice needed

2002-03-22 Thread michael kimsal

If this is the explanation the other 7 got, I'm not
surprised they're stumped.  :)

You don't seem to explain the formula to determine q100, q300, etc.,
which bugged me, but the text of your question seems to indicate
we don't really need to know this.

 > Now the tricky part is $Quantity2 can either be blank or have a value
 > and if $Quantity2 has a value then $Quantity3 can either be blank or
 > have a value

if ($Quantity2) {
execute code
]
if ($Quantity3) {
execute code
]

Am I missing something obvious?  Do the values of quantity2 and 3
have some impact on the pricings of quantity1?  Could you explain your
problem in more detail (offlist is fine if you want).


--
Michael Kimsal
http://www.phphelpdesk.com
Guaranteed PHP support
734-480-9961


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




[PHP] Advice needed

2002-03-22 Thread James Newkid

Sorry couldn't think of a better subject for this email :(

This has stumped 7 people so far. I'm not an expert with php, but any help 
would be great.

I have the following

$Quantity1
$Quantity2
$Quantity3

and

$Price1
$Price2
$Price3

These variables will eventually make a "chart"/database with the following 
headings
q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q10
the number represents the number of quantity

so $Quantity1 uses $Price1 's value

so if $Quantity1 is 10
and $Price1 is $1.00
that means each "unit" is .10

so the output would be
q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q10
0  0  0  0  .10 .10 .10 .10 .10 .10  .10  .10  .10  .10

Now the tricky part is $Quantity2 can either be blank or have a value
and if $Quantity2 has a value then $Quantity3 can either be blank or have a 
value

SO If $Quantity2 is 500
and $Price2 is $40.00
the output would now be
q1 q2 q3 q5 q10 q15 q20 q25 q50 q100 q300 q500 q600 q10
0  0  0  0  .10 .10 .10 .10 .10 .10  .10  .08  .08  .08

I think and hope you get the picture.

Things we know If there is no value for $Quantity2 then there will be no 
$Quantity3
and of course if either or both of those quantities are empty there will be 
no price.
And of course if there is a value for either of those quantities, there will 
be a price.


So what method would be best for doing this? Any functions that may come in 
handy?








_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] what's wrong with IE?

2002-03-22 Thread Alexander Javier


why is the $HTTP_POST_VARS array empty if i use IE? when i used NN, everything's ok. 
please help!



-
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®


[PHP] session problem?

2002-03-22 Thread bob

 1.php?2.php
session_start(); session_start();
.. ..
$_SESSION['a'] =$a; echo $_SESSION['a']; 
$_SESSION['b'] =$b; echo $_SESSION['b']; 
header("location: 2.php");

after jump to 2.php ,there is an warning: undefined index a ,b


if i  change 1.php  to

session_start(); 
..  
$_SESSION['a'] =$a;
$_SESSION['b'] =$b;
go on 

it works well!


Best regards and thanks in advance,
bob

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




RE: [PHP] FAQ

2002-03-22 Thread Demitrious S. Kelly

I'm willing to help host the project...

I'd be on a slack 8 box with a cable connection... only one IP address.
It's my home connection so we'd have to share bandwidth... but I think
it could be a valuable resource...

-Original Message-
From: J. Scott Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 2:40 PM
To: 'Kevin Stone'; [EMAIL PROTECTED]
Subject: RE: [PHP] FAQ

Hi,

New poster, no need to flame unnecessarily...

Following up on James' original posting, I took 2000 or so message
headers
from the archive and extracted (Perl, sorry) keywords for about 50% of
the
postings.  This gave the following metrics on problems:

13   table
65  apache
70  array
17  authentication
19  browser
13  cgi
39  cookie
35  database
9   dates
2   debug
9   editor
7   eval
6   fields
140 file
25  include
33  install
9   ip address
14  javascript
4   jpg
15  ldap
12  login
91  mail
146 mysql
11  oracle
20  pdf
2   PostgreSQL
15  Regex
7   rpm
8   security
93  session
11  socket
50  upload
29  variables
14  while
7   win32
37  xml
10  xsl

It seems like the hotspots are:

Database / Mysql
File handling
Apache
Arrays
XML

When James and I talked off list, he recommended:

>>You're probably also going to be dealing with global built in vars,
$_SESSION, $_POST, $_GET and older vars quite a bit as well.

I'm willing to grovel through old messages and write this up.  If anyone
has
any other common topics that I'm not finding, please email them to me.
When
its done, and useful, we can see about getting it auto posted (which is
a
_good_ idea).

Thanks
Scott

J. Scott Johnson

Virtual:
* * * * * * * * * * * * * * * * * * * * * * * * * *
[EMAIL PROTECTED]
http://www.fuzzygroup.com/
Yahoo IM: fuzzygroup


-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 5:24 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] FAQ


Too often novices are expected to know how to find this information by
mental telepathy because they either don't know the keywords to search
for or don't realize that certain common resources exist.  If the list
administrators would simply compile a short email containing FAQ and
RESOURCE links then have the system send it to php-general once a week,
then they could reduce a great deal of these repetitious questions.
IMHO, of course.
-Kevin


-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:25 PM
To: Rasmus Lerdorf
Cc: PHP List
Subject: Re: [PHP] FAQ

The PHP FAQ isn't really specific when it comes to most problems. The
'code'
section has like 10 questions, the rest of the FAQ is mainly how to
download/compile, what do these PHP errors mean, migration, etc.  A FAQ
that
had answers to questions that people ask on this list on a frequent
basis
would be more helpful.



On Friday 22 March 2002 12:05 pm, you wrote:
> I just don't see what the difference is.  This is a PHP mailing list
which
> supposedly gets questions about PHP.  Why would the PHP FAQ not be the
> right place for this?
>
> -Rasmus
>
> On Fri, 22 Mar 2002, James Taylor wrote:
> > You are correct sir.  The purpose of the FAQ would be so that, like
I
> > said, similar questions that pop up say, once a week, could be
answered
> > in the FAQ instead of on the list - That way I won't get 300
messages a
> > day :)
> >
> > On Friday 22 March 2002 11:36 am, you wrote:
> > > Despite what Rasmus just said, I think that you are saying a PHP
> > > Mailing List faq based on the q's that the mailing list gets, not
the
> > > general PHP faq.
> > >
> > > Scott
> > >
> > > -Original Message-
> > > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 22, 2002 2:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] FAQ
> > >
> > >
> > > Has anyone given any thought to possibly maintaining a FAQ
containing
> > > the answers to the most commonly asked PHP questions on this list?
I
> > > notice duplicates roll through every couple of days, and it would
> > > probably be a really nice PHP resource.
> > >
> > > Or, does one already exist? Ha.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

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




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



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



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




[PHP] [newman] Whats wrong with this MySql Statement?

2002-03-22 Thread Philip J. Newman



mysql_query("UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP = $proxy_ip");


is there anything wrong with this?

Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012



Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner

Justin French wrote:

> $sql = "SELECT * FROM news ORDER BY id DESC LIMIT $limit";

You're forgetting (or just didn't read my code), I'm UPDATE-ing, not SELECT-ing.  
mysql_num_rows() doesn't work on UPDATE.

Anyway, thanks to Rasmus for pointing out my error.


--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



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




Re: [PHP] MySQL query results

2002-03-22 Thread Justin French

FWIW, straight from my code, with a few snips:




Justin French
--
http://indent.com.au
http://soundpimps.com
http://hinge.net.au




"Ashley M. Kirchner" wrote:
> 
> Rasmus Lerdorf wrote:
> 
> > But did you read the documentation?  It states:
> 
> Yes.  But, reading it, and my brain actually registering what I was reading, now 
>that's a different story. :)  It _is_ Friday after all.  Thanks!
> 
> --
> H | "Life is the art of drawing without an eraser." - John Gardner
>   +
>   Ashley M. Kirchner    .   303.442.6410 x130
>   Director of Internet Operations / SysAdmin. 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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




RE: [PHP] URL information into a variable

2002-03-22 Thread J. Scott Johnson

Here you go: 



Scott

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 9:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] URL information into a variable


How do I take the current URL and turn it into a variable?

THANKS!!
Phil


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




Re: [PHP] URL information into a variable

2002-03-22 Thread Justin French

Hi,

This really is pretty easy to find in the manual.

I believe you'd want either $PHP_SELF or $REQUEST_URI, both documented here:

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


Justin French
-
http://indent.com.au
http://soundpimps.com
http://hinge.net.au




Phil Schwarzmann wrote:
> 
> How do I take the current URL and turn it into a variable?
> 
> THANKS!!
> Phil

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




Re: [PHP] question - display rows

2002-03-22 Thread Justin French

Hi,

(untested code)



or better still:

 $value)
{
// convert $myrow["id"] to $id, etc etc for all fields
// much easier to work with!!
$$key=nl2br(stripslashes($value));
}
  echo $id.$heading.$message;
  }
?>


Justin French
-
http://indent.com.au
http://soundpimps.com
http://hinge.net.au



Phil Schwarzmann wrote:
> 
> When I want to display a table onto the screen I use this code
> 
> $query = "SELECT * FROM database";
> $result = mysql_query($query);
> $num_rows = mysql_num_rows($result);
> for ($i = 0; $i < $num_rows; $i++) {
> $field1 = mysql_result($result, $i, field1);
> $field2 = mysql_result($result, $i, field2);
> echo $field1.$field2;
> }
> 
> ...but I heard that using mysql_result() is very ineffecient and that I
> should be using mysql_fetch_array() instead.
> 
> So how could produce those same results using mysql_fetch_array()
> instead??
> 
> THANKS!! YOU GUYS ROCK!!!

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




[PHP] question - display rows

2002-03-22 Thread Phil Schwarzmann

When I want to display a table onto the screen I use this code

$query = "SELECT * FROM database";
$result = mysql_query($query);
$num_rows = mysql_num_rows($result);
for ($i = 0; $i < $num_rows; $i++) {
$field1 = mysql_result($result, $i, field1);
$field2 = mysql_result($result, $i, field2);
echo $field1.$field2;
}

...but I heard that using mysql_result() is very ineffecient and that I
should be using mysql_fetch_array() instead.

So how could produce those same results using mysql_fetch_array()
instead??

THANKS!! YOU GUYS ROCK!!!



[PHP] URL information into a variable

2002-03-22 Thread Phil Schwarzmann

How do I take the current URL and turn it into a variable?

THANKS!!
Phil



Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner

Rasmus Lerdorf wrote:

> But did you read the documentation?  It states:

Yes.  But, reading it, and my brain actually registering what I was reading, now 
that's a different story. :)  It _is_ Friday after all.  Thanks!

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



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




Re: [PHP] PHP/mySQL hosting

2002-03-22 Thread bvr


go to google, put in 'free mysql hosting', press 'feeling lucky' ..

http://www.free-php-hosting.com/

bvr.

Daniel Negron/KBE wrote:

>Does anyone have a good site for free mySQL and PHP hosting ?
>
>
>**DAN**
>
>



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




RE: [PHP] What is the PHP version of Grep?

2002-03-22 Thread Demitrious S. Kelly

Stristr()

-Original Message-
From: David Duong [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 4:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] What is the PHP version of Grep?

I was wondering what is the equvilent of the perl coommand: grep.

Can you list all the files in a certain directory and put it in an
array.
Can you list all the files with *.htm in a certain directory and put it
in
an array.



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



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




[PHP] What is the PHP version of Grep?

2002-03-22 Thread David Duong

I was wondering what is the equvilent of the perl coommand: grep.

Can you list all the files in a certain directory and put it in an array.
Can you list all the files with *.htm in a certain directory and put it in
an array.



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




[PHP] Re: what is the difference between function and language construct?

2002-03-22 Thread David Duong

empty -- Determines whether a variable is set

gives a boolean result.
$var = 0;

if (empty($var)) {  // evaluates true
echo '$var is either 0 or not set at all';
}
if (!isset($var)) { // evaluates false
echo '$var is not set at all';
}

I don't think that


would work.  Try:

If you want to see if variable is empty, if it is change it to 5.


-- OR --

If you what to see if $a == 5 than



"Bob" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> why this get wrong?
>
> 
> if (empty($a=5)) {
> echo 'ok';
> } else {
> echo 'bad';
> }
> ?>
>



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




Re: [PHP] Perl NewsGroup?

2002-03-22 Thread David Duong

I didn't put mailing list I meant Usenet lists.

"Bvr" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Why not try www.perl.com ???
>
> I found: http://www.perl.com/cs/user/query/q/6?id_topic=50
>
> bvr.
>
> David Duong wrote:
>
> >This may be the worst place to put this but here goes:
> >
> >Does anyone know of a Perl NewsGroup?
> >
> >
> >
>
>



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




Re: [PHP] Does anybody use UltraDev?

2002-03-22 Thread Dan Harrelson

I do, and was just thinking of posing a similar question.  My question
was specific to the PHAkt app server extension.  I've tried it out and
think it's great, though limited.  For example, my simple project (my
very first :) calls for inserts into 2 tables from a single form. 
Phakt doesn't support this.  Nor, do I believe, does it support joins
for retrieval of data.

http://www.interakt.ro/products/PHAkt/index.php

Either way, I use Ultradev quite a bit and dig on it.

-Dan


--- "::: rObEr2 :::" <[EMAIL PROTECTED]> wrote:
> Hey!
> 
> Does anybody use UltraDev for PHP?
> Any comments about it?
> 
> (Personally I go for Visual PHP Studio)
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

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




Re: [PHP] Create Email POP accounts with PHP

2002-03-22 Thread ....::: rObEr2 :::....

vpopmail?


"Dan Harrelson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| I am a newbie and can't tell you how to do it, but I know that the book
| I am reading can!  Chapter 27 is titled "Building a Web-based Email
| Service".  The Book is title "PHP and MySQL Web Development" and I like
| it alot.  It was recommended on the mysql.com.
|
| http://tangledweb.com.au/
|
| -Dan
|
|
|
|
| --- Julian <[EMAIL PROTECTED]> wrote:
| > Hello!
| >
| > I want to know how I can create email POP accounts from a script PHP.
| >
| >
| > If somebody can help me, thank ahead of time!
| >
| > Regards! Julian
| >
| >
| > --
| > PHP General Mailing List (http://www.php.net/)
| > To unsubscribe, visit: http://www.php.net/unsub.php
| >
|
|
| __
| Do You Yahoo!?
| Yahoo! Movies - coverage of the 74th Academy Awards®
| http://movies.yahoo.com/



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




Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf

But did you read the documentation?  It states:

int mysql_affected_rows ( [resource link_identifier])

That's an optional link identifier.  You don't feed it a result resource.
Just call it without any arguments.  The affected rows is tied to a
database connection, not a result set.

-Rasmus

On Fri, 22 Mar 2002, Ashley M. Kirchner wrote:

> Rasmus Lerdorf wrote:
>
> > http://www.php.net/manual/en/function.mysql-affected-rows.php
>
> Thanks Rasmus.  I did try that as well, same result.  If I don't bother with the
> $result, everything's fine.  Like I said, the query runs, and gets executed.  The DB
> field gets changed as it should and all.  $result is always 1 (since the query is
> syntactically valid).  But, if I run mysql_affected_rows($result), that's when I run
> into an error.
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
>   +
>   Ashley M. Kirchner    .   303.442.6410 x130
>   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
>
>
>


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




Re: [PHP] Create Email POP accounts with PHP

2002-03-22 Thread Dan Harrelson

I am a newbie and can't tell you how to do it, but I know that the book
I am reading can!  Chapter 27 is titled "Building a Web-based Email
Service".  The Book is title "PHP and MySQL Web Development" and I like
it alot.  It was recommended on the mysql.com.

http://tangledweb.com.au/

-Dan




--- Julian <[EMAIL PROTECTED]> wrote:
> Hello!  
>   
> I want to know how I can create email POP accounts from a script PHP.
>  
>   
> If somebody can help me, thank ahead of time!  
>   
> Regards! Julian
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

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




[PHP] Does anybody use UltraDev?

2002-03-22 Thread ....::: rObEr2 :::....

Hey!

Does anybody use UltraDev for PHP?
Any comments about it?

(Personally I go for Visual PHP Studio)



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




Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner

Chris wrote:

> oops. i see then my previous mail will not help in this case. wasn't
> there something called 'affected_rows'? search the online manual for
> 'affected'.

I did.  Read my reply to Rasmus as well.  :)  At this rate, I may just say to heck
with the $result, and always assume something was done.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner

Chris wrote:

> > The query does get executed, and the record does get changed.
>
> seems there is something wrong with the query, can you either echo the query and
> feed it directly to mysql, (e.g. in phpmyadmin) see what happens?

Nope, the query's fine.  I can run it manually, and through the script and it
DOES run, and DOES make the changes it's told to make.  It's the result that won't
work and I think I found out why - if you read my next message.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner

Rasmus Lerdorf wrote:

> http://www.php.net/manual/en/function.mysql-affected-rows.php

Thanks Rasmus.  I did try that as well, same result.  If I don't bother with the
$result, everything's fine.  Like I said, the query runs, and gets executed.  The DB
field gets changed as it should and all.  $result is always 1 (since the query is
syntactically valid).  But, if I run mysql_affected_rows($result), that's when I run
into an error.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




Re: [PHP] MySQL query results

2002-03-22 Thread Chris

oops. i see then my previous mail will not help in this case. wasn't 
there something called 'affected_rows'? search the online manual for 
'affected'.


On 22 Mar 2002 at 17:09, Ashley M. Kirchner wrote:

> 
>   After a bit of research:
> 
> --
> Rick Emery wrote:
> 
> > $result = mysql_query(.)'
> > mysql_num_rows($result)
> 
> Hrm, this is resulting in:
> 
> Warning:  Supplied argument is not a valid MySQL result resource in
> ./index.php on line 16
>  Rows
> --
> 
> 
>   Rightfully so.  mysql_query() will only return true/false for UPDATEs
> indicating failure/success.  And, it's perfectly normal for it to be TRUE even
> if absolutely nothing was changed in the DB - the query was successful.  And
> mysql_num_rows($result) fails because $result=1 (assuming the query was valid).
> 
>   So, I need a different way to approach this so I can get some type of
> indication that something did change in the DB, or whether no records were
> found in the first place.
> 
>   I'd hate to have to do this in two steps, first query the DB with a SELECT
> statement, and if something was found, then do an UPDATE.
> 
>   Anyone have any other ideas?
> 
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
>   +
>   Ashley M. Kirchner    .   303.442.6410 x130
>   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
 !  please check my email address   !  
 !  only my email [EMAIL PROTECTED] works   !
 !  email [EMAIL PROTECTED] is a black hole since januari 2002 !

Chris Hayes - Droef 35 - Wageningen


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




Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf

http://www.php.net/manual/en/function.mysql-affected-rows.php

On Fri, 22 Mar 2002, Ashley M. Kirchner wrote:

>
>   After a bit of research:
>
> --
> Rick Emery wrote:
>
> > $result = mysql_query(.)'
> > mysql_num_rows($result)
>
> Hrm, this is resulting in:
>
> Warning:  Supplied argument is not a valid MySQL result resource in
> ./index.php on line 16
>  Rows
> --
>
>
>   Rightfully so.  mysql_query() will only return true/false for UPDATEs
> indicating failure/success.  And, it's perfectly normal for it to be TRUE even
> if absolutely nothing was changed in the DB - the query was successful.  And
> mysql_num_rows($result) fails because $result=1 (assuming the query was valid).
>
>   So, I need a different way to approach this so I can get some type of
> indication that something did change in the DB, or whether no records were
> found in the first place.
>
>   I'd hate to have to do this in two steps, first query the DB with a SELECT
> statement, and if something was found, then do an UPDATE.
>
>   Anyone have any other ideas?
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
>   +
>   Ashley M. Kirchner    .   303.442.6410 x130
>   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] ttf broken?

2002-03-22 Thread Michael A. Peters

Red Hat 7.2

OK- I'm going on ahead w/o T1lib for the moment.

compiled and installed php-4.1.2

Now some font stuff is busted.

Any image where I use ImageTTFText
no longer works.

I used these configure options for my php gd functions-


--with-zlib=/usr \
--with-gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/local \

What's up?
phpinfo() is at http://macaddict4life.dhs.org/info.php

if that helps.

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




Re: [PHP] MySQL query results

2002-03-22 Thread Chris

On 22 Mar 2002 at 16:41, Ashley M. Kirchner wrote:

> Rick Emery wrote:
> The query does get executed, and the record does get changed.
> 
> The code looks like this:
> 
>   $conn = @MYSQL_CONNECT($host,$user,$password) ;
>   mysql_select_db($database, $conn);
>   $query = "UPDATE clients SET email_flag='0' WHERE
> MD5(concat(email_address,'$key'))='$uniqueID' ";
>   $result = mysql_query($query, $conn);
>   $num_rows = mysql_num_rows($result);
>   echo "$num_rows Rows\n";

seems there is something wrong with the query, can you either echo the query and 
feed it directly to mysql, (e.g. in phpmyadmin) see what happens?

also, i always do queries like this:


$result=mysql_query($query) or die ('Bad database request 
setting email flag  in :'
.__FILE__ .' line '.__LINE__
.'The query used was: '.$query
.'MySQL says '.mysql_error() );

I find it is extremely useful in debugging.

-- 
 !  please check my email address   !  
 !  only my email [EMAIL PROTECTED] works   !
 !  email [EMAIL PROTECTED] is a black hole since januari 2002 !

Chris Hayes - Droef 35 - Wageningen


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




Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner


After a bit of research:

--
Rick Emery wrote:

> $result = mysql_query(.)'
> mysql_num_rows($result)

Hrm, this is resulting in:

Warning:  Supplied argument is not a valid MySQL result resource in
./index.php on line 16
 Rows
--


Rightfully so.  mysql_query() will only return true/false for UPDATEs
indicating failure/success.  And, it's perfectly normal for it to be TRUE even
if absolutely nothing was changed in the DB - the query was successful.  And
mysql_num_rows($result) fails because $result=1 (assuming the query was valid).

So, I need a different way to approach this so I can get some type of
indication that something did change in the DB, or whether no records were
found in the first place.

I'd hate to have to do this in two steps, first query the DB with a SELECT
statement, and if something was found, then do an UPDATE.

Anyone have any other ideas?

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.


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




[PHP] Create Email POP accounts with PHP

2002-03-22 Thread Julian

Hello!  
  
I want to know how I can create email POP accounts from a script PHP.  
  
If somebody can help me, thank ahead of time!  
  
Regards! Julian


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




[PHP] ttf broken?

2002-03-22 Thread Michael A. Peters

Red Hat 7.2

OK- I'm going on ahead w/o T1lib for the moment.

compiled and installed php-4.1.2

Now some font stuff is busted.

Any image where I use ImageTTFText
no longer works.

I used these configure options for my php gd functions-


--with-zlib=/usr \
--with-gd \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/local \

What's up?
phpinfo() is at http://macaddict4life.dhs.org/info.php

if that helps.

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




RE: [PHP] Variable problem

2002-03-22 Thread Chris

On 22 Mar 2002 at 17:27, Rick Emery wrote:
> ${varable}ABC

in quotes you can help php with 
 {$(varabl)}ABC



 
> 
> 
> -Original Message-
> From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 5:21 PM
> To: Rick Emery
> Subject: Re: [PHP] Variable problem
> 
> 
> on 3/22/02 6:18 PM, Rick Emery at [EMAIL PROTECTED] wrote:
> 
> 
> 
> show your code
> 
> -Original Message-
> From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 5:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Variable problem
> 
> 
> I have a variable name in a print <<< END and then some text after it.  The
> thing is, php thinks that the text is part of the variable name, which makes
> the variable, and the text after it, not show up.  But, if I put a space, it
> makes my html not work right.  Any ideas?
> 
> 
> 
> 
> It's something like this:
> print <<< END
> $varableABC
> END;
> 
> 
> 

-- 
 !  please check my email address   !  
 !  only my email [EMAIL PROTECTED] works   !
 !  email [EMAIL PROTECTED] is a black hole since januari 2002 !

Chris Hayes - Droef 35 - Wageningen


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




[PHP] Double quotes in form fields and submitting them

2002-03-22 Thread webapprentice

Hi,
I have a form with a text field, say userName.
I put a value in that has double quotes (i.e. "foobar") and submit this form.

On output I have this:


The output ends up being a \.

How do I keep the double quotes?

Thanks,
Stephen



Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner

Rick Emery wrote:

> $result = mysql_query(.)'
> mysql_num_rows($result)

Hrm, this is resulting in:

Warning:  Supplied argument is not a valid MySQL result resource in
./index.php on line 16
 Rows

The query does get executed, and the record does get changed.

The code looks like this:

  $conn = @MYSQL_CONNECT($host,$user,$password) ;
  mysql_select_db($database, $conn);
  $query = "UPDATE clients SET email_flag='0' WHERE
MD5(concat(email_address,'$key'))='$uniqueID' ";
  $result = mysql_query($query, $conn);
  $num_rows = mysql_num_rows($result);
  echo "$num_rows Rows\n";


--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




Re: [PHP] included files not reread by php when i edit the files

2002-03-22 Thread Chris

On 22 Mar 2002 at 13:30, Jim Lucas [php] wrote:

> how about giving an example of the error message(s)...

ok Jim. step by step.


1. parse error on line 36 of include.php. 
2. then i fixed the error ,  even made line 36 empty, so the message 
should point to line 37.
3. reloaded, and the message stayed identical: parse error on line 36.
(the same happens with typing errors that i correct: the correction 
does not show! the old error is echoed.)

4. Then, to try to clean the cache(?), in index.php i made a deliberate 
error by adding the # :
#include (include.php);
function_in_that_file();

5. Reload: and i got a got the obvious error message: cannot find 
that function_in_that_file().

6. Repaired error in index by removing the #.

7. After a reload often [but not always] the correction in include.php 
is accepted.

Reminder: this happens with a new version of the Postnuke CMS, it 
now uses sessions.
IE6, caching turned of, and check page every time as well as 
'automatic'..
Also reproducable in Opera.

Chris



> - Original Message - 
> From: "Chris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 22, 2002 12:59 PM
> Subject: [PHP] included files not reread by php when i edit the files
> 
> 
> > While editing pages, for some reason (default setting? / configuration 
> > problem?) the changes i make in included files (with sometimes quite 
> > some nesting) are not recognized when reloading a page. So i see 
> > errors that belong to the previous version.
> > 
> > What setting could do this?
> > 
> > I'm quite sure the browser is not caching the page.
> > 
> > Win98 + 'foxserv', that is: apache, mysql. php, zend.
> > Using: Postnuke 0.7.1 with sessions (it did not happen before the 
> > sessions, but cannot imagine the sessions do this.).
> > I would suspect zend but it also happened with the normal php 4.06.
> > 
> > cheers,
> > Chris
> > 
> > -- 
> >  ! please check my email address !  
> >  ! only my email [EMAIL PROTECTED] works !
> >  ! email [EMAIL PROTECTED] is a black hole since januari 2002 !
> > 
> > Chris Hayes - Droef 35 - Wageningen
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
 !  please check my email address   !  
 !  only my email [EMAIL PROTECTED] works   !
 !  email [EMAIL PROTECTED] is a black hole since januari 2002 !

Chris Hayes - Droef 35 - Wageningen


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




RE: [PHP] MySQL query results

2002-03-22 Thread Rick Emery

$result = mysql_query(.)'
mysql_num_rows($result)

-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 5:28 PM
To: PHP-General List
Subject: [PHP] MySQL query results



How can I tell whether anything was matched and changed after a
mysql_db_query?

If I'm in MySQL's console and I perform a query, it comes back and tells
me
something like:

Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

And if something matched, 'Rows matched' would be different, and if
anything was changed, 'rows affected' would be different.  How can I get
that
kind of results back to PHP so I can determine whether the query was
actually
successful in changing something (versus just being successful or not).

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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

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




RE: [PHP] Variable problem

2002-03-22 Thread Rick Emery

 
 

${varable}ABC



-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 5:21 PM
To: Rick Emery
Subject: Re: [PHP] Variable problem


on 3/22/02 6:18 PM, Rick Emery at [EMAIL PROTECTED] wrote:



show your code

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable problem


I have a variable name in a print <<< END and then some text after it.  The
thing is, php thinks that the text is part of the variable name, which makes
the variable, and the text after it, not show up.  But, if I put a space, it
makes my html not work right.  Any ideas?




It's something like this:
print <<< END
$varableABC
END;





[PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner


How can I tell whether anything was matched and changed after a
mysql_db_query?

If I'm in MySQL's console and I perform a query, it comes back and tells me
something like:

Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

And if something matched, 'Rows matched' would be different, and if
anything was changed, 'rows affected' would be different.  How can I get that
kind of results back to PHP so I can determine whether the query was actually
successful in changing something (versus just being successful or not).

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




RE: [PHP] Variable problem

2002-03-22 Thread Rick Emery

show your code

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable problem


I have a variable name in a print <<< END and then some text after it.  The
thing is, php thinks that the text is part of the variable name, which makes
the variable, and the text after it, not show up.  But, if I put a space, it
makes my html not work right.  Any ideas?


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

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




[PHP] Variable problem

2002-03-22 Thread Leif K-Brooks

I have a variable name in a print <<< END and then some text after it.  The
thing is, php thinks that the text is part of the variable name, which makes
the variable, and the text after it, not show up.  But, if I put a space, it
makes my html not work right.  Any ideas?


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




Re: [PHP] Maillist

2002-03-22 Thread Ashley M. Kirchner

"Robert V. Zwink" wrote:

> Then when someone sends back the $unique_id by clicking on your link, you
> can instuct MySQL to disable the record:
>
> "UPDATE users SET send_email = 'NO' WHERE
> MD5(email_address.'ThisIsASecretKey123')=$unique_id "

This works...with a small change (or is it a fix?):

"UPDATE users SET send_email = 'NO' WHERE
 MD5(concat(email_address,'ThisIsASecretKey123'))='$unique_id' "

Your example generates a syntax error.

Thanks for the suggestion!

PS:  Alternatively, I just stuck '$secret_key' in the query line, this way I
only have to change it in one location, and not have it hardcoded anywhere else.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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




RE: [PHP] A Language Script?

2002-03-22 Thread Demitrious S. Kelly

http://vancouver-webpages.com/multilingual/ccodes.txt
http://vancouver-webpages.com/multilingual/iso639a.txt

This seems like useful information for this purpose... and so I've
decided to forward it to the list as well... if this is considered
spamming please let me know so that I can avoid it in the future.
Thanks

Cheers!

-Original Message-
From: ...:: Rober2 ::... [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 2:25 PM
To: Demitrious S. Kelly
Subject: Re: [PHP] A Language Script?

Thanks!!

BTW: do you know about any site that provides the e.g. "en-us" tag but
for
other languages? I've tried the W3 but no result...



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




[PHP] Re: Drawing graphs - opinions

2002-03-22 Thread Lee P Reilly

Lee P Reilly wrote:

> with
> vertical error margin lines going along the y-axis. Any recommendations?

Ahem, the X axis.


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




Re: [PHP] Database Development Price Inquiry?

2002-03-22 Thread [-^-!-%-



 Yeah, I've ran into a few of those customers. It's even worst when you
 find one that doesn't know what they want, yet have many, sometimes
 conflicting, restrictions.


 Thanks, Miles!

 -john



On Fri, 22 Mar 2002, Miles Thompson wrote:

> It depends on the project. I generally charge $50/hr and bill on a two week
> cycle.
>
> Customers invariably want estimates, and I provide them, then warn when the
> requests for "extra functionality" start eating up the estimate. Generally
> they spring for the extra $$.
>
> Worst customers? The ones who don't know what they want, or give the
> vaguest direction, and then you iterate from there. Those bills are usually
> astronomical, in the sense that what they ended up with could have been
> reached with a little more work and commitment at their end.
>
> Regards - Miles Thompson
>
>
> At 10:24 PM 3/21/2002 -0800, Robin Chen wrote:
> >We calculate the charge by $75-$150 per hour depending on complexity of the
> >project, then quote customer the final price.  On small projects, < $5000, its
> >usually half before project, and half after project.  For project > $5000,
> >it's usually 30% up front, 30% when we have major features completed, 30% when
> >delivered, last 10% when finalized.  On even large projects $15k+, we usually
> >go by phases.
> >
> >Robin
> >
> >"[-^-!-%-" wrote:
> >
> > > Hello everyone,
> > >
> > > I'm in the process of revising my db development prices, and was wondering
> > > what the best practices were. I want to keep my prices low, but I often
> > > feel like I'm not charging close to what I should be charging.
> > >
> > > 1) What is the going rate for Database Development (MySQL+PHP
> > > or any other combo)?
> > >
> > > 2) What (or how) do you charge for MySQL+PHP database applications?
> > > 3) What do you factor into your pricing?
> > >
> > > We currently package our prices by the project. Example, we
> > > would charge one flat fee for an online database application.
> > > This would include everything from start to finish. Sometimes
> > > this works out, but other times it gets painful and tedious. I often feel
> > > like I'm not charging as much as I should be.
> > >
> > > 4) What is the best practice for db development pricing?
> > > Flat fee or hourly based? Do you charge based on the number of hours spent
> > > (anticipated) or by the project complexity and/or size?
> > >
> > > 5) Do you charge in stages or upon completion? For example, do you charge
> > > after the planning phase, development phase, etc. Or, after the project
> > > is complete?
> > >
> > > I'm especially interested in hearing from the West Coast (USA) developers.
> > > Any feedback would be greatly appreciated.
> > >
> > > Thanks.
> > >
> > > -john
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Drawing graphs - opinions

2002-03-22 Thread Lee P Reilly

Hi,

I see there a number of PHP scripts/libraries out there for the purpose
of graphing data. Which one is considered to be the best, most powerful
/ easiest to use? I need to plot X/Y graphs for some data sets with
vertical error margin lines going along the y-axis. Any recommendations?

Cheers,

Lee


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




RE: [PHP] FAQ

2002-03-22 Thread J. Scott Johnson

Hi,

New poster, no need to flame unnecessarily...

Following up on James' original posting, I took 2000 or so message headers
from the archive and extracted (Perl, sorry) keywords for about 50% of the
postings.  This gave the following metrics on problems:

13   table
65  apache
70  array
17  authentication
19  browser
13  cgi
39  cookie
35  database
9   dates
2   debug
9   editor
7   eval
6   fields
140 file
25  include
33  install
9   ip address
14  javascript
4   jpg
15  ldap
12  login
91  mail
146 mysql
11  oracle
20  pdf
2   PostgreSQL
15  Regex
7   rpm
8   security
93  session
11  socket
50  upload
29  variables
14  while
7   win32
37  xml
10  xsl

It seems like the hotspots are:

Database / Mysql
File handling
Apache
Arrays
XML

When James and I talked off list, he recommended:

>>You're probably also going to be dealing with global built in vars,
$_SESSION, $_POST, $_GET and older vars quite a bit as well.

I'm willing to grovel through old messages and write this up.  If anyone has
any other common topics that I'm not finding, please email them to me.  When
its done, and useful, we can see about getting it auto posted (which is a
_good_ idea).

Thanks
Scott

J. Scott Johnson

Virtual:
* * * * * * * * * * * * * * * * * * * * * * * * * *
[EMAIL PROTECTED]
http://www.fuzzygroup.com/
Yahoo IM: fuzzygroup


-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 5:24 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] FAQ


Too often novices are expected to know how to find this information by
mental telepathy because they either don't know the keywords to search
for or don't realize that certain common resources exist.  If the list
administrators would simply compile a short email containing FAQ and
RESOURCE links then have the system send it to php-general once a week,
then they could reduce a great deal of these repetitious questions.
IMHO, of course.
-Kevin


-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:25 PM
To: Rasmus Lerdorf
Cc: PHP List
Subject: Re: [PHP] FAQ

The PHP FAQ isn't really specific when it comes to most problems. The
'code'
section has like 10 questions, the rest of the FAQ is mainly how to
download/compile, what do these PHP errors mean, migration, etc.  A FAQ
that
had answers to questions that people ask on this list on a frequent
basis
would be more helpful.



On Friday 22 March 2002 12:05 pm, you wrote:
> I just don't see what the difference is.  This is a PHP mailing list
which
> supposedly gets questions about PHP.  Why would the PHP FAQ not be the
> right place for this?
>
> -Rasmus
>
> On Fri, 22 Mar 2002, James Taylor wrote:
> > You are correct sir.  The purpose of the FAQ would be so that, like
I
> > said, similar questions that pop up say, once a week, could be
answered
> > in the FAQ instead of on the list - That way I won't get 300
messages a
> > day :)
> >
> > On Friday 22 March 2002 11:36 am, you wrote:
> > > Despite what Rasmus just said, I think that you are saying a PHP
> > > Mailing List faq based on the q's that the mailing list gets, not
the
> > > general PHP faq.
> > >
> > > Scott
> > >
> > > -Original Message-
> > > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 22, 2002 2:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] FAQ
> > >
> > >
> > > Has anyone given any thought to possibly maintaining a FAQ
containing
> > > the answers to the most commonly asked PHP questions on this list?
I
> > > notice duplicates roll through every couple of days, and it would
> > > probably be a really nice PHP resource.
> > >
> > > Or, does one already exist? Ha.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

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




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



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




RE: [PHP] FAQ

2002-03-22 Thread Kevin Stone

Too often novices are expected to know how to find this information by
mental telepathy because they either don't know the keywords to search
for or don't realize that certain common resources exist.  If the list
administrators would simply compile a short email containing FAQ and
RESOURCE links then have the system send it to php-general once a week,
then they could reduce a great deal of these repetitious questions.
IMHO, of course.
-Kevin


-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 1:25 PM
To: Rasmus Lerdorf
Cc: PHP List
Subject: Re: [PHP] FAQ

The PHP FAQ isn't really specific when it comes to most problems. The
'code' 
section has like 10 questions, the rest of the FAQ is mainly how to 
download/compile, what do these PHP errors mean, migration, etc.  A FAQ
that 
had answers to questions that people ask on this list on a frequent
basis 
would be more helpful.



On Friday 22 March 2002 12:05 pm, you wrote:
> I just don't see what the difference is.  This is a PHP mailing list
which
> supposedly gets questions about PHP.  Why would the PHP FAQ not be the
> right place for this?
>
> -Rasmus
>
> On Fri, 22 Mar 2002, James Taylor wrote:
> > You are correct sir.  The purpose of the FAQ would be so that, like
I
> > said, similar questions that pop up say, once a week, could be
answered
> > in the FAQ instead of on the list - That way I won't get 300
messages a
> > day :)
> >
> > On Friday 22 March 2002 11:36 am, you wrote:
> > > Despite what Rasmus just said, I think that you are saying a PHP
> > > Mailing List faq based on the q's that the mailing list gets, not
the
> > > general PHP faq.
> > >
> > > Scott
> > >
> > > -Original Message-
> > > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 22, 2002 2:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] FAQ
> > >
> > >
> > > Has anyone given any thought to possibly maintaining a FAQ
containing
> > > the answers to the most commonly asked PHP questions on this list?
I
> > > notice duplicates roll through every couple of days, and it would
> > > probably be a really nice PHP resource.
> > >
> > > Or, does one already exist? Ha.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

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




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




[PHP] GOOD PRACTICE (was: RE: [PHP] A Language Script?)

2002-03-22 Thread Demitrious S. Kelly

I've been watching the lists from time to time and I see a lot of
requests for information like this floating around. I wonder if people
know of the phpinfo() command... in my experience it's been an
invaluable tool to help with little issues that pop up with 'where do I
find out XXX about XXX' make a 3 line php script called info.php
containing:

"

"

And you then find yourself amongst a wealth of useful information.  I
apologize if this sounds patronizing - it most certainly is not
delivered in such a tone... I really do think that people just don't
know about this... Or they are too lazy to check it first... (hopefully
more of the former rather then the later)

Ok I'm done ranting..

Cheers everyone!

-Original Message-
From: ::: rObEr2 ::: [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] A Language Script?

Hey!

I want to have my website on English, Spanish and Norwegian so I want to
have a PHP script that sends the user to the page on their language.

I've seen some portals doing some PHP things, and sending the user to a
'fancy' URL with the Languange that their Borwser/OS is on.

Can someone please tell me how it's done?

Thanks for your support...



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



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




RE: [PHP] A Language Script?

2002-03-22 Thread Demitrious S. Kelly

$HTTP_ACCEPT_LANGUAGE

-Original Message-
From: ::: rObEr2 ::: [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 1:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] A Language Script?

Hey!

I want to have my website on English, Spanish and Norwegian so I want to
have a PHP script that sends the user to the page on their language.

I've seen some portals doing some PHP things, and sending the user to a
'fancy' URL with the Languange that their Borwser/OS is on.

Can someone please tell me how it's done?

Thanks for your support...



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



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




[PHP] A Language Script?

2002-03-22 Thread ....::: rObEr2 :::....

Hey!

I want to have my website on English, Spanish and Norwegian so I want to
have a PHP script that sends the user to the page on their language.

I've seen some portals doing some PHP things, and sending the user to a
'fancy' URL with the Languange that their Borwser/OS is on.

Can someone please tell me how it's done?

Thanks for your support...



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




[PHP] Automatic Language Detection

2002-03-22 Thread ....::: rObEr2 :::....

Hey!

I want to have my website on English, Spanish and Norwegian so I want a PHP
script that sends the user to the page on their language.

I've seen some portals doing some PHP things, and sending the user to a
'fancy' URL with the Languange that their Borwser/OS is on.

Can someone please tell me how it's done?

Thanks for your support...



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




[PHP] Jazz problem

2002-03-22 Thread Sanj

template page at http://www.isbliss.co.nz/beta/mainpages/template.html
disregard any linked pages.

This will be the template for all the other pages.

1. Could you please tell me why when you hover off or anywhere on this page
the "hair salon" button is highlighted.

think I have done something to the:

section.

2. Also We want a background image for each flyover, will I have to create a
separate style for each i.e. .flyoutable2 /.flyoutable2 p /.flyoutable2
a:active etc?

3. I get no Background image in NN4.7

4. Also since this page will be the template for the other pages, when I go
to make it say the ""Face & Body " .html page trig two...how do I make it
highlight that button. so you know that you are on that page.


Cheers
S




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




Re: [PHP] included files not reread by php when i edit the files

2002-03-22 Thread Jim Lucas [php]

how about giving an example of the error message(s)...

- Original Message - 
From: "Chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 12:59 PM
Subject: [PHP] included files not reread by php when i edit the files


> While editing pages, for some reason (default setting? / configuration 
> problem?) the changes i make in included files (with sometimes quite 
> some nesting) are not recognized when reloading a page. So i see 
> errors that belong to the previous version.
> 
> What setting could do this?
> 
> I'm quite sure the browser is not caching the page.
> 
> Win98 + 'foxserv', that is: apache, mysql. php, zend.
> Using: Postnuke 0.7.1 with sessions (it did not happen before the 
> sessions, but cannot imagine the sessions do this.).
> I would suspect zend but it also happened with the normal php 4.06.
> 
> cheers,
> Chris
> 
> -- 
>  ! please check my email address !  
>  ! only my email [EMAIL PROTECTED] works !
>  ! email [EMAIL PROTECTED] is a black hole since januari 2002 !
> 
> Chris Hayes - Droef 35 - Wageningen
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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




Re: [PHP] cron with php as apache module

2002-03-22 Thread Paul Roberts

 wget http://your.server.address/phpscript.php

did the trick

thanks

Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: "Bruce S. Garlock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 8:55 PM
Subject: Re: [PHP] cron with php as apache module


> Are you specifying the full path in the crontab?  If the raq 3 does not have lynx, 
>you might
> be able to use wget.  I'm not too familiar with wget, you may want to read the 
>manpage.
> Here's how I run PHP scripts from cron, when PHP is compiled as a DSO:
> 
> 0 8 * * * TERM=xterm; export TERM; /usr/bin/lynx -source
> "http://your.server.address/phpscript.php"; 1>/dev/null 2>&1
> 
> You can leave off the stdin and stdout redirects if you want an email that the 
>script was
> run.
> 
> HTH..
> 
> - Bruce
> 
> 
> 
> Paul Roberts wrote:
> 
> > ok
> > for lynx, at the command prompt i get
> > bash: lynx: command not found
> >
> > I've also looked in all the obvious places for php but can't find it.
> >
> > the server is a cobalt raq 3 and i have a virtual host account so i can't 
>recompile php.
> >
> > maybe I'll rewrite it in Perl.
> >
> > Paul Roberts
> > [EMAIL PROTECTED]
> > 
> > - Original Message -
> > From: "Analysis & Solutions" <[EMAIL PROTECTED]>
> > To: "PHP List" <[EMAIL PROTECTED]>
> > Sent: Friday, March 22, 2002 7:26 PM
> > Subject: Re: [PHP] cron with php as apache module
> >
> > > Even if you can't get, or don't want to bother getting, PHP as a
> > > standalone CGI type program, you can still execute via crontab.  Make a
> > > web page that you want to have run, then put something along the lines
> > > of:
> > >
> > >lynx http://localhost/scriptname.php
> > >
> > > as the command in the crontab file.  Do note, you'll likely need to take
> > > steps to protect the script from being run by people you don't want
> > > touching it.  You could use SSL, cookies and REMOTE_ADDR, among other
> > > things to accomplish that.
> > >
> > > --Dan
> > >
> > > --
> > > PHP scripts that make your job easier
> > >   http://www.analysisandsolutions.com/code/
> > >  SQL Solution  |  Layout Solution  |  Form Solution
> > >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


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




[PHP] T1lib configure broken?

2002-03-22 Thread Michael A. Peters

Red Hat 7.2

t1lib installed in /usr/local

I build --with-t1lib=/usr/local

build fails saying it can't find /usr/lib/.libs/libt1.so

Well, duh! It's in /usr/local/lib (as I specified in config w/ the
=/usr/local flag)
Anyway- that configure option worked perfect in php-4.0.5

What broke 4.1.2 from beig able to find my t1lib install?
How can I fix it?

I need t1lib- so I can't upgrade till I find how to fix.
Please cc me in the reply (don't just reply to list)

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




RE: [PHP] Hi!

2002-03-22 Thread Rick Emery

> How is possible to  on an image and run a php function?


> Also how is possible to pass some php vars to javascript vars?
Can't do it directly.  JavaScript is client-side.  PHP is server-side.  As
you execute a PHP script, it will "create" the values for the JavaScript
source that PHP is creating.

-Original Message-
From: savaidis [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Hi!


Hi all!

I'm quite new to PHP so I have two questions:

How is possible to  on an image and run a php function?

Also how is possible to pass some php vars to javascript vars?


Makis
Thessaloniki
Greece

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

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




[PHP] included files not reread by php when i edit the files

2002-03-22 Thread Chris

While editing pages, for some reason (default setting? / configuration 
problem?) the changes i make in included files (with sometimes quite 
some nesting) are not recognized when reloading a page. So i see 
errors that belong to the previous version.

What setting could do this?

I'm quite sure the browser is not caching the page.

Win98 + 'foxserv', that is: apache, mysql. php, zend.
Using: Postnuke 0.7.1 with sessions (it did not happen before the 
sessions, but cannot imagine the sessions do this.).
I would suspect zend but it also happened with the normal php 4.06.

cheers,
Chris

-- 
 !  please check my email address   !  
 !  only my email [EMAIL PROTECTED] works   !
 !  email [EMAIL PROTECTED] is a black hole since januari 2002 !

Chris Hayes - Droef 35 - Wageningen


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




Re: [PHP] cron with php as apache module

2002-03-22 Thread Bruce S. Garlock

Are you specifying the full path in the crontab?  If the raq 3 does not have lynx, you 
might
be able to use wget.  I'm not too familiar with wget, you may want to read the manpage.
Here's how I run PHP scripts from cron, when PHP is compiled as a DSO:

0 8 * * * TERM=xterm; export TERM; /usr/bin/lynx -source
"http://your.server.address/phpscript.php"; 1>/dev/null 2>&1

You can leave off the stdin and stdout redirects if you want an email that the script 
was
run.

HTH..

- Bruce



Paul Roberts wrote:

> ok
> for lynx, at the command prompt i get
> bash: lynx: command not found
>
> I've also looked in all the obvious places for php but can't find it.
>
> the server is a cobalt raq 3 and i have a virtual host account so i can't recompile 
>php.
>
> maybe I'll rewrite it in Perl.
>
> Paul Roberts
> [EMAIL PROTECTED]
> 
> - Original Message -
> From: "Analysis & Solutions" <[EMAIL PROTECTED]>
> To: "PHP List" <[EMAIL PROTECTED]>
> Sent: Friday, March 22, 2002 7:26 PM
> Subject: Re: [PHP] cron with php as apache module
>
> > Even if you can't get, or don't want to bother getting, PHP as a
> > standalone CGI type program, you can still execute via crontab.  Make a
> > web page that you want to have run, then put something along the lines
> > of:
> >
> >lynx http://localhost/scriptname.php
> >
> > as the command in the crontab file.  Do note, you'll likely need to take
> > steps to protect the script from being run by people you don't want
> > touching it.  You could use SSL, cookies and REMOTE_ADDR, among other
> > things to accomplish that.
> >
> > --Dan
> >
> > --
> > PHP scripts that make your job easier
> >   http://www.analysisandsolutions.com/code/
> >  SQL Solution  |  Layout Solution  |  Form Solution
> >  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >


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




RE: [PHP] Re: Delete Confirmation

2002-03-22 Thread Boaz Yahav

Do that with JavaScript

Using JavaScript to show an OK/Cancel confirmation window
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1364

Sincerely

  berber

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


-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 6:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Delete Confirmation



Actually I have that working fine.  I was just looking to add to the
code a
confirmation box of some sort.  either typing in YES or clicking a YES
NO
BOX.

Thanks for your post.

**DAN**


 

Matt Wallace

cc:

 Subject: [PHP] Re: Delete
Confirmation 
03/20/2002

11:03 AM

 

 





Daniel Negron/Kbe wrote:

> Does anyone have examples of record deletions from php to mysql


Could you be more specific?

$sql = "DELETE from tablename where tablename_idx = $index";
$result = mysql_query($sql);

would be a very simple example of deleting a record from a hypothetical
database with php, but I'm not sure if that's what you were really
asking.





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






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


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




Re: [PHP] Sooo close - please help

2002-03-22 Thread charlesk


It looks like gmp_divexact returns a resource which does not appear to be what you 
want.

You may have to access the result somehow to see if it is giving you what you expect.

Charles Killmer

-- Original Message --
From: "brendan conroy" <[EMAIL PROTECTED]>
Date: Fri, 22 Mar 2002 20:18:10 +

Hi guys,
   Thanks for reading this. I desperatley need help with this
error. I just finished a huge project thats taken me months, my code works,
but the code it uses has an error. The project is due Monday and naturally 
enough the guy who wrote the code with the error is gone on holiday for the
weekend- typical. To be so close to having it finished is sort of
sickening..

Does anyone know what the hell Resource id's are, and why they are showing
up in my array instead of good ol fashioned numbers?

My array goes (correct)into a function looking like this :

Array ( [0] => Array ( [0] => -1 [1] => 1 [2] => 1 [3] => 1 ) [1] =>Array (
[0] => -2 [1] => 2 [2] => 2 [3] => 10 [4] => 2 ) [2] => Array ( [0] => -3[1]
=> 3 [2] => 3 [3] => 9 ) ) Array ( [0] => Array ( [0] => -4 [1] => 4 [2]=> 4
[3] => 4 ) [1] => Array ( [0] => -5 [1] => 5 [2] => 5 [3] => 5 ) [2] =>Array
( [0] => -6 [1] => 6 [2] => 6 [3] => 6 ) )

and comes out looking like this:

Array ( [0] => Array ( [0] => Resource id #5 [1] => Resource id #8 [2] =>
1[3] => 1 ) [1] => Array ( [0] => Resource id #16 [1] => Resource id #17
[2]=> 2 [3] => 10 [4] => 2 [5] => ) [2] => Array ( [0] => Resource id #24
[1]=> Resource id #25 [2] => 3 [3] => 9 ) ) Array ( [0] => Array ( [0]
=>Resource id #35 [1] => Resource id #36 [2] => 4 [3] => 4 ) [1] => Array
([0] => Resource id #44 [1] => Resource id #45 [2] => 5 [3] => 5 ) [2]
=>Array ( [0] => Resource id #53 [1] => Resource id #54 [2] => 6 [3] => 6 )
)

The Resource id #'s only go into the first two places in the end(third)
arrays.

Heres the other guys code, Im pretty sure the bug is in monic or prodmono as
they're the functions that deal with the elements that are turned into
Resource id #'s . I know this is an awful lot to ask,but like I said Im
desperate

>  function grobmonic($g)
> {
>
>   for($c=0;$c   {
>   $g[$c]=monic($g[$c]);
>   }
> return $g;
> }
> ?>
>
>
>  function monic($p)
> {
>   print_r($p);
>   if(gmp_cmp($p[0][0],$p[0][1])!=0)
>   {
>   $temp[0]=$p[0][1];
> $temp[1]=$p[0][0];
>   $p=prodmono($temp,$p);
>   }
> return $p;
> }
> ?>
>
>
>
>
>  function prodmono($p1,$p2)
> {
>
>   for($a=0;$a {
>
>   $num=gmp_mul($p1[0],$p2[$a][0]);
>
> $den=gmp_mul($p1[1],$p2[$a][1]);
>   $g=gmp_gcd($num,$den);
>   if(gmp_cmp($g,1)!=0)
>   {
>   $num=gmp_divexact($num,$g);
>   $den=gmp_divexact($den,$g);
>   }
>   $res[$a][0]=$num;
> $res[$a][1]=$den;
>   $k=$i=$j=2;
>   while($i   {
>   if($p1[$i]<$p2[$a][$j])
>   {
>   $res[$a][$k]=$p1[$i];
>   $res[$a][$k+1]=$p1[$i+1];
>   $i=$i+2;
>   }
>   elseif($p1[$i]>$p2[$a][$j])
>   {
> $res[$a][$k]=$p2[$a][$j];
> $res[$a][$k+1]=$p2[$a][$j+1];
> $j=$j+2;
> }
>   else
>   {
> $res[$a][$k]=$p1[$i];
> $res[$a][$k+1]=$p1[$i+1]+$p2[$a][$j+1];
> $i=$i+2;
>   $j=$j+2;
> }
>   $k=$k+2;
>   }
>   while($i   {
>   $res[$a][$k]=$p1[$i];
> $res[$a][$k+1]=$p1[$i+1];
> $i=$i+2;
>   $k=$k+2;
> }
> while($j {
> $res[$a][$k]=$p2[$a][$j];
> $res[$a][$k+1]=$p2[$a][$j+1];
> $j=$j+2;
> $k=$k+2;
> }
>   }
>   return $res;
>   }
> ?>
>


I'd really appreciate help with this


Thanks a million







_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
PHP General Mailing List (http://www.php.net/)
To u

[PHP] Hi!

2002-03-22 Thread savaidis

Hi all!

I'm quite new to PHP so I have two questions:

How is possible to  on an image and run a php function?

Also how is possible to pass some php vars to javascript vars?


Makis
Thessaloniki
Greece

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




Re: [PHP] looking for tutorial on XML parsing of attributes...

2002-03-22 Thread Erik Price

I'm no expert on the XML functions, but post your code and maybe we can 
figure out what's wrong.


Erik



On Thursday, March 21, 2002, at 09:24  PM, Scott Brown wrote:

> Ok - first off, I've found a few... phpbuilder has a nice number of
> references.  But every one I've tried has ignored attributes... either 
> that,
> or I dont understand what I'm doing.
>
> I retrieve from a distant server an XML response to an inquiry:
>
> 
> 
>   
> sometext
>   
>   
> 
>   sometext1
> 
>   
>   
> 
>   sometext2
> 
>   
>   
> 
>   sometext3
> 
>   
> 
>
> BUT... when I parse this using xml_parse, all I'm getting out is:
>
> Name = RESPONSE  -- Attributes = Array
> Name = STATUS  -- Attributes = Array
> Name = DESCRIPTION  -- Attributes = Array
> Name = DOMAIN  -- Attributes = Array
> Name = STATUS  -- Attributes = Array
> Name = DESCRIPTION  -- Attributes = Array
> Name = DOMAIN  -- Attributes = Array
> Name = STATUS  -- Attributes = Array
> Name = DESCRIPTION  -- Attributes = Array
> Name = DOMAIN  -- Attributes = Array
> Name = STATUS  -- Attributes = Array
> Name = DESCRIPTION  -- Attributes = Array
>
> I cant seem to nail down how to pull the actual attribute values 
> does
> anyone know of a tutorial that's going to teach me how to pull those
> attributes of fqdn and code?  I've figured out how to get the 
> DESCRIPTION...
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>







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


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




Re: [PHP] FAQ

2002-03-22 Thread Rasmus Lerdorf

So add it those.

On Fri, 22 Mar 2002, James Taylor wrote:

> The PHP FAQ isn't really specific when it comes to most problems. The 'code'
> section has like 10 questions, the rest of the FAQ is mainly how to
> download/compile, what do these PHP errors mean, migration, etc.  A FAQ that
> had answers to questions that people ask on this list on a frequent basis
> would be more helpful.
>
>
>
> On Friday 22 March 2002 12:05 pm, you wrote:
> > I just don't see what the difference is.  This is a PHP mailing list which
> > supposedly gets questions about PHP.  Why would the PHP FAQ not be the
> > right place for this?
> >
> > -Rasmus
> >
> > On Fri, 22 Mar 2002, James Taylor wrote:
> > > You are correct sir.  The purpose of the FAQ would be so that, like I
> > > said, similar questions that pop up say, once a week, could be answered
> > > in the FAQ instead of on the list - That way I won't get 300 messages a
> > > day :)
> > >
> > > On Friday 22 March 2002 11:36 am, you wrote:
> > > > Despite what Rasmus just said, I think that you are saying a PHP
> > > > Mailing List faq based on the q's that the mailing list gets, not the
> > > > general PHP faq.
> > > >
> > > > Scott
> > > >
> > > > -Original Message-
> > > > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, March 22, 2002 2:30 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] FAQ
> > > >
> > > >
> > > > Has anyone given any thought to possibly maintaining a FAQ containing
> > > > the answers to the most commonly asked PHP questions on this list? I
> > > > notice duplicates roll through every couple of days, and it would
> > > > probably be a really nice PHP resource.
> > > >
> > > > Or, does one already exist? Ha.
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP] Maillist

2002-03-22 Thread Robert V. Zwink

Both php and MySQL support MD5().  Consider this:

 // Define a secret key
$secret_key = "ThisIsASecretKey123";

 // Take the user's current email address
$email_address = "[EMAIL PROTECTED]";

 // And create a unique ID
$unique_id = md5($email_address.$secret_key);

Stick this unique id in the email you send to you user.
http://sitename.com/remove.php?unique_id=$unique_id

Then when someone sends back the $unique_id by clicking on your link, you
can instuct MySQL to disable the record:

"UPDATE users SET send_email = 'NO' WHERE
MD5(email_address.'ThisIsASecretKey123')=$unique_id "

The $secret_key prevents someone from guessing an email address, MD5 them,
and sending it to you script.  They would also need to know the secret key
to guess correctly.  This way you also do not need to "store" the hash
anywhere.  You could also update the secret key from time to time for
security.

What do you think?

Robert V. Zwink
http://www.zwink.net/daid.php

-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 12:38 PM
To: PHP-General List
Subject: [PHP] Maillist



I need to send out several hundred, to several thousand emails out of
our
database.  Now, before everyone starts telling me to use an actual MLM for
this, let me explain what I need to do.

I need to send a unique ID with each message, in the form of a URL.  We
want to make unsubscribing as easy as possible for our clients, so what I
plan
on doing is sending out a URL in the body of the message that contains a
unique
ID.  When they click on that URL, it hits another script on our website
which
than takes that ID, searches for it in the database and flags that record
(and
returns a 'Thank you' page.)

So, somehow, I need to generate a unique ID for each message send, stick
that ID into the database with the corresponding email address that it was
just
sent to and thenwait.

What's the best way to approach this? Should I generate IDs outside of
the
script, and then query the database for both the email and the ID and
construct
the message that way?  Or should I dynamically generate an ID during the
mailing process and shove it in the DB as the message goes out?

Suggestions, criticism, comments...welcome.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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


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




Re: [PHP] FAQ

2002-03-22 Thread James Taylor

The PHP FAQ isn't really specific when it comes to most problems. The 'code' 
section has like 10 questions, the rest of the FAQ is mainly how to 
download/compile, what do these PHP errors mean, migration, etc.  A FAQ that 
had answers to questions that people ask on this list on a frequent basis 
would be more helpful.



On Friday 22 March 2002 12:05 pm, you wrote:
> I just don't see what the difference is.  This is a PHP mailing list which
> supposedly gets questions about PHP.  Why would the PHP FAQ not be the
> right place for this?
>
> -Rasmus
>
> On Fri, 22 Mar 2002, James Taylor wrote:
> > You are correct sir.  The purpose of the FAQ would be so that, like I
> > said, similar questions that pop up say, once a week, could be answered
> > in the FAQ instead of on the list - That way I won't get 300 messages a
> > day :)
> >
> > On Friday 22 March 2002 11:36 am, you wrote:
> > > Despite what Rasmus just said, I think that you are saying a PHP
> > > Mailing List faq based on the q's that the mailing list gets, not the
> > > general PHP faq.
> > >
> > > Scott
> > >
> > > -Original Message-
> > > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 22, 2002 2:30 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] FAQ
> > >
> > >
> > > Has anyone given any thought to possibly maintaining a FAQ containing
> > > the answers to the most commonly asked PHP questions on this list? I
> > > notice duplicates roll through every couple of days, and it would
> > > probably be a really nice PHP resource.
> > >
> > > Or, does one already exist? Ha.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP] cron with php as apache module

2002-03-22 Thread Erik Price


On Friday, March 22, 2002, at 03:16  PM, Paul Roberts wrote:

> for lynx, at the command prompt i get
> bash: lynx: command not found
>
> I've also looked in all the obvious places for php but can't find it.
>
> the server is a cobalt raq 3 and i have a virtual host account so i 
> can't recompile php.
>
> maybe I'll rewrite it in Perl.

Try looking for "links", it's basically the same thing (but don't tell 
the links people I said that! :)

If not, why not just download and build links, and put it in your ~/bin 
directory or something?  I don't believe it has to be admin-installed, 
does it?


Erik





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


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




[PHP] Sooo close - please help

2002-03-22 Thread brendan conroy

Hi guys,
   Thanks for reading this. I desperatley need help with this
error. I just finished a huge project thats taken me months, my code works, 
but the code it uses has an error. The project is due Monday and naturally 
enough the guy who wrote the code with the error is gone on holiday for the 
weekend- typical. To be so close to having it finished is sort of 
sickening..

Does anyone know what the hell Resource id's are, and why they are showing
up in my array instead of good ol fashioned numbers?

My array goes (correct)into a function looking like this :

Array ( [0] => Array ( [0] => -1 [1] => 1 [2] => 1 [3] => 1 ) [1] =>Array ( 
[0] => -2 [1] => 2 [2] => 2 [3] => 10 [4] => 2 ) [2] => Array ( [0] => -3[1] 
=> 3 [2] => 3 [3] => 9 ) ) Array ( [0] => Array ( [0] => -4 [1] => 4 [2]=> 4 
[3] => 4 ) [1] => Array ( [0] => -5 [1] => 5 [2] => 5 [3] => 5 ) [2] =>Array 
( [0] => -6 [1] => 6 [2] => 6 [3] => 6 ) )

and comes out looking like this:

Array ( [0] => Array ( [0] => Resource id #5 [1] => Resource id #8 [2] => 
1[3] => 1 ) [1] => Array ( [0] => Resource id #16 [1] => Resource id #17 
[2]=> 2 [3] => 10 [4] => 2 [5] => ) [2] => Array ( [0] => Resource id #24 
[1]=> Resource id #25 [2] => 3 [3] => 9 ) ) Array ( [0] => Array ( [0] 
=>Resource id #35 [1] => Resource id #36 [2] => 4 [3] => 4 ) [1] => Array 
([0] => Resource id #44 [1] => Resource id #45 [2] => 5 [3] => 5 ) [2] 
=>Array ( [0] => Resource id #53 [1] => Resource id #54 [2] => 6 [3] => 6 ) 
)

The Resource id #'s only go into the first two places in the end(third)
arrays.

Heres the other guys code, Im pretty sure the bug is in monic or prodmono as 
they're the functions that deal with the elements that are turned into 
Resource id #'s . I know this is an awful lot to ask,but like I said Im 
desperate

>  function grobmonic($g)
> {
>
>   for($c=0;$c   {
>   $g[$c]=monic($g[$c]);
>   }
> return $g;
> }
> ?>
>
>
>  function monic($p)
> {
>   print_r($p);
>   if(gmp_cmp($p[0][0],$p[0][1])!=0)
>   {
>   $temp[0]=$p[0][1];
> $temp[1]=$p[0][0];
>   $p=prodmono($temp,$p);
>   }
> return $p;
> }
> ?>
>
>
>
>
>  function prodmono($p1,$p2)
> {
>
>   for($a=0;$a {
>
>   $num=gmp_mul($p1[0],$p2[$a][0]);
>
> $den=gmp_mul($p1[1],$p2[$a][1]);
>   $g=gmp_gcd($num,$den);
>   if(gmp_cmp($g,1)!=0)
>   {
>   $num=gmp_divexact($num,$g);
>   $den=gmp_divexact($den,$g);
>   }
>   $res[$a][0]=$num;
> $res[$a][1]=$den;
>   $k=$i=$j=2;
>   while($i   {
>   if($p1[$i]<$p2[$a][$j])
>   {
>   $res[$a][$k]=$p1[$i];
>   $res[$a][$k+1]=$p1[$i+1];
>   $i=$i+2;
>   }
>   elseif($p1[$i]>$p2[$a][$j])
>   {
> $res[$a][$k]=$p2[$a][$j];
> $res[$a][$k+1]=$p2[$a][$j+1];
> $j=$j+2;
> }
>   else
>   {
> $res[$a][$k]=$p1[$i];
> $res[$a][$k+1]=$p1[$i+1]+$p2[$a][$j+1];
> $i=$i+2;
>   $j=$j+2;
> }
>   $k=$k+2;
>   }
>   while($i   {
>   $res[$a][$k]=$p1[$i];
> $res[$a][$k+1]=$p1[$i+1];
> $i=$i+2;
>   $k=$k+2;
> }
> while($j {
> $res[$a][$k]=$p2[$a][$j];
> $res[$a][$k+1]=$p2[$a][$j+1];
> $j=$j+2;
> $k=$k+2;
> }
>   }
>   return $res;
>   }
> ?>
>


I'd really appreciate help with this


Thanks a million







_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Re: [PHP] IMAGE Manipulation

2002-03-22 Thread James Taylor

Hey, I'm not sure if anyone ever answered your question, but here's a little 
function I wrote for something similar to what you want to do and it doesn't 
require GD be installed.  You need to modify the top portion, I just threw 
that in there to show you how it would work.  $pic is the name of the image 
you want to display.  $largestside is the largest width/height you'll want to 
be shown - So if the max height or width is supposed to only be 200, you'd 
set it to that, then it scales the other side so that it displays with the 
correct dimensions.  This doesn't ACTUALLY resize the file, it just takes the 
image and then in HTML it sets the height and width.  If you need to actually 
resize the file you will need GD to be installed.  Hope this helps in some 
way!




function resize($v_pic) {

   $largestside = 120;
   $size = GetImageSize ("$v_pic");

   $width = $size[0];
   $height = $size[1];

   if ($width == $height) {
  $dimensions[0] = $largestside;
  $dimensions[1] = $largestside;
   } elseif ($width > $height) {
  $divisor = $width / $largestside;
  $height = $height / $divisor;
  $dimensions[1] = intval ($height);
  $dimensions[0] = $largestside;
   } elseif ($width < $height) {
  $divisor = $height / 120;
  $width = $width / $divisor;
  $dimensions[0] = intval ($width);
  $dimensions[1] = 120;
   }

   return $dimensions;
}

On Saturday 16 March 2002 04:56 am, you wrote:
> Hi,
>
> I'm trying to resize images from a big image to smaller image in
> dimension and also file size so that when a user upload an image into
> server, when a browser display the picture it desn't have to be as big.
> I hope my question make sense.
>
> I just don't know where to start.
>
> may be somebody could help me, please.
>
> thank you for reviewing my email.
>
> regards,
> Dani

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




Re: [PHP] cron with php as apache module

2002-03-22 Thread Paul Roberts

ok
for lynx, at the command prompt i get
bash: lynx: command not found

I've also looked in all the obvious places for php but can't find it.

the server is a cobalt raq 3 and i have a virtual host account so i can't recompile 
php.

maybe I'll rewrite it in Perl.

Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: "Analysis & Solutions" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 7:26 PM
Subject: Re: [PHP] cron with php as apache module


> Even if you can't get, or don't want to bother getting, PHP as a
> standalone CGI type program, you can still execute via crontab.  Make a
> web page that you want to have run, then put something along the lines
> of:
> 
>lynx http://localhost/scriptname.php
> 
> as the command in the crontab file.  Do note, you'll likely need to take
> steps to protect the script from being run by people you don't want
> touching it.  You could use SSL, cookies and REMOTE_ADDR, among other
> things to accomplish that.
> 
> --Dan
> 
> -- 
> PHP scripts that make your job easier
>   http://www.analysisandsolutions.com/code/
>  SQL Solution  |  Layout Solution  |  Form Solution
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


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




Re: [PHP] FAQ

2002-03-22 Thread Rasmus Lerdorf

I just don't see what the difference is.  This is a PHP mailing list which
supposedly gets questions about PHP.  Why would the PHP FAQ not be the
right place for this?

-Rasmus

On Fri, 22 Mar 2002, James Taylor wrote:

> You are correct sir.  The purpose of the FAQ would be so that, like I said,
> similar questions that pop up say, once a week, could be answered in the FAQ
> instead of on the list - That way I won't get 300 messages a day :)
>
> On Friday 22 March 2002 11:36 am, you wrote:
> > Despite what Rasmus just said, I think that you are saying a PHP Mailing
> > List faq based on the q's that the mailing list gets, not the general PHP
> > faq.
> >
> > Scott
> >
> > -Original Message-
> > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 22, 2002 2:30 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] FAQ
> >
> >
> > Has anyone given any thought to possibly maintaining a FAQ containing the
> > answers to the most commonly asked PHP questions on this list? I notice
> > duplicates roll through every couple of days, and it would probably be a
> > really nice PHP resource.
> >
> > Or, does one already exist? Ha.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] FAQ

2002-03-22 Thread John Fishworld

Yep good idea !
Oh and by the books - a couple of opinions wouldn't be bad either !

regards
john

> I've been working on that at http://www.php-faq.com/ Want to help?
>
> > -Original Message-
> > From: James Taylor [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 22, 2002 2:30 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] FAQ
> >
> > Has anyone given any thought to possibly maintaining a FAQ
> > containing the answers to the most commonly asked PHP questions on this
> > list? I notice
> > duplicates roll through every couple of days, and it would
> > probably be a
> > really nice PHP resource.
> >
> > Or, does one already exist? Ha.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




RE: [PHP] FAQ

2002-03-22 Thread Robert V. Zwink

This one has been around for awhile, though I don't think its "official".

php.faqts.com

Robert Zwink
http://www.zwink.net/daid.php

-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 2:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] FAQ


Has anyone given any thought to possibly maintaining a FAQ containing the 
answers to the most commonly asked PHP questions on this list? I notice 
duplicates roll through every couple of days, and it would probably be a 
really nice PHP resource.

Or, does one already exist? Ha.

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


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




RE: [PHP] FAQ

2002-03-22 Thread Brian Drexler

Yes, an FAQ would be nice...so would a Manual...Oh wait, there is one, but
people just happen to overlook it most of the time :-)  I apologize for the
sarcasm, but it is Friday!

Brian

-Original Message-
From: James Taylor [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 2:50 PM
To: [EMAIL PROTECTED]
Cc: PHP List
Subject: Re: [PHP] FAQ


You are correct sir.  The purpose of the FAQ would be so that, like I said,
similar questions that pop up say, once a week, could be answered in the FAQ
instead of on the list - That way I won't get 300 messages a day :)

On Friday 22 March 2002 11:36 am, you wrote:
> Despite what Rasmus just said, I think that you are saying a PHP Mailing
> List faq based on the q's that the mailing list gets, not the general PHP
> faq.
>
> Scott
>
> -Original Message-
> From: James Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 2:30 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] FAQ
>
>
> Has anyone given any thought to possibly maintaining a FAQ containing the
> answers to the most commonly asked PHP questions on this list? I notice
> duplicates roll through every couple of days, and it would probably be a
> really nice PHP resource.
>
> Or, does one already exist? Ha.

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


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




RE: [PHP] FAQ

2002-03-22 Thread Matt Schroebel

I've been working on that at http://www.php-faq.com/ Want to help?

> -Original Message-
> From: James Taylor [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, March 22, 2002 2:30 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] FAQ
> 
> Has anyone given any thought to possibly maintaining a FAQ 
> containing the answers to the most commonly asked PHP questions on this 
> list? I notice 
> duplicates roll through every couple of days, and it would 
> probably be a 
> really nice PHP resource.
> 
> Or, does one already exist? Ha.

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




RE: [PHP] Maillist

2002-03-22 Thread Rick Emery

I think PHP's uniqid() will suit your purposes.  Look in the Miscellaneous
Functions section of the manual.

-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:38 AM
To: PHP-General List
Subject: [PHP] Maillist



I need to send out several hundred, to several thousand emails out of
our
database.  Now, before everyone starts telling me to use an actual MLM for
this, let me explain what I need to do.

I need to send a unique ID with each message, in the form of a URL.  We
want to make unsubscribing as easy as possible for our clients, so what I
plan
on doing is sending out a URL in the body of the message that contains a
unique
ID.  When they click on that URL, it hits another script on our website
which
than takes that ID, searches for it in the database and flags that record
(and
returns a 'Thank you' page.)

So, somehow, I need to generate a unique ID for each message send, stick
that ID into the database with the corresponding email address that it was
just
sent to and thenwait.

What's the best way to approach this? Should I generate IDs outside of
the
script, and then query the database for both the email and the ID and
construct
the message that way?  Or should I dynamically generate an ID during the
mailing process and shove it in the DB as the message goes out?

Suggestions, criticism, comments...welcome.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.




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

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




Re: [PHP] FAQ

2002-03-22 Thread James Taylor

You are correct sir.  The purpose of the FAQ would be so that, like I said, 
similar questions that pop up say, once a week, could be answered in the FAQ 
instead of on the list - That way I won't get 300 messages a day :)

On Friday 22 March 2002 11:36 am, you wrote:
> Despite what Rasmus just said, I think that you are saying a PHP Mailing
> List faq based on the q's that the mailing list gets, not the general PHP
> faq.
>
> Scott
>
> -Original Message-
> From: James Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 2:30 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] FAQ
>
>
> Has anyone given any thought to possibly maintaining a FAQ containing the
> answers to the most commonly asked PHP questions on this list? I notice
> duplicates roll through every couple of days, and it would probably be a
> really nice PHP resource.
>
> Or, does one already exist? Ha.

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




[PHP] store locator/zip code question...

2002-03-22 Thread Kelly Meeks

Hi folks,

I've got a client that wants to show users dealers of their products based on mileage 
from their location.

I've seen this done, and I assume it's based on either a database relating the zip 
info to miles, or to some kind of hash on the zipcode itself.

Anyone have any experience with this?

TIA,

Kelly

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




Re: [PHP] FAQ

2002-03-22 Thread Rasmus Lerdorf

That's a FAQ

(did you try the obvious?  http://php.net/faq)

On Fri, 22 Mar 2002, James Taylor wrote:

> Has anyone given any thought to possibly maintaining a FAQ containing the
> answers to the most commonly asked PHP questions on this list? I notice
> duplicates roll through every couple of days, and it would probably be a
> really nice PHP resource.
>
> Or, does one already exist? Ha.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] FAQ

2002-03-22 Thread James Taylor

Has anyone given any thought to possibly maintaining a FAQ containing the 
answers to the most commonly asked PHP questions on this list? I notice 
duplicates roll through every couple of days, and it would probably be a 
really nice PHP resource.

Or, does one already exist? Ha.

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




RE: [PHP] Forcing little endian with pack("d");

2002-03-22 Thread Mika Tuupola

On Fri, 22 Mar 2002, Mike Eynon wrote:

> I have looked through the pack code in php-4.1.2.  There appear to be no
> other options other than what is documented on the php.net pack function
> page.  There appears to be no way of specifying endian-ness for floats or
> doubles using pack.  They are copied to the output stream using a simple
> memcpy.

The solution was much simpler than I though. Reversing
the output with strrev() seems to do the job:

$double = pack("d",   $val);

if ($bigendian) {
$double = strrev($double);
}   

Now the value of $double is the same in big and smallendian
machines. So I suppose strrev() is binary safe.

> I would need more details on what you are doing to be sure, but, is the
> format something you can worry about on the unpacking side? 

I am writing a binary file (BIFF) whose specs state that the data
needs to be written littleendian.

> The code in pack.c for the pack function is pretty dang simple.  It wouldn't
> take more than an hour or so to cut and paste a few sections of code to add
> the options you need.  Could be good to have in future versions of php.

+1 for adding that to future versions. Don't talk C myself 
though ;)

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




Re: [PHP] cron with php as apache module

2002-03-22 Thread Analysis & Solutions

Even if you can't get, or don't want to bother getting, PHP as a
standalone CGI type program, you can still execute via crontab.  Make a
web page that you want to have run, then put something along the lines
of:

   lynx http://localhost/scriptname.php

as the command in the crontab file.  Do note, you'll likely need to take
steps to protect the script from being run by people you don't want
touching it.  You could use SSL, cookies and REMOTE_ADDR, among other
things to accomplish that.

--Dan

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

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




[PHP] Rollover not functioning

2002-03-22 Thread Joshua E Minnie

Does anyone have any idea why adding PHP into an HTML page would cause a
rollover (not even within the PHP script) to not function?

The thing is, I have done the same thing on various other pages, but this is
the only page that does it.  I tried removing the PHP script from the page,
and the rollover works, but when I add the code back in, it doesn't.  And if
anyone has any ideas as how to minimize the code, they would be appreciated
as well.  Here is the code that was inserted within a cell in a table ..the
rollover is in another cell:



Error: could not open $filename for
reading\n";
exit;
  }
  $form = fread($fp, filesize($filename));
  fclose($fp);
  $form = str_replace("{name}", $HTTP_POST_VARS["name"], $form);
  $form = str_replace("{email}", $HTTP_POST_VARS["email"], $form);
  echo $form;
}
elseif(empty($HTTP_POST_VARS["name"]) || empty($HTTP_POST_VARS["email"]) ||
empty($HTTP_POST_VARS["comments"])) {
  echo "You must fill out all
information\n";
  @ $fp = fopen($filename, "r");
  if(!$fp) {
echo "Error: could not open $filename for
reading\n";
exit;
  }
  $form = fread($fp, filesize($filename));
  fclose($fp);
  $form = str_replace("{name}", $HTTP_POST_VARS["name"], $form);
  $form = str_replace("{email}", $HTTP_POST_VARS["email"], $form);
  echo $form;
}
else {
  $submit = 0;
  $name = $HTTP_POST_VARS["name"];
  $body = strip_tags(trim(stripslashes($HTTP_POST_VARS["comments"])));
  $body .= "\n\nSent: ".date("F j, Y  g:i a")."\nSender: $name";
  $to = "[EMAIL PROTECTED]";
  $subject = "Wild Zone web contact";
  $headers = "From: ".$HTTP_POST_VARS["email"]."\n";
  mail($to,$subject,$body,$headers);
  @ $fp = fopen($filename, "r");
  if(!$fp) {
echo "Error: could not open $filename for
reading\n";
exit;
  }
  $form = fread($fp, filesize($filename));
  fclose($fp);
  $form = str_replace("{name}", "", $form);
  $form = str_replace("{email}", "", $form);
  echo "Your information has been
successfully transmitted\n";
  echo $form;
}
?>
--
Joshua E Minnie
CIO
[EMAIL PROTECTED]

"Don't work for recognition, but always do work worthy of recognition."



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




RE: [PHP] Forcing little endian with pack("d");

2002-03-22 Thread Mike Eynon



I have looked through the pack code in php-4.1.2.  There appear to be no
other options other than what is documented on the php.net pack function
page.  There appears to be no way of specifying endian-ness for floats or
doubles using pack.  They are copied to the output stream using a simple
memcpy.

I would need more details on what you are doing to be sure, but, is the
format something you can worry about on the unpacking side?  Usually, it is
best to marshall the data in the native format of the machine doing the
marshalling, and then convert the data (if needed) on the machine you are
un-marshalling on.  This usually makes debugging a whole heck of a lot
easier.  All you will have to do is store the endian-ness of the machine you
are packing on with the data being packed.  Of course, this only works if
you are not unpacking with PHP...

The code in pack.c for the pack function is pretty dang simple.  It wouldn't
take more than an hour or so to cut and paste a few sections of code to add
the options you need.  Could be good to have in future versions of php.

Good Luck.

// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave.
// Santa Cruz, CA  95062
// 831.588.2388

-Original Message-
From: Mika Tuupola [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Forcing little endian with pack("d");



http://www.php.net/manual/en/function.pack.php

The manual page describes format string "d" as:

d double (machine dependent size and representation).

Is there an easy way of forcing the binary to be representated
little endian even with hosts which are big endian (undocumented
format string for example?).


--
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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


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




RE: [PHP] cron with php as apache module

2002-03-22 Thread Hunter, Ray

Yeah, 

Compile php first as CLI, move the contents of the bin directory to where
you want them, and then compile php again for the apache module.

In the bin directory you will have a php executable file which you can use
for your cli apps.

In your php files that you want to run as crons then add this before the

/* EOF */



Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


> -Original Message-
> From: Paul Roberts [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, March 22, 2002 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] cron with php as apache module
> 
> 
> I want to run a php script via a crontab, (i can set up the 
> crontab etc).
> 
> this is a Linux server and php is installed as an apache 
> module, is there any way to run the php script via cron.
> 
>  the build details are 
> 
>   Configure Command './configure' 
> '--with-apxs=/usr/sbin/apxs' '--with-mysql' 
> '--enable-track-vars' '--enable-versioning' '--enable-bcmath' 
> 
> 
> 
> Paul Roberts
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



Re: [PHP] Desperate!!!!!!! Resource id #24 - error???????????

2002-03-22 Thread Jason Wong

Thank you for (mis)placing your faith in me. But if you want a better quality 
of help you should write to the list and not to any one individual.



On Saturday 23 March 2002 02:44, brendan conroy wrote:
> OK here goes, Im pretty sure the error is in the monic function, thanks for
> your time on this
>
>  function grobmonic($g)
> {
>
>   for($c=0;$c   {
>   $g[$c]=monic($g[$c]);
>   }
> return $g;
> }
> ?>
>
>
>  function monic($p)
> {
>   print_r($p);
>   if(gmp_cmp($p[0][0],$p[0][1])!=0)
>   {
>   $temp[0]=$p[0][1];
> $temp[1]=$p[0][0];
>   $p=prodmono($temp,$p);
>   }
> return $p;
> }
> ?>
>
>
>
>
>  function prodmono($p1,$p2)
> {
>
>   for($a=0;$a {
>
>   $num=gmp_mul($p1[0],$p2[$a][0]);
>
> $den=gmp_mul($p1[1],$p2[$a][1]);
>   $g=gmp_gcd($num,$den);
>   if(gmp_cmp($g,1)!=0)
>   {
>   $num=gmp_divexact($num,$g);
>   $den=gmp_divexact($den,$g);
>   }
>   $res[$a][0]=$num;
> $res[$a][1]=$den;
>   $k=$i=$j=2;
>   while($i   {
>   if($p1[$i]<$p2[$a][$j])
>   {
>   $res[$a][$k]=$p1[$i];
>   $res[$a][$k+1]=$p1[$i+1];
>   $i=$i+2;
>   }
>   elseif($p1[$i]>$p2[$a][$j])
>   {
> $res[$a][$k]=$p2[$a][$j];
> $res[$a][$k+1]=$p2[$a][$j+1];
> $j=$j+2;
> }
>   else
>   {
> $res[$a][$k]=$p1[$i];
> $res[$a][$k+1]=$p1[$i+1]+$p2[$a][$j+1];
> $i=$i+2;
>   $j=$j+2;
> }
>   $k=$k+2;
>   }
>   while($i   {
>   $res[$a][$k]=$p1[$i];
> $res[$a][$k+1]=$p1[$i+1];
> $i=$i+2;
>   $k=$k+2;
> }
> while($j {
> $res[$a][$k]=$p2[$a][$j];
> $res[$a][$k+1]=$p2[$a][$j+1];
> $j=$j+2;
> $k=$k+2;
> }
>   }
>   return $res;
>   }
> ?>
>
>
>
>
> From: Jason Wong <[EMAIL PROTECTED]>
>
> >To: [EMAIL PROTECTED]
> >Subject: Re: [PHP]  Desperate!!!   Resource id #24 -
> >error???
> >Date: Sat, 23 Mar 2002 02:18:58 +0800
> >
> >On Saturday 23 March 2002 01:53, brendan conroy wrote:
> > > Hi guys,
> > > Thanks for reading this. I desperatley need help with this
> >
> >error. I
> >
> > > just finished a huge project thats taken me months, my code works, but
> >
> >the
> >
> > > code its attached to has an error. The project is due Monday and
> >
> >naturally
> >
> > > enough the guy who wrote the code with the error is gone on holiday for
> >
> >the
> >
> > > weekend- typical.
> >
> >Let's see the code that "its attached to".
> >
> >
> >--
> >Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> >
> >/*
> >Slang is language that takes off its coat, spits on its hands, and goes to
> >work.
> >*/
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> _
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx

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




RE: [PHP] cron with php as apache module

2002-03-22 Thread Darren Gamble

Good day,

Most Linux packages also install the php binary as part of the distribution
(I know Redhat does).

Look in /usr/local/bin (or other common places) to see if the executable
"php" has been installed.

If it is, you're set.  Just run the script as if it were a .cgi .
Instructions are on php's site.

On a sour note, FreeBSD's package does not include the executable.. >=(


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


-Original Message-
From: Paul Roberts [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 12:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] cron with php as apache module


I want to run a php script via a crontab, (i can set up the crontab etc).

this is a Linux server and php is installed as an apache module, is there
any way to run the php script via cron.

 the build details are 

  Configure Command './configure' '--with-apxs=/usr/sbin/apxs'
'--with-mysql' '--enable-track-vars' '--enable-versioning' '--enable-bcmath'




Paul Roberts
[EMAIL PROTECTED]




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

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




  1   2   >