Re: [PHP] IP Chains

2001-04-24 Thread Michael Hall


I don't understand why you want to connect IPCHAINS to your PHP script.
Normally your IPCHAINS (or IPTABLES) firewall would be running anyway,
wouldn't it? Maybe I've missed something, but I don't see how the two are
linked. 

I'd have the PHP script check username and password, and if valid, go
ahead and do whatever the script determines. I'd also have IPCHAINS
running the whole time and configured to let any authorised user out/in.
But there would be no direct link between the two.

Mick

On Tue, 24 Apr 2001, Faryal wrote:

 Hi
 I wanted o ask u about a problem regarding my project. The project is related to 
Cyber Cafe Authentication. Here we have to chk whether a set of user name  
password is valid and if valid allow this user access to internet. All the scripitng 
has been done in PHP and the operating system is linux. Now we just have to link IP 
CHAINS to our php script. That is  when the user is allowed to access internet, ip 
chains should start running through the script. However we are stuck at this problem 
 cannot find a sound solution. Can u plz help us? That would be very nice :)
 Waiting anxiuosly for ur reply.
 Regards
 Faryal
 
 


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




[PHP] Want to send email in html format

2001-04-24 Thread George Alexander

Hi,

I am working on a newsletter module. What I want
to know is that how can we send a newsletter via
email to all the subscribers in html format 
with images in the htm too???

Well I am able to send an html file as attachment
using the php mail() function. But I still can't
see the images in the htm file. What I think is
the mail function just sends the file as text only
and it will not pick up the images in the html file.
So is there a way that I can send the html format 
with images via email.

Please reply asap.

regards
George

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com





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




Re: [PHP] how do I do this

2001-04-24 Thread Philip Olson


I missed this thread but check out :

  http://zend.com/zend/tut/drop-down.php

regards,
philip

On Tue, 24 Apr 2001, Adrian D'Costa wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On Mon, 23 Apr 2001, Andreas Landmark wrote:
 
   country the corresponding cities should only be listed in the second
   dropdown box.  Can some one guide me.  Right below is my table
   structure. 
  
  If you want to do this with pure php you'll need to reload the page after
  the user selects the country from the dropdownbox, to get the webbrowser
  to switch the cities in the city-dropdown w/o reloading you'll need to
  use javascript or similar evil measures...
 
 I want to do it in pure php, how do I do this.  
 
 I tried it in javascripts but I could not get javascript to pass the
 results back to php.  My knowledge is limited
 
 TIA
 
 Adrian
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.2 (GNU/Linux)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE65R4X/f1mUNueu/oRAmMWAJ0fwyRUjYHehZVr2y6yp+7ZcD+HVACeOINX
 1TUK0JkhUygsXC2uawoxikM=
 =2c/I
 -END PGP SIGNATURE-
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




RE: [PHP] Want to send email in html format

2001-04-24 Thread Peter Houchin

have  something like 

mail($address, $subject, $body, $headers \nContent-Type: text/HTML; 
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit  )in your mail 

