[PHP] compile problem with gd 2.0.1

2002-05-31 Thread Michael Geier

Linux Redhat 7.3
PHP 4.2.0
GD 2.0.1

during make:
/bin/sh /root/php-4.2.0/libtool --silent --mode=compile gcc  -I. -I/root/php-
4.2.0/ext/gd -I/root/php-4.2.0/main -I/root/php-4.2.0 -
I/usr/local/apache/include -I/root/php-4.2.0/Zend -I/usr/local/mysql/include -
I/usr/local/easysoft/oob/client/include -I/root/php-4.2.0/ext/xml/expat  -
DLINUX=22 -DUSE_HSREGEX -I/root/php-4.2.0/TSRM -g -O2 -prefer-pic  -c gd.c
gd.c: In function `zm_startup_gd':
gd.c:303: `gdArc' undeclared (first use in this function)
gd.c:303: (Each undeclared identifier is reported only once
gd.c:303: for each function it appears in.)
gd.c:304: `gdPie' undeclared (first use in this function)
gd.c:305: `gdChord' undeclared (first use in this function)
gd.c:306: `gdNoFill' undeclared (first use in this function)
gd.c:307: `gdEdged' undeclared (first use in this function)
gd.c: In function `zif_imagecreatetruecolor':
gd.c:588: warning: assignment makes pointer from integer without a cast
gd.c: In function `zif_imagecolorat':
gd.c:1626: structure has no member named `tpixels'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/root/php-4.2.0/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/php-4.2.0/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/php-4.2.0/ext'
make: *** [all-recursive] Error 1


configure:
 --with-apxs=/usr/local/apache/bin/apxs
 --enable-ftp
 --with-gd
 --enable-force-cgi-redirect
 --with-pear
 --enable-mailparse
 --enable-sockets
 --with-esoob
 --with-mysql=/usr/local/mysql
 --with-zlib-dir=/usr/include
 --with-jpeg-dir=/usr/lib
 --with-png-dir=/usr/lib

any help appreciated
-- 
Michael Geier
email: [EMAIL PROTECTED]




-
This mail sent through CDM Sports Webmail.

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




[PHP] pdf with POST

2002-05-31 Thread Josep R. Raurell

Hello.

I do a pdf with a lot of variables from a form, with a GET method.

After make the pdf (in the same script) I sent the headers and the user 
can see the document in your browser:

   $data = $albara-retorna();
   $len=strlen($data);

   header(Content-Type: application/pdf);
   header(Content-Length: $len);
   header(Content-Disposition: inline; filename=$fileName);
   header(Pragma: no-cache);
   header(Expires: 0);
 
   print $data;
   $albara-deleteDoc();

This work OK.
But I want use POST because there are so much variables in the URL, whit 
post the result is a blank scrren (the pdf never apears).
Somebody nows if is posible (with another headers or with other 
solution) to use a POST method to get a pdf made on the fly ?


Thanks.
Josep. R. Raurell



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




Re: [PHP] nested if parse error

2002-05-31 Thread Miroslav Figlar

  could somebody explain me please what is wrong with this
  piece of code?
  ?
  if (1):
  if (1) echo hello;
  else:
  endif;
  ?

  Well, first off you've broken the golden rule, which is: Don't mix the
:-type syntax with the {}-type or completely bare syntaxes.

 In more detail:  on reaching the else, PHP matches it with the nearest
preceding if; this is the If (1) echo ... line, which isn't using :-type
syntax, so it expects the else also not to use :-type syntax -- so the : is
a parse error.

now it's clear to me
anyway it's funny that this works fine :-)
?
if (1):
if (1) echo hello;
$a = 1;// here can be anything else
else:
endif;
?



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




Re: [PHP] pdf with POST

2002-05-31 Thread Miguel Cruz

On Fri, 31 May 2002, Josep R. Raurell wrote:
 I do a pdf with a lot of variables from a form, with a GET method.
 
 After make the pdf (in the same script) I sent the headers and the user 
 can see the document in your browser:
 
$data = $albara-retorna();
$len=strlen($data);
 
header(Content-Type: application/pdf);
header(Content-Length: $len);
header(Content-Disposition: inline; filename=$fileName);
header(Pragma: no-cache);
header(Expires: 0);
  
print $data;
$albara-deleteDoc();
 
 This work OK.
 But I want use POST because there are so much variables in the URL, whit 
 post the result is a blank scrren (the pdf never apears).
 Somebody nows if is posible (with another headers or with other 
 solution) to use a POST method to get a pdf made on the fly ?

This isn't very helpful, but I can tell you that I have a lot of little 
programs that generate PDFs from POSTed form data (one I use to print my 
personal envelopes, things like that) and they all work fine. So it's 
definitely possible. That suggests that maybe something else is messing up 
in your case.

miguel


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




[PHP] Apache 2.0.36 and PHP

2002-05-31 Thread Herman Pool

Hi all,

I have installed the binary version of Apache 1.3.23 on my W2000 SP2
machine.
The binary version of PHP 4.1.1 works fine with it.
So far, so good, no problems at all.

I simply installed the binary version of Apache 2.0.36 and PHP 4.1.1 does
not work anymore.
I didn't do anything else than installing the binary version of apache, and
start apache.
Apache starts well, I can see the Apache welcome screen.

What did I do wrong or forget ??

With kind regards,

Herman




**
Dit bericht en alle eventueel meegestuurde documenten
zijn vertrouwelijk en alleen bestemd voor degene aan wie
het bericht geadresseerd is. Indien u dit bericht heeft
ontvangen terwijl u niet de geadresseerde bent, verzoeken
wij u het bericht te vernietigen en ons daarvan in kennis te
stellen.

Dit bericht is tevens gecontroleerd op computervirussen.

This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this e-mail 
in error, please delete the message and notify us.

This e-mail message has been swept by MIMEsweeper for
the presence of computer viruses.
**

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




Re: [PHP] Apache 2.0.36 and PHP

2002-05-31 Thread Stuart Dallas

Friday, May 31, 2002, 9:29:52 AM, you wrote:

 I simply installed the binary version of Apache 2.0.36 and PHP 4.1.1 does
 not work anymore.
 I didn't do anything else than installing the binary version of apache, and
 start apache.
 Apache starts well, I can see the Apache welcome screen.

 What did I do wrong or forget ??

You need to upgrade PHP to the latest version which contains experimental
support for Apache 2. PHP 4.1.x doesn't provide any specific support for
Apache 2 and will only work if you use it as a CGI app.

Whn you upgrade, don't forget to change the LoadModule line for PHP in
httpd.conf to load php/experimental/apache2filter.dll instead of
php/sapi/php4apache.dll.

-- 
Stuart


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




[PHP] Multiple queries

2002-05-31 Thread Caspar Kennerdale

Sorry If this is the wrong list for this topic, I hope someone can shed some
light onto my problem.

I am building a php/ Mysql web site for a client which is a picture gallery.
The web site has 3 frames (required by the designer so that the whole thing
doesnt refresh all the time).
Frame 1- Navigation
Frame 2- Info on selected artworks and other related projects
Frame 3- The artworks/ jpegs

I have one table, with a name and info about the project and upto 5 urls of
where the jpeg lies.

When a project is selected in the navigation I request the record from the
database, I create an array which contains the location of the jpegs and
then display them in Frame 3.

Now, I then have a piece of javascript which tells frame 2 to update itself.
So I have parsed the record ID to it and it then open a query to the
database and outputs the relevant information about the artworks. Lastly a
third query is also sent to the database to see if there are any other
projects in the gallery by the same artist- and then create a list of
related links.

So I have 3 database queries over two pages.

I'm wondering if there is a more efficient way of doing this?




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




RE: [PHP] nested if parse error

2002-05-31 Thread Ford, Mike [LSS]

 -Original Message-
 From: Miroslav Figlar [mailto:[EMAIL PROTECTED]]
 Sent: 31 May 2002 07:26
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] nested if parse error
 
 
 anyway it's funny that this works fine :-)
 ?
 if (1):
 if (1) echo hello;
 $a = 1;// here can be anything else
 else:
 endif;
 ?

Nope, that makes perfect sense too.  Think about where your second if(1) terminates -- 
is it still open when the parser reaches the else:?

As I said before, it just gets way too confusing if you try to mix the :-type syntax 
with anything else: if you use it at all, use it for *everything*.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




[PHP] Replacing Number with Month(newbie)

2002-05-31 Thread webmaster



Is there a magical function that I can use to 
convert 4 into April and 5 into May etc?

can I use mktime()

Oneyes no answer will do fine

JJ Harrison[EMAIL PROTECTED]www.tececo.com

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


[PHP] how to detect if the client's browser accepts cookies ?

2002-05-31 Thread David Eisenhart

Hi

I am writing a function to construct page links within my site; I want it to
append the session id to the URL's query string if the client does not
accept cookies (and ignore the session id if the client does accept
cookies).

How do I detect if the client browser accepts cookies?
Indeed, has anyone got such a function as described above?

Any help gratefully received.

David




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




RE: [PHP] Re: Help with a trivial session example.

2002-05-31 Thread Ford, Mike [LSS]

 -Original Message-
 From: Michael Davey [mailto:[EMAIL PROTECTED]]
 Sent: 31 May 2002 00:37
 
 I can't say that I have moved over to the new superglobals 
 yet - I prefer
 register_globals cos I am lazy ;)
 
 But it does seem that there are two possible variables that 
 you need to
 use - the one in your script ($HTTP_SESSION_VARS), but this 
 is only for
 4.0.6 or less, it is $_SESSION otherwise - what version do you have
 installed?

Nope, that's not true -- $HTTP_*_VARS arrays are still around, as well as $_*, so 
existing scripts using them will continue to work.  The old names aren't even listed 
as deprecated, so it doesn't look like they're going to go away any time soon.

Having said that, if you're starting from scratch on version 4.1.0 or later, you 
should definitely go for the new $_* superglobals.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




RE: [PHP] Replacing Number with Month(newbie)

2002-05-31 Thread Jon Haworth

Hi JJ,

 Is there a magical function that I can use to convert 4 
 into April and 5 into May etc?
 can I use mktime()
 One yes no answer will do fine

Yes and no ;-)

You might want to use a combination of mktime() and date().

i.e.

?php
  $month = 4;
  echo date (jS F Y, mktime (1, 0, 0, $month, 1, 2002)); 
?

HTH
Jon

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




[PHP] Cache Control

2002-05-31 Thread Jeroen Timmers

Where i can find more help about cache control

Thx

Jeroen


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




Re: [PHP] how to detect if the client's browser accepts cookies ?

2002-05-31 Thread Nick Talbott

On Friday 31 May 2002 10:53 am, David Eisenhart wrote:
 Hi

 I am writing a function to construct page links within my site; I want it
 to append the session id to the URL's query string if the client does not
 accept cookies (and ignore the session id if the client does accept
 cookies).

 How do I detect if the client browser accepts cookies?
 Indeed, has anyone got such a function as described above?

Here's one approach you could try.  Set a cookie, send a redirect, and see if 
you get the cookie back ...

Script 1 - cookiecheck1.php

?php
setcookie(testcookie,ok);
header(Location: cookiecheck2.php);
?

Script 2  - cookiecheck2.php

?php
if ($testcookie ==ok)
  print This browser appears to handle cookies OK.;
else
  print This browser either doesn't support use of cookies, 
or has cookie use disabled.;
?

Regards

- Nick


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




RE: [PHP] Cache Control

2002-05-31 Thread Jon Haworth

Hi Jeroen,

 Where i can find more help about cache control

Here: http://www.google.com/search?q=help+about+cache+control (495,000
results)

Or did you mean something a bit more specific?

Cheers
Jon

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




RE: [PHP] Cache Control

2002-05-31 Thread Jeroen Timmers

indeed

more specific

Jeroen

At 11:00 31-5-2002 +0100, you wrote:
Hi Jeroen,

  Where i can find more help about cache control

Here: http://www.google.com/search?q=help+about+cache+control (495,000
results)

Or did you mean something a bit more specific?

Cheers
Jon

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



RE: [PHP] Replacing Number with Month(newbie)

2002-05-31 Thread Ford, Mike [LSS]

 -Original Message-
 From: Jon Haworth [mailto:[EMAIL PROTECTED]]
 Sent: 31 May 2002 10:58
 
 Hi JJ,
 
  Is there a magical function that I can use to convert 4 
  into April and 5 into May etc?
  can I use mktime()
  One yes no answer will do fine
 
 Yes and no ;-)

Ha! I was just about to say exactly that myself!

 
 You might want to use a combination of mktime() and date().
 
 i.e.
 
 ?php
   $month = 4;
   echo date (jS F Y, mktime (1, 0, 0, $month, 1, 2002)); 
 ?

Except, to get just the month (and leaving out optional arguments to mktime()), you 
would need:

date('F', mktime(12, 0, 0, $month));

Also note I've specified 12:00, as opposed to 01:00, just to make sure you're well 
clear of any possible daylight-savings timeshifts!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




RE: [PHP] Cache Control

2002-05-31 Thread Jon Haworth


Hi Jeroen,
   Where i can find more help about cache control
 
  http://www.google.com/search?q=help+about+cache+control
  Or did you mean something a bit more specific?

 indeed
 more specific

Well, seeing as you're not sharing the actual question with the mailing
list, this answer may not be exactly what you're after, but it's probably:

meta http-equiv=Pragma content=no-cache
meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Expires content=?=$a_GMT_date_in_the_past?

;-)

Cheers
Jon

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




php-general Digest 31 May 2002 10:09:27 -0000 Issue 1377

2002-05-31 Thread php-general-digest-help


php-general Digest 31 May 2002 10:09:27 - Issue 1377

Topics (messages 100015 through 100072):

Re: Help with example session class (second request)
100015 by: Michael Davey
100026 by: John Holmes

Re: migrating PWS to Apache
100016 by: Analysis  Solutions

array question
100017 by: Michelle
100018 by: Martin Towell
100020 by: Analysis  Solutions

Re: Help with a trivial session example.
100019 by: Daevid Vincent
100021 by: Michael Davey
100024 by: Daevid Vincent
100025 by: John Holmes
100027 by: Michael Davey
100065 by: Ford, Mike   [LSS]

Trouble with PHP XMLRPC on Solaris
100022 by: Michael Sweeney

Apache 1.3.24 + PHP 4.2.1 Install Problem - Undefined Symbol
100023 by: Samantha Savvakis

Failed opening '' for inclusion...
100028 by: Jeff Lewis
100029 by: Martin Towell
100030 by: Jeff Lewis
100031 by: Martin Towell
100033 by: Jeff Lewis

'Couldn't compile code. And I'm not smart enough to tell you why, sorry.' -- Any ideas?
100032 by: Sqlcoders.com Programming Dept

Slow Access to SMTP is Causing Slow mail()
100034 by: Bruce Vander Werf
100035 by: Manuel Lemos
100038 by: Miguel Cruz

Re: Undefined variables
100036 by: Christopher J. Crane
100037 by: Miguel Cruz
100052 by: Christopher J. Crane
100053 by: Martin Towell

Re: fdup  Pipes? (New Thread)
100039 by: Miguel Cruz

Re: PHP commands inside a MySQL Database
100040 by: Miguel Cruz

Re: Newbie redirect problem
100041 by: Miguel Cruz

Re: Creating IMAP accounts
100042 by: Miguel Cruz

Re: Design Problem
100043 by: Miguel Cruz

Mcrypt Function - New to it
100044 by: Tom Ray
100047 by: Tom Rogers
100050 by: Tom Ray

Re: newbie: cron jobs
100045 by: Miguel Cruz

user auth
100046 by: Justin Blake
100048 by: Daniel Tryba
100049 by: Miguel Cruz

PHP.INI Lockdown
100051 by: David Redmond

Graphs using PHP
100054 by: Jason Soza

compile problem with gd 2.0.1
100055 by: Michael Geier

pdf with POST
100056 by: Josep R. Raurell
100058 by: Miguel Cruz

Re: nested if parse error
100057 by: Miroslav Figlar
100062 by: Ford, Mike   [LSS]

Apache 2.0.36  and PHP
100059 by: Herman Pool
100060 by: Stuart Dallas

Multiple queries
100061 by: Caspar Kennerdale

Replacing Number with Month(newbie)
100063 by: webmaster.tececo.com
100066 by: Jon Haworth
100071 by: Ford, Mike   [LSS]

how to detect if the client's browser accepts cookies ?
100064 by: David Eisenhart
100068 by: Nick Talbott

Cache Control
100067 by: Jeroen Timmers
100069 by: Jon Haworth
100070 by: Jeroen Timmers
100072 by: Jon Haworth

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---

As I said...

Not quite sure where you got this $login class instance from, but it
appears to be from thin air.  If you have a session class then you would
need to instantiate it first with:

$login = new XYZSessionClass(); // plus any constructor arguments

And to quote from the manual page you gave the link to:

To use this class, simply create a new object $login = new
mySession(name);

Daevid Vincent [EMAIL PROTECTED] wrote in message
003c01c20826$451f3dd0$45193e04@telecom">news:003c01c20826$451f3dd0$45193e04@telecom...
 Thank you john for the prompt reply, however I must be completely
 retarded. I do this:

 ?php
 session_start();

 if( $login-getSessionVar(login) )
 {
 $booth_id = $login-getSessionVar(booth_id);
 $booth_name = $login-getSessionVar(booth_name);
 echo \nBRbooth_id = $booth_id and booth_name =
 $booth_nameBR\n;
 }
 else
 {
 Header(Location: ../index.phtml\n\n);
 exit;
 }

 echo this session is named: .session_name().BR\n;

 include(../globalassets/include/header.phtml);
 ?

 And I get this error:

 Fatal error: Call to a member function on a non-object in content.phtml
 on line 4

  -Original Message-
  From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 30, 2002 12:19 PM
  To: Daevid Vincent; PHP general mailing list
  Subject: Re: [PHP] Help with example session class (second request)
 
 
  Call session_start() on your second page...
 
  ---John Holmes...
 
  - Original Message -
  From: Daevid Vincent [EMAIL PROTECTED]
  To: PHP general mailing list [EMAIL PROTECTED]
  Sent: Thursday, May 30, 2002 3:10 PM
  Subject: [PHP] Help with example session class (second request)
 
 
   Sorry for posting this again so soon, but until I get 

RE: [PHP] how to detect if the client's browser accepts cookies ?

2002-05-31 Thread Ford, Mike [LSS]

 -Original Message-
 From: David Eisenhart [mailto:[EMAIL PROTECTED]]
 Sent: 31 May 2002 10:54
 
 I am writing a function to construct page links within my 
 site; I want it to
 append the session id to the URL's query string if the client does not
 accept cookies (and ignore the session id if the client does accept
 cookies).
 
 How do I detect if the client browser accepts cookies?
 Indeed, has anyone got such a function as described above?

Yes -- and it's called PHP!

The following is taken from the online manual page at 
http://www.php.net/manual/en/ref.session.php:

  The session module supports both methods. Cookies are optimal, but
  since they are not reliable (clients are not bound to accept them),
  we cannot rely on them. The second method embeds the session id
  directly into URLs. 

  PHP is capable of doing this transparently when compiled with
  --enable-trans-sid. If you enable this option, relative URIs will be
  changed to contain the session id automatically. Alternatively, you
  can use the constant SID which is defined, if the client did not
  send the appropriate cookie. SID is either of the form
  session_name=session_id or is an empty string. 

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




RE: [PHP] mktime parameters (Was: Replacing Number with Month(newbie))

2002-05-31 Thread Jon Haworth

Hi Mike,

   Is there a magical function that I can use to convert 4 
   into April and 5 into May etc?
   can I use mktime()
   One yes no answer will do fine
  
  Yes and no ;-)
 
 Ha! I was just about to say exactly that myself!

It was just too tempting :-)

 Except, to get just the month (and leaving out 
 optional arguments to mktime()), you would need:
 date('F', mktime(12, 0, 0, $month));

Hmm. I thought this should work as well. This morning, though, I had to fix
a bug where a combo box was displaying something like

January
March
March
April
May
May

...

The code was

select name=lm
  ?php
for ($i=1; $i=12; $i++) {
  echo option value=\. $i. \;
  echo ($i == $lm) ?  selected : ;
  echo . date (F, mktime (3, 0, 0, $i)). /option;
}
  ?
/select

When I changed the mktime parameters to (3, 0, 0, $i, 1, 2002) it all worked
fine.

I think it's because it's the 31st today, and any months that don't have 31
days were getting screwed up (wouldn't mind hearing any other ideas though).
It seems like it's always a good idea to pass at least the day parameter to
mktime(), unless you enjoy unpredictable results ;-)

Cheers
Jon

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




Fwd: RE: [PHP] Cache Control

2002-05-31 Thread Jeroen Timmers


Date: Fri, 31 May 2002 12:13:40 +0200
To: Jon Haworth [EMAIL PROTECTED]
From: Jeroen Timmers [EMAIL PROTECTED]
Subject: RE: [PHP] Cache Control

I want info on the internet where i can find a manuel.

I want a statement that de page always refresh

the page is a php script and sometimes it comes out of a proxy but
that is not allowed.

Thx Jeroen

At 11:11 31-5-2002 +0100, you wrote:

Hi Jeroen,
Where i can find more help about cache control
  
   http://www.google.com/search?q=help+about+cache+control
   Or did you mean something a bit more specific?
 
  indeed
  more specific

Well, seeing as you're not sharing the actual question with the mailing
list, this answer may not be exactly what you're after, but it's probably:

meta http-equiv=Pragma content=no-cache
meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Expires content=?=$a_GMT_date_in_the_past?

;-)

Cheers
Jon

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



RE: [PHP] Cache Control

2002-05-31 Thread Jon Haworth

Hi Jeroen,

 I want info on the internet where i can find a manuel.

http://www.google.com/search?q=http+cache+control+headers

 the page is a php script and sometimes it comes out of a proxy but
 that is not allowed.

It's not something you have absolute control over - some proxies are
configured to ignore your caching instructions anyway.

Cheers
Jon

PS. Please try and avoid using HTML mail on lists.

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




[PHP] Regular Expressions...

2002-05-31 Thread Brian McGarvie

All,

I have a text field that a user can enter text into, I then explode it
into an array, and ultimatley build a regular expression such as:

/(advance|racingx)|(advance|racingx)/i

for use in:

preg_match ($reg_expr, $file);

however the expression above doesnot yeild the required result, it will
match a string with any word, whereas i want to match strings with BOTH
words present.

example of the contents of $file that might pass is:

advance_racingx_14_4_29.pdf

another might be, which would not pass is:

advance_fork10_3_4_11.pdf

Thanks in advance for your help...

  Brian...

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




[PHP] Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread John Christopher


I would like to use PHP in a project for a United States
Government client.  The client is skeptical because PHP
is not a Microsoft product.  I'm looking for statistics and
links that show that PHP *is* currently in use by the
US Government.

Is PHP used by the U.S. Department of Defense?  Examples?

Is PHP a U.S. Military Standard?

Any stats or links would be most helpful.  Thank you.


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




[PHP] PHP-mysql: affected rows

2002-05-31 Thread Victor Spng Arthursson

Hi!

If I use the LIMIT 0, 9 at the end of a SQL-query, mysql will only return the first 
9 records from the database... But to determine wether or not to print out the next 
page, I need to know the total number of records matching the query... Is there a way 
of doing this without having to do a new query with COUNT in it..?

Sincerely

Victor


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




RE: [PHP] Replacing Number with Month(newbie)

2002-05-31 Thread John Holmes

You can use an array..
 
$month = array(January,February,March,April.);
 
echo $month[1];
 
Or put that into a function and use it like show_month(5);
 
---John Holmes.
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 5:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Replacing Number with Month(newbie)
 
Is there a magical function that I can use to convert 4 into April and 5
into May etc?
 
can I use mktime()
 
One yes no answer will do fine
 
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com



RE: [PHP] Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread John Holmes

It's being used by me. :)

It's not really accepted anywhere, but there are no regulations against
using it. I looked into it a little bit before I started writing my
current project. I don't know of any sites that are using it except for
mine (and it's intranet only). 

---John Holmes...

 -Original Message-
 From: John Christopher [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 8:08 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Is PHP used by U.S. Government? By U.S. DoD?
 
 
 I would like to use PHP in a project for a United States
 Government client.  The client is skeptical because PHP
 is not a Microsoft product.  I'm looking for statistics and
 links that show that PHP *is* currently in use by the
 US Government.
 
 Is PHP used by the U.S. Department of Defense?  Examples?
 
 Is PHP a U.S. Military Standard?
 
 Any stats or links would be most helpful.  Thank you.
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com
 
 --
 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] Run php function with user click

2002-05-31 Thread Dave Shacket

I know how to have my php code run a function within itself. But is there a
way that upon an event (clicking a button, etc.), you could run a php
function without having to go to a new page?



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




RE: [PHP] PHP-mysql: affected rows

2002-05-31 Thread John Holmes

No. Do one query with count(*), one with limit. If you're smart, you'll
save the total amount in a session somewhere so you only have to do that
query once, anyway.

---John Holmes...

 -Original Message-
 From: Victor SpÄng Arthursson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 8:16 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP-mysql: affected rows
 
 Hi!
 
 If I use the LIMIT 0, 9 at the end of a SQL-query, mysql will only
 return the first 9 records from the database... But to determine
wether or
 not to print out the next page, I need to know the total number of
 records matching the query... Is there a way of doing this without
having
 to do a new query with COUNT in it..?
 
 Sincerely
 
 Victor
 
 
 --
 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: Run php function with user click

2002-05-31 Thread Michael Davey

Not really, seeing as PHP is executed at the server and not on the client -
you would need JavaScript for this.

Mikey

Dave Shacket [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I know how to have my php code run a function within itself. But is there
a
 way that upon an event (clicking a button, etc.), you could run a php
 function without having to go to a new page?





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




[PHP] Go to a different web page?

2002-05-31 Thread Dave Shacket

I have stared at fopen for a long time but can't figure out how to get php
to pull in a new web page. I am looking for something akin to javascript
window.location command, just as if I typed a new page into my address bar.
What am I missing?



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




[PHP] Standalone PHP Binaries?

2002-05-31 Thread Jonathan Rosenberg

Can someone point me at a site that has pre-compiled binaries for
a standalone PHP interpreter?  In particular, I'm looking to use
one on Solaris.

TIA.

--
JR


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




Re: [PHP] Go to a different web page?

2002-05-31 Thread Justin French

on 31/05/02 10:43 PM, Dave Shacket ([EMAIL PROTECTED]) wrote:

 I have stared at fopen for a long time but can't figure out how to get php
 to pull in a new web page. I am looking for something akin to javascript
 window.location command, just as if I typed a new page into my address bar.
 What am I missing?

you are missing header('Location: blah.html') :)

read the manual page carefully, because header()'s have to be set before any
content is sent to the browser.

php.net/header


Justin French


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




RE: [PHP] Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

My company contracts for the National Institutes of Health and the National
Cancer Institute.  A group of us are developing a website for State Cancer
Profiles - ie, you want to see the trend of lung cancer in the Total US v.
Kentucky kinds of things.  All of the graphs that I'm working on are being
developed dynamically using PHP.  

Unfortunately, the site isn't public yet, so I can't send you a link.  We
should be live sometime this summer.  At that point in time it will be a
link off of www.cancer.gov.

Good luck!  If you want any more information, I'll see what I can get you
and your client.  I know examples of the site have been shown to people on
Capitol Hill, so it is possible I could send you the password for the test
site.  I'm not in a position to make those kinds of decisions :-)

-Natalie

-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 8:55 AM
To: 'John Christopher'; [EMAIL PROTECTED]
Subject: RE: [PHP] Is PHP used by U.S. Government? By U.S. DoD?


It's being used by me. :)

It's not really accepted anywhere, but there are no regulations against
using it. I looked into it a little bit before I started writing my current
project. I don't know of any sites that are using it except for mine (and
it's intranet only). 

---John Holmes...

 -Original Message-
 From: John Christopher [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 8:08 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Is PHP used by U.S. Government? By U.S. DoD?
 
 
 I would like to use PHP in a project for a United States Government 
 client.  The client is skeptical because PHP is not a Microsoft 
 product.  I'm looking for statistics and links that show that PHP *is* 
 currently in use by the US Government.
 
 Is PHP used by the U.S. Department of Defense?  Examples?
 
 Is PHP a U.S. Military Standard?
 
 Any stats or links would be most helpful.  Thank you.
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup 
 http://fifaworldcup.yahoo.com
 
 --
 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] Regular Expressions...

2002-05-31 Thread Michael Sims

On Fri, 31 May 2002 12:32:29 +0100, you wrote:

example of the contents of $file that might pass is:

advance_racingx_14_4_29.pdf

another might be, which would not pass is:

advance_fork10_3_4_11.pdf

If you need it to be in that specific order, use the following:

if(preg_match(/advance.*racingx/,$string)) {
  //do stuff
}

If the order doesn't matter, do this:

if(preg_match(/advance/,$string)  preg_match(/racingx/,$string))
{
  //do stuff
}

There may be some more efficient/elegant ways to do this, but the
above should yield the results you are looking for.



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




[PHP] PHP can not connect to mysql

2002-05-31 Thread andy

Hi there,

I am runningn suse72 and there was a mysql installation with the rpm
installed. so I did try to get rid of all the stuff I found from the old
mysql installation (with yast) and compiled mysql from source. Server is
running now. Unfotuantelly php is still trying to connect to the old
version. phpinfo tells me the old mysql version number.

This is what I am gettinng from php:

Warning: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2) in

Server is definatelly running. Not the old one though! I killed the old
process which was anyhow running.

Can anybody help on that?

Thank you very much in advance,

Andy



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




[PHP] Make stand alone php with FastZTrack

2002-05-31 Thread Qingjuan Gu

Hello,

I have installed the Netscape FastTrack and mySql on Unit Tru64. Now I want to install 
php also, Since our FastTrack and mySql have been used a year. I want to keep 
FastTrack and mysql, Does anybody have suggestion about how to make php under this 
circumstance?


Thank you very much.

Grace

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




RE: [PHP] Graphs using PHP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

Hi, Jason.

I'm developing some really cool line/point and bar graphs.  While the Image
stuff is definitely quite different, I think you'd really like it once you
get into it.  Our graphs are generated dynamically from data in a database.
I can't show you the graphs because they aren't ready for the public yet,
but on the line/point graph we actually have the points as different shapes
and stuff - circles, triangles, squares...  Once we get the new version of
PHP we'll be using styled lines (dot dash dash kinds of things) with a
width, so they will be easily copied in to PowerPoint presentations.

It's a lot of work to get it started, because you have to figure out where
you're going to want everything to go, but I recommend trying it.  Start by
drawing some rectangles and filled rectangles and stuff like that.

Oh, and when you use ImageTTFText, I recommend that for smaller fonts you
use -$fontColor instead of just $fontColor - it comes out clearer.  For
bigger fonts sometimes the blurry one is better because it's less pixilated.

Good luck!  If you need anything else, let me know!

-Natalie

-Original Message-
From: Jason Soza [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 1:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Graphs using PHP


Just want to run this by you all to check the feasibility of it.

I run a site that deals with cars, people can upload pics of their vehicle
and tell everyone else its year, color, 'generation', and where they're
located.

What I'd like to do is make some graphs on the front page that look like
gauges you'd see in a car, i.e. speedometer, tachometer, oil, etc. but these
would actually be graphs showing, for instance, how many of the cars on the
site are red, or whatever the most popular color is. So if a majority of the
cars were red, and red cars made up 57% of the total cars on the site, I'd
want a graphic of a speedometer with a needle that would be in a position
that represented 57%.

How difficult is this? I looked at some of the imagecreate() functions in
the manual, but they look like a language all their own and I'd like to know
if there's any easier way to do this that I'm overlooking. I'm thinking
doing some kind of image overlay is the way to go, but not sure. Any ideas
or pointers would be great, links to sample scripts would be excellent.
Thanks!

Jason Soza


-- 
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: PHP can not connect to mysql

2002-05-31 Thread Michael Davey

Check permissions on '/var/lib/mysql/mysql.sock'  I seem to remember having
this problem in the past...

Mikey

Andy [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi there,

 I am runningn suse72 and there was a mysql installation with the rpm
 installed. so I did try to get rid of all the stuff I found from the old
 mysql installation (with yast) and compiled mysql from source. Server is
 running now. Unfotuantelly php is still trying to connect to the old
 version. phpinfo tells me the old mysql version number.

 This is what I am gettinng from php:

 Warning: Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (2) in

 Server is definatelly running. Not the old one though! I killed the old
 process which was anyhow running.

 Can anybody help on that?

 Thank you very much in advance,

 Andy





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




Re: [PHP] PHP-mysql: affected rows

2002-05-31 Thread Chris Hewitt

Victor,

I'd do the count first anyway. Then you know whether you need to put up 
the next page links or not.

HTH
Chris

Victor SpÄng Arthursson wrote:

Hi!

If I use the LIMIT 0, 9 at the end of a SQL-query, mysql will only return the first 
9 records from the database... But to determine wether or not to print out the next 
page, I need to know the total number of records matching the query... Is there a 
way of doing this without having to do a new query with COUNT in it..?

Sincerely

Victor





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




[PHP] Re: PHP can not connect to mysql

2002-05-31 Thread andy

That is the wron socket. I found out that my mysql version is running on
socket /tmp/mysql.sock while the old one is running on
/var/lib/mysql/mysql.sock.

How can I tell php to connect with the other socket?

Thanx,

Andy



- Original Message -
From: Michael Davey [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 4:05 PM
Subject: Re: PHP can not connect to mysql


 Check permissions on '/var/lib/mysql/mysql.sock'  I seem to remember
having
 this problem in the past...

 Mikey

 Andy [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi there,
 
  I am runningn suse72 and there was a mysql installation with the rpm
  installed. so I did try to get rid of all the stuff I found from the old
  mysql installation (with yast) and compiled mysql from source. Server is
  running now. Unfotuantelly php is still trying to connect to the old
  version. phpinfo tells me the old mysql version number.
 
  This is what I am gettinng from php:
 
  Warning: Can't connect to local MySQL server through socket
  '/var/lib/mysql/mysql.sock' (2) in
 
  Server is definatelly running. Not the old one though! I killed the old
  process which was anyhow running.
 
  Can anybody help on that?
 
  Thank you very much in advance,
 
  Andy
 
 




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




Re: [PHP] Multiple queries

2002-05-31 Thread Analysis Solutions

Heya:

On Fri, May 31, 2002 at 09:55:27AM +0100, Caspar Kennerdale wrote:

 I have one table, with a name and info about the project and upto 5 
 urls of where the jpeg lies.

Are you talking about five fields in the table containing up to five
URI's for each project?  That's not cool.  You should normalize that
structure.  Put the project info in one table and then the URI's in
anohter.  This allows you to efficiently store as few or as many URI's
as your heart desires.


 Now, I then have a piece of javascript which tells frame 2 to update 
 itself.

And what about people looking at your site who don't have Java'sCrap 
running?


 So I have parsed the record ID to it and it then open a query to the
 database and outputs the relevant information about the artworks. Lastly a
 third query is also sent to the database to see if there are any other
 projects in the gallery by the same artist- and then create a list of
 related links.

Sounds right.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 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
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] Re: PHP can not connect to mysql

2002-05-31 Thread James Holden

@mysql_connect(localhost:/tmp/mysql,user,pass);


- James
--
W: www.londontown.com
@: [EMAIL PROTECTED]
--

-Original Message-
From: andy [mailto:[EMAIL PROTECTED]]
Sent: 31 May 2002 15:19
To: Michael Davey; [EMAIL PROTECTED]
Subject: [PHP] Re: PHP can not connect to mysql


That is the wron socket. I found out that my mysql version is running on
socket /tmp/mysql.sock while the old one is running on
/var/lib/mysql/mysql.sock.

How can I tell php to connect with the other socket?

Thanx,

Andy



- Original Message -
From: Michael Davey [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 4:05 PM
Subject: Re: PHP can not connect to mysql


 Check permissions on '/var/lib/mysql/mysql.sock'  I seem to remember
having
 this problem in the past...

 Mikey

 Andy [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi there,
 
  I am runningn suse72 and there was a mysql installation with the rpm
  installed. so I did try to get rid of all the stuff I found from the old
  mysql installation (with yast) and compiled mysql from source. Server is
  running now. Unfotuantelly php is still trying to connect to the old
  version. phpinfo tells me the old mysql version number.
 
  This is what I am gettinng from php:
 
  Warning: Can't connect to local MySQL server through socket
  '/var/lib/mysql/mysql.sock' (2) in
 
  Server is definatelly running. Not the old one though! I killed the old
  process which was anyhow running.
 
  Can anybody help on that?
 
  Thank you very much in advance,
 
  Andy
 
 




--
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: PHP can not connect to mysql

2002-05-31 Thread Michael Davey

Or edit php.ini:

mysql.default_socket = /tmp/mysql.sock


James Holden [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 @mysql_connect(localhost:/tmp/mysql,user,pass);


 - James
 --
 W: www.londontown.com
 @: [EMAIL PROTECTED]
 --

 -Original Message-
 From: andy [mailto:[EMAIL PROTECTED]]
 Sent: 31 May 2002 15:19
 To: Michael Davey; [EMAIL PROTECTED]
 Subject: [PHP] Re: PHP can not connect to mysql


 That is the wron socket. I found out that my mysql version is running on
 socket /tmp/mysql.sock while the old one is running on
 /var/lib/mysql/mysql.sock.

 How can I tell php to connect with the other socket?

 Thanx,

 Andy



 - Original Message -
 From: Michael Davey [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Friday, May 31, 2002 4:05 PM
 Subject: Re: PHP can not connect to mysql


  Check permissions on '/var/lib/mysql/mysql.sock'  I seem to remember
 having
  this problem in the past...
 
  Mikey
 
  Andy [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Hi there,
  
   I am runningn suse72 and there was a mysql installation with the rpm
   installed. so I did try to get rid of all the stuff I found from the
old
   mysql installation (with yast) and compiled mysql from source. Server
is
   running now. Unfotuantelly php is still trying to connect to the old
   version. phpinfo tells me the old mysql version number.
  
   This is what I am gettinng from php:
  
   Warning: Can't connect to local MySQL server through socket
   '/var/lib/mysql/mysql.sock' (2) in
  
   Server is definatelly running. Not the old one though! I killed the
old
   process which was anyhow running.
  
   Can anybody help on that?
  
   Thank you very much in advance,
  
   Andy
  
  
 
 


 --
 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] Why does the mail() function hang ?!?

2002-05-31 Thread Phil Schwarzmann

I'm using the mail() function, it sends the message properly but the
page hangs.
 
Has anyone else had this problem?
 
I'm not trying to send any bulk mail, just one message to one mailbox.
 
Thanks!!



RE: [PHP] Why does the mail() function hang ?!?

2002-05-31 Thread Jay Blanchard

Did you check your error log?

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 9:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Why does the mail() function hang ?!?


I'm using the mail() function, it sends the message properly but the
page hangs.
 
Has anyone else had this problem?
 
I'm not trying to send any bulk mail, just one message to one mailbox.
 
Thanks!!



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




[PHP] apache2filter.dll

2002-05-31 Thread Herman Pool

Hi all,

I have downloaded PHP4.2.1 because I want to use it with apache 2.0.36
But there is no php/experimental/apache2filter.dll  file in PHP4.2.1
Did I miss something?

With kind regards,

Herman





**
Dit bericht en alle eventueel meegestuurde documenten
zijn vertrouwelijk en alleen bestemd voor degene aan wie
het bericht geadresseerd is. Indien u dit bericht heeft
ontvangen terwijl u niet de geadresseerde bent, verzoeken
wij u het bericht te vernietigen en ons daarvan in kennis te
stellen.

Dit bericht is tevens gecontroleerd op computervirussen.

This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this e-mail 
in error, please delete the message and notify us.

This e-mail message has been swept by MIMEsweeper for
the presence of computer viruses.
**

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




[PHP] Class variables and scope

2002-05-31 Thread Michael Davey

Can anyone here shed some light on this issue?

I have a class which is responsible for it's own database access and (some
of it) is initalised as below:

?
class myClass
{
var $conn;
var $sth;
// etc...

function myClass ($db)
{
$host = localhost;
$user = user_name;
$password = password;
$this-conn = mysql_connect ($host, $user, $pwd)
or die (Unable to connect to database);
$sel = mysql_select_db ($db, $this-conn);
if (!$sel) die (Unable to select database);
return true;
}

// rest of the class
}
?

Now, say for example the class is used as per the script below:

?
require (myClass.class);
$c1 = new myClass (first_database);
$c2 = new myClass (second_database);

// error here
$c1-doSomething();
?

When I try to work with the first instance of my class, I get an error which
I finally tracked down to it trying to run it's SQL queries against the
database defined in $c2.  Now, I was under the impression that class
variables were private to each instance, however, this seems to be acting
like a static var.

Help?!?

Mikey



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




[PHP] Re: apache2filter.dll

2002-05-31 Thread Michael Davey

It is called php4apache2.dll

Mikey

Herman Pool [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi all,

 I have downloaded PHP4.2.1 because I want to use it with apache 2.0.36
 But there is no php/experimental/apache2filter.dll  file in PHP4.2.1
 Did I miss something?

 With kind regards,

 Herman





 **
 Dit bericht en alle eventueel meegestuurde documenten
 zijn vertrouwelijk en alleen bestemd voor degene aan wie
 het bericht geadresseerd is. Indien u dit bericht heeft
 ontvangen terwijl u niet de geadresseerde bent, verzoeken
 wij u het bericht te vernietigen en ons daarvan in kennis te
 stellen.

 Dit bericht is tevens gecontroleerd op computervirussen.

 This e-mail and any files transmitted with it are confidential
 and intended solely for the use of the individual or entity to
 whom they are addressed. If you have received this e-mail
 in error, please delete the message and notify us.

 This e-mail message has been swept by MIMEsweeper for
 the presence of computer viruses.
 **



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




[PHP] gd project question

2002-05-31 Thread Michael Geier

I have the following issue:

I am making a gas guage based on a percentage.
ie.  
- a 180 degree arc is created
- the range will be 0 to n (undetermined ammount)
- there will be x number of entries
- the needle will pount to a a percentage 
  for (int)floor((x / n) * 100)

The issue is, I have the starting pt for the needle (imagefilledarc 
needs the center of the 'circle' as the starting pt, which is where 
the needle will start too), but how would I get the x|y coordinates 
for the end of the needle based on a perentage of a half-circle 
(180 degree arc)?

Appreciate any clues or ideas.

---
Michael Geier


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




Re: [PHP] Class variables and scope

2002-05-31 Thread Stuart Dallas

On Friday, May 31, 2002 at 4:11:42 PM, you wrote:
 When I try to work with the first instance of my class, I get an error which
 I finally tracked down to it trying to run it's SQL queries against the
 database defined in $c2.  Now, I was under the impression that class
 variables were private to each instance, however, this seems to be acting
 like a static var.

You need to specify $this-conn in each mysql_* function you call otherwise it
will be called against the last connection made.

-- 
Stuart


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




Re: [PHP] Class variables and scope

2002-05-31 Thread Michael Davey

I am doing that - sorry, should have given you a bit more code...

?
class myClass
{
var $conn;
var $sth;
// etc...

function myClass ($db)
{
$host = localhost;
$user = user_name;
$password = password;
$this-conn = mysql_connect ($host, $user, $pwd)
or die (Unable to connect to database);
$sel = mysql_select_db ($db, $this-conn);
if (!$sel) die (Unable to select database);
return true;
}

function doSomething ()
{
$sql = select * from table;
$this-sth = mysql_query ($sql, $this-conn);
// do something with query...
}
}
?

Is there something inherently static about msql connections?

Mikey

Stuart Dallas [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Friday, May 31, 2002 at 4:11:42 PM, you wrote:
  When I try to work with the first instance of my class, I get an error
which
  I finally tracked down to it trying to run it's SQL queries against the
  database defined in $c2.  Now, I was under the impression that class
  variables were private to each instance, however, this seems to be
acting
  like a static var.

 You need to specify $this-conn in each mysql_* function you call
otherwise it
 will be called against the last connection made.

 --
 Stuart




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




[PHP] Re: gd project question

2002-05-31 Thread Michael Davey

I believe you will need to use sin and cos to do this...

I experimented with drawing circles in javascript (sorry, it's not PHP but
you can see the concept) and ended up with this:

  for (j = 0; j = 360; j += (360 / 10))
  {
// x1  y1 are offset values
var s = x1 + radius * Math.cos (j);
var t = y1 + radius * Math.sin (j);
setLayer (layer_count, s, t);
layer_count++;
  }

You would be able to work out the angle by making it a percentage of 180
degrees - although for horizontal gauges, you would need to offset it
by -90.

Hope this helps...

Mikey

Michael Geier [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have the following issue:

 I am making a gas guage based on a percentage.
 ie.
 - a 180 degree arc is created
 - the range will be 0 to n (undetermined ammount)
 - there will be x number of entries
 - the needle will pount to a a percentage
   for (int)floor((x / n) * 100)

 The issue is, I have the starting pt for the needle (imagefilledarc
 needs the center of the 'circle' as the starting pt, which is where
 the needle will start too), but how would I get the x|y coordinates
 for the end of the needle based on a perentage of a half-circle
 (180 degree arc)?

 Appreciate any clues or ideas.

 ---
 Michael Geier




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




[PHP] Form content type missing, how to fetch variables?

2002-05-31 Thread Simon Troup

How do you fetch posted form variables from a request that does not have
content type in the headers? I mean, instead of having Content-Type:
x-www-form-urlencoded or something similar, there is nothing - just the raw
data. How can I parse that?

Regards

SImon


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




[PHP] PHP Decisions and Issues

2002-05-31 Thread Justin Felker

Hello to everyone.  This email will probably be quite lengthy so please 
bear with me.  What I am asking is quite important to me, so I will try to 
be as detailed as possible.

I have spent the last hour pouring over this list's archive.  I have found 
some great information and a lot of you appear to be quite helpful.  I just 
want to thank everyone in advance for their help.  If I have missed 
something obvious or my question is redundant, then please point me towards 
the appropriate links and I will read them right away.

I, along with several other people am starting a business which will depend 
heavily on its web presence.  Unfortunately, I am in the all too common 
position of having to make technical decisions that will have repercussions 
on the future well-being of said business, with little to no budget.  It is 
crucial that the solution I pick, handle what we hope will become a very 
large load in the not-to-distant future (whether this happens or not is a 
question for another day, heh).  To this end, I am very interested in using 
the LAMP (Linux+Apache+MySQL+PHP) approach.  I have experience with all of 
these technologies, but I am definitely not in a position to vouch for 
their worthiness for use in a large scale application running beneath a 
heavy load.

To quantify LAMP's ability, is it appropriate for say, sites that generate 
on the order of 5 million unique hits per day?  If not, where would you 
draw the line?  At 500,000?  Or 1 million?  If so, how much higher could it 
go possibly?  10 million?  20?

Keep in mind that we have no problem heavily optimizing the application 
(code tweaks, cacheing, etc).

We looked into and even began development in JSP w/ Tomcat but found Tomcat 
to be exceedingly unstable for production use (not that it was ever really 
meant for it).   And of course, the other available application servers 
were well beyond our budget.  Also, time constraints have forced us to look 
for a faster-to-develop alternative.

Just a couple of details about the application we intend to develop.  It 
will be very database intensive (many queries per page) and will also 
provide real-time payment support (for which transactions are a must).

So, what say you?  Given all that I have said, is LAMP appropriate?  Will 
PHP and maybe even more importantly, MySQL be able to scale well?  I have 
no doubt that MySQL is fast, but just how scaleable is it?  Will it die 
beneath the kind of loads I have described?

What would be *most* helpful to me is if you could provide web sites that 
exist currently and experience this load and are using LAMP 
(http://www.sourceforge.net?).

I hope you are still with me!  Thanks a lot for taking the time to read 
this and I would appreciate greatly any help that can provide.

Thanks.

Justin


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




[PHP] MS SQL Problem

2002-05-31 Thread Justin Felker

Last night, I ran into a problem when using the MS SQL support in PHP under 
Apache/PHP module/MS SQL 2000.  Everything worked well enough.  I was able 
to connect to the server, query data, and a number of other 
things.  However, I found that if I ran my test page (it connects to, 
queries and displays 20 rows of data, then disconnects) over and over very 
quickly (hold CTRL+R down basically) PHP would eventually (after about 6 
seconds) fail to connect to the MS SQL server.  In fact, the web server 
would have to be completely restarted before it could connect again.

Has anyone run into this?  I mean, if there is no solution to this and is 
the cause of basically shaky MS SQL support, then the SQL server would be 
made useless for sites with even a modest amount of traffic (several 
requests per second).  Is this a known problem?  If so, could anyone help 
me out?

Thanks!

Justin


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




[PHP] bzip/zlib question

2002-05-31 Thread Michael Davey

I have been looking through the documentation for using Bzip2 or zlib
compression and have a couple of questions for the group...

1.Which is best to use on terms of: resultant file size, availability of
decompression clients  ease of use?

2.Both bzip  zlib documentation makes use of *write() functions to add
strings to the file, but can this be used to add files?

3.I intend to add two or more zip files to the archive so that the
client only needs to download one file rather than several- which is most
suited to this - zlib or bzip2?

Mikey



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




[PHP] Class/Objects

2002-05-31 Thread Gerard Samuel

Im still green with writing with class, but I just want to check with
you all.
I started creating a class file that also using 2 other classes.
class.php
---
?php

class foo
{
 function foo()
 {
 require_once('./this.class.php');
 $this-db_obj = new abc($db);

 require_once('./that.class.php');
 $this-tpl_obj = new xwy;
 }
}

?
--

Then in my actual page I started this
--
?php

require_once('./class.php');
$bar = new foo();

$bar-db_obj-run_some_code($bar);
$bar-tpl_obj-do_this_for_me($bar);

?


It works but was wondering if its 'legal' to use it like this -
$lcre-db_obj-run_some_code($bar);
$lcre-tpl_obj-do_this_for_me($bar);

Im not extending the classes, just using them, so is what Im doing ok??
Thanks

-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/




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




Re: [PHP] MS SQL Problem

2002-05-31 Thread Sqlcoders.com Programming Dept

Hiya,
were you using the appropriate free_query  close functions to free up the
memory  more importantly the socket used to talk to the sql server?

You might want to try using the _pconnect function if it's available instead
of the usual _connect statement.

I'd guess that PHP ran out of sockets to make outbound connections with.
Also, I believe that MSSQL is setup to only have around 1000 max connections
open unless you alter the value in the config.

HTH,
Dw


Sqlcoders.com Dynamic data driven web solutions
- Original Message -
From: Justin Felker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: May 31 2002 08:46 AM
Subject: [PHP] MS SQL Problem


 Last night, I ran into a problem when using the MS SQL support in PHP
under
 Apache/PHP module/MS SQL 2000.  Everything worked well enough.  I was able
 to connect to the server, query data, and a number of other
 things.  However, I found that if I ran my test page (it connects to,
 queries and displays 20 rows of data, then disconnects) over and over very
 quickly (hold CTRL+R down basically) PHP would eventually (after about 6
 seconds) fail to connect to the MS SQL server.  In fact, the web server
 would have to be completely restarted before it could connect again.

 Has anyone run into this?  I mean, if there is no solution to this and is
 the cause of basically shaky MS SQL support, then the SQL server would be
 made useless for sites with even a modest amount of traffic (several
 requests per second).  Is this a known problem?  If so, could anyone help
 me out?

 Thanks!

 Justin


 --
 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] Newbie question : PHP variables are not posted by this

2002-05-31 Thread Frédérick St-Hilaire

It a BASIC question,

With the following:

FORM NAME='Job_Application' ACTION=job_action.php METHOD=post
ENCTYPE=multipart/form-data
INPUT TYPE=text NAME=name
 Name : BR
INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=20
INPUT TYPE=FILE NAME=userfileBRBR
INPUT TYPE=submit NAME=enter VALUE=SendBR
INPUT TYPE=reset value=reset name=resetBR
/FORM

With the job_action.php I want to display the resaults to the user.

But the variable name is empty.

What's the problem?

Thanks

Frédérick St-Hilaire



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




[PHP] Re: Class/Objects

2002-05-31 Thread Michael Davey

I believe so - but why are you passing a the object a reference to itself?

 $bar-db_obj-run_some_code($bar);
 $bar-tpl_obj-do_this_for_me($bar);

If you need to access parts of the object from within, use the $this-
pointer.

 It works but was wondering if its 'legal' to use it like this -
 $lcre-db_obj-run_some_code($bar);
 $lcre-tpl_obj-do_this_for_me($bar);

This looks like it makes more sense as you are passing a reference to $bar
into $lcre - as long as your function is setup to accept this type of object
and knows what to do with it.

Mikey



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




[PHP] Re: Newbie question : PHP variables are not posted by this

2002-05-31 Thread Michael Davey

Can you send the code that is failing to the list - it will help in working
out the problem...

Mikey

FréDéRick St-Hilaire [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 It a BASIC question,

 With the following:

 FORM NAME='Job_Application' ACTION=job_action.php METHOD=post
 ENCTYPE=multipart/form-data
 INPUT TYPE=text NAME=name
  Name : BR
 INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=20
 INPUT TYPE=FILE NAME=userfileBRBR
 INPUT TYPE=submit NAME=enter VALUE=SendBR
 INPUT TYPE=reset value=reset name=resetBR
 /FORM

 With the job_action.php I want to display the resaults to the user.

 But the variable name is empty.

 What's the problem?

 Thanks

 Frédérick St-Hilaire





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




[PHP] diplaying the path

2002-05-31 Thread Kris Vose

Is there a variable/function in php that will display the url location of the 
hyper-link that brought them to the current page.  Thanks in advance.
 
Kris Vose 



Re: [PHP] Re: Class/Objects

2002-05-31 Thread Gerard Samuel

The first example was a mistake.  The second is a correct example.
I just wasn't sure on the proper format $this-that-foo($bar), if it is 
technically correct...
Thanks


Michael Davey wrote:

I believe so - but why are you passing a the object a reference to itself?

  

$bar-db_obj-run_some_code($bar);
$bar-tpl_obj-do_this_for_me($bar);


.
If you need to access parts of the object from within, use the $this-
pointer.

  

It works but was wondering if its 'legal' to use it like this -
$lcre-db_obj-run_some_code($bar);
$lcre-tpl_obj-do_this_for_me($bar);



This looks like it makes more sense as you are passing a reference to $bar
into $lcre - as long as your function is setup to accept this type of object
and knows what to do with it.

Mikey



  


-- 
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/




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




Re: [PHP] Re: Newbie question : PHP variables are not posted by this

2002-05-31 Thread Stuart Dallas

On Friday, May 31, 2002, 5:17:49 PM, you wrote:
 Can you send the code that is failing to the list - it will help in working
 out the problem...

And include your platform details (OS, PHP version, etc).

-- 
Stuart


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




Re: [PHP] Undefined variables

2002-05-31 Thread Philip Olson


Another similar way, using an array (very simple to 
add tasks):

  $tasks = array('ShowVersion','GetData','CreateImage');

  if (@in_array($_REQUEST['Task'], $tasks)) {
  // add some error checking here (function_exists())
  $$Task();
  } else {
  // maybe run a default task here
  print unknown task;
  }

Am using @ in case 'Task' doesn't exist at all, so no 
error will be seen (undefined variables create E_NOTICE 
level errors).  Although you may want to check this before 
Task even reaches in_array(), with empty().  See also:

  http://www.php.net/error_reporting

$$Task() is a variable function:

  http://uk.php.net/manual/functions.variable-functions.php

And $_REQUEST is a PHP predefined/reserved variable that 
contains a mix of Get, Post and Cookie data.  This may or 
may not be appropriate here:
 
  http://au.phpz.net/manual/language.variables.predefined.php

On a sidenote (picky), consider making variables all 
lowercase. Also when printing a single var, no need to 
surround it with quotes.  print $foo.

Regards,
Philip Olson

On Fri, 31 May 2002, Christopher J. Crane wrote:

 I like this piece of code. In fact, I convert all my scripts that use the
 older If/Else  code. What would happen if the break;  wasn't used. Would
 it just continue through the rest of the function to find another match???
 
 Miguel Cruz [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  On Thu, 30 May 2002, Crane, Christopher wrote:
   if ($Task == ShowVersion) { function ShowVersion(); }
   elseif ($Task == GetData) { function GetData(); print $DataOutput; }
   elseif ($Task == CreateImage) { function CreateImage(); }
   else { print Incorrect Variable or no Variable Suppliesbr; }
 
  if (isset($Task))
  {
switch($Task)
{
case 'ShowVersion':
  ShowVersion();
  break;
case 'GetData':
  GetData;
  print $DataOutput;
  break;
case 'CreateImage':
  CreateImage();
  break;
default:
  print 'Unknown function';
}
  } else {
print 'No function supplied';
  }
 
 
 
 
 
 -- 
 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] gd project question

2002-05-31 Thread Darren Gamble

Good day,

Wow, a high school math question.

You should use asin() and acos() of the angle to get the y and x
differentials, respectively.  Multiply the result by the size of the needle.

This assumes that your guage is oriented horizontally, and the needle sweeps
from right to left, pointing upwards.  Adjust the sign or switch the
functions around if your gauge is different.

Note that the functions operate in radians (2*pi radians == 360 degrees).


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


 -Original Message-
 From: Michael Geier [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 9:18 AM
 To: Php-General
 Subject: [PHP] gd project question
 
 
 I have the following issue:
 
   I am making a gas guage based on a percentage.
   ie.  
   - a 180 degree arc is created
   - the range will be 0 to n (undetermined ammount)
   - there will be x number of entries
   - the needle will pount to a a percentage 
 for (int)floor((x / n) * 100)
 
   The issue is, I have the starting pt for the needle 
 (imagefilledarc 
   needs the center of the 'circle' as the starting pt, 
 which is where 
   the needle will start too), but how would I get the x|y 
 coordinates 
   for the end of the needle based on a perentage of a half-circle 
   (180 degree arc)?
   
 Appreciate any clues or ideas.
 
 ---
 Michael Geier
 
 
 -- 
 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] Undefined variables

2002-05-31 Thread Darren Gamble

Good day,

I don't have a piece of code off the top of my head, but you'll get lots of
results and examples if you enter those variables into www.php.net 's search
field and search the online documentation (which is very, very good, I
should add).

Hope that helps.


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


 -Original Message-
 From: Christopher J. Crane [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 30, 2002 8:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Undefined variables
 
 
 Darren,
 Thanks for the tip on direction to head in. Could you provide 
 an example of
 what you are referring to?
 
 
 Darren Gamble [EMAIL PROTECTED] wrote in message
 078EC26E265CD411BD9100508BDFFC860ED3E64E@shawmail02">news:078EC26E265CD411BD9100508BDFFC860ED3E64E@shawmail02...
  Good day,
 
  Just to clarify, Perl will, in fact, complain if you have undefined
  variables (or variables that you use once) if you have 
 warnings and/or
  strict mode in effect.  Using at least one is strongly recommended.
 
  In PHP, the method you're using for getting form data is 
 deprecated.  You
  should use $HTTP_POST_VARS or $_POST, depending on your 
 version.  Check
 the
  docco for more info on those.
 
  If you really have to check variables using this method, 
 use isset() to
 see
  if the variables ... have been set. =)
 
  
  Darren Gamble
  Planner, Regional Services
  Shaw Cablesystems GP
  630 - 3rd Avenue SW
  Calgary, Alberta, Canada
  T2P 4L4
  (403) 781-4948
 
 
   -Original Message-
   From: Crane, Christopher [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, May 30, 2002 3:07 PM
   To: '[EMAIL PROTECTED]'
   Subject: [PHP] Undefined variables
  
  
   I have an annoying problem, that I know is my own ignorance
   to PHP. I came
   from PERL and this was not a problem there but is with PHP.
  
   Here's the issue.
   I have a number of scripts that use a index.php?Task='some
   sort of task
   name', for example, http://www.foo.com/index.php?Task=ShowVersion
   http://www.foo.com/index.php?Task=ShowVersion .  Then I use
   an if/else
   statement to tell the script what to do if it sees the
   ShowVersion variable.
   In the ShowVersion example, I would call a function that 
 displays the
   version information I defined in the script. As a back up, I
   always provide
   an else statement to catch variables I have no functions for.
  
   If I have a ShowVersion function, GetData function and a 
 CreateImage
   function and the Task variable is empty or a variable that
   does not exists
   comes in like http://www.foo.com/index.php?Task=SomethingDumb
   http://www.foo.com/index.php?Task=SomethingDumb  it 
 would go to the
   default function of something by using the ELSE part of 
 the if/else
   statements.
  
   I hope I am describing this correctly.now here is the
   problem. If I have
   warnings turned on, or if I have a log written for warnings,
   the log fills
   up if someone goes to http://www.foo.com/index.php
   http://www.foo.com/index.php  or http://www.foo.com
  http://www.foo.com
  will error messages like undefine variable TASK on line 
 255. I understand
  the reason, that PHP was expecting the variable Task when 
 it got to the
  if/else statements. So I put in something like if(!($Task)) 
 { function
  Something(); } but it still is looking for the variable so it still
 errors.
 
  In Perl, it would simply be ignored. What do I do here.
 
  Here is a simple example of the code.
 
  if ($Task == ShowVersion) { function ShowVersion(); }
  elseif ($Task == GetData) { function GetData(); print 
 $DataOutput; }
  elseif ($Task == CreateImage) { function CreateImage(); }
  else { print Incorrect Variable or no Variable Suppliesbr; }
 
 
 
 
 
  Christopher J. Crane
  Network Operations Manager
 
  IKON Office Solutions
  860.659.6464
 
 
 
 
 
 -- 
 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: diplaying the path

2002-05-31 Thread Michael Davey

$_SERVER['HTTP_REFERRER']

Kris Vose [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there a variable/function in php that will display the url location of
the hyper-link that brought them to the current page.  Thanks in advance.

 Kris Vose




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




[PHP] Re: Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread Philip Hallstrom

U.S. Naval Research Laboratory's Intranet relies on PHP

http://www.zend.com/zend/cs/csnavalready.php


On Fri, 31 May 2002, John Christopher wrote:


 I would like to use PHP in a project for a United States
 Government client.  The client is skeptical because PHP
 is not a Microsoft product.  I'm looking for statistics and
 links that show that PHP *is* currently in use by the
 US Government.

 Is PHP used by the U.S. Department of Defense?  Examples?

 Is PHP a U.S. Military Standard?

 Any stats or links would be most helpful.  Thank you.


 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com

 --
 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] Working with ip addresses and address space

2002-05-31 Thread Chris Knipe

Hi all,

anyone know of any good pre-written classes or functions to work with IP
address space?

I'm looking for things which can verify correct notation of IP addresses
(fine, that's easy enough), but also verify things like network addresses,
broadcast addresses, and work out subnet masks when a start and end IP
address is given...

Any ideas?  I'm sure I can just write my own... But it's going to save me
allot of time if something like this is out there already for me to use.

--
me



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




[PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

I just tried to open the PHP link about the Navy.  I'm running IE6 (freshly
installed today, so no tweaks have been made) with Win2000.  When I clicked
on the link in the email, a locate link window came up (similar to an open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[EMAIL PROTECTED] 

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




Re: [PHP] diplaying the path

2002-05-31 Thread Jim lucas

depending on what version of php you are running, you can use
$GLOBALS['HTTP_REFERER'] or on newer versions you can use
$_SERVER['HTTP_REFERER']

Jim Lucas
- Original Message -
From: Kris Vose [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 9:19 AM
Subject: [PHP] diplaying the path


 Is there a variable/function in php that will display the url location of
the hyper-link that brought them to the current page.  Thanks in advance.

 Kris Vose



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




Re: [PHP] Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread Miguel Cruz

On Fri, 31 May 2002, John Christopher wrote:
 I would like to use PHP in a project for a United States
 Government client.  The client is skeptical because PHP
 is not a Microsoft product.  I'm looking for statistics and
 links that show that PHP *is* currently in use by the
 US Government.
 
 Is PHP used by the U.S. Department of Defense?  Examples?
 
 Is PHP a U.S. Military Standard?

I used PHP when I worked for the US government. No inquests were launched.

Here are some random government PHP pages pulled off a quick Google 
search:

http://eire.census.gov/popest/estimates.php
http://www.oig.dot.gov/docs_by_area.php?area=8
http://mdn.arm.gov/web/webutil/lib/suitetoc.php?suite=dscomponent=hands
http://www.aps.anl.gov/epics/php.php?format=printer
http://kinetics.nist.gov/index.php
http://pacer.ca6.uscourts.gov/index.php
http://www.mbda.gov/templates/inside.php?content_id=624

And some in .mil...

http://futures.hua.army.mil/privacy.php
https://projects.nrl.navy.mil/epi/sign_up.php
http://hafb2.hill.af.mil/museum/entry.php
http://www.estripes.osd.mil/billing/Matches/01Matches.php
http://pf.itd.nrl.navy.mil/docman/display_doc.php?docid=2129group_id=1
http://housing.cnfj.navy.mil/waitinglist.php

miguel


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




[PHP] !----XML Parsing

2002-05-31 Thread Crane, Christopher

Here is a piece of code, that is close to doing what I want it to.
The end result I would like to have is an array that is simple to work with.
If the XML tag was issue-nameRED HAT/issue-name, I would like something
like the following:
 
$Tags['issue-name']. So I could print it out. Something like, print
$Tags['issue-name']br\n;
 
I was able to get a numerical representation of the array like, $Tags[5] and
the value of that tag was RED HAT, but then I would have to know what the
position of the data I am looking for in the array. I would prefer to know
the tag name and the array and get to the data that way. I know there is a
way to do this, but I just can't figure it out. There is a lot of
information on Parsing the XML file but not getting into a useful array, or
at least that I have found easily to understand.
 
 
if(!isset($Sym)) { $Sym = 'IKN'; }
$URI = 'http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksymbol=';
$simple = implode( '', file($URI$Sym));
 
$p = xml_parser_create();
xml_parse_into_struct($p,$simple,$vals,$index);
xml_parser_free($p);
//echo Index array\n;
//print_r($index);
//echo \nVals array\n;
//print_r($vals);

Christopher J. Crane
Network Operations Manager

IKON Office Solutions
860.659.6464

 



Re: [PHP] Run php function with user click

2002-05-31 Thread Michael Sweeney

On Friday 31 May 2002 05:44, you wrote:
 I know how to have my php code run a function within itself. But is there a
 way that upon an event (clicking a button, etc.), you could run a php
 function without having to go to a new page?

No. PHP is a server side application. The only way to run a function or php 
program is to send a request to the server. When you do that the server sends 
back a response and your broswer refreshes the page. 

..michael..

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




Re: [PHP] PHP Decisions and Issues

2002-05-31 Thread Miguel Cruz

On Fri, 31 May 2002, Justin Felker wrote:
 I have spent the last hour pouring over this list's archive.

(Not a flame, but I keep seeing this recently. The word is poring.)

 I, along with several other people am starting a business which will depend 
 heavily on its web presence.  Unfortunately, I am in the all too common 
 position of having to make technical decisions that will have repercussions 
 on the future well-being of said business, with little to no budget.  It is 
 crucial that the solution I pick, handle what we hope will become a very 
 large load in the not-to-distant future (whether this happens or not is a 
 question for another day, heh).  To this end, I am very interested in using 
 the LAMP (Linux+Apache+MySQL+PHP) approach.  I have experience with all of 
 these technologies, but I am definitely not in a position to vouch for 
 their worthiness for use in a large scale application running beneath a 
 heavy load.
 
 To quantify LAMP's ability, is it appropriate for say, sites that generate 
 on the order of 5 million unique hits per day?  If not, where would you 
 draw the line?  At 500,000?  Or 1 million?  If so, how much higher could it 
 go possibly?  10 million?  20?

 . . .

 So, what say you?  Given all that I have said, is LAMP appropriate?  Will 
 PHP and maybe even more importantly, MySQL be able to scale well?  I have 
 no doubt that MySQL is fast, but just how scaleable is it?  Will it die 
 beneath the kind of loads I have described?

It's really difficult to answer this question without knowing a lot more
about your application. But as a casual guess, if you reach that sort of
traffic level, I'd say your stumbling block is going to by MySQL. At some 
point - granted, that point can be far away if you design your database 
and queries well - it will buckle under load.

I'm too busy actually working, unfortunately, to pay attention to the 
bleeding edge developments in MySQL. But as it stands, there's no serious 
support for clustering, which means that when you are pushing more 
transactions than can be handled by the most expensive single machine you 
can afford, you've hit a brick wall. And as you know, there is a point 
after which multiple lesser-powered machines are a whole lot cheaper than 
a single mighty one.

If your database transactions are mostly read-only, and you can segregate
the infrequent write transactions to a separate server, you can do
jury-rigged replication of the main data store and scale indefinitely.

Otherwise, you'll probably have to plan with an eye to a migration path 
toward Oracle, DB2, or whatever. This doesn't mean you can't start out 
with MySQL, but it does mean you should develop with a database 
abstraction layer and shouldn't depend on features that are fast in MySQL 
but poorly supported by other databases (or emulated in the abstraction 
layer).

As for Linux, Apache, and PHP, there's no limit to the transaction volume 
you can handle with even rudimentary load-balancing tactics, so that's 
nothing to worry about. 

miguel


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




RE: [PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Jaime Bozza

Natalie,
   I'm using Outlook XP here and the link opens just fine.  The only
time I get that locate link browser window is if I hold the shift-key
down when clicking on the link.  (I typically link to open links in new
windows, so I hold the shift-key when clicking links - It will open the
link in a new browser window.)

   If you weren't hitting the shift-key, it could be possible that one
of your shift-keys are stuck, which is emulating the shift-click.  Not
much more I can tell you other than that, since the link (and all
others) work just fine for me in Outlook XP.


Jaime Bozza


-Original Message-
From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 12:16 PM
To: [EMAIL PROTECTED]
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS)
Subject: [PHP] PHP URLs not opening from email in Outlook XP


I just tried to open the PHP link about the Navy.  I'm running IE6
(freshly
installed today, so no tweaks have been made) with Win2000.  When I
clicked
on the link in the email, a locate link window came up (similar to an
open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is
that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the
unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to
prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[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




Re: [PHP] bzip/zlib question

2002-05-31 Thread Miguel Cruz

On Fri, 31 May 2002, Michael Davey wrote:
 I have been looking through the documentation for using Bzip2 or zlib
 compression and have a couple of questions for the group...
 
 1.  Which is best to use on terms of: resultant file size, availability
 of decompression clients  ease of use?

File size: bzip2 wins, hands down
Client availability: zlib wins, hands down
Easy of use: tie.

miguel


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




RE: [PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

My shift key isn't stuck.  I don't know what's wrong.  I found out that one
other person had a problem with it at my company and apparently one of the
techies put it on MS's technet group.  Hopefully something will come of it.


Thanks for your help!

-Natalie

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 1:49 PM
To: Leotta, Natalie (NCI/IMS)
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS);
[EMAIL PROTECTED]
Subject: RE: [PHP] PHP URLs not opening from email in Outlook XP


Natalie,
   I'm using Outlook XP here and the link opens just fine.  The only time I
get that locate link browser window is if I hold the shift-key down when
clicking on the link.  (I typically link to open links in new windows, so I
hold the shift-key when clicking links - It will open the link in a new
browser window.)

   If you weren't hitting the shift-key, it could be possible that one of
your shift-keys are stuck, which is emulating the shift-click.  Not much
more I can tell you other than that, since the link (and all
others) work just fine for me in Outlook XP.


Jaime Bozza


-Original Message-
From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 12:16 PM
To: [EMAIL PROTECTED]
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS)
Subject: [PHP] PHP URLs not opening from email in Outlook XP


I just tried to open the PHP link about the Navy.  I'm running IE6 (freshly
installed today, so no tweaks have been made) with Win2000.  When I clicked
on the link in the email, a locate link window came up (similar to an open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[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




Re: [PHP] Run php function with user click

2002-05-31 Thread Miguel Cruz

On Fri, 31 May 2002, Dave Shacket wrote:
 I know how to have my php code run a function within itself. But is there a
 way that upon an event (clicking a button, etc.), you could run a php
 function without having to go to a new page?

javascript onclick or whatever can call a PHP program on your server.

miguel


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




Re: [PHP] Working with ip addresses and address space

2002-05-31 Thread Rasmus Lerdorf

ip2long and long2ip and a bit of bitwise logic is really all you need.

-Rasmus

On Fri, 31 May 2002, Chris Knipe wrote:

 Hi all,

 anyone know of any good pre-written classes or functions to work with IP
 address space?

 I'm looking for things which can verify correct notation of IP addresses
 (fine, that's easy enough), but also verify things like network addresses,
 broadcast addresses, and work out subnet masks when a start and end IP
 address is given...

 Any ideas?  I'm sure I can just write my own... But it's going to save me
 allot of time if something like this is out there already for me to use.

 --
 me



 --
 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] gd project question

2002-05-31 Thread Michael Geier

Did I mention I hate math [grin]...
ok...so here we go so far...

I am passing a variable diameter of the arc ($d),
the total number of widgets possible ($n),
and the number of current widgets ($x)

so let's say $d = 100
 $n = 100
 $x = 50

 $perc = $x / $n (0.50 or 50 %)

 degree conversion = # * (180/M_PI)

 asin($perc) converted to degrees = 30
 acos($perc) converted to degrees = 60

my arc runs from 180 deg. to 360/0 degree, or left to right, pointing
upwards (upside down U).
i guess I am not getting my head around the numbers...is there anywhere on
the net that has a good thorough description about a process like this?

Thx.
mike

 -Original Message-
 From: Darren Gamble [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 31, 2002 11:40 AM
 To: 'Michael Geier'; Php-General
 Subject: RE: [PHP] gd project question


 Good day,

 Wow, a high school math question.

 You should use asin() and acos() of the angle to get the y and x
 differentials, respectively.  Multiply the result by the size of
 the needle.

 This assumes that your guage is oriented horizontally, and the
 needle sweeps
 from right to left, pointing upwards.  Adjust the sign or switch the
 functions around if your gauge is different.

 Note that the functions operate in radians (2*pi radians == 360 degrees).

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


  -Original Message-
  From: Michael Geier [mailto:[EMAIL PROTECTED]]
  Sent: Friday, May 31, 2002 9:18 AM
  To: Php-General
  Subject: [PHP] gd project question
 
 
  I have the following issue:
 
  I am making a gas guage based on a percentage.
  ie.
  - a 180 degree arc is created
  - the range will be 0 to n (undetermined ammount)
  - there will be x number of entries
  - the needle will pount to a a percentage
for (int)floor((x / n) * 100)
 
  The issue is, I have the starting pt for the needle
  (imagefilledarc
  needs the center of the 'circle' as the starting pt,
  which is where
  the needle will start too), but how would I get the x|y
  coordinates
  for the end of the needle based on a perentage of a half-circle
  (180 degree arc)?
 
  Appreciate any clues or ideas.
 
  ---
  Michael Geier
 
 
  --
  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] diplaying the path

2002-05-31 Thread Philip Olson

actually:

If the php directive register_globals is on, then 
$HTTP_REFERER will exist. Otherwise it will not.
(or course that assumes a value exists at all).

Regardless of the register_globals setting, you 
can do:

  // Works since PHP 3 (forever)*
  print $HTTP_SERVER_VARS['HTTP_REFERER'];

  // Works since PHP 4.1.0
  print $_SERVER['HTTP_REFERER'];

Btw, $GLOBALS['HTTP_REFERER'] === $HTTP_REFERER.
And lastly, since PHP 4.2.0 the register_globals 
directive defaults to off, which is what Jim was 
indirectly referring to.  See also extract().

Regards,
Philip Olson

* For versions older then 4.0.3 see also the 
  track_vars directive, it should be on.


On Fri, 31 May 2002, Jim lucas wrote:

 depending on what version of php you are running, you can use
 $GLOBALS['HTTP_REFERER'] or on newer versions you can use
 $_SERVER['HTTP_REFERER']
 
 Jim Lucas
 - Original Message -
 From: Kris Vose [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 31, 2002 9:19 AM
 Subject: [PHP] diplaying the path
 
 
  Is there a variable/function in php that will display the url location of
 the hyper-link that brought them to the current page.  Thanks in advance.
 
  Kris Vose
 
 
 
 -- 
 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] bzip/zlib question

2002-05-31 Thread Michael Davey

So does anyone have any advice on adding files rather than strings?

On Fri, 31 May 2002, Michael Davey wrote:

 I have been looking through the documentation for using Bzip2 or zlib

 compression and have a couple of questions for the group...



 1. Which is best to use on terms of: resultant file size, availability

 of decompression clients  ease of use?

File size: bzip2 wins, hands down

Client availability: zlib wins, hands down

Easy of use: tie.

miguel

 2.Both bzip  zlib documentation makes use of *write() functions to
add
 strings to the file, but can this be used to add files?

 3.I intend to add two or more zip files to the archive so that the
 client only needs to download one file rather than several- which is most
 suited to this - zlib or bzip2?

 Mikey




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




RE: [PHP] Run php function with user click

2002-05-31 Thread Jay Blanchard

[snip]
On Friday 31 May 2002 05:44, you wrote:
 I know how to have my php code run a function within itself. But is there
a
 way that upon an event (clicking a button, etc.), you could run a php
 function without having to go to a new page?

No. PHP is a server side application. The only way to run a function or php
program is to send a request to the server. When you do that the server
sends
back a response and your broswer refreshes the page.
[/snip]

You could put up a borderless IFRAME and refresh the associated file :)

Jay



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




Re: [PHP] PHP Decisions and Issues

2002-05-31 Thread syslog.org

Given enough hardware and an appropriately designed application, yes you
will be able to scale up as high as you want to go.  The big questions are
how much money can you spend vs. what performance, stability and fault
tolerance do you want out?

You have lots of options -
Three or four large smp web servers and a one or two replicated mysql
servers in a round robin configuration
or
dozens of moderately powerful servers running both web server and mysql
server with a smart load balancing switch in front.

Both have advantages and disadvantages.  Partly it depends on how you
write the application, how many sql calls per page you make, how many are
writes vs. reads.  It may also make sense to write it into a multi tiered
app, having the web server make calls to a dedicated php app server that
in turn talks to the database server.

I have ways I like to do things, but it really comes down to what you can
afford dollar wise, complexity wise, uptime wise and management wise.

Jerry

On Fri, 31 May 2002, Justin Felker wrote:

 Hello to everyone.  This email will probably be quite lengthy so please
 bear with me.  What I am asking is quite important to me, so I will try to
 be as detailed as possible.

 I have spent the last hour pouring over this list's archive.  I have found
 some great information and a lot of you appear to be quite helpful.  I just
 want to thank everyone in advance for their help.  If I have missed
 something obvious or my question is redundant, then please point me towards
 the appropriate links and I will read them right away.

 I, along with several other people am starting a business which will depend
 heavily on its web presence.  Unfortunately, I am in the all too common
 position of having to make technical decisions that will have repercussions
 on the future well-being of said business, with little to no budget.  It is
 crucial that the solution I pick, handle what we hope will become a very
 large load in the not-to-distant future (whether this happens or not is a
 question for another day, heh).  To this end, I am very interested in using
 the LAMP (Linux+Apache+MySQL+PHP) approach.  I have experience with all of
 these technologies, but I am definitely not in a position to vouch for
 their worthiness for use in a large scale application running beneath a
 heavy load.

 To quantify LAMP's ability, is it appropriate for say, sites that generate
 on the order of 5 million unique hits per day?  If not, where would you
 draw the line?  At 500,000?  Or 1 million?  If so, how much higher could it
 go possibly?  10 million?  20?

 Keep in mind that we have no problem heavily optimizing the application
 (code tweaks, cacheing, etc).

 We looked into and even began development in JSP w/ Tomcat but found Tomcat
 to be exceedingly unstable for production use (not that it was ever really
 meant for it).   And of course, the other available application servers
 were well beyond our budget.  Also, time constraints have forced us to look
 for a faster-to-develop alternative.

 Just a couple of details about the application we intend to develop.  It
 will be very database intensive (many queries per page) and will also
 provide real-time payment support (for which transactions are a must).

 So, what say you?  Given all that I have said, is LAMP appropriate?  Will
 PHP and maybe even more importantly, MySQL be able to scale well?  I have
 no doubt that MySQL is fast, but just how scaleable is it?  Will it die
 beneath the kind of loads I have described?

 What would be *most* helpful to me is if you could provide web sites that
 exist currently and experience this load and are using LAMP
 (http://www.sourceforge.net?).

 I hope you are still with me!  Thanks a lot for taking the time to read
 this and I would appreciate greatly any help that can provide.

 Thanks.

 Justin


 --
 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] Is PHP used by U.S. Government? By U.S. DoD?

2002-05-31 Thread syslog.org

I just did a google search on .gov  php and got back a ton of hits.  dot,
dod, census, anl and many many others.

Jerry

On Fri, 31 May 2002, John Christopher wrote:


 I would like to use PHP in a project for a United States
 Government client.  The client is skeptical because PHP
 is not a Microsoft product.  I'm looking for statistics and
 links that show that PHP *is* currently in use by the
 US Government.

 Is PHP used by the U.S. Department of Defense?  Examples?

 Is PHP a U.S. Military Standard?

 Any stats or links would be most helpful.  Thank you.


 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com

 --
 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] PHP Decisions and Issues

2002-05-31 Thread 1LT John W. Holmes

Start doing some research and testing. Can PHP and MySQL do that? Sure. Are
there better solutions? Sure. Too many factors go into decisions like this
that's it not a simple email question and answer.

For one, MySQL only supports transactions if you use InnoDB tables. How
reliable are they? I don't know, you'll have to look into it. Do you have a
good programmer? If you have a programmer that can write efficient code,
then almost any program can be done in PHP. If you get a crappy programmer,
then even a simple script can bring your server to it's knees with a little
traffic.

Questions like this are posed every day and there are ariticles all over out
there that discuss the benifits and disadvantages. Do some searching on
Google.

Good luck.

---John Holmes...

- Original Message -
From: Justin Felker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 31, 2002 11:39 AM
Subject: [PHP] PHP Decisions and Issues


 Hello to everyone.  This email will probably be quite lengthy so please
 bear with me.  What I am asking is quite important to me, so I will try to
 be as detailed as possible.

 I have spent the last hour pouring over this list's archive.  I have found
 some great information and a lot of you appear to be quite helpful.  I
just
 want to thank everyone in advance for their help.  If I have missed
 something obvious or my question is redundant, then please point me
towards
 the appropriate links and I will read them right away.

 I, along with several other people am starting a business which will
depend
 heavily on its web presence.  Unfortunately, I am in the all too common
 position of having to make technical decisions that will have
repercussions
 on the future well-being of said business, with little to no budget.  It
is
 crucial that the solution I pick, handle what we hope will become a very
 large load in the not-to-distant future (whether this happens or not is a
 question for another day, heh).  To this end, I am very interested in
using
 the LAMP (Linux+Apache+MySQL+PHP) approach.  I have experience with all of
 these technologies, but I am definitely not in a position to vouch for
 their worthiness for use in a large scale application running beneath a
 heavy load.

 To quantify LAMP's ability, is it appropriate for say, sites that generate
 on the order of 5 million unique hits per day?  If not, where would you
 draw the line?  At 500,000?  Or 1 million?  If so, how much higher could
it
 go possibly?  10 million?  20?

 Keep in mind that we have no problem heavily optimizing the application
 (code tweaks, cacheing, etc).

 We looked into and even began development in JSP w/ Tomcat but found
Tomcat
 to be exceedingly unstable for production use (not that it was ever really
 meant for it).   And of course, the other available application servers
 were well beyond our budget.  Also, time constraints have forced us to
look
 for a faster-to-develop alternative.

 Just a couple of details about the application we intend to develop.  It
 will be very database intensive (many queries per page) and will also
 provide real-time payment support (for which transactions are a must).

 So, what say you?  Given all that I have said, is LAMP appropriate?  Will
 PHP and maybe even more importantly, MySQL be able to scale well?  I have
 no doubt that MySQL is fast, but just how scaleable is it?  Will it die
 beneath the kind of loads I have described?

 What would be *most* helpful to me is if you could provide web sites that
 exist currently and experience this load and are using LAMP
 (http://www.sourceforge.net?).

 I hope you are still with me!  Thanks a lot for taking the time to read
 this and I would appreciate greatly any help that can provide.

 Thanks.

 Justin


 --
 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] Form content type missing, how to fetch variables?

2002-05-31 Thread Analysis Solutions

Simon:

   form method=post
   input type=submit name=Foo value=Boo /
   /form
   ?php
   if ( isset($_POST['Foo']) ) {
  echo 'p' . $_POST['Foo'] . '/p';
   }
   ?

Viewing that the first time will show the form.  Submitting the form 
will show you the form again and then the value of Foo.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 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
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Parsing file's

2002-05-31 Thread Scott

I have a csv file that I am parsing, formatting and then writting to a new 
file.  I am currently using an array, but I have some lines that might 
contain more data than others.  I know for sure that columns 0-33 will 
always be there, but the customer has the option to add another set of 
columns to the row if needed.  I do know that the addition's will always 
be 18 columns and I do know that they can add up to 15 set's of 18.  So, 
the row length could be 0-33 or 0-51 if they add one additional set or 303 
columns if they go up to 15.  

The tricky part is I have to format each column for the new file that is 
created, I do this using sprintf.  I have so far tried to use array_slice 
 for the first 18 columns, then I do another array_slice starting at 18 
and using the column count to get the last column in the row.  Here is the 
code:

array_slice($fields, 18,$lineCount);
foreach ($fields as $key = $value){
print $key|$value\r\n;
}

The format of the new file will be this:
01-Customer information
02-Other information
03a Required Info (that can repeat up to 15 times per line)
03b 
04b 
04-Close Customer Record

Repeat cycle for each row.  The inner loop happens between the 02 and 04 
records.  Remember, I need to format each individual column, they are 
different format options.

If you have some thoughts, I would be all ears as I have been starring at 
this too long and too hard.  

Thanks,

-Scott



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




RE: [PHP] gd project question

2002-05-31 Thread Miguel Cruz

On Fri, 31 May 2002, Michael Geier wrote:
 my arc runs from 180 deg. to 360/0 degree, or left to right, pointing
 upwards (upside down U).
 i guess I am not getting my head around the numbers...is there anywhere on
 the net that has a good thorough description about a process like this?

http://www.google.com/search?hl=enlr=q=%22trigonometry+tutorial%22

miguel


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




[PHP] RE: SOLVED: [PHP] PHP URLs not opening from email in Outlook XP

2002-05-31 Thread Leotta, Natalie (NCI/IMS)

For anyone who was having this problem, here's the solution.  It's a
windows-level bug.  Even HTML files weren't opening.

In Windows Explorer, go to either View/Tools (depending on version) and get
to Folder Options.  Go into File Types, and change the URL:HTTP (spelled
out) to have open and point it to your browser of choice.  Not something
you want to put on your website for John Q. Public, but ok for advanced
users.

thanks for the help!

-Natalie

-Original Message-
From: Leotta, Natalie (NCI/IMS) 
Sent: Friday, May 31, 2002 1:52 PM
To: 'Jaime Bozza'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP URLs not opening from email in Outlook XP


My shift key isn't stuck.  I don't know what's wrong.  I found out that one
other person had a problem with it at my company and apparently one of the
techies put it on MS's technet group.  Hopefully something will come of it.


Thanks for your help!

-Natalie

-Original Message-
From: Jaime Bozza [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 1:49 PM
To: Leotta, Natalie (NCI/IMS)
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS);
[EMAIL PROTECTED]
Subject: RE: [PHP] PHP URLs not opening from email in Outlook XP


Natalie,
   I'm using Outlook XP here and the link opens just fine.  The only time I
get that locate link browser window is if I hold the shift-key down when
clicking on the link.  (I typically link to open links in new windows, so I
hold the shift-key when clicking links - It will open the link in a new
browser window.)

   If you weren't hitting the shift-key, it could be possible that one of
your shift-keys are stuck, which is emulating the shift-click.  Not much
more I can tell you other than that, since the link (and all
others) work just fine for me in Outlook XP.


Jaime Bozza


-Original Message-
From: Leotta, Natalie (NCI/IMS) [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 31, 2002 12:16 PM
To: [EMAIL PROTECTED]
Cc: Jeans, Matt (NCI/IMS); Cucinelli, James (NCI/IMS)
Subject: [PHP] PHP URLs not opening from email in Outlook XP


I just tried to open the PHP link about the Navy.  I'm running IE6 (freshly
installed today, so no tweaks have been made) with Win2000.  When I clicked
on the link in the email, a locate link window came up (similar to an open
file window).  This does not happen on my coworker's machine.  The only
obvious difference between my computer and my coworker's computer is that
I'm running Office XP and he's got Office 2000, so we've got different
versions of Outlook.

We are currently redoing our website so that the URL has all of the unique
identifiers for each graph, so the whole point is to have people graph
something, copy it into an email, and send it to someone so they get the
same graph.

Does this happen to anyone else?  Is there something we can do to prevent it
from happening?

Thanks!

-Natalie

PS Here's the link that was sent, if you want to try it:

http://www.zend.com/zend/cs/csnavalready.php

Natalie S. Leotta
Information Management Services, Inc.
(301) 680-9770
[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

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




[PHP] Re: SQL question, getting error and not sure why

2002-05-31 Thread Michael Virnstein

This
 Read does not block read.
 read does not block write.
 write does not block read.
 write blocks write on the same column.
should read:
Oracle has a row locking mechanism, so
the following blocking mechanisms apply, when two
or more oracle sessions want to operate on the same row:
read does not block read.
read does not block write.
write does not block read.
write blocks write.
So if two ppl write on the same row on the same time,
oracle waits for the first transaction, to be committed,
or rollbacked, then for the second...and so forth.

if you send your insert query with the select max(myrow)+1 form table;
and some other session inserts also with your statement at almost the
same time and commits in the meanwhile, that won't affect your max(myrow)
result in any way. oracle will bring you the result as it would have been
as you started your query.so it is for session b. the insert wont have to
wait, it
doesn't affect the same row as the other session. so you'll get the same
results.

open two sql plus windows.

in the first do:
 insert into acteursenc (nuacteur,nomacteur)
 (select AA, BB from
 (select max(nuacteur)+1 AA from acteursenc),
 (select 'Michael Sweeney' BB from dual)
then in the second do:
 select max(nuacteur)+1 AA from acteursenc
then in the first
 commit
and in the second:
 select max(nuacteur)+1 AA from acteursenc

yo'll see, that AA will be 1 higher the second time

Michael

Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 the problem is, that the second sql produces more
 than one row. To be exactly the amount of
 select count(*) from acteursenc rows, with
 'Michael Sweeney' as value in BB. Perhaps you
 have a unique key on nomacteur?!

 I could help further, if i know what you want to do
 with your query.
 if nuacteur is a pk, use a sequence!
 if two users send this query almost at the same time,
 you'll get two times the same pk.
 That's because of oracles locking mechanism:
 Read does not block read.
 read does not block write.
 write does not block read.
 write blocks write on the same column.
 if someone inserts a row with your statement, and hasn't commited his
 transaction,
 and someone else inserts a row with your statment before he has commited,
 then the two will get the same results for max(id)+1. A sequence will
never
 give the
 same result and is easy to use. and for your query, wouldn' this be
easier:
 insert into acteursenc
(nuacteur, nomacteur)
 values
(S_ACTEURSENC.NEXTVAL, 'Michael Sweeney')

 please explain what you want to do.

 Michael

 Michael Sweeney [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  My following query :
 
  insert into acteursenc (nuacteur,nomacteur)
  (select AA, BB from
  (select max(nuacteur)+1 AA from acteursenc),
  (select 'Michael Sweeney' BB from acteursenc))
 
  produces an ORA-1: unique constraint error.
 
  The primary key is nuacteur, but by setting AA to max(nuacteur)+1 I
should
  be getting a new key that is unique, however it does not seem that way.
 
  What am I doing wrong here?
 
 





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




[PHP] Re: SQL question, getting error and not sure why

2002-05-31 Thread Michael Virnstein

and don't do something like
insert into (col1, col2) values ('1', '2');
to oracle. this is deadly if you do
insert into (col1, col2) values ('3', 4');
afterwards, oracle will not know this query.
it'll have to parse it again, because you used
literals. you have to use bindvars, if it is possible
with your oracle version. am only familiar
with 8i, so i can't tell. this query has to look:
insert into (col1, col2) values (:1, :2);
and you have to use ocibindbyname to bind
a phpvariable after ociparse. That way oracle
will parse your query only for the first time and
then take it out of the shared pool, if you come
along with another value. This is massively important!
Same for selcet or other queries. No matter what query, use
bindvars. You can read much more in the docs and e.g here:
http://asktom.oracle.com/pls/ask/f?p=4950:8:F4950_P8_DISPLAYID:528893984
337

Michael

Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 This
  Read does not block read.
  read does not block write.
  write does not block read.
  write blocks write on the same column.
 should read:
 Oracle has a row locking mechanism, so
 the following blocking mechanisms apply, when two
 or more oracle sessions want to operate on the same row:
 read does not block read.
 read does not block write.
 write does not block read.
 write blocks write.
 So if two ppl write on the same row on the same time,
 oracle waits for the first transaction, to be committed,
 or rollbacked, then for the second...and so forth.

 if you send your insert query with the select max(myrow)+1 form table;
 and some other session inserts also with your statement at almost the
 same time and commits in the meanwhile, that won't affect your max(myrow)
 result in any way. oracle will bring you the result as it would have been
 as you started your query.so it is for session b. the insert wont have to
 wait, it
 doesn't affect the same row as the other session. so you'll get the same
 results.

 open two sql plus windows.

 in the first do:
  insert into acteursenc (nuacteur,nomacteur)
  (select AA, BB from
  (select max(nuacteur)+1 AA from acteursenc),
  (select 'Michael Sweeney' BB from dual)
 then in the second do:
  select max(nuacteur)+1 AA from acteursenc
 then in the first
  commit
 and in the second:
  select max(nuacteur)+1 AA from acteursenc

 yo'll see, that AA will be 1 higher the second time

 Michael

 Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  the problem is, that the second sql produces more
  than one row. To be exactly the amount of
  select count(*) from acteursenc rows, with
  'Michael Sweeney' as value in BB. Perhaps you
  have a unique key on nomacteur?!
 
  I could help further, if i know what you want to do
  with your query.
  if nuacteur is a pk, use a sequence!
  if two users send this query almost at the same time,
  you'll get two times the same pk.
  That's because of oracles locking mechanism:
  Read does not block read.
  read does not block write.
  write does not block read.
  write blocks write on the same column.
  if someone inserts a row with your statement, and hasn't commited his
  transaction,
  and someone else inserts a row with your statment before he has
commited,
  then the two will get the same results for max(id)+1. A sequence will
 never
  give the
  same result and is easy to use. and for your query, wouldn' this be
 easier:
  insert into acteursenc
 (nuacteur, nomacteur)
  values
 (S_ACTEURSENC.NEXTVAL, 'Michael Sweeney')
 
  please explain what you want to do.
 
  Michael
 
  Michael Sweeney [EMAIL PROTECTED] schrieb im Newsbeitrag
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   My following query :
  
   insert into acteursenc (nuacteur,nomacteur)
   (select AA, BB from
   (select max(nuacteur)+1 AA from acteursenc),
   (select 'Michael Sweeney' BB from acteursenc))
  
   produces an ORA-1: unique constraint error.
  
   The primary key is nuacteur, but by setting AA to max(nuacteur)+1 I
 should
   be getting a new key that is unique, however it does not seem that
way.
  
   What am I doing wrong here?
  
  
 
 





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




[PHP] php newbie question

2002-05-31 Thread Taylor Lewick

I am having a hard time getting apache to load the php4 module.  Can I still use PHP 
for my web stuff...?

Thanks

Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073

Help Wanted.  Seeking Telepath...
You Know where to apply.


Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that 
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*

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




[PHP] is session.use_trans_sid dangerous?

2002-05-31 Thread Giancarlo

Hi,
I've tried the PHP4 built-in sessions, and both with and without  the
default setting off
session.use_trans_sid
php.ini, I see that you can force anyone into a session if you point  to
a URL like
http://myhost/a_page.php?PHPSESSID=blackhole
even if his cookie are enabled.

Wasn't that supposed to be an alternative for those clients with cookies
disabled?
Is it correct that  does it work even if cookies are enabled?
Is it correct that there is no check, nor a switch or a directive, that
prevents from accepting a session we haven't issued?

Thanks

Giancarlo Pinerolo


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




[PHP] php4 install with apache.org

2002-05-31 Thread Taylor Lewick

Hi all. I am trying to install the php4 module for apache 1.3.24 on HPUX 11.00
I have sucessfully compiled apache 1.3.24, mysql 4.01, and php4, but when I try to 
integrate the php4 module in with apache, I am getting nailed every time..

I did the configure --activate-module=src/modules/php4/libphp4.a

and that worked.
When I did a make, I get this error..
ld: DP relative code in file modules/php4/libphp4.a(zend_alloc.o) - shared library 
must be position independent.

When I recieved a similar error for another piece of software I was compiling, I fixed 
it by editing the .c file and checking the paths of the #includes.
That didn't seem to work this time.
Can anyone point me in the right direction?
Thanks,
Taylor

Taylor Lewick
Unix System Administrator
Fortis Benefits
816 881 6073

Help Wanted.  Seeking Telepath...
You Know where to apply.


Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that 
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*

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




[PHP] Re: Parsing file's

2002-05-31 Thread Michael Davey

You should normalise your data - have a field in the second csv that links
to the first csv and then you can have as many rows as you want associated
with the record in the first file.

Mikey

Scott [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a csv file that I am parsing, formatting and then writting to a new
 file.  I am currently using an array, but I have some lines that might
 contain more data than others.  I know for sure that columns 0-33 will
 always be there, but the customer has the option to add another set of
 columns to the row if needed.  I do know that the addition's will always
 be 18 columns and I do know that they can add up to 15 set's of 18.  So,
 the row length could be 0-33 or 0-51 if they add one additional set or 303
 columns if they go up to 15.

 The tricky part is I have to format each column for the new file that is
 created, I do this using sprintf.  I have so far tried to use array_slice
  for the first 18 columns, then I do another array_slice starting at 18
 and using the column count to get the last column in the row.  Here is the
 code:

 array_slice($fields, 18,$lineCount);
 foreach ($fields as $key = $value){
 print $key|$value\r\n;
 }

 The format of the new file will be this:
 01-Customer information
 02-Other information
 03a Required Info (that can repeat up to 15 times per line)
 03b 
 04b 
 04-Close Customer Record

 Repeat cycle for each row.  The inner loop happens between the 02 and 04
 records.  Remember, I need to format each individual column, they are
 different format options.

 If you have some thoughts, I would be all ears as I have been starring at
 this too long and too hard.

 Thanks,

 -Scott





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




  1   2   >