mail(

-Original Message-
From: George Alexander [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 4:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Want to send email in html format


Hi,

I am working on a newsletter module. What I want
to know is that how can we send a newsletter via
email to all the subscribers in html format 
with images in the htm too???

Well I am able to send an html file as attachment
using the php mail() function. But I still can't
see the images in the htm file. What I think is
the mail function just sends the file as text only
and it will not pick up the images in the html file.
So is there a way that I can send the html format 
with images via email.

Please reply asap.

regards
George

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com





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




[PHP] sending files by mail

2001-04-24 Thread Calin Rotaru

Hello!

I generate a text file from a mysql database.
I'm trying to send this file by mail. Is this possible with mail() function 
??? I read the documentation, but I didn't find anything yet.
Thanks.


Calin

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




Re: [PHP] sending files by mail

2001-04-24 Thread David Robley

On Wed, 25 Apr 2001 00:02, Calin Rotaru wrote:
 Hello!

 I generate a text file from a mysql database.
 I'm trying to send this file by mail. Is this possible with mail()
 function ??? I read the documentation, but I didn't find anything yet.
 Thanks.


 Calin

You'll need to read the data from the file into a variable which you can 
then process and send with mail()

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

   Fact is solidified opinion

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




Re: [PHP] how do I do this

2001-04-24 Thread Adrian D'Costa

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thanks.  This is what I was looking for.  I will try and hack the example

Adrian

On Tue, 24 Apr 2001, Philip Olson wrote:

 
 I missed this thread but check out :
 
   http://zend.com/zend/tut/drop-down.php
 
 regards,
 philip
 
 On Tue, 24 Apr 2001, Adrian D'Costa wrote:
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
  
  On Mon, 23 Apr 2001, Andreas Landmark wrote:
  
country the corresponding cities should only be listed in the second
dropdown box.  Can some one guide me.  Right below is my table
structure. 
   
   If you want to do this with pure php you'll need to reload the page after
   the user selects the country from the dropdownbox, to get the webbrowser
   to switch the cities in the city-dropdown w/o reloading you'll need to
   use javascript or similar evil measures...
  
  I want to do it in pure php, how do I do this.  
  
  I tried it in javascripts but I could not get javascript to pass the
  results back to php.  My knowledge is limited
  
  TIA
  
  Adrian
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.0.2 (GNU/Linux)
  Comment: For info see http://www.gnupg.org
  
  iD8DBQE65R4X/f1mUNueu/oRAmMWAJ0fwyRUjYHehZVr2y6yp+7ZcD+HVACeOINX
  1TUK0JkhUygsXC2uawoxikM=
  =2c/I
  -END PGP SIGNATURE-
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
 
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE65Sv4/f1mUNueu/oRAi3JAJit2Ny3NHZ7n6bFZZGMDqGewdHrAKDUuOc2
/X7LTzPXuVggiinSZ4TATA==
=49Be
-END PGP SIGNATURE-


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




[PHP] Convert a numeric string

2001-04-24 Thread liman

Hi all.

How can I convert this: 1250 into this: 10.000.250?
I must manage numbers rangin from some million to... well, too much to
read them without points (or colons for USA guys).

I'm looking in the docs but printf doesn't seem to be able to do that.

Thank you.



-- 
Liman - [EMAIL PROTECTED]

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




RE: [PHP] Convert a numeric string

2001-04-24 Thread Jason Murray

 I'm looking in the docs but printf doesn't seem to be able to do that.

You want http://www.php.net/manual/en/function.number-format.php.

Jason

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




RE: [PHP] Why is it dangerous to have register_globals on?

2001-04-24 Thread Francois Legare



Francois Legare
[EMAIL PROTECTED]

 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: April 23, 2001 9:30 PM
 To: Plutarck
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Why is it dangerous to have register_globals on?

 Never never never trust user-supplied data implicitly.  Always check
 anything that could possibly come from the user.  For internal variables,
 always initialize them and just generally think things through as you
 write your scripts.  This is no different in PHP than in any other
 scripting language used for web work.

 -Rasmus
Hi Rasmus,
can you, or anyone else, give more examples to help me understand what you
mean by generally think things through or give pointer(s) on the web where
this topic is being discussed and plenty of examples are given. Actually,
any advices, tips and tricks on how to code securely and how to make sure
user-supplied data are never implicitly trusted would be more than welcomed.

thanks


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




Re: [PHP] Sensitive Information (like CC)

2001-04-24 Thread Niklas Neumann

 What's the best (secure?) way of transmitting sensitive information
 over email? 

Leave the messages on the server and get them via pop3s. Outlook is capable 
of pop3 via ssl.

Best regards
  Niklas Neumann

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




Re: [PHP] Why is it dangerous to have register_globals on?

2001-04-24 Thread Geir Eivind Mork

On Monday 23 April 2001 11:56, Greig, Euan wrote:
  I have read in several places that is dangerous to have register_globals
 on, but I have not understood the (short) explanations given. Can anyone
 enlighten me?

keep it a rule to either unset any variable that you use or set them with a 
default value. how awfully nice register_globals is, I've started to be more 
aware and use of HTTP_POST_VARS and HTTP_GET_VARS in case someone get a wild 
idea to abuse some of my products. they might get some dangerous stuff, I 
can't imagine their fantasy so I just let them have as little chance as 
possible :)

-- 
 php developer / CoreTrek AS| TV is chewing gum for the eyes.   --
 Sandnes / Rogaland / Norway| Frank Lloyd Wright 
 web: http://www.moijk.net/ | 

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




RE: [PHP] Sensitive Information (like CC)

2001-04-24 Thread Jason Murray

 Leave the messages on the server and get them via pop3s. 
 Outlook is capable of pop3 via ssl.

I wouldn't do that - it makes the server a great hack target.

Jason

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




[PHP] Yes, thanx

2001-04-24 Thread liman

Yes. It was just that.

Thankx a lot.

-- 
Liman - [EMAIL PROTECTED]

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




SV: [PHP] Want to send email in html format

2001-04-24 Thread Martin Oust

is it possible to change the Content-Type and Content-Transfer-Encoding in a
mail you recieve??? this way you can convert mails written with html-codes,
sent from a mail-program that doesn't support it..

Peter Houchin [EMAIL PROTECTED] skrev i
meldingsnyheter:[EMAIL PROTECTED]
 have  something like

 mail($address, $subject, $body, $headers \nContent-Type: text/HTML;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit  )in your mail

 mail(

 -Original Message-
 From: George Alexander [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 24, 2001 4:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Want to send email in html format


 Hi,

 I am working on a newsletter module. What I want
 to know is that how can we send a newsletter via
 email to all the subscribers in html format
 with images in the htm too???

 Well I am able to send an html file as attachment
 using the php mail() function. But I still can't
 see the images in the htm file. What I think is
 the mail function just sends the file as text only
 and it will not pick up the images in the html file.
 So is there a way that I can send the html format
 with images via email.

 Please reply asap.

 regards
 George

 _
 Chat with your friends as soon as they come online. Get Rediff Bol at
 http://bol.rediff.com





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





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




[PHP] Standalone Browser with PHP and/CGI

2001-04-24 Thread John Monfort


  Hello everyone,

  Quick question:

  I would like to install a standalone web server can run PHP, I'm looking
  for guidance on how to do this.

  Basically, I want to add a PHP application on a CD-ROM, for
  demonstration purposes.

  I know PHP can be runed as a standalone, but what about the server? Can
  apache do something like this? Will a person have install apache when
  they run the disk? Do you know of a server that can do this?
  I'm currently looking at the SimpleServer, by AnalogX-www.analogX.com,
  but that only allow CGI and is not too configurable.

  I would appreciate any information that you can share.

  Thanks.




__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-


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




SV: [PHP] Want to send email in html format

2001-04-24 Thread Martin Oust

is it possible to change the Content-Type and Content-Transfer-Encoding in a
mail you recieve??? this way you can convert mails written with html-codes,
sent from a mail-program that doesn't support it..


Peter Houchin [EMAIL PROTECTED] skrev i
meldingsnyheter:[EMAIL PROTECTED]
 have  something like

 mail($address, $subject, $body, $headers \nContent-Type: text/HTML;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit  )in your mail

 mail(

 -Original Message-
 From: George Alexander [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 24, 2001 4:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Want to send email in html format


 Hi,

 I am working on a newsletter module. What I want
 to know is that how can we send a newsletter via
 email to all the subscribers in html format
 with images in the htm too???

 Well I am able to send an html file as attachment
 using the php mail() function. But I still can't
 see the images in the htm file. What I think is
 the mail function just sends the file as text only
 and it will not pick up the images in the html file.
 So is there a way that I can send the html format
 with images via email.

 Please reply asap.

 regards
 George

 _
 Chat with your friends as soon as they come online. Get Rediff Bol at
 http://bol.rediff.com





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





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




SV: [PHP] Want to send email in html format

2001-04-24 Thread Martin Oust

is it possible to change the Content-Type and Content-Transfer-Encoding in a
mail you recieve??? this way you can convert mails written with html-codes,
sent from a mail-program that doesn't support it..



Peter Houchin [EMAIL PROTECTED] skrev i
meldingsnyheter:[EMAIL PROTECTED]
 have  something like

 mail($address, $subject, $body, $headers \nContent-Type: text/HTML;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit  )in your mail

 mail(

 -Original Message-
 From: George Alexander [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 24, 2001 4:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Want to send email in html format


 Hi,

 I am working on a newsletter module. What I want
 to know is that how can we send a newsletter via
 email to all the subscribers in html format
 with images in the htm too???

 Well I am able to send an html file as attachment
 using the php mail() function. But I still can't
 see the images in the htm file. What I think is
 the mail function just sends the file as text only
 and it will not pick up the images in the html file.
 So is there a way that I can send the html format
 with images via email.

 Please reply asap.

 regards
 George

 _
 Chat with your friends as soon as they come online. Get Rediff Bol at
 http://bol.rediff.com





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





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




Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Phil Driscoll

When I did the windows installer there was some talk of defaulting to
install in 'Program files' (I think Zeev suggested it), but there was a
significant body of opinion which thought that there would be problems at
least with parts of php with respect to the space in the filename. I just
listened to the opinion and chickened out defaulting the installation to
C:\php (easily overridden by the user). I never did any tests on the space
issue, but it may be worth considering here before coming to a conclusion.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



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




[PHP] what is better? mysql_connect() or mysql_pconnect()?

2001-04-24 Thread elias

hello...
just asking...what is better in this case:
i got lots of scripts and almost all of them needs to connect to the DB and
some of thems are accessed lots of times what is better to use in such
cases:
mysql_connect() or mysql_pconnect()...
i mean will speed factor play a role when lots and lots of user tries to
connect to the DB?

-elias
http://eassoft.cjb.net




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




Re: [PHP] Standalone Browser with PHP and/CGI

2001-04-24 Thread elias

Don't really... know...why don't you try PWS+PHP4 for windows?
it will take up like max 50MB on the CDrom and it's easy installable...

-elias
http://eassoft.cjb.net

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

   Hello everyone,

   Quick question:

   I would like to install a standalone web server can run PHP, I'm looking
   for guidance on how to do this.

   Basically, I want to add a PHP application on a CD-ROM, for
   demonstration purposes.

   I know PHP can be runed as a standalone, but what about the server? Can
   apache do something like this? Will a person have install apache when
   they run the disk? Do you know of a server that can do this?
   I'm currently looking at the SimpleServer, by AnalogX-www.analogX.com,
   but that only allow CGI and is not too configurable.

   I would appreciate any information that you can share.

   Thanks.




 __John Monfort_
 _+---+_
  P E P I E  D E S I G N S
www.pepiedesigns.com
 The world is waiting, are you ready?
 -+___+-


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




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




[PHP] delete browser-cache

2001-04-24 Thread mohammed oda

hi
how can i delete the browser-cache in PHP
thanks

-- 
Mohammed Oda
Leibniz str. 76
55118 Mainz
Tel.06131-638350

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Andi Gutmans

I don't think there are any problems with the space in the path name.
If there are we are better off finding them and fixing them instead of 
defaulting to c:\php4. I think we should follow the Windows standard on 
Windows. I know that I hate when programs want to install themselves in c:\ 
on Windows.

Andi

At 09:29 AM 4/24/2001 +0100, Phil Driscoll wrote:
When I did the windows installer there was some talk of defaulting to
install in 'Program files' (I think Zeev suggested it), but there was a
significant body of opinion which thought that there would be problems at
least with parts of php with respect to the space in the filename. I just
listened to the opinion and chickened out defaulting the installation to
C:\php (easily overridden by the user). I never did any tests on the space
issue, but it may be worth considering here before coming to a conclusion.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



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


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




[PHP] what is better? mysql_connect() or mysql_pconnect()?

2001-04-24 Thread VirtualSolution [Virtualsolution.net]

[PHP] what is better? mysql_connect() or mysql_pconnect()?



mysql_pconnect()

is better for a web application because is lighter for the server, (the connection is 
not permanent)






Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Zeev Suraski

There shouldn't be any problems with spaces in the name under Windows - 
I've been using it for years like that...

Zeev

At 13:02 24/4/2001, Andi Gutmans wrote:
I don't think there are any problems with the space in the path name.
If there are we are better off finding them and fixing them instead of 
defaulting to c:\php4. I think we should follow the Windows standard on 
Windows. I know that I hate when programs want to install themselves in 
c:\ on Windows.

Andi

At 09:29 AM 4/24/2001 +0100, Phil Driscoll wrote:
When I did the windows installer there was some talk of defaulting to
install in 'Program files' (I think Zeev suggested it), but there was a
significant body of opinion which thought that there would be problems at
least with parts of php with respect to the space in the filename. I just
listened to the opinion and chickened out defaulting the installation to
C:\php (easily overridden by the user). I never did any tests on the space
issue, but it may be worth considering here before coming to a conclusion.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



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

--
Zeev Suraski [EMAIL PROTECTED]
CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/


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




Re: [PHP] sending files by mail

2001-04-24 Thread Calin Rotaru

On Tuesday 24 April 2001 03:37, David Robley wrote:
 On Wed, 25 Apr 2001 00:02, Calin Rotaru wrote:
  Hello!
 
  I generate a text file from a mysql database.
  I'm trying to send this file by mail. Is this possible with mail()
  function ??? I read the documentation, but I didn't find anything yet.
  Thanks.
 
 
  Calin

 You'll need to read the data from the file into a variable which you can
 then process and send with mail()
I read the file in $body;Then  I  wrote thees lines:

mail($address,$message,$body,$headers \nContent-Type: text/PLAIN;
charset=US_ASCII; name=\fisier.txt\\nContent-Transfer-Encoding: 
BASE64\nContent-Dispositon: attachment;
filename=\fisier.txt\\n);

and this is the message which I received

Content-Type: text/PLAIN;
Status:   

charset=US_ASCII; name=fisier.txt
Content-Transfer-Encoding: BASE64
Content-Dispositon: attachment; 
filename=fisier.txt


and then the lines from file.

I didn'l receive an attachment.
What am I doing wrong?

Calin



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




Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Phil Driscoll

If there are we are better off finding them and fixing them instead of
Agreed.

However the 'Program files' folder is the standard place where applications
that the user runs live. Web scripting things seem to live (at least on NT)
in SYSTEMROOT\system32\inetsrv - which is more unpleasant than in C:\ IMHO.
I don't care too much where things go as long as it works, but certainly, if
we want to make things easier for users, we should bear in mind that all the
IIS/PWS management tools default to looking in SYSTEMROOT\system32\inetsrv
for things when configuring scriptmapping.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org


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




Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Svein Roar Nilsen

   And I see no reason why we should not be allowed to handle most of the
  fatal errors we get on our own. Especially annoying is the xslt_process()
  function that returns something like brbFatal error/b:  XML parser
  error 7: mismatched tag in b/var/www/[...]. As far as I can see, this

 http://www.php.net/manual/en/features.error-handling.php
 have you taken a deeper look into this?

Well, I have tried...

 beside, use @ in front of the command to pipe away the current error or stop
 on-screen display of errors in general.

My problem is that not displaying anything in case of an error is a
completely unacceptable solution. I *MUST* return a valid XML message in
a predefined format. If not, I am violating the standard we are
following. And if I do not find a way to comply with the standard, it
means that we have to scrap PHP alltogether for this project. 


Svein Roar

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




php-general Digest 24 Apr 2001 10:12:47 -0000 Issue 646

2001-04-24 Thread php-general-digest-help


php-general Digest 24 Apr 2001 10:12:47 - Issue 646

Topics (messages 49945 through 50040):

Question on installation
49945 by: Jason Lam
49986 by: Nashirak Bosk

Using input type = 'button rather than input type = 'submit'
49946 by: Martin Cameron
49956 by: Rene Maldonado
49967 by: Plutarck
49969 by: Jason Murray
50012 by: Martin Cameron
50013 by: David Robley

PHP script and new window.
49947 by: Angerer, Chad
49963 by: Plutarck

Re: Site Structure
49948 by: Meir kriheli
49954 by: Steve Werby

Re: PHP 4.0.5
49949 by: Henrik Hansen
49950 by: Henrik Hansen
49964 by: Plutarck

Re: How to turn off warnings ???
49951 by: Brandon Orther
49968 by: Plutarck

Posting to a form
49952 by: Wade
49957 by: Philip Olson
49958 by: Jack Dempsey

Calculating the difference between two dates
49953 by: Stuart Rees
49961 by: Plutarck

Re: ereg_replace: Replacing only first occurrence
49955 by: ~~~i LeoNid ~~

Re: How to find the object...(clarification)
49959 by: Plutarck

Re: How to find the object name in a class?
49960 by: Plutarck

Re: newbie question: duplicate emails
49962 by: Plutarck

trouble reading a database (fwd)
49965 by: johndmiller
49966 by: Jason Murray
49982 by: johndmiller

ereg_replace: Help!
49970 by: Erica Douglass
49971 by: Plutarck

Re: Having trouble executing unzip from PHP script
49972 by: David Robley

Re: logging in (online?!)
49973 by: Plutarck

preg_replace on array with E (PCRE_DOLLAR_ENDONLY) modifier
49974 by: Grant Walters
49976 by: Plutarck
49985 by: CC Zona

Re: web page grab
49975 by: Plutarck

newbie migration issues
49977 by: S.J. Black
49980 by: Jack Dempsey
49981 by: Plutarck

Re: Method Not Allowed
49978 by: Steve Maroney

Re: Printing
49979 by: Plutarck

gif and jpeg support
49983 by: Dan Phoenix

PHP and useradd
49984 by: Nashirak Bosk
49987 by: Plutarck
50010 by: Steve Werby

date plus 7 more days
49988 by: Jacky
49991 by: David Robley

Now, why doesn't this work?
49989 by: Tyler Longren
49992 by: Jason Murray
49995 by: David Robley

function in if statement not executed ?-- Help
49990 by: PHPhyperboy
49994 by: Jason Murray
49996 by: PHPhyperboy

Re: Now, why doesn't this work (update)?
49993 by: Tyler Longren

date add more 7 days, help needed.
49997 by: Jacky
5 by: Maxim Maletsky

Re: Now, why doesn't this work? (this thread can die off now)
49998 by: Tyler Longren

is_link() behavior
4 by: J. Jones
50005 by: Martin Skjöldebrand
50007 by: J. Jones

Sensitive Information (like CC)
50001 by: Ashley M. Kirchner
50006 by: Jason Murray
50008 by: Aaron D. Turner
50026 by: Niklas Neumann
50028 by: Jason Murray

file_exists with remote file???
50002 by: Paulo - Bruc Internet
50004 by: J. Jones

BASIC function question
50003 by: Martin Skjöldebrand
50009 by: David Robley
50015 by: Philip Olson

Re: Why is it dangerous to have register_globals on?
50011 by: Rasmus Lerdorf
50025 by: Francois Legare
50027 by: Geir Eivind Mork

Re: Looping through variables
50014 by: Dan Lowe

Re: how do I do this
50016 by: Adrian D'Costa
50018 by: Philip Olson
50022 by: Adrian D'Costa

Want to send email in html format
50017 by: George  Alexander
50019 by: Peter Houchin
50030 by: Martin Oust
50031 by: Martin Oust
50032 by: Martin Oust

sending files by mail
50020 by: Calin Rotaru
50021 by: David Robley
50039 by: Calin Rotaru

Convert a numeric string
50023 by: liman
50024 by: Jason Murray

Yes, thanx
50029 by: liman

Standalone Browser with PHP and/CGI
50033 by: John Monfort
50035 by: elias

what is better? mysql_connect() or mysql_pconnect()?
50034 by: elias
50037 by: VirtualSolution [Virtualsolution.net]

delete browser-cache
50036 by: mohammed oda

Re: IP Chains
50038 by: Michael Hall

Re: Fatal Errors and Error Handling
50040 by: Svein Roar Nilsen

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]


--



I have installed the RPM version of PHP that came with a Linux dist. Obviously, it 
didn't came with a lot of the goodies, like ODBC. Now, if I have to install those 
modules, is there anyway I can JUST compile those 

[PHP-CVS] cvs: php4 /ext/ircg ircg.c ircg_scanner.c php_ircg.h

2001-04-24 Thread Sascha Schumann

sas Tue Apr 24 02:40:06 2001 EDT

  Modified files:  
/php4/ext/ircg  ircg.c ircg_scanner.c php_ircg.h 
  Log:
  Add support for suppressing the loopback of messages sent using ircg_msg.
  
  Add support for nickname escaping
  
  Using this technique it becomes possible to use nicknames like
  John Doe in the front-end.  Scripts can use ircg_nickname_(un)escape.
  This should be applyable to channel names as well.
  
  A new flag character (2) is introduced which unescapes the respective
  argument.
  
  I.e. a format string could look like
  
  %2f joins %cscriptparent.new_user('%12f','%1c')/script
  
  In the case of G|27n|27R, this would be interpolated as:
  
  G'n'R joins foobarscriptparent.new_user('G\'n\'R','foobar')/script
  
  I.e. %12f means unescape the parameter and apply javascript escaping.
  
  
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.60 php4/ext/ircg/ircg.c:1.61
--- php4/ext/ircg/ircg.c:1.60   Wed Apr 18 04:42:30 2001
+++ php4/ext/ircg/ircg.cTue Apr 24 02:40:05 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: ircg.c,v 1.60 2001/04/18 11:42:30 sas Exp $ */
+/* $Id: ircg.c,v 1.61 2001/04/24 09:40:05 sas Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -82,6 +82,8 @@
PHP_FE(ircg_html_encode, NULL)
PHP_FE(ircg_whois, NULL)
PHP_FE(ircg_kick, NULL)
+   PHP_FE(ircg_nickname_escape, NULL)
+   PHP_FE(ircg_nickname_unescape, NULL)
PHP_FE(ircg_ignore_add, NULL)
PHP_FE(ircg_ignore_del, NULL)
PHP_FE(ircg_disconnect, NULL)
@@ -218,6 +220,55 @@
}
 }
 
+static const char hextab[] = 0123456789abcdef;
+
+#define NICKNAME_ESC_CHAR '|'
+
+static void ircg_nickname_escape(smart_str *input, smart_str *output)
+{
+   char *p;
+   char *end;
+   char c;
+
+   end = input-c + input-len;
+
+   for(p = input-c; p  end; p++) {
+   c = *p;
+   if ((c = 'a'  c = 'z')
+   || (c = 'A'  c = 'Z')
+   || (c = '0'  c = '9'))
+   smart_str_appendc_ex(output, c, 1);
+   else {
+   smart_str_appendc_ex(output, NICKNAME_ESC_CHAR, 1);
+   smart_str_appendc_ex(output, hextab[c  4], 1);
+   smart_str_appendc_ex(output, hextab[c  15], 1);
+   }
+   }
+}
+
+#define HEX_VALUE(c) ((c='a'c='f')?c-'a':(c='0'c='9')?c-'0':0)
+
+static void ircg_nickname_unescape(smart_str *input, smart_str *output)
+{
+   char *p;
+   char *end;
+
+   end = input-c + input-len;
+
+   for(p = input-c; p  end; p++) {
+   switch (p[0]) {
+   case NICKNAME_ESC_CHAR:
+   if (p + 2 = end) break;
+   smart_str_appendc_ex(output, (HEX_VALUE(p[1])  4) + 
+HEX_VALUE(p[2]), 1);
+   p += 2;
+   break;
+   default:
+   smart_str_appendc_ex(output, p[0], 1);
+   }
+   }
+}
+
+
 void ircg_mirc_color(const char *, smart_str *, size_t);
 
 static void format_msg(const char *fmt, smart_str *channel, smart_str *to, smart_str 
*from, smart_str *msg, smart_str *result)
@@ -231,6 +282,7 @@
int js_encoded = 0;
unsigned long len;
int mod_encode;
+   int nickname_decode;

if (fmt[0] == '\0') {
return;
@@ -243,19 +295,23 @@
smart_str_appendl_ex(result, p, len, 1);


-   mod_encode = 0;
+   nickname_decode = mod_encode = 0;
 
 
 #define IRCG_APPEND(what) \
-   if (mod_encode) { \
+   if (mod_encode  nickname_decode) { \
smart_str tmp = {0}; \
-   ircg_js_escape(what, tmp); \
-   smart_str_append_ex(result, tmp, 1); \
+   ircg_nickname_unescape(what, tmp); \
+   ircg_js_escape(tmp, result); \
smart_str_free_ex(tmp, 1); \
+   } else if (mod_encode) { \
+   ircg_js_escape(what, result); \
+   } else if (nickname_decode) { \
+   ircg_nickname_unescape(what, result); \
} else { \
smart_str_append_ex(result, what, 1); \
}
-   
+
 again:
c = q[1];

@@ -264,6 +320,10 @@
mod_encode = 1;
q++;
goto again;
+   case '2':
+   nickname_decode = 1;
+   q++;
+   goto again;
case 'c':
IRCG_APPEND(channel);
break;
@@ -683,6 +743,48 @@
 #endif
 }
 
+PHP_FUNCTION(ircg_nickname_escape)
+{
+  

[PHP] how to install Win2K over Linux machine

2001-04-24 Thread howe

Hello,
  Does anyone know how to uninstall linux completlt, coz i deleted the linux
partition the OS still remain Linux...then HANG after that



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




RE: [PHP] how to install Win2K over Linux machine

2001-04-24 Thread Dominick Vansevenant

First, this is not the list for this question !!

Try booting with a dos bootdisk and enter fdisk /mbr first before installing
w2k.

D.

-Original Message-
From: howe [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 24 april 2001 12:23
To: [EMAIL PROTECTED]
Subject: [PHP] how to install Win2K over Linux machine


Hello,
  Does anyone know how to uninstall linux completlt, coz i deleted the linux
partition the OS still remain Linux...then HANG after that



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



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




Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Geir Eivind Mork

   http://www.php.net/manual/en/features.error-handling.php
   have you taken a deeper look into this?
  Well, I have tried...

And what kind of problem did you encounter? 

  My problem is that not displaying anything in case of an error is a
  completely unacceptable solution. I *MUST* return a valid XML message in
  a predefined format. If not, I am violating the standard we are

but that, as far as I've understand your case, isn't a problem. 

-- 
 php developer / CoreTrek AS| Recent investments will yield a slight
 Sandnes / Rogaland / Norway| profit. 
 web: http://www.moijk.net/ | 

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




[PHP] Countdown in PHP

2001-04-24 Thread george

  i need to use PHP to countdown to a certain date, and display the 
output as 
  time left:days, hours, minutes, seconds
   The countdown coule be done with javascript, but however it must be 
done client side


 TIA
-- 
george
chiefmonkey@my_pantswisemonkeydesign.co.uk
remove my_pants to reply
44 (0)1698 712537
44 (0)1698 712657

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




RE: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Marc Boeren


If there are we are better off finding them and fixing them instead of 
defaulting to c:\php4. I think we should follow the Windows standard on 
Windows. I know that I hate when programs want to install themselves in c:\

on Windows.

Just stating the obvious here, but c:\program files is a setting in the
registry that can be overridden (on my machine, it's d:\app), so if it is
decided to use this dir then please read the location from the registry (I
hate programs that install themselves in c:\program files after I have gone
through all the trouble of renaming it to d:\app)

if we want to make things easier for users, we should bear in mind that all
the
IIS/PWS management tools default to looking in SYSTEMROOT\system32\inetsrv

And since I'm using Apache under Windows (just for testing and developing,
but I've never had any trouble), this is probably not the place to default
to...

Cheerio, Marc.

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




[PHP] Anyone got the new Postgres 7.1 .rpms working?

2001-04-24 Thread Geoff Caplan

Hi

I am trying to compile the latest version of PHP to work with the new
Postgres 7.1 on RedHat 6.2

I have installed the Postgres library, client and server .rpms without
any problems.

Then in the php file /ext/pgsql/php_pgsql.h I have changed the
#include from postgres.h to postgres_fe.h as recommended.

But my make is failing with the following error:

php_pgsql.h:32: postgres_fe.h: No such file or directory
php_pgsql.h:33: libpq-fe.h: No such file or directory
php_pgsql.h:39: libpq/libpq-fs.h: No such file or directory

So far as I can see, none of these files exist in my /usr tree.

Is this a bug with the rpm or am I doing something dumb? My linux
skills are basic so any help would be much appreciated

Geoff Caplan



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




[PHP] PHP accessing the COM port?

2001-04-24 Thread sean

Hi,

I was wondering if anyone knew if I could acces the com port via PHP and
work with AT commands?

Someone has suggested something that MIGHT work - using fopen(com1... sorry
I dont know the correct syntax but as soon as I have managed to install php
I will give it a try.. in the meantime I would be grateful if you would let
me know if you think this will work..
many thanks

Sean



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




Re: [PHP] Countdown in PHP

2001-04-24 Thread george


 I mean server side.
 What i thought icould do was use a cookie time() 
 but how do I extract the value and display it as day hour minute second 
format
 and also how do I change the value of the cookie to reflect the 
different times someone will log on.
 For instance by setting the cookie someone will have access for 3 hours 
but someone who enters the site an hour later will only have access for 
2.
 Any help would be great Ihave nearly finished this project and this is 
all that is hoiding me up, I am  starting to pull my hair out and the 
client is determined that it be done server side. 


-- 
george
chiefmonkey@my_pantswisemonkeydesign.co.uk
remove my_pants to reply
44 (0)1698 712537
44 (0)1698 712657

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




[PHP] Vote results without refreshing the whole site!

2001-04-24 Thread Mohamedou

Dear all,

I have a survey script included in my site. After voting I need the results
but without refreshing the whole site just the script must load the new
results.
Every help will be apreciated

Yours

Moh


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


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




Re: [PHP] PHP 4.0.5

2001-04-24 Thread Martín Marqués

On Mar 24 Abr 2001 01:33, Henrik Hansen wrote:
 Martín Marqués [EMAIL PROTECTED] wrote:
   On Lun 23 Abr 2001 22:13, Felix Kronlage wrote:
On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
 I asked when the new version of PHP was comming out at the beginning
 of the month and some one told me that it was comming out the week
 after. Haven't seen it yet, anyone knows the release date??
   
RC7 got out a few days ago (Thursday I believe), and I think I recall
that unless lot's of things went wrong this is the last RC
   
-fkr
   
ps. I guess, it's released once it works fine :)
  
   Why don't the publicate the RC's. I had a hard time getting RC5.

 they are freely avaialiable on the net for download. or you always
 have cvs :)

I have a CVS installed on one of my machines, but the RCX are not published 
on the web site. That's what I'm copmplaining about!!

Saludos... :-)

-- 
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-
Martin Marques  |[EMAIL PROTECTED]
Programador, Administrador  |   Centro de Telematica
   Universidad Nacional
del Litoral
-

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




[PHP] Re: Posting to a form

2001-04-24 Thread Adrian D'Costa

I had this problem when I saved the page as a .html rather than a .php

Adrian

On Mon, 23 Apr 2001, Wade wrote:

 I'm trying to do the following
 
 input type=text tabindex=17 name=Aname value=
 
 ?
 echo strtoupper($Aname);
 ?
 
 But when Aname is multiple words, such as Wade Williams, everything from
 the whitespace on gets cut off.
 
 Any ideas how to fix this?
 
 Thanks
 Wade
 
 
 


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




Re: [PHP] How to turn off warnings ???

2001-04-24 Thread Christian Reiniger

On Monday 23 April 2001 23:50, Roee Rubin wrote:
 Hello,

 I am a newbie to PHP and I am trying to get a number of scripts to
 work.

 Whenever I try to execute some code I receive 'warnings', that
 basically clutter up the screen. Since I am assuming that these are not
 fatal - is there  any way to turn them off?

Warnings are not fatal as such, but they often give hints that you have a 
bug somewhere. Correct your code.

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

...1000100011010101101010110100111010113...

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




Re: [PHP] Why is it dangerous to have register_globals on?

2001-04-24 Thread Euan Greig

Now I understand! I hadn't twigged to the danger of _internal_ variables
getting overwritten by bogus get/post variables.

Thanks to you all.

Euan

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Actually it's not dangerous per se.
 
  However if can be very dangerous if you aren't being careful in your
code,
  for instance, consider this.
 
  Let's say I've conditionally set $sql somewhere else in the code based
upon
  certain conditions, which works fine. But let's say those conditions
aren't
  met so $sql doesn't get set to anything since it's not really used. Now
  consider this code:
 
  if ($sql)
  {
  $result = mysql_query($sql);
  }
 
  Now that would be fine for all normal instances. But now what if someone
  appends this onto the end of your url:
 
  ?query=
 
  ...plus something like DROP databasename. It doesn't take too much
  imagination to see what kind of things could happen if someone just had
a
  little bit of knowledge about how your code works.
 
  Thus you have two options. One is of course to turn register_globals
off,
  but ALWAYS ALWAYS _ALWAYS_ set a default for every variable you refer to
in
  your script at some point before doing anything with it. So if you use
$sql
  be 100% sure that it has been set $sql explicitly in your code before
doing
  anything with it.

 Whether you turn register_globals off or not, you need to always watch
 cases like this.  I have seen many people say that register_globals is
 inherently insecure and then they turn it off and go through and use
 something like $HTTP_POST_VARS['sql'] everywhere they used to use $sql.
 This only makes it slightly more tedious to inject bogus variables into
 since the attacker now needs to make a trivial little form to inject stuff
 into the POST data instead of just sticking it onto the URL.
 Security-wise there is no difference whatsoever.

 Never never never trust user-supplied data implicitly.  Always check
 anything that could possibly come from the user.  For internal variables,
 always initialize them and just generally think things through as you
 write your scripts.  This is no different in PHP than in any other
 scripting language used for web work.

 -Rasmus


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




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




Re: [PHP] PHP accessing the COM port?

2001-04-24 Thread sean

Hi all, me again.

I tried accessing the com port using fopen and was denied access... does
anyin have any other ideas?  I would really like to do this in php rather
than VB.

here is what I got...

Warning: fopen(COM1:,r+) - Permission denied in c:\web\test.php on line
6
Warning: Supplied argument is not a valid File-Handle resource in
c:\web\test.php on line 15


[EMAIL PROTECTED] wrote in message
9c3l86$lev$[EMAIL PROTECTED]">news:9c3l86$lev$[EMAIL PROTECTED]...
 Hi,

 I was wondering if anyone knew if I could acces the com port via PHP and
 work with AT commands?

 Someone has suggested something that MIGHT work - using fopen(com1...
sorry
 I dont know the correct syntax but as soon as I have managed to install
php
 I will give it a try.. in the meantime I would be grateful if you would
let
 me know if you think this will work..
 many thanks

 Sean



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




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




Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Christian Reiniger

On Tuesday 24 April 2001 12:14, Svein Roar Nilsen wrote:

  beside, use @ in front of the command to pipe away the current error
  or stop on-screen display of errors in general.

 My problem is that not displaying anything in case of an error is a
 completely unacceptable solution. I *MUST* return a valid XML message
 in a predefined format. If not, I am violating the standard we are

if (@foo_bar (42, 4711) == ERROR_CODE) {
   PrintXMLErrorMessage ();
}
else {
   GoOnProcessing ();
}

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

...1000100011010101101010110100111010113...

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




Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Svein Roar Nilsen

Geir Eivind Mork wrote:
http://www.php.net/manual/en/features.error-handling.php
have you taken a deeper look into this?
   Well, I have tried...
 
 And what kind of problem did you encounter?

The problem is that PHP generates fatal errors too often, and I have not
been able to find a way of trapping them. It also means that I am not
able to generate an error-message of the requiered form, e.g. something
like

?xml version=1.0 encoding=UTF-8 ?
my_reply
  my_error
Internal server error
  /my_error
/my_reply

What I do not need, is something like

brbFatal error/b:  XML parser error 7:
mismatched tag in b/var/www/[...]

And returning nothing would be even worse. 

The messages are meant to be machine-readable, meaning we must comply
with the standards.

 but that, as far as I've understand your case, isn't a problem.

Yes, it is. Because many functions generate fatal errors instead of
simply returning false or generating a warning. I have tried using the
set_error_handler(), but it only traps warnings and notices. It is
possible that I am doing something wrong, so if you can give me a short
working example, I should be really grateful! 


Svein Roar

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




RE: [PHP] How to find the object name in a class?

2001-04-24 Thread Boget, Chris

 *sigh* I'm thinking so too ;(
 Doh!
 However, I have at least a usable hack around.
 In the constructor of your class, add:
 function Class ($object_name) {
 global $pge;
 $pge = $object_name;
 }
 Then when you use create a new object of that type you must use:
 $objectname = new Class('objectname');

Heh.  This is exactly what I'm doing as it was the only work around
that I could find, too.

 Then in your code you just use ${$pge}- to refer to it.

Yup.  However, before I do this, I check to make sure $pge is valid 
before I use it.  Otherwise, all kinds of nastiness can occur.

What I'm doing this for is my error reporting class.  I'm using a
wrapper function that calls my class' errorHandler() method since
you cannot specify a class method as the handler function.  Kind
of funky.  But doing this was the only way I could get around it.

 Sucks, doesn't it?

Yup.  But I'm sure there is a reason for it.  Kind of like whatever
the reason is that we cannot actually get a variable's name.

I.E.

$joe = bob;

we cannot get that the above variable's name is joe.
Oh, well.

Chris



RE: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Boget, Chris

  My problem is that not displaying anything in case of an error is a
  completely unacceptable solution. I *MUST* return a valid 
  XML message in a predefined format. If not, I am violating the 
 standard we are
 if (@foo_bar (42, 4711) == ERROR_CODE) {
PrintXMLErrorMessage ();

I do not believe the above will work.  When using the @ symbol
in front of an expression, it makes it so that the error code that is
returned is 0.  While writing my error handler class, in the 
function that processes whatever error is triggered, I check to see
if the error code is 0 and if it is, I do nothing because there was
an @ symbol prepended to the expression.
You can read more about this in the error handling section of the
documentation.

Chris



[PHP] Error Handling

2001-04-24 Thread Boget, Chris

Is there a good write up out there or can anyone offer
some insight to the rest of us as to how error handling
should be properly implemented?
Yes, PEAR has some error handling routines, but it
doesn't have any kind of information as to how it should
be properly implemented.  I've just finished writing a
pretty decent error handling class of my own but going
through my code, I see places where I can add the
trigger_error() function, but beyond that, I'm not sure
exactly how to process it all.
Up to now, I've just been doing some generic error
handling.  If a query fails, if a user enters the wrong 
value, I print out a message.  But now that I'm handling
all the errors, I'm finding that I'm getting so many more
messages from PHP than I was before.  For example, if
a variable wasn't properly initialized 

(ie, I'll get an error in this case:

$mode = add;
if( $mode == add ) {
  $joe = bob;

}

if( $joe ) {
  echo You got here;

}

an error will be thrown by PHP saying that $joe is
uninitialized)

It's not as if that's a big deal.  It isn't.  But since I'm
getting more information than I need to actually give
the end user, it seems like kind of a daunting task to
start handling the errors myself.  It is something we
are going to need to do so I cannot put it off.  But I
am hoping that there is some sort of write up or tutorial
or something out there where I can learn from the
experience of others as to how something like this should
be done properly.  I'd rather do something of this
magnitude right the first time.

As an aside,  in writing this class and seeing how PHP 
works in this regard, I've so much more respect for 
what PHP actually does behind the scenes with regards 
to error and syntax checking.  It was definitely a learning
experience.

Chris



[PHP] The page cannot be displayed

2001-04-24 Thread Marcelo Pereira

Hi All,

I'm in troubles when I access Horde using win32 clients. This is a aplications built 
in PHP.
I can see (and fill) the form ``horde/imp/login.php'' but when it calls for 
``redirect.php'' (this file is at same folder that login.php) then I receive the 
famous ``this page cannot be displayed''.
I've read the php documentation but I dont think this is the problem..

Using unix clients the things goes very well...

What did I go wrong ??

See ya,

Marcelo Pereira
Unicamp - Brazil



[PHP] Functions.

2001-04-24 Thread Anders Clerwall

Hi,
Is there a tutorial of some sort on how I add function sets to PHP4?
I've searched the net for more info about this other than what the PHP4.x
manual says, and I saw some reference to freshmeat, but I couldn't find
that.
Any help appreciated, thanks!
--
 /\ ASCII ribbon | Anders Clerwall * Product Development  Teligent Nordic AB
 \/   campaign   | P.O. Box 213, S-149 23 Nynäshamn, Sweden  *  http://pc131
 /\   against| [EMAIL PROTECTED] * Mobile: +46 (0)70 749 56 57
/  \ HTML email. | What's with the  'Intel  Inside'  warning label anyway?





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




RE: [PHP] Site Structure

2001-04-24 Thread Matthew M. Boulter


G'day all, I thought I'd mention how I developed my last project and got
around some of these problems, bear with me it can be quite complicated.

===
In the development we had to develop on many different servers, mine at
home, my partners at his place then two different ones at work. Here's the
site structure (Red Hat 7):

/var/www/api/   -- all my code outside of the web tree
 config/-- where all the API's config files go (*.cfg)
 0.1/   -- version 0.1 of my API
 modules/   -- all of my 0.1 version modules (*.lib)
 0.2/   -- version 0.2 of my API
 modules/   -- all of my 0.2 version modules (*.lib)
/var/www/html/v1/   -- version 1 of the site (/html is Red Hat 7's name 
for
/htdocs)
/var/www/html/v2/   -- version 2   
---

[in PHP.INI]include_path = .:/var/www/api/config:/var/www/api/modules

In each /HTML/?? directory there is a file - api_connect.cfg

[in api_connect.cfg]include 'api01.cfg'

This basically says use version 0.1 of the API for this website. This way as
I experiment and change my source code I can make an entire new version
branch of my source code (i.e., make /var/www/api/0.3/modules) and change
the 'api_connect.cfg' file to suit.

* How to access in a PHP and/or HTML-hybrid file?
  Easy! ?php include 'api_connect.cfg'; ? at the top of your document.

--For-example--
My index file has a login form, therefore my index.html has the code
?php include 'api_connect.cfg';
// do other processing here, since that code sets up my API connection I
can use all my objects
$dbase = new ApiDbaseConn(); //etc, etc, etc
?
HTML
!-- blah, blah, blah --
/HTML

The include process would look like:--I-- Includes
/var/www/html/v1/index.html --I--
/var/www/html/v1/api_connect.cfg   --I--   /var/www/api/config/api01.cfg
   
 ^
** NOTE: This link takes advantage of the /var/www/api/config entry in the
PHP.INI include_path directive **

==Now=What??===What=does=API??.CFG=do?==
===
This is where the fun starts ;) Below is a *censored ;)* API04.CFG file:


[API04.CFG]

---
//--begin-file-guard--
$included_flag='__API_CONFIG_'.basename(__FILE__);
if(defined($included_flag)) {return true;} define($included_flag,TRUE);
//--end-file-guard---

/***
***/
/*==FRAMEWORK===CONSTANTS===
==*/
/***
***/
define('API_VERSION', '0.4');

//==[SITE-DETAILS]==

define('API_DEBUG_ON', 0);  // 0 - off; 1 - on
define('API_ERROR_ON', 0);  // 0 - off; 1 - on

$czServerName = 'vandyk';

switch ($czServerName)
{   
case 'vandyk':  define('SLASH', '/'); 
define('API_PATH', '/var/www/api'.SLASH);
define('API_DBASE_PRIMARY','***CENSORED***');
define('API_DBASE_SECONDARY','***CENSORED***');
define('API_DBASE_DBASENAME','***CENSORED***');
define('API_DBASE_PASSWORD','***CENSORED***'); 
 

define('API_DBASE_DBASENAME','***CENSORED***'); 
$bIsUnix = TRUE;
break;
//---  
 
case 'enki':define('SLASH', '\\'); 
 
define('API_PATH', 'C:\apache\api'.SLASH);
define('API_DBASE_PRIMARY','***CENSORED***');
define('API_DBASE_SECONDARY','***CENSORED***');
define('API_DBASE_DBASENAME','***CENSORED***');
define('API_DBASE_PASSWORD','***CENSORED***'); 
 

define('API_DBASE_DBASENAME','***CENSORED***'); 
$bIsUnix = FALSE;
break;
//---  
 

RE: [PHP] Posting to a form

2001-04-24 Thread Matthew Luchak

you can't have whitespace in $valsI would replace the whitespace
with _ and vice-versa when you want to ouput the $vals...

 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]




I'm trying to do the following

input type=text tabindex=17 name=Aname value=

?
echo strtoupper($Aname);
?

But when Aname is multiple words, such as Wade Williams, everything
from
the whitespace on gets cut off.



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




[PHP] PHP pl vs. ususal version.

2001-04-24 Thread Scott Fletcher

  I noticed when I install the PHP using hte version with pl, like
PHP-4.0.4pl1, and compile Apache with this PHP.  Apache said it couldn't
compile the PHP and doesn't compile it.  I struggled with it for a few
hours.  Then I end up installing PHP-4.0.2 without the pl on it and
compile Apache and it work fine.

  What I had discover is that you can't install the PHP with the pl
without the version that doesn't have the pl.  Is that true?   (To install
PHP version first before installing hte package level).

Scott



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




Re: [PHP] PHP accessing the COM port?

2001-04-24 Thread Scott Fletcher

  You would need to set the file permission to the file itself, COM1.
That would be the common errors.

Scott
[EMAIL PROTECTED] wrote in message
9c3q7s$lu3$[EMAIL PROTECTED]">news:9c3q7s$lu3$[EMAIL PROTECTED]...
 Hi all, me again.

 I tried accessing the com port using fopen and was denied access... does
 anyin have any other ideas?  I would really like to do this in php rather
 than VB.

 here is what I got...

 Warning: fopen(COM1:,r+) - Permission denied in c:\web\test.php on
line
 6
 Warning: Supplied argument is not a valid File-Handle resource in
 c:\web\test.php on line 15


 [EMAIL PROTECTED] wrote in message
 9c3l86$lev$[EMAIL PROTECTED]">news:9c3l86$lev$[EMAIL PROTECTED]...
  Hi,
 
  I was wondering if anyone knew if I could acces the com port via PHP and
  work with AT commands?
 
  Someone has suggested something that MIGHT work - using fopen(com1...
 sorry
  I dont know the correct syntax but as soon as I have managed to install
 php
  I will give it a try.. in the meantime I would be grateful if you would
 let
  me know if you think this will work..
  many thanks
 
  Sean
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



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




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




Re: [PHP] PHP accessing the COM port?

2001-04-24 Thread elias

 Warning: fopen(COM1:,r+) - Permission denied in c:\web\test.php on
line
why 'COM1:' and not 'COM1' ?

-elias
http://eassoft.cjb.net


[EMAIL PROTECTED] wrote in message
9c3q7s$lu3$[EMAIL PROTECTED]">news:9c3q7s$lu3$[EMAIL PROTECTED]...
 Hi all, me again.

 I tried accessing the com port using fopen and was denied access... does
 anyin have any other ideas?  I would really like to do this in php rather
 than VB.

 here is what I got...

 Warning: fopen(COM1:,r+) - Permission denied in c:\web\test.php on
line
 6
 Warning: Supplied argument is not a valid File-Handle resource in
 c:\web\test.php on line 15


 [EMAIL PROTECTED] wrote in message
 9c3l86$lev$[EMAIL PROTECTED]">news:9c3l86$lev$[EMAIL PROTECTED]...
  Hi,
 
  I was wondering if anyone knew if I could acces the com port via PHP and
  work with AT commands?
 
  Someone has suggested something that MIGHT work - using fopen(com1...
 sorry
  I dont know the correct syntax but as soon as I have managed to install
 php
  I will give it a try.. in the meantime I would be grateful if you would
 let
  me know if you think this will work..
  many thanks
 
  Sean
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



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




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




RE: [PHP] Is there such an array like $array[][]?

2001-04-24 Thread Robert V. Zwink

I have used the function usort() to sort multi-dimensional arrays before.
It might be a challenge to write the comparison function, but it is
possible.  I use 3-dim arrays all of the time.  Makes for a bit cleaner code
IMHO.

I suppose one thing to consider, is that if you have an enormous 3-dim
array, you are probably doing something wrong.  Generating a really big
array can be resource intense, and can slow you page down exponentially.
Select only parts of the recordset, or smaller chuck of the file for better
execution, but if your application requires a large 3-dim array, it works
just fine for me.

Robert Zwink

-Original Message-
From: Tim Ward [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 8:06 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Is there such an array like $array[][]?


1. there are no multi-dimensional arrays in php, just single dimension
arrays each element of which may be an array (or any other variable type).
If you make every element of an array an array of size x, you will get what
can be used as a multi-dimensional array. But if you forget what it really
is, you'll run into problems like expecting to be able to sort
$array[$x][$y] by $y.
2. because of this you can have as many levels of an array as you want.

try :
$array[][][][] = fred;
foreach($array as $level1)
foreach($level1 as $level2)
foreach($level2 as $level3)
foreach($level3 as $value)
echo($value);

Tim Ward
Senior Systems Engineer

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


 -Original Message-
 From: Plutarck [mailto:[EMAIL PROTECTED]]
 Sent: 17 April 2001 17:42
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Is there such an array like $array[][]?


 PHP can be a tad screwy with how it handles multi-dimensional
 arrays, but
 yes PHP handles them. No real speed problems with them either.

 But you may just want to use an associative array like:

 $loc = array(y = $y, x = $x);

 Then just use $loc[y] and $loc[x].

 Just another option, but feel free to use multi-dimensional
 arrays. Just be
 aware that PHP supports only two dimensions (so $array[][][]
 will not work),
 and if you try and get fancy with sort() and count() you are
 going to give
 yourself a migraine.


 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.


 Jack Dempsey [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  yes, that's a multi-dimensional array, which is fine in php (and
  everything else i can think of =P)...
 
  -jack
 
  Scott Fletcher wrote:
  
   Hi!  I am wondering if there is such a php array that can
 take care of
 the x
   and y axis data.  I figure that using this array type,
 $axis[$x][$y]
 would
   do the trick.  Would it work?  If not, then education me
 on what would
 work!
   Thanks!
  
   Scott
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 




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


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




Re: [PHP] PHP 4.0.5

2001-04-24 Thread The Doctor

On another front, will PHP 4.0.5 be compilable for a STATIC apache 2.0 Beta?

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




[PHP] How do I unsubscribe from this list

2001-04-24 Thread Walgamotte, David





   




[PHP-CVS] cvs: php4 /sapi/apache2filter sapi_apache2.c

2001-04-24 Thread Sascha Schumann

sas Tue Apr 24 05:57:34 2001 EDT

  Modified files:  
/php4/sapi/apache2filtersapi_apache2.c 
  Log:
  Accomodate Apache HTTPD 2.0 API change
  
  
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.28 
php4/sapi/apache2filter/sapi_apache2.c:1.29
--- php4/sapi/apache2filter/sapi_apache2.c:1.28 Wed Feb 28 06:19:15 2001
+++ php4/sapi/apache2filter/sapi_apache2.c  Tue Apr 24 05:57:34 2001
@@ -231,7 +231,7 @@
}
 
 static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, 
-   ap_input_mode_t mode)
+   ap_input_mode_t mode, apr_size_t *readbytes)
 {
php_struct *ctx;
long old_index;
@@ -245,7 +245,7 @@
 
INIT_CTX;
 
-   if ((rv = ap_get_brigade(f-next, bb, mode)) != APR_SUCCESS) {
+   if ((rv = ap_get_brigade(f-next, bb, mode, readbytes)) != APR_SUCCESS) {
return rv;
}
 



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




Re: [PHP] PHP pl vs. ususal version.

2001-04-24 Thread Michael Kimsal



Scott Fletcher wrote:

   I noticed when I install the PHP using hte version with pl, like
 PHP-4.0.4pl1, and compile Apache with this PHP.  Apache said it couldn't
 compile the PHP and doesn't compile it.  I struggled with it for a few
 hours.  Then I end up installing PHP-4.0.2 without the pl on it and
 compile Apache and it work fine.

   What I had discover is that you can't install the PHP with the pl
 without the version that doesn't have the pl.  Is that true?   (To install
 PHP version first before installing hte package level).

No, that's not true.  I've seen fresh installs of PHP4.0.3pl1 which worked OK.



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




RE: [PHP] How do I unsubscribe from this list

2001-04-24 Thread Jon Haworth

quote src=bottom of every email
To unsubscribe, e-mail: [EMAIL PROTECTED]
/quote

HTH
Jon




-Original Message-
From: Walgamotte, David [mailto:[EMAIL PROTECTED]]
Sent: 24 April 2001 14:45
To: [EMAIL PROTECTED]
Subject: [PHP] How do I unsubscribe from this list




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

**

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




Re: [PHP] Want to send email in html format

2001-04-24 Thread Charlie Llewellin

One fairly easy way is to use Richard Heyes html mail class available at

phpclasses.upperdesign.com


 I am working on a newsletter module. What I want
 to know is that how can we send a newsletter via
 email to all the subscribers in html format 
 with images in the htm too???
 



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




[PHP] About sessions !!

2001-04-24 Thread Hassan Arteaga

Hi !!

I just begin with PHP( but is the same as ASP ) and testing some examples...

loock at the code:

Page 1- Session.php

?php
session_start();
$myvar = 1;
session_register(myvar);
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ? echo $myvar; ? times.p
To continue, A HREF=session1.phpclick here/A
/body
/html 

___


Page 2- Session1.php
?php
session_start();
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ?php echo $myvar; ? times.p
Your SID is:  ?php echo SID; ? p
/body
/html 


Page 1 is ok..but when I click to go to page 2  I receive this results..

Hello visitor, you have seen this page times.
Your SID is: SID 

Who can tell me what happend !!

Thank you in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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




Re: [PHP] what is better? mysql_connect() or mysql_pconnect()?

2001-04-24 Thread Nikhil Goyal

I believe a good article is at
http://www.php.net/manual/en/features.persistent-connections.php

elias [EMAIL PROTECTED] wrote in message
9c3fi6$edm$[EMAIL PROTECTED]">news:9c3fi6$edm$[EMAIL PROTECTED]...
 hello...
 just asking...what is better in this case:
 i got lots of scripts and almost all of them needs to connect to the DB
and
 some of thems are accessed lots of times what is better to use in such
 cases:
 mysql_connect() or mysql_pconnect()...
 i mean will speed factor play a role when lots and lots of user tries to
 connect to the DB?

 -elias
 http://eassoft.cjb.net




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




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




Re: [PHP] PHP 4.0.5

2001-04-24 Thread Martín Marqués

On Mar 24 Abr 2001 16:34, The Doctor wrote:
 On another front, will PHP 4.0.5 be compilable for a STATIC apache 2.0
 Beta?

As far as I know, yes! There is at configure time an option to use 
apache-2.0. Never used it.

saludos... :-)

-- 
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-
Martin Marques  |[EMAIL PROTECTED]
Programador, Administrador  |   Centro de Telematica
   Universidad Nacional
del Litoral
-

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




[PHP-CVS] cvs: php4(PHP_4_0_5) /sapi/apache2filter sapi_apache2.c

2001-04-24 Thread Sascha Schumann

sas Tue Apr 24 05:58:53 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/sapi/apache2filtersapi_apache2.c 
  Log:
  MFH: Accomodate Apache HTTPD 2.0 API change
  
  
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.28 
php4/sapi/apache2filter/sapi_apache2.c:1.28.2.1
--- php4/sapi/apache2filter/sapi_apache2.c:1.28 Wed Feb 28 06:19:15 2001
+++ php4/sapi/apache2filter/sapi_apache2.c  Tue Apr 24 05:58:53 2001
@@ -231,7 +231,7 @@
}
 
 static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb, 
-   ap_input_mode_t mode)
+   ap_input_mode_t mode, apr_size_t *readbytes)
 {
php_struct *ctx;
long old_index;
@@ -245,7 +245,7 @@
 
INIT_CTX;
 
-   if ((rv = ap_get_brigade(f-next, bb, mode)) != APR_SUCCESS) {
+   if ((rv = ap_get_brigade(f-next, bb, mode, readbytes)) != APR_SUCCESS) {
return rv;
}
 



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




[PHP] FTP problem..

2001-04-24 Thread Chad Day

I'm trying to write a script to ftp the contents of one directory structure
onto another server.. I'm having problems recursing the directories, either
it a) doesn't do it or b) gets stuck in a loop.

Here's the function I'm having the problem with..


function recurseUp()
{
global $conn_id, $recurse;
$handle=opendir('.');
while (false!==($file = readdir($handle))) {
if ($file != .  $file != ..)
echo brb$file/bbr;
{
//if dir then recurse
if (is_Dir($file)) {
chDir($file);
$result = ftp_chdir($conn_id, $file);
if (!$result) {
@ftp_mkdir($conn_id, $file);
$result = ftp_chdir($conn_id, $file);
}
recurseUp();
} else {
//put
$result = ftp_put($conn_id, $file, $file, FTP_BINARY);
if (!$result) {
echo BRbError attempting retrieve file: 
$file/b;
} else {
echo BRRemote File Successfully Saved as: 
$file;
}
}
}
}

chDir('c:\inetpub\wwwroot\php\xfer');
ftp_cdup($conn_id);
closedir($handle);

}


Does anyone see the problem?  Thanks!

Chad


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




Re: [PHP] About sessions !!

2001-04-24 Thread Yasuo Ohgaki

SID does not work  unless you enable trans sid.

Regards,
--
Yasuo Ohgaki


Hassan Arteaga [EMAIL PROTECTED] wrote in message
7F548E90E63BD1118E4600609707771F8BEFAF@goliath">news:7F548E90E63BD1118E4600609707771F8BEFAF@goliath...
Hi !!

I just begin with PHP( but is the same as ASP ) and testing some examples...

loock at the code:

Page 1- Session.php

?php
session_start();
$myvar = 1;
session_register(myvar);
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ? echo $myvar; ? times.p
To continue, A HREF=session1.phpclick here/A
/body
/html

___


Page 2- Session1.php
?php
session_start();
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ?php echo $myvar; ? times.p
Your SID is:  ?php echo SID; ? p
/body
/html


Page 1 is ok..but when I click to go to page 2  I receive this results..

Hello visitor, you have seen this page times.
Your SID is: SID

Who can tell me what happend !!

Thank you in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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



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




Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Christian Reiniger

On Tuesday 24 April 2001 14:47, Boget, Chris wrote:
   My problem is that not displaying anything in case of an error is a
   completely unacceptable solution. I *MUST* return a valid
   XML message in a predefined format. If not, I am violating the
 
  standard we are
  if (@foo_bar (42, 4711) == ERROR_CODE) {
 PrintXMLErrorMessage ();

 I do not believe the above will work.  When using the @ symbol
 in front of an expression, it makes it so that the error code that is
 returned is 0.  While writing my error handler class, in the

Wrong. From http://php.net/manual/en/language.operators.errorcontrol.php :
--
PHP supports one error control operator: the at sign (@). When prepended 
to an expression in PHP, any error messages that might be generated by 
that expression will be ignored.
--

The @ operator suppresses any error *message*, but leaves the return 
value intact. 
Just imagine that with your interpretation in the following snippet
$conn = @mysql_connect(...)
$conn would always be set to 0...

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

I sat laughing snidely into my notebook until they showed me a PC running
Linux. And oh! It was as though the heavens opened and God handed down a
client-side OS so beautiful, so graceful, and so elegant that a million
Microsoft developers couldn't have invented it even if they had a hundred
years and a thousand crates of Jolt cola.

- LAN Times

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




Re: [PHP]PHP script and new window.

2001-04-24 Thread Nikhil Goyal

Plutarck [EMAIL PROTECTED] wrote in message
9c2gdi$170$[EMAIL PROTECTED]">news:9c2gdi$170$[EMAIL PROTECTED]...
 First of all, I believe since you are using javascript on your button you
 shouldn't use type=submit. Change it to type=button, which means it
will
 have no effect for browsers that don't have javascript enabled when
clicked.
 That could be an error, for one. But then again, it might not.

I had a similar requirement - to run a javascript when a form is submitted.
the best way to do this was to remove the 'onClick' event from the submit
button and instead make an 'onSubmit' event on the form

but remember that onSubmit must return true is the form is to be submitted,
false if the form is NOT to be submitted. It must return.

 It might cause it to be submitted to one page and opened on another, which
 very well may be what you want to happen. However it might be that the

Another good way to do that is to add a TARGET=_blank option to the FORM
tag. Or you can add a TARGET=windowname option, where windowname is a
window which your onSubmit code opened. This will submit the code and
display results in a new window

N



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




RE: [PHP] About sessions !!

2001-04-24 Thread Nicolas Guilhot

You should also check if register_globals is set to ON in your php.ini file.
Otherwise you can't access you session variable just with $myvar !!

And in your code you never increment $myvar, so even if it works, you'll
always get 1.

Regards,

Nicolas Guilhot

-Message d'origine-
De : Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 24 avril 2001 16:11
À : [EMAIL PROTECTED]
Objet : Re: [PHP] About sessions !!


SID does not work  unless you enable trans sid.

Regards,
--
Yasuo Ohgaki


Hassan Arteaga [EMAIL PROTECTED] wrote in message
7F548E90E63BD1118E4600609707771F8BEFAF@goliath">news:7F548E90E63BD1118E4600609707771F8BEFAF@goliath...
Hi !!

I just begin with PHP( but is the same as ASP ) and testing some examples...

loock at the code:

Page 1- Session.php

?php
session_start();
$myvar = 1;
session_register(myvar);
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ? echo $myvar; ? times.p
To continue, A HREF=session1.phpclick here/A
/body
/html

___


Page 2- Session1.php
?php
session_start();
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ?php echo $myvar; ? times.p
Your SID is:  ?php echo SID; ? p
/body
/html


Page 1 is ok..but when I click to go to page 2  I receive this results..

Hello visitor, you have seen this page times.
Your SID is: SID

Who can tell me what happend !!

Thank you in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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



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


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




Re: [PHP] Using input type = 'button rather than input type = 'submit'

2001-04-24 Thread Nikhil Goyal

also, using Method = POST will not show the vars in the URL, though it will be passed. 
Make it METHOD=GET to show it in the URL.

N
  Rene Maldonado [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi I think it woulf be better this way: 
  print form action = '$PHP_SELF?action=1' method = 'post' name = 
'hello'; 
  print input type='text' name='var_hello'; 
  print input type  = submit value = 'Submit' ; 


  and, the var name is $var_hello 

  this way, the value of your var do not appear in the URL, 

  This work for me... 



  Martin Cameron wrote: 

Here is a simple form file that needs to pass a variable - $hello - from 
the form to a new function. Unfortunately, it doesn't.  When you click 
the submit button, the URL looks like this: 
 http://localhost/test5.php?action=1hello= 

 It should have the variable there after the hello= 

I suspect it's something to do with parent.location. Looking for a 
solution. Here's the script: 

 head 
 /head 
 body bgcolor=white 
 ? 
 define(INITIAL_PAGE,0); 
 define(SELECT,1); 
 function initial_page(){ 
global $PHP_SELF,$hello; 
print form action = '$PHP_SELF?action=1' method = 'post' 
 name = 'hello'; 
print input type='text' name='hello'; 
print input name = 'hello' type='button' value='Submit' 
 onClick=\parent.location='$PHP_SELF?action=1hello=$hello'\; 

print /form; 
 } 

 function select(){ 
global $hello; 
print Hellooo, $hello!; 
 } 

 initial_page(); 

 switch($action){ 
  case INITIAL_PAGE: 
initial_page; 
break; 
  case SELECT: 
select(); 
break; 
  default: 
die (Hello, can't find that function.); 
 } 
 ? 
 /body 
 /html 

The thing is that if you simply hit enter - rather than click the 
submit button, the first directive in the form tag is invoked, and 
the value of the $hello variable IS passed. 

regards 
Martin Cameron



--


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



Re: [PHP] PHP 4.0.5

2001-04-24 Thread The Doctor

On Tue, Apr 24, 2001 at 11:01:27AM +0300, Martín Marqués wrote:
 On Mar 24 Abr 2001 16:34, The Doctor wrote:
  On another front, will PHP 4.0.5 be compilable for a STATIC apache 2.0
  Beta?
 
 As far as I know, yes! There is at configure time an option to use 
 apache-2.0. Never used it.
 
 saludos... :-)


For dynamic yes NOT for static. 

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




[PHP] Netscape Enterprise Server + PHP ?= possible

2001-04-24 Thread Daniel



Hi! I'm going to use PHP with Netscape Enterprise Server 3.5.1 (HP-UX). Is
it possible and what should I do?

As I understood from the documentation JSP is only one way. Do not want to
believe in it. :-)
Daniel



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




RE: [PHP] About sessions !!

2001-04-24 Thread Hassan Arteaga

ok ..register_globals  are on !!
Ok $myvar always will be 1 ..but  when a try to print it is empty !!!..It is
just a test about session.

Thanks Nicolas !!

-Original Message-
From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:13 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] About sessions !!


You should also check if register_globals is set to ON in your php.ini file.
Otherwise you can't access you session variable just with $myvar !!

And in your code you never increment $myvar, so even if it works, you'll
always get 1.

Regards,

Nicolas Guilhot

-Message d'origine-
De : Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 24 avril 2001 16:11
À : [EMAIL PROTECTED]
Objet : Re: [PHP] About sessions !!


SID does not work  unless you enable trans sid.

Regards,
--
Yasuo Ohgaki


Hassan Arteaga [EMAIL PROTECTED] wrote in message
7F548E90E63BD1118E4600609707771F8BEFAF@goliath">news:7F548E90E63BD1118E4600609707771F8BEFAF@goliath...
Hi !!

I just begin with PHP( but is the same as ASP ) and testing some examples...

loock at the code:

Page 1- Session.php

?php
session_start();
$myvar = 1;
session_register(myvar);
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ? echo $myvar; ? times.p
To continue, A HREF=session1.phpclick here/A
/body
/html

___


Page 2- Session1.php
?php
session_start();
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ?php echo $myvar; ? times.p
Your SID is:  ?php echo SID; ? p
/body
/html


Page 1 is ok..but when I click to go to page 2  I receive this results..

Hello visitor, you have seen this page times.
Your SID is: SID

Who can tell me what happend !!

Thank you in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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



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


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

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




Re: [PHP] Anyone got the new Postgres 7.1 .rpms working?

2001-04-24 Thread Meir Kriheli - MKsoft


- Original Message - 
From: Geoff Caplan [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 12:33 PM
Subject: [PHP] Anyone got the new Postgres 7.1 .rpms working?


 Hi
 
 I am trying to compile the latest version of PHP to work with the new
 Postgres 7.1 on RedHat 6.2
 
 I have installed the Postgres library, client and server .rpms without
 any problems.
 
 Then in the php file /ext/pgsql/php_pgsql.h I have changed the
 #include from postgres.h to postgres_fe.h as recommended.
 
 But my make is failing with the following error:
 
 php_pgsql.h:32: postgres_fe.h: No such file or directory
 php_pgsql.h:33: libpq-fe.h: No such file or directory
 php_pgsql.h:39: libpq/libpq-fs.h: No such file or directory
 
 So far as I can see, none of these files exist in my /usr tree.
 
 Is this a bug with the rpm or am I doing something dumb? My linux
 skills are basic so any help would be much appreciated
 
 Geoff Caplan

I had the same problem, and solved it by creating a symlink name postgres.h
to fostgres-fe.h, and it is working great.

In ypur postgres include dir do:

ln -s postgres-fe.h postgres.h

Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me - Pink Floyd


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




RE: [PHP] Is there such an array like $array[][]?

2001-04-24 Thread Robert V. Zwink

I don't understand your different definitions:  muti-dimensional and
array of arrays

From the manual:
Multi-Dimensional Arrays
Multi-dimensional arrays are actually pretty simple. For each dimension of
the array, you add another [key] value to the end:

 Tim Ward wrote:
 snip
 What looks like a 2d array is fact an array of arrays (and so
 on). If it's built right this can be treated as a multi-d array in many
 ways  ... but not all.

I wonder if you can help me understand this concept by giving an example of
what is possible with 1-dim arrays, but not with 3-dim arrays?

From my point of view the only difference is writing a custom comparison
function when sorting, though this does seem logical considering the
additional complexity of multiple dimensions.

Thanks for your help.

Robert Zwink


-Original Message-
From: Tim Ward [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 9:54 AM
To: 'Robert V. Zwink'
Subject: RE: [PHP] Is there such an array like $array[][]?


my point was that what appear to be multi-dimensional arrays in php are not
that at all. What looks like a 2d array is fact an array of arrays (and so
on). If it's built right this can be treated as a multi-d array in many ways
... but not all.

There seem to be a lot of queries from people confused about how to deal
with arrays of arrays and this often stems from a misconception that they
are actually multi-d arrays.

Tim Ward
Senior Systems Engineer

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


 -Original Message-
 From: Robert V. Zwink [mailto:[EMAIL PROTECTED]]
 Sent: 24 April 2001 14:33
 To: Tim Ward; [EMAIL PROTECTED]
 Subject: RE: [PHP] Is there such an array like $array[][]?


 I have used the function usort() to sort multi-dimensional
 arrays before.
 It might be a challenge to write the comparison function, but it is
 possible.  I use 3-dim arrays all of the time.  Makes for a
 bit cleaner code
 IMHO.

 I suppose one thing to consider, is that if you have an enormous 3-dim
 array, you are probably doing something wrong.  Generating a
 really big
 array can be resource intense, and can slow you page down
 exponentially.
 Select only parts of the recordset, or smaller chuck of the
 file for better
 execution, but if your application requires a large 3-dim
 array, it works
 just fine for me.

 Robert Zwink

 -Original Message-
 From: Tim Ward [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 18, 2001 8:06 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [PHP] Is there such an array like $array[][]?


 1. there are no multi-dimensional arrays in php, just single dimension
 arrays each element of which may be an array (or any other
 variable type).
 If you make every element of an array an array of size x, you
 will get what
 can be used as a multi-dimensional array. But if you forget
 what it really
 is, you'll run into problems like expecting to be able to sort
 $array[$x][$y] by $y.
 2. because of this you can have as many levels of an array as
 you want.

 try :
 $array[][][][] = fred;
 foreach($array as $level1)
   foreach($level1 as $level2)
   foreach($level2 as $level3)
   foreach($level3 as $value)
   echo($value);

   Tim Ward
   Senior Systems Engineer

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


  -Original Message-
  From: Plutarck [mailto:[EMAIL PROTECTED]]
  Sent: 17 April 2001 17:42
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Is there such an array like $array[][]?
 
 
  PHP can be a tad screwy with how it handles multi-dimensional
  arrays, but
  yes PHP handles them. No real speed problems with them either.
 
  But you may just want to use an associative array like:
 
  $loc = array(y = $y, x = $x);
 
  Then just use $loc[y] and $loc[x].
 
  Just another option, but feel free to use multi-dimensional
  arrays. Just be
  aware that PHP supports only two dimensions (so $array[][][]
  will not work),
  and if you try and get fancy with sort() and count() you are
  going to give
  yourself a migraine.
 
 
  --
  Plutarck
  Should be working on something...
  ...but forgot what it was.
 
 
  Jack Dempsey [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   yes, that's a multi-dimensional array, which is fine in php (and
   everything else i can think of =P)...
  
   -jack
  
   Scott Fletcher wrote:
   
Hi!  I am wondering if there is such a php array that can
  take care of
  the x
and y axis data.  I figure that using this array type,
  $axis[$x][$y]
  would
do the trick.  Would it work?  If not, then education me
  on what would
  work!
Thanks!
   
Scott
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: 

[PHP] no fetch

2001-04-24 Thread Wilbert Enserink

Hello everybody,

I'm just starting out with php4 and I can use some help.
Below is a script I wrote. The dbase connections are allright (i have tested
them) , but the final result is 'no fetch'.
so something goes wrong in 'mysql_fetch_row' but I don't understand what.
Any of you have an idea?

Thanx.

W. Enserink


?php

$global_dbh = mysql_connect($hostname, $user, $password);

if(!$global_dbh)
 die(no dbase connection);

$a = mysql_select_db('pdd', $global_dbh);
if(!$a)
 die(no dbase selection);


function display_db_table($tablename, $connection)
{
 $query_string = select * from $tablename;
 print (querystring = $query_stringBR);
 $result_id = mysql_query($query_string, $connection);
 print(result_id = $result_idBR);
 $column_count = mysql_num_fields($result_id);
 print(column_count = $column_countBR);



print(TABLE BORDER=1\n);
while ($row = mysql_fetch_row($result_id));
 {
 if(!$row)
  die (no fetch);
 print row = $row[1];
 print(tr align = left valign = top);
 for ($column_num = 0;
  $column_num  $column_count;
  $column_num++)
 print(TD$row[$column_num] $column_num/td\n);

 print(/tr\n);
 }
print(/table\n);
}
?

html
body
tabletrtd
?php
display_db_table(test, $global_dbh);

?
/TD/TR/TABLE
/body
/html

-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-

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




RE: [PHP] Netscape Enterprise Server + PHP ?= possible

2001-04-24 Thread Jon Haworth

I would have thought you could use it as a CGI, if you can't get it running
as a module.

These manual pages look like they might be of use to you:
http://www.php.net/manual/en/install.netscape-enterprise.php
http://www.php.net/manual/en/install.hpux.php

Cheers
Jon


-Original Message-
From: Daniel [mailto:[EMAIL PROTECTED]]
Sent: 24 April 2001 15:21
To: [EMAIL PROTECTED]
Subject: [PHP] Netscape Enterprise Server + PHP ?= possible




Hi! I'm going to use PHP with Netscape Enterprise Server 3.5.1 (HP-UX). Is
it possible and what should I do?

As I understood from the documentation JSP is only one way. Do not want to
believe in it. :-)
Daniel



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

**

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




[PHP] db to xls

2001-04-24 Thread Rahul Bhide

Gurus,
I want to query an oracle database and push the output to an MS
Excel spreadsheet . Currently I am dumping it to a csv text file and
reading into Excel.
Is there a better way to do this?? Is there a php function for
this ??
Regards
~Rahul



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




[PHP] create bar chart

2001-04-24 Thread Ali

Hello,

how it is possible to create a bar chart in php? I appreciate any hint.

Ali


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




Re: [PHP] create bar chart

2001-04-24 Thread Rahul Bhide

Ali,
You need to install gd library with php .
Visit here for a reference tool
//www.sourceforge.net/projects/phplot/
bye
~Rahul
Ali wrote:

 Hello,

 how it is possible to create a bar chart in php? I appreciate any hint.

 Ali

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


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




RE: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Boget, Chris

   standard we are
   if (@foo_bar (42, 4711) == ERROR_CODE) {
  PrintXMLErrorMessage ();
  I do not believe the above will work.  When using the @ symbol
  in front of an expression, it makes it so that the error 
  code that is returned is 0.  While writing my error handler class, 
  in the
 Wrong. From 
 http://php.net/manual/en/language.operators.errorcontrol.php :
 --
 PHP supports one error control operator: the at sign (@). When prepended 
 to an expression in PHP, any error messages that might be generated by 
 that expression will be ignored.
 --
 The @ operator suppresses any error *message*, but leaves the return 
 value intact. Just imagine that with your interpretation in the following 
 snippet
 $conn = @mysql_connect(...)
 $conn would always be set to 0...

Wrong back.  From:
http://php.net/manual/en/function.set-error-handler.php


It is important to remember that the standard PHP error handler is 
completely bypassed. error_reporting() settings will have no effect 
and your error handler will be called regardless - however you are 
still able to read the current value of error_reporting() and act
appropriately. Of particular note is that this value will be 0 if the 
statement that caused the error was prepended by the @ error-control
operator. 


Using your example, $conn wouldn't be '0' but if any error that is
generated by mysql_connect, that error code/number (what you are
going to be looking for) will be '0'.  So if, in the original function
f00_bar(), it tried to return any error code/number, that code/number
would be '0' (zero) by nature of having the @ operator prepended
to the function call.
You don't have to believe me.  Set up your own error handler and
see for yourself what error number you get when the @ symbol
is prepended to an expression.

Chris



[PHP] Image Processing in PHP

2001-04-24 Thread Michael O'Neal

Hi,

I want a client to be able to upload a file to the web server via PHP.  
Then, I want that image to be processed, scaled, and made into thumbnails 
and full-size images.  Is this possible with the image processing 
capabilities of PHP, or should I use something like Image Magick to do it 
server side?

Please copy your reply to [EMAIL PROTECTED] as I am on the digest 
version.  

Thanks in advance.


mto

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R 
-
http://www.thinkmango.com
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507



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




Re: [PHP] create bar chart

2001-04-24 Thread Ali

Hello Rahul,

thanks for your reply. I already have got gd library installed. This tool
which have mentioned may help me further to create such a bar chart. I will
look at it.

Regards

Ali


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




RE: [PHP] About sessions !! (fwd)

2001-04-24 Thread johndmiller

try doing the session_register and then $myvar = 1;
I think when you do the session_register the value of $myvar gets
initialized to null.

-- Forwarded message --
Date: Tue, 24 Apr 2001 11:23:17 -0300
From: Hassan Arteaga [EMAIL PROTECTED]
To: Php (E-mail) [EMAIL PROTECTED]
Subject: RE: [PHP] About sessions !!

ok ..register_globals  are on !!
Ok $myvar always will be 1 ..but  when a try to print it is empty !!!..It is
just a test about session.

Thanks Nicolas !!

-Original Message-
From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:13 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] About sessions !!


You should also check if register_globals is set to ON in your php.ini file.
Otherwise you can't access you session variable just with $myvar !!

And in your code you never increment $myvar, so even if it works, you'll
always get 1.

Regards,

Nicolas Guilhot

-Message d'origine-
De : Yasuo Ohgaki [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 24 avril 2001 16:11
À : [EMAIL PROTECTED]
Objet : Re: [PHP] About sessions !!


SID does not work  unless you enable trans sid.

Regards,
--
Yasuo Ohgaki


Hassan Arteaga [EMAIL PROTECTED] wrote in message
7F548E90E63BD1118E4600609707771F8BEFAF@goliath">news:7F548E90E63BD1118E4600609707771F8BEFAF@goliath...
Hi !!

I just begin with PHP( but is the same as ASP ) and testing some examples...

loock at the code:

Page 1- Session.php

?php
session_start();
$myvar = 1;
session_register(myvar);
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ? echo $myvar; ? times.p
To continue, A HREF=session1.phpclick here/A
/body
/html

___


Page 2- Session1.php
?php
session_start();
?
html
head
meta http-equiv=Content-Type content=text/html; charset=windows-1252
meta name=GENERATOR content=Microsoft FrontPage 4.0
meta name=ProgId content=FrontPage.Editor.Document
titleNew Page 1/title
/head
body
Hello visitor, you have seen this page ?php echo $myvar; ? times.p
Your SID is:  ?php echo SID; ? p
/body
/html


Page 1 is ok..but when I click to go to page 2  I receive this results..

Hello visitor, you have seen this page times.
Your SID is: SID

Who can tell me what happend !!

Thank you in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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



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


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

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


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




Re: [PHP] db to xls

2001-04-24 Thread Calin Rotaru

You can query the oracle database and generate a text file with tab delimiter.
Then you can open this file in Excel.

Calin

On Tuesday 24 April 2001 10:31, Rahul Bhide wrote:
 Gurus,
 I want to query an oracle database and push the output to an MS
 Excel spreadsheet . Currently I am dumping it to a csv text file and
 reading into Excel.
 Is there a better way to do this?? Is there a php function for
 this ??
 Regards
 ~Rahul

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




Re: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Christian Reiniger

On Tuesday 24 April 2001 16:48, Boget, Chris wrote:
standard we are
if (@foo_bar (42, 4711) == ERROR_CODE) {
   PrintXMLErrorMessage ();

 Wrong back.  From:
 http://php.net/manual/en/function.set-error-handler.php

 
 It is important to remember that the standard PHP error handler is
 completely bypassed. error_reporting() settings will have no effect
 and your error handler will be called regardless - however you are
 still able to read the current value of error_reporting() and act
 appropriately. Of particular note is that this value will be 0 if the
 statement that caused the error was prepended by the @ error-control
 operator.
 

 Using your example, $conn wouldn't be '0' but if any error that is
 generated by mysql_connect, that error code/number (what you are
 going to be looking for) will be '0'.  So if, in the original function
 f00_bar(), it tried to return any error code/number, that code/number
 would be '0' (zero) by nature of having the @ operator prepended
 to the function call.

Well, we both are right. The snippet I suggested (top of this mail) 
*will* work, because the @ operator doesn't mess with the return value of 
the function. A custom error handling function installed via 
set_error_handler() will *not* work because it won't get the error code.

But I never suggested using set_error_handler() :)

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

I sat laughing snidely into my notebook until they showed me a PC running
Linux. And oh! It was as though the heavens opened and God handed down a
client-side OS so beautiful, so graceful, and so elegant that a million
Microsoft developers couldn't have invented it even if they had a hundred
years and a thousand crates of Jolt cola.

- LAN Times

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




[PHP] including html pages inside an interface

2001-04-24 Thread Romulo Roberto Pereira

Hello!

This is the scenario:

(a) I have an interface that will be the main interface with the user

(b) I have a mail server (Mirapoint) that has a web interface

(c) The web interface for the Mirapoint server is inside frames

This is the problem:

(a) let's say that I log in as a user from the Mirapoint web e-mail server;
I will receive an interface for the user with all the e-mail readers and
commands let's say like compose new e-mail and delete e-mail.

(b) I want to show let's say the headers inside my interface.

How do I do that? Ideas?

Thank you,

Rom


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




RE: [PHP] Site Structure

2001-04-24 Thread John Huggins

This guy is proof that PHP programmers are a functional clever bunch and PHP
does not box us in with too many limits.

 -Original Message-
 From: Matthew M. Boulter [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 24, 2001 9:16 AM
 To: Steve Werby; Toby Miller; indrek siitan
 Cc: PHP General Mailing List
 Subject: RE: [PHP] Site Structure



 G'day all, I thought I'd mention how I developed my last project and got
 around some of these problems, bear with me it can be quite complicated.
 ==
 ==
 ===
 In the development we had to develop on many different servers, mine at
 home, my partners at his place then two different ones at work. Here's the
 site structure (Red Hat 7):

 /var/www/api/ -- all my code outside of the web tree
config/-- where all the API's config
 files go (*.cfg)
0.1/   -- version 0.1 of my API
modules/   -- all of my 0.1 version modules (*.lib)
0.2/   -- version 0.2 of my API
modules/   -- all of my 0.2 version modules (*.lib)
 /var/www/html/v1/ -- version 1 of the site (/html is
 Red Hat 7's name for
 /htdocs)
 /var/www/html/v2/ -- version 2   
 ---

 [in PHP.INI]  include_path =
 .:/var/www/api/config:/var/www/api/modules

 In each /HTML/?? directory there is a file - api_connect.cfg

 [in api_connect.cfg]  include 'api01.cfg'

 This basically says use version 0.1 of the API for this website.
 This way as
 I experiment and change my source code I can make an entire new version
 branch of my source code (i.e., make /var/www/api/0.3/modules) and change
 the 'api_connect.cfg' file to suit.

 * How to access in a PHP and/or HTML-hybrid file?
   Easy! ?php include 'api_connect.cfg'; ? at the top of your document.

 --For-example--
 My index file has a login form, therefore my index.html has the code
 ?php include 'api_connect.cfg';
   // do other processing here, since that code sets up my API
 connection I
 can use all my objects
   $dbase = new ApiDbaseConn(); //etc, etc, etc
 ?
 HTML
 !-- blah, blah, blah --
 /HTML

 The include process would look like:  --I-- Includes
 /var/www/html/v1/index.html   --I--
 /var/www/html/v1/api_connect.cfg   --I--   /var/www/api/config/api01.cfg

   ^
 ** NOTE: This link takes advantage of the /var/www/api/config
 entry in the
 PHP.INI include_path directive **

 ==Now=What??===What=does=API??.CFG=do?
 ==
 ===
 This is where the fun starts ;) Below is a *censored ;)* API04.CFG file:


 [API04.CFG]
 --
 --
 ---
 //--begin-file-guard--
 $included_flag='__API_CONFIG_'.basename(__FILE__);
 if(defined($included_flag)) {return true;} define($included_flag,TRUE);
 //--end-file-guard---

 /*
 **
 ***/
 /*==FRAMEWORK===CONSTANTS=
 ==
 ==*/
 /*
 **
 ***/
 define('API_VERSION', '0.4');

 //==[SITE-DETAILS]
 ==
 
 define('API_DEBUG_ON', 0);//
 0 - off; 1 - on
 define('API_ERROR_ON', 0);//
 0 - off; 1 - on

 $czServerName = 'vandyk';

 switch ($czServerName)
 {
   case 'vandyk':  define('SLASH', '/');
   define('API_PATH', '/var/www/api'.SLASH);

 define('API_DBASE_PRIMARY','***CENSORED***');

 define('API_DBASE_SECONDARY','***CENSORED***');

 define('API_DBASE_DBASENAME','***CENSORED***');

 define('API_DBASE_PASSWORD','***CENSORED***');

 define('API_DBASE_DBASENAME','***CENSORED***');
   $bIsUnix = TRUE;
   break;
   //---

   case 'enki':define('SLASH', '\\');

   define('API_PATH',
 'C:\apache\api'.SLASH);

 define('API_DBASE_PRIMARY','***CENSORED***');

 define('API_DBASE_SECONDARY','***CENSORED***');

 define('API_DBASE_DBASENAME','***CENSORED***');

 define('API_DBASE_PASSWORD','***CENSORED***');

 define('API_DBASE_DBASENAME','***CENSORED***');
   $bIsUnix = FALSE;
   break;
   //---

   case 'fontaine':// you get the idea
   //---

   case 'morillo':
 // you get the idea
   //---
   case 'oakenfold':   // you get the idea
 }


 

Re: [PHP] db to xls

2001-04-24 Thread Rahul Bhide

Thanks Calin,
I have already tried with the csv and the tab delimited text file  . I wanted
to know a better option
bye
`Rahul
Calin Rotaru wrote:

 You can query the oracle database and generate a text file with tab delimiter.
 Then you can open this file in Excel.

 Calin

 On Tuesday 24 April 2001 10:31, Rahul Bhide wrote:
  Gurus,
  I want to query an oracle database and push the output to an MS
  Excel spreadsheet . Currently I am dumping it to a csv text file and
  reading into Excel.
  Is there a better way to do this?? Is there a php function for
  this ??
  Regards
  ~Rahul

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


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




RE: [PHP] Image Processing in PHP

2001-04-24 Thread Joseph Bannon

 I want a client to be able to upload a file to the web server via PHP.  
 Then, I want that image to be processed, scaled, and made into thumbnails 
 and full-size images.  Is this possible with the image processing 
 capabilities of PHP, or should I use something like Image Magick to do it 
 server side?



I'd like to know how to do this as well.

J






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




RE: [PHP] Fatal Errors and Error Handling

2001-04-24 Thread Boget, Chris

 if (@foo_bar (42, 4711) == ERROR_CODE) {
PrintXMLErrorMessage ();


 Well, we both are right. The snippet I suggested (top of this mail) 
 *will* work, because the @ operator doesn't mess with the return 
 value of  the function. 

That is correct.  However, the == ERROR_CODE suggests that
an error code will be returned by foo_bar().  However, that code
will be suppressed by the @ symbol and that is what I was commenting
on... the fact that the above example couldn't be used if you wanted
to print your own error messsage.

 A custom error handling function installed via set_error_handler() 
 will *not* work because it won't get the error code.

Well, it will work and it will still be called.  However, the error code
passed to it will be '0'.

 But I never suggested using set_error_handler() :)

But the issue at hand was the fact that the original poster
was using, and needed to use, set_error_handler to handle
their own errors.

Chris



Re: [PHP] db to xls

2001-04-24 Thread Andreas Landmark

On Tue, Apr 24, 2001 at 08:37:19PM +0530, Rahul Bhide produced this golden nugget:
 Thanks Calin,
 I have already tried with the csv and the tab delimited text file  . I wanted
 to know a better option
 bye
 `Rahul

Doubt there is a more effective solution with php (unless you write a class/
function that ouputs .xls), what you could do though is probably to use ODBC
to connect excel (if it supports odbc) and connect the oracle base through
ODBC...

-- 
Andreas D. Landmark / noXtension
Fortune's Fictitious Country Song Title of the Week:
How Can I Miss You if You Won't Go Away?

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




RE: [PHP] db to xls

2001-04-24 Thread Alok K. Dhir


If you really want to create Excel files directly from php, the attached
file (untested) may help.  I found this somewhere on the net while
looking for the same solution.

What I wound up using is the _excellent_ Spreadsheet::WriteExcel module
for Perl.  We simply call the perl CGI for that function of our web app.
Works great!  It also has a Spreadsheet::ParseExcel companion which
works equally well.

The only problem we had with this was not being able to get to the
contents of the session while in Perl.  Could have jumped through some
hoops to get it, but wound up hacking around it by using a long query
string with the pertinent parameters (ugly, but works).

Al

 -Original Message-
 From: 
 [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED].
 net] On Behalf Of Calin Rotaru
 Sent: Tuesday, April 24, 2001 5:59 PM
 To: Rahul Bhide; [EMAIL PROTECTED]
 Subject: Re: [PHP] db to xls
 
 
 You can query the oracle database and generate a text file 
 with tab delimiter. Then you can open this file in Excel.
 
 Calin
 
 On Tuesday 24 April 2001 10:31, Rahul Bhide wrote:
  Gurus,
  I want to query an oracle database and push the output to an MS 
  Excel spreadsheet . Currently I am dumping it to a csv text 
 file and 
  reading into Excel.
  Is there a better way to do this?? Is there a php function for 
  this ?? Regards
  ~Rahul
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
 [EMAIL PROTECTED] To contact the list 
 administrators, e-mail: [EMAIL PROTECTED]
 
 



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


RE: [PHP] db to xls

2001-04-24 Thread Boget, Chris

 I want to query an oracle database and push the output to an MS
 Excel spreadsheet . Currently I am dumping it to a csv text file and
 reading into Excel.
 Is there a better way to do this?? Is there a php function for this ??

What I am doing is using PHP to generate an HTML table in the
format that I want to display the db results in.  Then, at the top
of this file, I include the following code:

code_snippet

Header(Content-Disposition: inline; filename=filename.xls);
Header(Content-Description: PHP3 Generated Data);
Header(Content-type: application/vnd.ms-excel; name='excel');
flush();

/code_snippet

The browser will get those headers, see that it's receiving an
excel file and proceed to launch Excel.  And Excel is good enough
to know and process HTML and your data is displayed appropriately.
It's very cool and very easy to implement.

Chris



Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c

2001-04-24 Thread Joe Brown

What is the software default path registry key???
I found it once before, when I wasn't looking.  Now I'm looking I can't find
it.


Marc Boeren [EMAIL PROTECTED] wrote in message
7BE0F4A5D7AED2119B7500A0C94C58AC17A73B@DELLSERVER">news:7BE0F4A5D7AED2119B7500A0C94C58AC17A73B@DELLSERVER...

 If there are we are better off finding them and fixing them instead of
 defaulting to c:\php4. I think we should follow the Windows standard on
 Windows. I know that I hate when programs want to install themselves in
c:\

 on Windows.

 Just stating the obvious here, but c:\program files is a setting in the
 registry that can be overridden (on my machine, it's d:\app), so if it is
 decided to use this dir then please read the location from the registry (I
 hate programs that install themselves in c:\program files after I have
gone
 through all the trouble of renaming it to d:\app)

 if we want to make things easier for users, we should bear in mind that
all
 the
 IIS/PWS management tools default to looking in
SYSTEMROOT\system32\inetsrv

 And since I'm using Apache under Windows (just for testing and developing,
 but I've never had any trouble), this is probably not the place to default
 to...

 Cheerio, Marc.

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




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




[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/imap php_imap.c

2001-04-24 Thread Chuck Hagenbuch

chagenbuTue Apr 24 07:17:41 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4/ext/imap  php_imap.c 
  Log:
  MFH: fix crash bug in imap_sort (#9908).
  
  
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.62.2.1 php4/ext/imap/php_imap.c:1.62.2.2
--- php4/ext/imap/php_imap.c:1.62.2.1   Fri Mar 16 05:24:06 2001
+++ php4/ext/imap/php_imap.cTue Apr 24 07:17:41 2001
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: php_imap.c,v 1.62.2.1 2001/03/16 13:24:06 kalowsky Exp $ */
+/* $Id: php_imap.c,v 1.62.2.2 2001/04/24 14:17:41 chagenbu Exp $ */
 
 #define IMAP41
 
@@ -2748,12 +2748,18 @@
mypgm-next = NIL;

slst = mail_sort(imap_le_struct-imap_stream, NIL, spg, mypgm, myargc = 4 ? 
Z_LVAL_PP(flags) : NIL);
+   if (spg) {
+   mail_free_searchpgm(spg);
+   }
+

array_init(return_value);
-   for (sl = slst; *sl; sl++) { 
-   add_next_index_long(return_value, *sl);
+   if (slst != NIL  slst != 0) {
+   for (sl = slst; *sl; sl++) { 
+   add_next_index_long(return_value, *sl);
+   }
+   fs_give ((void **) slst);
}
-   fs_give ((void **) slst); 
 }
 /* }}} */
 



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




[PHP] newbie help with wildcard question

2001-04-24 Thread Publications

Thank you in advance for your response. I have an order form that I would
like to drop directly into my shopping cart. The following form and php
works great for the first input - part_number - is there a wildcard that I
can place at the end of the array so that the cart will pickup all part
numbers entered into the form?

FORM ACTION=?php print MTA_URL('/cart/dropin.php',array('part_number'=
$part_number)); ? method=post
  INPUT TYPE=HIDDEN NAME=Orderform VALUE=No
  table width=22% border=0 cellspacing=0 cellpadding=0
tr
  tdbModel or Part Number: /b/td
/tr
tr
  td
input type=Text name=part_number
  /td
/tr
tr
  td
input type=Text name=part_number2
  /td
/tr
   etc...

Duffy Betterton
Director of Publications
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
www.mtadistributors.com http://www.mtadistributors.com
1-615-277-3265





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




  1   2   3   >