[PHP] directory listing

2003-01-09 Thread Aleš Lončar
Hi!

I have one question.
How can I get sorted listing of a direcorty with readdir function? Is this possible or 
I have to write custom function using array function sort?

TNX

LP, AlesL

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




[PHP] proc_open() problems

2003-01-09 Thread Jean-Christian Imbeault
I've written a script that uses proc_open() to call and external program 
and capture it's output.

My script works fine as long as I call/use it in the directory where it 
resides. But if I try to include() it in a script that resides in 
another folder proc_open() return an exit value of 255. I can't access 
the external program.

What am I missing? Some file perms? I did a "chown -R apache *" from the 
top directory but that didn't help ...

I'm using the php.ini-recommended file. Is there some setting in there I 
should change?

Jc


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



[PHP] string prints out as number (E+10...), why?

2003-01-09 Thread Jean-Christian Imbeault
I'm passing a var into a function which is a 16 digit number, but when I 
try to print it out I get 1.111E+15 instead of the expected 
11.

Why? How can I change this behaviour?

Jc


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



Re: [PHP] Segmentation fault and var_dump()

2003-01-09 Thread Jason Wong
On Thursday 09 January 2003 05:59, Rob Brandt wrote:

> What is wrong?  It only does this when the var_dump() is present;
> comment it out and there is no segmentation fault (but the script
> still doesn't work right).  With it present, the seg faults every
> time.

You can try using print_r() instead of var_dump(). It's output is not as 
detailed as var_dump() but may be sufficient for your needs.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Everything should be built top-down, except this time.
*/


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




Re: [PHP] directory listing

2003-01-09 Thread Jason Wong
On Thursday 09 January 2003 16:29, Aleš Lončar wrote:
> Hi!
>
> I have one question.
> How can I get sorted listing of a direcorty with readdir function? Is this
> possible 

No, not with readdir() on its own.

> or I have to write custom function using array function sort?

Yes, that is what you would have to do. Check out the user notes on the online 
manual. I think someone has posted some code that you can use or adapt.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
One has to look out for engineers -- they begin with sewing machines
and end up with the atomic bomb.
-- Marcel Pagnol
*/


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




[PHP] output of calling grep lr

2003-01-09 Thread Martin Hudec
Hello all,

i am executing grep command from php to get listing of files
containing searched phrase
i am getting output like this:

a/x.txt a/y.txt b/z.txt

I am unable to find any way to replace spaces for \n character using
ereg_replace(), I tried to replace / instead and it replaced it in
last filepath...so i am wondering..am I getting output in one "line"?
Or what?

I was also considering PassThru() but it is not suitable for my needs,
because it generates binary data.

Can anyone help me please?

I have RedHat as webserver, so linux environment :)
source is here:




-- 
Best regards,
 Martin  mail   [EMAIL PROTECTED]
 mobile +421.907.303.393
 icq34358414
 wwwhttp://www.corwin.sk

PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033

"In those days spirits were brave, the stakes were high, 
 men were real men, women were real women and small furry 
 creatures from Alpha Centauri were real small furry creatures 
 from Alpha Centauri."

by Douglas Adams


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




[PHP] Re: output of calling grep lr

2003-01-09 Thread Jean-Christian Imbeault
If this is for output to a web browser you can use nl2br to changed all 
the line-breaks to 's ...

Jc


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



[PHP] Re: fast template over xsl

2003-01-09 Thread rush
"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i am considering the move from fast template to xslt , is there any
> benifits for this ? also is there a way to intergrate xsl like fast
template
> ie parse rows in the php script

In my (biased) opinion, you could be better of staying with templates. But
you could try TemplateTamer, to simplify, organize, and improve your
template development. I believe that TemplateTamer would be more productive
than either FastTemplate or xslt.

rush
--
http://www.templatetamer.org/




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




Re: [PHP] string prints out as number (E+10...), why?

2003-01-09 Thread - Edwin
Hello,

Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: 
> I'm passing a var into a function which is a 16 digit number, but when I 
> try to print it out I get 1.111E+15 instead of the expected 
> 11.
> 
> Why?

I guess it's because the number is converted automatically to an exponential notation 
if it goes over a certain number of digits--makes it easier to read...

> How can I change this behaviour?

Perhaps, you can use sprintf()

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

HTH,

- E

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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





Re: [PHP] string prints out as number (E+10...), why?

2003-01-09 Thread Jean-Christian Imbeault
- Edwin wrote:


I guess it's because the number is converted automatically to an exponential notation if it goes over a certain number of digits--makes it easier to read...


I figured as much. But why? I found a solution by changing the precision 
of floats in the php.ini file.

But I still find it strange that PHP will, internally, happily treat my 
variable as a string but when it comes time to print it out, it decides 
that it's a number and formats it without my asking it to.

Jc


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



[PHP] gettext and translations

2003-01-09 Thread electroteque
hi i am just reading up on gettext , it says its for translating messages ,
how about translating entire site content ? and a question i have been asked
is how authentic is the translations ?



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




[PHP] how to make server response to emails

2003-01-09 Thread See kok Boon
Hi experts,

 

Seen this in many mailing list, but I do not know the logic behind it, hope
someone can spare some time to enlighten me.

 

Recall that many mailing list systems all users to send an email with the
word "unsubscribe" (or "help" or "subscribe" for that matter.) in the
subject line to allow the subscriber to unsubscribe, therefore I believe
that there is a way to make the mail server, or which ever it is, to
response specifically to text within the mail.

 

Besides using this for mailing list, I think the logic can also be used I
other areas such as specific response to Q&A etc.

 

However, I have no idea how this is accomplished and what this system is
called, so I need some precious help here. Anyone please?

 

Thanks in advance.. =)

 

Yours faithfully,

See Kok Boon

Realize Creations

http://www.RealizeCreations.com

---

looking for jobs? career? chat?

look in realPortal

 




Re: [PHP] string prints out as number (E+10...), why?

2003-01-09 Thread - Edwin
Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: 
> - Edwin wrote:
> > 
> > I guess it's because the number is converted automatically to an 
> > exponential notation if it goes over a certain number of digits--makes 
> > it easier to read...
> 
> I figured as much. But why? I found a solution by changing the precision 
> of floats in the php.ini file.
> 
> But I still find it strange that PHP will, internally, happily treat my 
> variable as a string but when it comes time to print it out, it decides 
> that it's a number and formats it without my asking it to.

Mmm, I'm not sure if I understand this correctly but I don't think PHP will "just 
decide" that your string IS a number and *formats* it.

Consider this:

';
  echo $var2; // echoes 

?>

As you can see, PHP didn't "touch" the string version...

Anyway, I don't think the conversion to an exponential notation is peculiar to PHP--my 
math teacher required me to do the same :)

- E

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




Re: [PHP] string prints out as number (E+10...), why?

2003-01-09 Thread Jean-Christian Imbeault
- Edwin wrote:



[...]


As you can see, PHP didn't "touch" the string version...


True. My var is being passed in as a POST var so maybe that has 
something to do with it ...

Jc


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



[PHP] Configuring 4.3.0 on Solaris 2.8

2003-01-09 Thread Ewan McDowall
Hi,

I already tried the php-install list, but nobody has been able to solve my wee 
problem, I was
hoping someone could help me with this.  I am trying to install php version 4.3.0 on a 
sun
sparc running solaris 2.8, and I'm getting stuck at the configure step.  When running 
the
configure command, this is what I get:

root@dalwhinnie> ./configure
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for working sed... sed
checking host system type... sparc-sun-solaris2.8

And it gets no further.  I have no problems configuring php in the past.

Has anyone else seen this?

Thanks in advance,

Ewan



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




Re: [PHP] how to make server response to emails

2003-01-09 Thread - Edwin
Hello,

"See kok Boon" <[EMAIL PROTECTED]> wrote: 
> Hi experts,

Well, I'm no expert ;) so let me just tell you where you can find more info.

I think you're looking for something like what PHP's mailing list is using. It's 
called ezmlm. Pls. check their site:

  http://www.ezmlm.org/

- E

...[snip]...

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




[PHP] Re: how to make server response to emails

2003-01-09 Thread Jean-Christian Imbeault
I'm not sure how it's done exactly but I think the basic concept is to 
have a daemon running, or have your program run by cron, and have the 
program collect it's mail.

On Linux I think you can get your mail simply by fetching and parsing 
the file /var/spool/mail/"username", where username is the name of the 
account unsubscribe requests are mailed to.

But you want a mailing list, use major domo or some other ML spftware 
instead of writing your own.

Jc


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



[PHP] Re: How can I redirect to another php page

2003-01-09 Thread DreamRiver

Teo,
You may want something like this:

switch( $Color ) {
   case "Yellow":
   header("Location: yellow.php");
   break;
   case "Green":
   header("Location: green.php");
   break;
   default:
   echo"No switch value present for Color - contact the webmaster.";
   exit;
} // end switch( $Color )

Depending on usage, you may also get away with a simple:
   include_once("yellow.php"); // instead of using header()


Regards,
Richard
http://phpyellow.com
__
Teo wrote:
Hi All!
I would like to redirect the user to another php page accordingly to his/her chosen 
options, example:
if ($Color == "Yellow") {
go to page 
else if ($Color == "Green")
go to page 
}

Does anyone knows how to achieve the goal??

Thanks

Teo



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




Re: [PHP] gettext and translations

2003-01-09 Thread - Edwin
Hello,

"electroteque" <[EMAIL PROTECTED]> wrote: 
> hi i am just reading up on gettext , it says its for translating messages 
> , how about translating entire site content ?

Mmm, I don't think anything like that exists--at least, not yet. There are or no sites 
(or software) that can perfectly translate any entire site. And, don't expect anything 
that would translate your entire encyclopaedia automatically as well... :)

> and a question i have been 
> asked is how authentic is the translations ?

Well, for gettext's translations, I believe the translators are real humans (and 
they're native speakers) so you can expect a high quality translation that serves its 
purpose...

Just MHO,

- E

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




Re: [PHP] how to make server response to emails

2003-01-09 Thread Jason Wong
On Thursday 09 January 2003 17:33, See kok Boon wrote:

> Seen this in many mailing list, but I do not know the logic behind it, hope
> someone can spare some time to enlighten me.
>
>
>
> Recall that many mailing list systems all users to send an email with the
> word "unsubscribe" (or "help" or "subscribe" for that matter.) in the
> subject line to allow the subscriber to unsubscribe, therefore I believe
> that there is a way to make the mail server, or which ever it is, to
> response specifically to text within the mail.
>
>
>
> Besides using this for mailing list, I think the logic can also be used I
> other areas such as specific response to Q&A etc.
>
>
>
> However, I have no idea how this is accomplished and what this system is
> called, so I need some precious help here. Anyone please?

Most MTA systems can process mail through an arbitary program. Thus you can 
use a CLI version of PHP to process your mail. Search the archives for 
"process email".

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Do not underestimate the power of the Force.
*/


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




Re: [PHP] How to detect a PHP script time-out?

2003-01-09 Thread Tamas Arpad
> Cool! I just tested it out and it works. At lest under PHP 4.3.0 and
> Apache 1.3.26.
>
> But according to the bug report this functionality may change in the
> future and a new function apache_register_shutdown() might replace the
> current one ...
>
> The current functionality is *not* what is documented, but is it was is
> *intended*. I.e. will the current functionality be change to be what the
> docs say or will it continue and the docs will be changed?
>
> I will be using this functionality and need to know if it will change in
> future releases ...
There was a discussion about this topic on the dev list, and because of many 
reasons the current functionality of register_shutdown_function() will remain 
the same in future releases too. Joseph Tate is working on a new function 
(apache_register_shutdown_function) to make it possible on apache to use the 
old behavior (Thanks Joseph! :)).

Arpi

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




RE: [PHP] gettext and translations

2003-01-09 Thread Dan Rossi
how does it work then ? i assumed from the description , you give it a
locale and it will translate content from the database into the given
language ? damn wish there was something like that

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 9:11 PM
To: electroteque
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] gettext and translations


Hello,

"electroteque" <[EMAIL PROTECTED]> wrote:
> hi i am just reading up on gettext , it says its for translating messages
> , how about translating entire site content ?

Mmm, I don't think anything like that exists--at least, not yet. There are
or no sites (or software) that can perfectly translate any entire site. And,
don't expect anything that would translate your entire encyclopaedia
automatically as well... :)

> and a question i have been
> asked is how authentic is the translations ?

Well, for gettext's translations, I believe the translators are real humans
(and they're native speakers) so you can expect a high quality translation
that serves its purpose...

Just MHO,

- E

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




Re: [PHP] How to detect a PHP script time-out?

2003-01-09 Thread Jean-Christian Imbeault
Tamas Arpad wrote:


There was a discussion about this topic on the dev list, and because of many 
reasons the current functionality of register_shutdown_function() will remain 
the same in future releases too. Joseph Tate is working on a new function 
(apache_register_shutdown_function) to make it possible on apache to use the 
old behavior (Thanks Joseph! :)).

Great! Love you guys! This "buggy" function is coming in quite handy :)

Jc


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




[PHP] PHP 4.3.0, __CLASS__ and __FUNCTION__

2003-01-09 Thread Michael Virnstein
Hi there,

can someone please explain what __CLASS__ and __FUNCTION__ are and what they
do?
They are listed in the PHP 4.3.0 changelog and can be found here:
http://www.php.net/manual/en/reserved.php
but i can't find any explanation.

Michael



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




[PHP] Re: PHP 4.3.0, __CLASS__ and __FUNCTION__

2003-01-09 Thread nicos
They return the current class name or the current function in which they are
called.

--
Regards.
M.CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com Hébergement de sites internets.

"Michael Virnstein" <[EMAIL PROTECTED]> a écrit dans le message de
news: [EMAIL PROTECTED]
> Hi there,
>
> can someone please explain what __CLASS__ and __FUNCTION__ are and what
they
> do?
> They are listed in the PHP 4.3.0 changelog and can be found here:
> http://www.php.net/manual/en/reserved.php
> but i can't find any explanation.
>
> Michael
>
>



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




RE: [PHP] how to make server response to emails

2003-01-09 Thread See kok Boon
To: Jason Wong 

Hi,

Sorry, I am abit dumb. Where is the archive that you refer to in your email?

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: 09 January 2003 06:10
To: [EMAIL PROTECTED]
Subject: Re: [PHP] how to make server response to emails

On Thursday 09 January 2003 17:33, See kok Boon wrote:

> Seen this in many mailing list, but I do not know the logic behind it,
hope
> someone can spare some time to enlighten me.
>
>
>
> Recall that many mailing list systems all users to send an email with the
> word "unsubscribe" (or "help" or "subscribe" for that matter.) in the
> subject line to allow the subscriber to unsubscribe, therefore I believe
> that there is a way to make the mail server, or which ever it is, to
> response specifically to text within the mail.
>
>
>
> Besides using this for mailing list, I think the logic can also be used I
> other areas such as specific response to Q&A etc.
>
>
>
> However, I have no idea how this is accomplished and what this system is
> called, so I need some precious help here. Anyone please?

Most MTA systems can process mail through an arbitary program. Thus you can 
use a CLI version of PHP to process your mail. Search the archives for 
"process email".

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Do not underestimate the power of the Force.
*/


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




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




RE: [PHP] how to make server response to emails

2003-01-09 Thread See kok Boon
To: [EMAIL PROTECTED]

Hi,

Erm.. actually I am not looking for a mailing list program, instead I am
looking for a program (preferably written in PHP) that would allow me to
capture emails containing specific text in its content and return specific
results according to the email content...

Any more clues for me?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 09 January 2003 06:02
To: See kok Boon
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] how to make server response to emails

Hello,

"See kok Boon" <[EMAIL PROTECTED]> wrote: 
> Hi experts,

Well, I'm no expert ;) so let me just tell you where you can find more info.

I think you're looking for something like what PHP's mailing list is using.
It's called ezmlm. Pls. check their site:

  http://www.ezmlm.org/

- E

...[snip]...

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




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




Re: [PHP] money

2003-01-09 Thread rblack

number_format()

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

==
Richard Black
Senior Developer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 951 3481
Email: [EMAIL PROTECTED]


   

"Wilbert   

Enserink"To: <[EMAIL PROTECTED]>   

<[EMAIL PROTECTED]   cc:   

l>   Subject: [PHP] money  

   

09/01/2003 

10:44  

   

   





Hi all,



I'm busy making a swebstore. I have troubles with the format of money.

I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"


Whatever I try I can't get the comma there (it's showing a point "." and it
doesn't display the second number behind the comma i.e. "12.5"

Anybody knows how to make me my money? :-)

regards Wilbert




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


This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com





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




Re: [PHP] money

2003-01-09 Thread Danny Shepherd
http://www.php.net/manual/en/function.number-format.php

- Original Message -
From: "Wilbert Enserink" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 09, 2003 10:44 AM
Subject: [PHP] money


Hi all,



I'm busy making a swebstore. I have troubles with the format of money.

I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"


Whatever I try I can't get the comma there (it's showing a point "." and it
doesn't display the second number behind the comma i.e. "12.5"

Anybody knows how to make me my money? :-)

regards Wilbert




-
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, visit: http://www.php.net/unsub.php




Re: [PHP] how to make server response to emails

2003-01-09 Thread Jason Wong
On Thursday 09 January 2003 18:46, See kok Boon wrote:
> To: Jason Wong
>
> Hi,
>
> Sorry, I am abit dumb. Where is the archive that you refer to in your
> email?

google > "php archive"

Click on the link for MARC.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If you find a solution and become attached to it, the solution may become
your next problem.
*/


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




[PHP] Re: money

2003-01-09 Thread Jean-Christian Imbeault
Wilbert Enserink wrote:


I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"

Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"


Show us some code and maybe we can help. If you don't give any code we 
have no idea what you are doing wrong.

Jc


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



Re: [PHP] how to make server response to emails

2003-01-09 Thread Jean-Christian Imbeault
See Kok Boon wrote:


Sorry, I am abit dumb. Where is the archive that you refer to in your email?


The PHP archives. Go to the PHP web site and follow the links to the 
mailing lists page. There you will find links to the archives.

Jc


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



[PHP] Re: Submit Form

2003-01-09 Thread DreamRiver

Steven (cc list),
The sticky part is: ---User comes back next day, clicks load

For that functionality you will need to remember the user, the last project they were 
using and the form they were 'on'. How? 

You can have the user log in to their last saved state (which you will save when they 
log out), or set cookies on their machine or ... either way you need a unique way to 
identify the user, their work and their last form. 

When you decide how to maintain/save this 'state' information then your work is laid 
out for you ...

You can also see some commented and working code for db inserts, cookies, logins, 
prefilling form data fields, javascript form validation etc. - what you refer to - by 
downloading a FREE application called phpyellow Lite Edition here:

http://www.dreamriver.com/phpcheckout/showcase.php?productnumber=1

After unzipping take a look at loginResult.php which may have some code you will need. 
You can skip the install and go right to the code, because a working demo of the code 
is here:
http://phpyellow.com/phpyellow/index.php

This won't answer all your questions, but at least it's a start... the key decision 
you need to make is how you will save your 'state' information.

richard.
http://www.dreamriver.com

Stephen wrote:
__
Message-ID: <001101c2b762$b8624080$0200a8c0@melchior>
From: "Stephen" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Date: Wed, 8 Jan 2003 17:10:13 -0500
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="=_NextPart_000_000D_01C2B738.CEFB1C10"
Subject: Submit Form

Hello,

I have a question. First of all, I want to save the data a user has typed in a form 
into a MySQL database so they can load it up for later use but, I need to first submit 
all the form vars on the current page from a link. This may be Javascript, but either 
way, I'm not sure how to do it. Any ideas? Here's a graph kinda...

-User enters form and submits the first page
--User taken to second form
---User fills out the first two fields
User clicks a "Save Progress" link and all form fields submitted
(I can do beyond this part but just so you get the idea of what I mean)
-PHP saves current form vars to a MySQL database
--User told information saved and he leaves
---User comes back next day, clicks load
User select his current project
-User taken to the last form he was on, fields filled in

Thanks,
Stephen Craton
http://www.melchior.us

"What's the point in appearance if your true love, doesn't care about it?" -- 
http://www.melchior.us
_




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




[PHP] money

2003-01-09 Thread Wilbert Enserink
Hi all,



I'm busy making a swebstore. I have troubles with the format of money.

I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"


Whatever I try I can't get the comma there (it's showing a point "." and it doesn't 
display the second number behind the comma i.e. "12.5"

Anybody knows how to make me my money? :-)

regards Wilbert




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


RE: [PHP] gettext and translations

2003-01-09 Thread Dan Rossi
have a look at this guys

http://www.translator.cx/

i'm installing it now

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 9:11 PM
To: electroteque
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] gettext and translations


Hello,

"electroteque" <[EMAIL PROTECTED]> wrote:
> hi i am just reading up on gettext , it says its for translating messages
> , how about translating entire site content ?

Mmm, I don't think anything like that exists--at least, not yet. There are
or no sites (or software) that can perfectly translate any entire site. And,
don't expect anything that would translate your entire encyclopaedia
automatically as well... :)

> and a question i have been
> asked is how authentic is the translations ?

Well, for gettext's translations, I believe the translators are real humans
(and they're native speakers) so you can expect a high quality translation
that serves its purpose...

Just MHO,

- E

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/


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




Re: [PHP] money

2003-01-09 Thread Scott Houseman
Hi There.

Try this

//To get a comma rather that a period:

$fTotalPrice = $iQuantity * $fUnitPrice;
$fTotalPrice = str_replace( '.', ',', $fTotalPrice );

//To check wether to add a zero to the end of a float:

// Get part of float after comma.
$iDecimal = substr( $fTotalPrice, strpos( $fTotalPrice, ',' ) +1 );
if ( strlen( $iDecimal ) == 1 )
{
	$fTotalPrice .= '0';
}

I haven't tested this, but it should work.

Cheers

Scott

On 2003/01/09 12:44, Wilbert Enserink wrote:

Hi all,



I'm busy making a swebstore. I have troubles with the format of money.

I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"


Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"

Anybody knows how to make me my money? :-)

regards Wilbert




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


--
Scott Houseman
Senior Software Developer
Junk Mail Publishing (Pty) Ltd
T + 27 12 342 3840 ext 2806 F +27 12 342 3876
E [EMAIL PROTECTED] | www.junkmail.co.za
A 1312 Pretorius Street, Hatfield, Pretoria
P O Box 6574, Pretoria, 0001, South Africa
+27 82 491 8021


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




[PHP] session not set, server configuration?

2003-01-09 Thread James Tan
Dear Sir/Madam,

I've been trying out my script, it works fine so far on my pc with apache
1.3.26 with php 4.3.0

but when i uploaded to another server with
http://www.mercstudio.com/test.php

the session seems to be unstable.
sometimes it works, sometimes not.

http://www.mercstudio.com/hoteldemo/myadmin/

when i set the session key called "userkey"
it works fine on my pc.
but when i upload them on the server, some pc r able to login, but most of
the pc did not get to login.

the login check with mysql database went fine, but the session did not set
on some pc attempting to login

index.php -> login.php (set userkey=1) -> main.php (check session userkey >
0)

if session userkey is not set, the user will be brought back to index.php


here's my login code:

==login.php==
include "lib/mysql.php";
include "lib/u007lib.php";

// connecting to mysql db , my own lib...
$rs = getdb("");
$rs->query("select * from ct_user where companyid like '" .
$HTTP_POST_VARS["companyid"] .  "'");
$rs2 = getdb("");

$erron = "";

if(!$rs->eof)
{

// if company records found...
$rs2->query("select * from ct_login where loginid like '" .
$HTTP_POST_VARS["loginid"] . "' and userid=" . $rs->fields("id") . " and
pass like '" . $HTTP_POST_VARS["password"] . "'");

if(!$rs2->eof)
{
// if loginid and password match...

session_start();
// session key to be checked...
$userkey = $rs2->fields("lvl");

$userid = $rs2->fields("id");
$userloginid = $rs2->fields("loginid");

$usercomid = $rs->fields("id");
$usercompany = $rs->fields("company");
$usercompanyid = $rs->fields("companyid");

// registering session key
session_register("userkey");
session_register("usercomid");
session_register("usercompany");
session_register("usercompanyid");

session_register("userid");
session_register("userloginid");


setcookie("companyid", $HTTP_POST_VARS["companyid"], time()+(60*60*24*30));
setcookie("loginid", $HTTP_POST_VARS["loginid"], time()+(60*60*24*30));

//redirecting to main.php
header("location: main.php"); exit();
}
else
{
$erron = "Invalid User / Password";
}

}
else
{
$erron = "No Such Company ID";
}

?>
=end of login code

=beginning code of main.php=

==end of main.php code=

please advise,

thank you

--
James Tan
IT Technical Specialist

NextMove Technology Sdn. Bhd.
Tel: 03-5192 1366
Fax: 03-5192 1280
Lot 2-2, Jalan SU6A,
Persiaran Tengku Ampuan,
Lion Industrial Park, Section 22,
4 Shah Alam, Selangor D.E.



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




Re: [PHP] Adding HTTP URL Code

2003-01-09 Thread Sean Burlington
ELLIOTT,KATHERINE A (HP-FtCollins,ex1) wrote:

OK, so I've gotten NO responses to my query below so I
thought I'd ask for something slightly different and see what
I get.


if you want to get a reply

1) look in the manual/ archives first

2) use a helpful subject line
   eg making links clickable

3) show us the code
   you have tried to get it working - and this code will help greatly 
in explaining what you are trying to do

4) show us the error message OR show us the output
 and explain what is wrong with it


remember - you aren't paying for this - there are hundreds of messages a 
day - personally I only skim read most of them - and if a question makes 
little sense I'm not going to spend time on it.


that said



$text = "This is a test.  It is only a test.
What happens when I include a URL in my results text?

http://not.a.real.url/programs

This is only a test";

$clickable_text = preg_replace("#(http://[^\s]+)#i",
 "$1", $text);

echo $clickable_text;

?>

I haven't been particularly strict with the allowed url charecters - 
I've just allowed everything and assumed that the url ends with 
whitespace (or end of file)

Sean



If I have a bunch of plain text data, how can I pull out the
strings containing "http".  I've tried several different things
but what I end up with is more or less than what I want.
Once I have this, I can add the URL code and replace the
string but I haven't figured out how to do this.

For example, what would I do if my text looks like this (not
including the astrices):

**
This is a test.  It is only a test.
What happens when I include a URL in my results text?

http://not.a.real.url/programs

This is only a test
**

Anyone?  Anyone?

Thanks,

Katherine

-Original Message-
From: ELLIOTT,KATHERINE A (HP-FtCollins,ex1)
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Adding HTTP URL Code


Hello,

I have a string of data that can be anywhere from one line (a single URL)
to many, many lines.  The data is in plain text but, as I alluded, may
contain
one or more URLs (or none).  I then take this data and put it on a web page
so I would like to make any URLs in the data live.  Has anyone on the list
done
this?  If so, can you tell me how?  I'm stumped.

Thanks,

Katherine





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




[PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
Hi all,

So I have a page that processes information and then "echo"s out a redirect
that looks like this:



The thing is, there are some variables that I would love to pass in $_POST
or $HTTP_POST_VARS to the page referred to in "$url".

Is there any way to stuff this data into either of these globals so that the
"$url" page can access 'em?

Thanks a bunch!

--Noel




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




[PHP] Re: session not set, server configuration?

2003-01-09 Thread Noel Wade
James -

Don't know how you're working with Cookies and sessions for sure, but the
default / "easy" way to check for an established session is to put
"session_start();" at the top of every page that's going to access the
session variables.  That will check for an established/open session and make
the registered session variables accessible to the page.

Then a logical check is as simple as using "session_is_registered()" like
this:

if (session_is_registered("registered_variable_name"))
//do something here if the person has already registered their session
else
//session not registered!

Hope this helps!

Take care,

--Noel




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




[PHP] Unable to load dynamic library ... php_gd.dll

2003-01-09 Thread Even Thorbergsen
I have moved an old web to a new server (Windows-2000)
with fresh versions of php (4.3.0) and GD.

I get the error message "Unable to load dynamic library .../php_gd.dll.
The specified procedure could not be found.

This looks like a false setting of the extension_dir path in php.ini
but this is correct.

I have also put a copy of php_gd.dll on the c:/php directory
where php.exe is located, but this does not help.

I have tried to limit the number of Image* routines involved
by trying the simple php script given below,
but the same error message keeps popping up.

Can someone give me a suggestion here?


Even Thorbergsen
Interconsult, Norway


 "40",// x1
"1"  => "50",  // y1
"2"  => "20",// x2
"3"  => "240",   // y2
"4" => "60",// x3
"5"  => "60",   // y3
"6"  => "240",   // x4
"7"  => "20",// y4
"8" => "50",// x5
"9"  => "40",   // y5
"10" => "10",// x6
"11" => "10",// y6
);

$im = ImageCreate (250, 250);

$white  = ImageColorAllocate ($im, 255, 255, 255);
$blue   = ImageColorAllocate ($im, 0, 0, 255);

ImageFilledPolygon ($im, $a, 6, $blue );
ImagePng ($im);
ImageDestroy ($im);

?>




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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Scott Houseman
Hi.

If you add them to the $url variable as in a query string, they
should be available in that page's $_GET array e.g.
if $url = "http://myhost.com/mypage.php?id=$id&page=$page&user=$user";

then you would have the values

$_GET{'id'}
$_GET{'page'}
$_GET{'user'}

created for you with the values as given.

Cheers

Scott

On 2003/01/09 02:04, Noel Wade wrote:

Hi all,

So I have a page that processes information and then "echo"s out a redirect
that looks like this:



The thing is, there are some variables that I would love to pass in $_POST
or $HTTP_POST_VARS to the page referred to in "$url".

Is there any way to stuff this data into either of these globals so that the
"$url" page can access 'em?

Thanks a bunch!

--Noel






--
Scott Houseman
Senior Software Developer
Junk Mail Publishing (Pty) Ltd
T + 27 12 342 3840 ext 2806 F +27 12 342 3876
E [EMAIL PROTECTED] | www.junkmail.co.za
A 1312 Pretorius Street, Hatfield, Pretoria
P O Box 6574, Pretoria, 0001, South Africa
+27 82 491 8021


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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Noel Wade
Thanks - I understand that method; but I'm really looking for a way to pass
them without them being visible / mucking up the URL line with a buncha
stuff...

Take care,

--Noel



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




RE: [PHP] Re: how to make server response to emails

2003-01-09 Thread See kok Boon

To: Jean -Christian Imbeault

Thanks for helping out... I actually do not want a mailing list right now, I
already have one. What I need is to use the same concept for some other
email driven tasks.

After some searching using "process email" I realize I can use PHP to get
the emails and parse its contents much like a webmail system.

I am not sure, but I think I need and imap extension installed. From another
script, the programmer attempt to include the php_imap file, which I am not
sure what is it too...

Does anyone by any chance know whether imap is a must for retrieval of
emails or is it just like you say, extract files from the mail/username
folder?

Thanks in advance.


-Original Message-
From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] 
Sent: 09 January 2003 06:01
To: [EMAIL PROTECTED]
Subject: [PHP] Re: how to make server response to emails

I'm not sure how it's done exactly but I think the basic concept is to 
have a daemon running, or have your program run by cron, and have the 
program collect it's mail.

On Linux I think you can get your mail simply by fetching and parsing 
the file /var/spool/mail/"username", where username is the name of the 
account unsubscribe requests are mailed to.

But you want a mailing list, use major domo or some other ML spftware 
instead of writing your own.

Jc


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




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




Re: [PHP] PHP 4.3.0 with Oracle

2003-01-09 Thread Thies C. Arntzen
On Wed, Jan 08, 2003 at 04:38:25PM -0200, José Manuel Valente wrote:
> Hy Guys,
> 
> I´m a newby here.
> 
>  I´am trying to compile PHP 4.3.0 with Oracle support. When it
> compiles oci8.c , it returns an error, like follows:
> 
> /bin/sh libtool --silent --mode=compile
> gcc  -Iext/oci8/ -I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC -I/usr/src/ph
> p-4.3.0/include -I/usr/src/php-4.3.0/main -I/usr/src/php-4.3.0 -I/usr/src/ph
> p-4.3.0/Zend -I/usr/include/imap -I/opt/oracle/product/8.1.5/rdbms/demo -I/o
> pt/oracle/product/8.1.5/network/public -I/opt/oracle/product/8.1.5/plsql/pub
> lic -I/usr/src/php-4.3.0/ext/xml/expat  -DLINUX=22 -DMOD_SSL=208111 -DUSE_HS
> REGEX -DEAPI -DUSE_EXPAT -I/usr/src/php-4.3.0/TSRM  -g -O2  -prefer-pic -c
> /usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo
> /usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror':
> /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: `OCI_ATTR_STATEMENT' undeclared
> (first use in this function)
> /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: (Each undeclared identifier is
> reported only once
> /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: for each function it appears in.)
> make: *** [ext/oci8/oci8.lo] Error 1
> 
> 
> With PHP 4.2.3 and belower, it worked fine.
> Anyone has any ideas?

just add 
#undef HAVE_OCI8_ATTR_STATEMENT

in line 4329 of oci8.c and recompile

re,
tc

PS: what version of oracle are you using?

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




RE: [PHP] Adding HTTP URL Code

2003-01-09 Thread Robert Fisher
I found this in the archives of this list
message title: php parsing problem with chat 
message number: 103717 
by: Deadsam 


// // URL PARSER FOR MESSAGE $msg = ereg_replace
("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]]", "\\0",
$msg); //$msg =
ereg_replace("\[url\]([^\[]+)\[/url\]", "\\1",
$msg); 

Might load the file in, do line by line search for
this pattern if it passes then save it or do what you
want.

PSEUDO CODE

Get File;
Foreach file_line {
   if contains URL {
  do action;
   }
}
Close File;


Robert Fisher
Axis Solutions, Inc.


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP] Re: Databases vs. File Access

2003-01-09 Thread David Eisenhart
to add another cent to Timothy's contribution I agree, check out Smarty
(http://smarty.php.net/) for the templating.

D


"Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message
000801c2b7ab$837eefa0$0500a8c0@bambino">news:000801c2b7ab$837eefa0$0500a8c0@bambino...
> My 2 cents would be use a database and templates then create cached
> static versions of
> the pages on the first request and then when you need to changes things
> it is just a
> simple change the template and you a whole new look without the issue of
> performance.
>
> Make that 5 cents worth!!
>



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




[PHP] grgrgrgr other problem with location??????

2003-01-09 Thread Ysrael Guzmán
I want to send two variables:
 
this is correct???
 
location.href="page.php?"

other form

">

 

 

Ysrael Guzmán Meza

 

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




[PHP] Re: [PHP-DEV] Terminal text objects (PHP CDK NCURSES)

2003-01-09 Thread Wez Furlong
This would be a nice thing to include in PECL (see http://pear.php.net).

--Wez.

On Wed, 8 Jan 2003, Nikolai Vladychevski wrote:

> Hello,
>
> I want to share the code (php-extension) I have included into php-4.2.2 to
> support CDK widgets
> (http://gd.tuwien.ac.at/hci/cdk/?file=cdk.tar.gz&type=listing) to enable PHP
> to use text based "GUI" in terminal environment.
>
> CDK supports:
>  -Alphalist (list with alphanumeric search)
>  -Calendar dialog box
>  -Dialog
>  -Entry field with type masking
>  -Scale field
>  -2 dimension graphics (text mode)
>  -Histogram display
>  -Item list field
>  -Label
>  -Marque (text box in movement)
>  -Matrix field
>  -Menu
>  -Scroll
>  -Selection field
>  -Slider field
>  -Radio button
>  -Template field


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




[PHP] session problem

2003-01-09 Thread Supra
Hi,

I got serious problem I need to solve a.s.a.p.
Well, I've developed a database application with PHP and MySql, I used
sessions.
While developing I used my own computer as a web server - Windows 2000 Pro,
IIS 5, PHP 4.2.3 via ISAPI. And all my code was tested successfully while my
computer is the server and the client. Now after moving the sources to the
server (Windows 2000 Advanced Server) and exporting the MySql database to
the server, the application fail. While debugging I got to a firm conclusion
that the sessions doesn't work well. I copied the php.ini to the system root
on the server and it still doesn't work.

Please advice me what to do in order to make the application work on the
server.

Thanks I advance,

Supra



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




Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Philippe Saladin

"Noel Wade" <[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> Thanks - I understand that method; but I'm really looking for a way to
pass
> them without them being visible / mucking up the URL line with a buncha
> stuff...
(Note that even with a post, the data aren't really hidden : they are in the
http content.)

>So I have a page that processes information and then "echo"s out a redirect
>that looks like this:
>

If you can't call your page with a "real" post (a form submitted), it would
be possible to simulate it with this function (from Rasmus Lerdorf, AFAIK) :

function PostToHost($host, $path, $data_to_send) {
 $fp = fsockopen($host,80);
 fputs($fp, "POST $path HTTP/1.1\n");
 fputs($fp, "Host: $host\n");
 fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
 fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
 fputs($fp, "Connection: close\n\n");
 fputs($fp, $data_to_send);
 while(!feof($fp)) {
   echo fgets($fp, 128);
 }
 fclose($fp);
}

with $data_to_send = "formfield1=myfieldvalue1&formfield2=myfieldvalue2";

Otherwise, easier, couldn't you use sessions ? you would hide your $url into
$_SESSION['url']

Regards,
Philippe



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




[PHP] how to passing two dimension array

2003-01-09 Thread Rizki Salamun
hi there..

I have a problem when I want to passing two dimension varible. I made this
variable from html form.

like this:



";
?>  
   a
   b  
   ...
   ...



but when again I want to print the $vari[$i][$j, in the page2.php it
seems doesnt recognize this variable.


thanks

-rizki-



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




[PHP] I have a problem while installing...

2003-01-09 Thread Terry Lau
Hello,

I'm using Red Hat Linux 8.0. The Apache Server 2.0 and php 4.2.2 are 
installed when I install Linux. The server is installed in /var/. So, I 
don't know how to follow the installation instructions described in your 
web to set up php. Do I need to install apache and php again? Furthermore, 
I don't know what i need to edit the php.ini file and I have modified the 
httpd.conf file. Thus, could you feel free to describe the detailed 
instruction for me? 
Thanks for your help!

Terry


_
¨Ï¥Î MSN Messenger¡A»PªB¤Í¦b½u¤W²á¤Ñ: http://messenger.microsoft.com/tc 


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



Re: [PHP] graph libs

2003-01-09 Thread Marek Kilimajer
I used older version (1.5.3, latest at that time), there were no special 
requirements and was also GPL

Larry Brown wrote:

My extreme apologies to jpgraphs.  They are more in line with phplot.  I
might even end up using them instead.  Vagarant is the more difficult
package.  Again, their graph examples are pretty smooth but required a lot
of package/dependency updates to RH.

 

This is by no means an advertisement, just one of the results I got looking
   

around for charts.  The following link lists a few viable
 

solutions.
   


 

http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/
   


 

Jpgraph renders an excellent image from the examples but the prerequisite
   

packages were many and ultimately the install/readme didn't work
>for compiling the package.  I could have looked further and found a
solution, but with the number of prerequisites I dropped it looking for a
>faster install.  The next one I came across that gave a reasonable looking
chart was phplot which only requires GD which is stock on my RH
>distro.  I got it up and working without any installation (not to mention
dependencies).  So I am up and running quickly and smoothly with
>phplot.  It's a shame jpgraphs' dependencies aren't packaged with the
distro. The transparent option on the colors is really smooth and I
just >don't have the time.  Thanks to all for suggestions, I still want to
look at one other site that was recommended here on the list.



Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388





 



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




Re: [PHP] Re: Double entry into MySQL..

2003-01-09 Thread Marek Kilimajer
$_SERVER['REQUEST_METHOD'] contains the method used to retrieve the page 
(POST, GET etc, see rfc2616). HEAD method is used to retrieve info about 
a resource, but I'm not sure why, as Timothy stated, it does not always 
work.

Altug Sahin wrote:

Is this a php.ini or apache setting?

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 

You should be able to get around it also by checking
if $_SERVER[REQUEST_METHOD]=='HEAD'

Timothy Hitchens (HiTCHO) wrote:
   

 



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




Re: [PHP] how to passing two dimension array

2003-01-09 Thread Marek Kilimajer
if $i=1 and $j=2, you should be able to get $_POST['vari'][1][2] in 
page2.php

Rizki Salamun wrote:

hi there..

I have a problem when I want to passing two dimension varible. I made this
variable from html form.

like this:




print "";
?>  
  a
  b	
  ...
  ...



but when again I want to print the $vari[$i][$j, in the page2.php it
seems doesnt recognize this variable.


thanks

-rizki-



 



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




Re: [PHP] grgrgrgr other problem with location??????

2003-01-09 Thread Marek Kilimajer
should be . instead of ;  

location.href="page.php?
"&var2=$variable2";  ?>"



Ysrael Guzmán wrote:

I want to send two variables:

this is correct???

location.href="page.php?
"&var2=$variable2";  ?>"

other form


"&var2=$variable2";  ?>">





Ysrael Guzmán Meza



 



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




[PHP] Fw: PHP / GnuPG problem with Fopen

2003-01-09 Thread Clint Fern
Hi,

Many apologies if this has been covered before - but I haven't tracked it down in the 
archive and it's been annoying me for weeks.

I'm using a script to send an order number & encrypted cc number by GnuPG. 
Unfortunately the temporary files don't seem to be created causing error messages. Can 
anyone point me in the right direction - many thanks.

Script lines are;

$message = 'Order #' . $insert_id . "\n\n" . 'Number: ' . $GLOBALS['cc_toencrypt'] . 
"\n\n";
// I've tried this variableputenv ("GNUPGHOME=/home/www/.gnupg");
// I've tried this variableputenv ("GNUPGHOME=/home/.gnupg");

//set the environment variable for GPGPATH
 putenv ("GNUPGHOME=/usr/local/psa/home/ahosts/p.com/home/.gnupg");

//generate token for unique filenames
$tmpToken = md5(uniqid(rand()));

//create vars to hold paths and filenames
$plainTxt = "/usr/local/psa/home/ahosts/p.com/httpsdocs/tmp/" . "$tmpToken" . 
"data";
$crypted = "/usr/local/psa/home/ahosts/p.com/httpsdocs/tmp/" . "$tmpToken" . 
"gpgdata";

//open file and dump in plaintext contents
$fp = fopen($plainTxt, "w+");
fputs($fp, $message);
fclose($fp);

//invoke GPG to encrypt file contents
system("/usr/local/php_safe/bin --encrypt -ao $crypted -r 'Ralph Brookes 
<[EMAIL PROTECTED]>' $plainTxt");

//open file and read encrypted contents into var
251   $fd = fopen($crypted, "a+");
252   $mail_cont = fread($fd, filesize($crypted));
253   fclose($fd);

//delete files!
unlink($plainTxt);
255   Unlink($crypted);  

tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, 'Extra Order Info', $mail_cont, STORE_OWNER, 
STORE_OWNER_EMAIL_ADDRESS, '');


Error messages are;

Warning: 
fopen("/usr/local/psa/home/ahosts/p.com/httpsdocs/tmp/21fc09f4a3e129b04ae38984613ece46pgpdata",
 "r+") - No such file or directory in 
/usr/local/psa/home/ahosts/p.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php
 on line 251

Warning: stat failed for 
/usr/local/psa/home/ahosts/p.com/httpsdocs/tmp/21fc09f4a3e129b04ae38984613ece46pgpdata
 (errno=2 - No such file or directory) in 
/usr/local/psa/home/ahosts/p.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php
 on line 252

Warning: fread(): supplied argument is not a valid File-Handle resource in 
/usr/local/psa/home/ahosts/p.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php
 on line 252

Warning: fclose(): supplied argument is not a valid File-Handle resource in 
/usr/local/psa/home/ahosts/p.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php
 on line 253

Warning: unlink() failed (No such file or directory) in 
/usr/local/psa/home/ahosts/p.com/httpsdocs/catalog2/catalog/includes/modules/payment/ccgpg.php
 on line 255


Cheers
Clint


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03



Re: [PHP] Can you insert into $_POST manually?

2003-01-09 Thread Marek Kilimajer
You can also build a form with hidden variables and use
 to submit it. For javascript 
disabled browser put a
"Continue" submit button

Noel Wade wrote:

Thanks - I understand that method; but I'm really looking for a way to pass
them without them being visible / mucking up the URL line with a buncha
stuff...

Take care,

--Noel



 



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




Re: [PHP] I have a problem while installing...

2003-01-09 Thread Marek Kilimajer
You likely not need to do anything, just start writing php, e.g. create file
/var/www/html/phpinfo.php
and write


Now you should be able to access it from your browser using
http://localhost/phpinfo.php
If apache server is not running, run
/etc/init.d/httpd start
as root


Terry Lau wrote:

> Hello,
>
> I'm using Red Hat Linux 8.0. The Apache Server 2.0 and php 4.2.2 are
> installed when I install Linux. The server is installed in /var/. So,
> I don't know how to follow the installation instructions described in
> your web to set up php. Do I need to install apache and php again?
> Furthermore, I don't know what i need to edit the php.ini file and I
> have modified the httpd.conf file. Thus, could you feel free to
> describe the detailed instruction for me? Thanks for your help!
>
> Terry
>
>
> _
> ¨Ï¥Î MSN Messenger¡A»PªB¤Í¦b½u¤W²á¤Ñ: http://messenger.microsoft.com/tc
>


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




Re: [PHP] how to passing two dimension array

2003-01-09 Thread Rizki Salamun
On Thu, 9 Jan 2003, Marek Kilimajer wrote:

> if $i=1 and $j=2, you should be able to get $_POST['vari'][1][2] in 
> page2.php
> 

I have tried with set the variable  $vari[1][2]="TRY" in page1.php and
send it by hidden field.

and in page2.php I put script:

echo $_POST['vari'][1][2];

but still not working. any sugestion?

thanks

-rizki-


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




[PHP] i want to send 2 variables????

2003-01-09 Thread Ysrael Guzmán
 
i like send two variables using:
 
href="mi page.php?http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] i want to send 2 variables????

2003-01-09 Thread Joshua Pierre
On Thu, Jan 09, 2003 at 09:14:21AM -0500, Ysrael Guzm?n wrote:
>  
> i like send two variables using:
>  
> href="mi page.php?  

http://blah.com/page.php?var1=contents&var2=contents

That should do it for you.

Cheers,

Josh

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




[PHP] calculate the traffic size with php(like the apache access_log)

2003-01-09 Thread Torsten Rosenberger
Hello


Is it possible to get the transfer (traffic) size from a webpage
as is stands in the apache access_log file


127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] "GET /~torsten/cups/pdf.php
HTTP/1.1" 200 48 (size)

When i work with outbut buffer i only get the html source size with
ob_get_length.If there are images in the side this method faild
ob_get_length ignores the images.

I can get the size if i parse the apache log file but there is no way 
to assign it to a customers homepage because i use a CMS.


Maybe there are other ways.


BR/Torsten Rosenberger




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




Re: [PHP] how to passing two dimension array

2003-01-09 Thread Marek Kilimajer
try
print_r($_POST);
in page2.php

Rizki Salamun wrote:


On Thu, 9 Jan 2003, Marek Kilimajer wrote:

 

if $i=1 and $j=2, you should be able to get $_POST['vari'][1][2] in 
page2.php

   


I have tried with set the variable  $vari[1][2]="TRY" in page1.php and
send it by hidden field.

and in page2.php I put script:

echo $_POST['vari'][1][2];

but still not working. any sugestion?

thanks

-rizki-


 



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




Re: [PHP] calculate the traffic size with php(like the apache access_log)

2003-01-09 Thread Marek Kilimajer
Requests for images bypass php, so you need get it from apache log.

Torsten Rosenberger wrote:


Hello


Is it possible to get the transfer (traffic) size from a webpage
as is stands in the apache access_log file


127.0.0.1 - - [07/Jan/2003:13:01:58 +0100] "GET /~torsten/cups/pdf.php
HTTP/1.1" 200 48 (size)

When i work with outbut buffer i only get the html source size with
ob_get_length.If there are images in the side this method faild
ob_get_length ignores the images.

I can get the size if i parse the apache log file but there is no way 
to assign it to a customers homepage because i use a CMS.


Maybe there are other ways.


BR/Torsten Rosenberger




 



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




[PHP] Having / not posted to MySQL Database

2003-01-09 Thread Vernon
When posting to a MySQL database field database record slashes are being
added to the data where there is an apostrophe. How do I either, not have
the apostrophe posted without the slash or have it not displayed when it is
being retrieved?

Thanks
V



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




Re: [PHP] i want to send 2 variables????

2003-01-09 Thread rw
Quoting Ysrael Guzmán <[EMAIL PROTECTED]>:

###  
### i like send two variables using:
###  
### href="mi page.php?http://www.php.net/)
### To unsubscribe, visit: http://www.php.net/unsub.php
### 
### 

Here's one idea!


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




[PHP] Informing a User of an Illegal Character in a post

2003-01-09 Thread Vernon
I'm having trouble when a user post a message to a MySQL database where if a
user create a user name like 'user&user' as the & symbol is used in URLs.
Does anyone have any idea how I can inform user that they have entered and
illegal character and are there are illegal characters that I should let
them use other than '&' and '?'

Thanks
V



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




[PHP] problem with forms and sessions

2003-01-09 Thread scott
hi

I'm having problems submitting forms while using sessions :o(

I'm using



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




Re: [PHP] Having / not posted to MySQL Database

2003-01-09 Thread Adam Voigt




Turn off magic quotes in the php.ini to not have them go in, and you will most

likely get a bunch of error's, or pass what you select from the database through

the stripslashes function like:



$query = mysql_query("SELECT field FROM table;");

$array = mysql_fetch_array($query);



$array[field] = stripslashes($array[field]);



On Thu, 2003-01-09 at 09:41, Vernon wrote:

When posting to a MySQL database field database record slashes are being

added to the data where there is an apostrophe. How do I either, not have

the apostrophe posted without the slash or have it not displayed when it is

being retrieved?



Thanks

V







-- 

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

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP] forms and sessions ?

2003-01-09 Thread scott
hi

I'm having some problems submitting forms while using sessions :o(

I have a form, that will only display if the session vars exist and are not
null or empty. I'm using this is the form handler



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




[PHP] php and asp

2003-01-09 Thread Jerry M. Howell II
Hello all I seem to recall php being able to provide some suport for
asp. How would I turn this feature on? is it a line in the php.ini or is
it a compile time option?

-- 
Jerry M. Howell II

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




Re: [PHP] XML File does not reflect changes upon reopen - HELP

2003-01-09 Thread Marek Kilimajer
There might be couple of problems:
- your php script should read from the cgi script until EOF, so it 
continues after the other script finishes
- your cgi script should fflush the file before closing, and then close 
the connection
- use clearstatcache() before opening the file if the php script 
accesses the file before

Phil Powell wrote:

I am making changes to an XML file (and the only way I can, unless anyone knows how in PHP I can write TO an XML file!!! is to use a TCL CGI script to write to the XML file), once changes have been made I need to reopen the file and read its contents, however, every time I do I am getting OLD file information and NOT my changes, every single time, unless I refresh my page... 

Does anyone know what I can do about this? I can't redirect them, that would be horribly inefficient.. what can I do?

Thanx
Phil

 



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




Re: [PHP] php and asp

2003-01-09 Thread Adam Voigt




No idea what your talking about, PHP can't parse ASP code and vice versa.



On Mon, 2003-01-06 at 20:34, Jerry M. Howell II wrote:

Hello all I seem to recall php being able to provide some suport for

asp. How would I turn this feature on? is it a line in the php.ini or is

it a compile time option?



-- 

Jerry M. Howell II



-- 

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

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP] php and asp

2003-01-09 Thread Clint Tredway
The only thing PHP can do that's related to asp, is use the <% like asp
does. This is not recommended though..

Clint

- Original Message -
From: "Jerry M. Howell II" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 7:34 PM
Subject: [PHP] php and asp


> Hello all I seem to recall php being able to provide some suport for
> asp. How would I turn this feature on? is it a line in the php.ini or is
> it a compile time option?
>
> --
> Jerry M. Howell II
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


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




Re: [PHP] how to make server response to emails

2003-01-09 Thread Michael Sims
On Thu, 9 Jan 2003 17:33:02 +0800, you wrote:

>I believe
>that there is a way to make the mail server, or which ever it is, to
>response specifically to text within the mail.
[...]
>However, I have no idea how this is accomplished and what this system is
>called, so I need some precious help here. Anyone please?

99% of the time scripts such as this operate in the following manner.
Lets say the script responds to emails sent to [EMAIL PROTECTED]  The
server which handles mail for example.com has an alias for the address
"foo" which actually points to an external script.  Most MTA's will
allow you to do this (yes, even some for Windows, believe it or not).
For example, in sendmail you could place a line in /etc/aliases or
/etc/mail/aliases (depending on your installation) like the following:

foo:  "|/usr/local/bin/myscript.php -s"

This would cause sendmail to send the text of any email sent to "foo"
to myscript.php's stdin via a pipe.  (Be aware that some sites with
sendmail use the sendmail restricted shell, so there are some extra
steps involved in getting an alias like the above to work, which I
won't go into here).

"myscript.php" would need to be a PHP CLI script, meaning that it's
chmod'ed executable and has:

#!/usr/local/bin/php

at the top or something similar.  Then this script would have to read
from stdin and parse the text it receives via regexes or some other
method to determine how to handle it.  The script would receive the
full message, including all headers.

In PHP you can read from stdin by opening a filehandle to it:

$stdin = fopen('php://stdin', 'r');

Although in PHP 4.3.0 there are CLI specific constants defined which
obseletes the above.  For more info:

http://www.php.net/manual/en/features.commandline.php

I've implementing a script like this before, but unfortunately it's
written in Perl.  Many of the concepts are similar, though, so if you
know any Perl at all and think it may help you I can send it to you
off-list.

HTH...

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




[PHP] undefined variable notice - how to furn of

2003-01-09 Thread Borut Kovacec
Hi

I just installed new php 4.2.3 on Win XP, Apache 1.3.24..
Everything works fine, just now I'm getting "Notice" messages for every undefined 
variable or undefined index in arrays..

So now I have to use issset() everytime to avoid this messages... 

..is there any way to turn this messages off, because if prior versions I never got 
them..??

Borut



Re: [PHP] PHP 4.3.0 with Oracle

2003-01-09 Thread José Manuel Valente
In that server, i am running 8.1.5.

Thanks for the help. i am going to try it right away. really thanks! :)

Bye,

Jose Manuel Valente

- Original Message -
From: "Thies C. Arntzen" <[EMAIL PROTECTED]>
To: "José Manuel Valente" <[EMAIL PROTECTED]>
Cc: "PHP" <[EMAIL PROTECTED]>
Sent: Thursday, January 09, 2003 10:34 AM
Subject: Re: [PHP] PHP 4.3.0 with Oracle


> On Wed, Jan 08, 2003 at 04:38:25PM -0200, José Manuel Valente wrote:
> > Hy Guys,
> >
> > I´m a newby here.
> >
> >  I´am trying to compile PHP 4.3.0 with Oracle support. When it
> > compiles oci8.c , it returns an error, like follows:
> >
> > /bin/sh libtool --silent --mode=compile
> >
gcc  -Iext/oci8/ -I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC -I/usr/src/ph
> >
p-4.3.0/include -I/usr/src/php-4.3.0/main -I/usr/src/php-4.3.0 -I/usr/src/ph
> >
p-4.3.0/Zend -I/usr/include/imap -I/opt/oracle/product/8.1.5/rdbms/demo -I/o
> >
pt/oracle/product/8.1.5/network/public -I/opt/oracle/product/8.1.5/plsql/pub
> >
lic -I/usr/src/php-4.3.0/ext/xml/expat  -DLINUX=22 -DMOD_SSL=208111 -DUSE_HS
> >
REGEX -DEAPI -DUSE_EXPAT -I/usr/src/php-4.3.0/TSRM  -g -O2  -prefer-pic -c
> > /usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo
> > /usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror':
> > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: `OCI_ATTR_STATEMENT' undeclared
> > (first use in this function)
> > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: (Each undeclared identifier is
> > reported only once
> > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: for each function it appears
in.)
> > make: *** [ext/oci8/oci8.lo] Error 1
> >
> >
> > With PHP 4.2.3 and belower, it worked fine.
> > Anyone has any ideas?
>
> just add
> #undef HAVE_OCI8_ATTR_STATEMENT
>
> in line 4329 of oci8.c and recompile
>
> re,
> tc
>
> PS: what version of oracle are you using?
>


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




[PHP] flash and php (using the varibles)

2003-01-09 Thread - \[ Paul Ferrie \] -
Hi guys i hope there is someone in here that use flsah along with php to
help with this :)

Anyway i will make it simple.

mysql returns a number say 123 i want flash to take this number to animate a
progress bar, but here the problem it does work but the progress bar dosn't
animate it just sets to the hieght of the numbers sent back from mysql.  How
can i slow down the animation of the progress bar

Anyone



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




[PHP] Reading Registry

2003-01-09 Thread Christopher Ditty
Hello all.  I don't think this is possible, but I wanted to ask to be
sure.  Is it possible to read and write to a web user's registry with
php?  I believe this can be done with CF and ASP, but I was not sure
about PHP.  A search turned up nothing usefull.

Thanks

CDitty


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




Re: [PHP] PHP 4.3.0 with Oracle

2003-01-09 Thread José Manuel Valente
Id didn´t work out. The same error message
   :(




> On Wed, Jan 08, 2003 at 04:38:25PM -0200, José Manuel Valente wrote:
> > Hy Guys,
> >
> > I´m a newby here.
> >
> >  I´am trying to compile PHP 4.3.0 with Oracle support. When it
> > compiles oci8.c , it returns an error, like follows:
> >
> > /bin/sh libtool --silent --mode=compile
> >
gcc  -Iext/oci8/ -I/usr/src/php-4.3.0/ext/oci8/ -DPHP_ATOM_INC -I/usr/src/ph
> >
p-4.3.0/include -I/usr/src/php-4.3.0/main -I/usr/src/php-4.3.0 -I/usr/src/ph
> >
p-4.3.0/Zend -I/usr/include/imap -I/opt/oracle/product/8.1.5/rdbms/demo -I/o
> >
pt/oracle/product/8.1.5/network/public -I/opt/oracle/product/8.1.5/plsql/pub
> >
lic -I/usr/src/php-4.3.0/ext/xml/expat  -DLINUX=22 -DMOD_SSL=208111 -DUSE_HS
> >
REGEX -DEAPI -DUSE_EXPAT -I/usr/src/php-4.3.0/TSRM  -g -O2  -prefer-pic -c
> > /usr/src/php-4.3.0/ext/oci8/oci8.c -o ext/oci8/oci8.lo
> > /usr/src/php-4.3.0/ext/oci8/oci8.c: In function `zif_ocierror':
> > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: `OCI_ATTR_STATEMENT' undeclared
> > (first use in this function)
> > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: (Each undeclared identifier is
> > reported only once
> > /usr/src/php-4.3.0/ext/oci8/oci8.c:4271: for each function it appears
in.)
> > make: *** [ext/oci8/oci8.lo] Error 1
> >
> >
> > With PHP 4.2.3 and belower, it worked fine.
> > Anyone has any ideas?
>
> just add
> #undef HAVE_OCI8_ATTR_STATEMENT
>
> in line 4329 of oci8.c and recompile
>
> re,
> tc
>
> PS: what version of oracle are you using?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Reading Registry

2003-01-09 Thread Kansu Dinçer
Hi,

CD> Hello all.  I don't think this is possible, but I wanted to ask to be
CD> sure.  Is it possible to read and write to a web user's registry with
CD> php?  I believe this can be done with CF and ASP, but I was not sure
CD> about PHP.  A search turned up nothing usefull.

I don't think so.. Clientside is client's business...

-- 
Regards,
 Kansumailto:[EMAIL PROTECTED]


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




Re: [PHP] flash and php (using the varibles)

2003-01-09 Thread Philipp Hartmann
I didnt test this, but something along the line should work

[ActionScript]
onEnterFrame = function{
i  = dataYougetFromMySQL;
if (i < max){
this._width = this._width * (i*factor) // factor can slow down or accelerate
your animation
}
}
[/ActionScript]

hth,
Philipp


"- [ Paul Ferrie ] -" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi guys i hope there is someone in here that use flsah along with php to
> help with this :)
>
> Anyway i will make it simple.
>
> mysql returns a number say 123 i want flash to take this number to animate
a
> progress bar, but here the problem it does work but the progress bar
dosn't
> animate it just sets to the hieght of the numbers sent back from mysql.
How
> can i slow down the animation of the progress bar
>
> Anyone
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




RE: [PHP] undefined variable notice - how to furn of[Scanned]

2003-01-09 Thread Michael Egan
Borut,

I had this problem myself just before Christmas.

The following solution was proposed:

>> All of the PHP scripts hosted on a Linux server 
>> I'm working with have suddenly begun producing 
>> an error message:
>>
>>  undefined variable 'variablename'

> Looks like someone's tweaked the error reporting level so it's on E_ALL,
> which can be a somewhat alarmist setting :-)

> Read all about it at http://php.net/manual/en/ref.errorfunc.php

Michael Egan



-Original Message-
From: Borut Kovacec [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 15:57
To: PHP Mailing List
Subject: [PHP] undefined variable notice - how to furn of[Scanned]


Hi

I just installed new php 4.2.3 on Win XP, Apache 1.3.24..
Everything works fine, just now I'm getting "Notice" messages for every undefined 
variable or undefined index in arrays..

So now I have to use issset() everytime to avoid this messages... 

..is there any way to turn this messages off, because if prior versions I never got 
them..??

Borut

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




Re: [PHP] apache and php

2003-01-09 Thread Gareth Thomas
Tim,

thanks but it still doesn't work. What puzzles me is that last night I
reinstalled a  'vanilla' install of RedHat 8 from the distribution where I
selected PHP and Apache. So now I am running PHP 4.2.2 and Apache 2.0.40, I
make the change you recommened to httpd.conf, stop and restart the service
and it still simply ignores the PHP code...this is driving me insane.

Gareth

"Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message
007101c2b784$652736b0$0500a8c0@bambino">news:007101c2b784$652736b0$0500a8c0@bambino...
> Your settings should be something similar to this:
>
> 
> AddType application/x-httpd-php .php .html
> AddType application/x-httpd-php-source .phps
> 
>
> Do you have the page remotely available to see what is happening for
> you??
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Gareth Thomas [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 9 January 2003 12:03 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] apache and php
> >
> >
> > I am trying to run a PHP page from my browser (Mozilla) and
> > each time I load the page it is attempting to force a dowload
> > of the page instead, based on the mime-type. I had been
> > developing a command line PHP application which works fine
> > and then had just started on a web interface and realised
> > that Apache may not be configured correctly. So I edited
> > httpd.conf and added the Add Type line for x-type-httpd .php.
> > I am running Apache 2.0.40 on RedHat 8 and PHP 4.3.0pre2. Can
> > anyone tell me what I am doing wrong? What should the
> > modifications be to httpd.conf for PHP?
> >
> > Thanks in advance
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




[PHP] newbee

2003-01-09 Thread Hendrik van Niekerk
Hi

I'm very new to PHP. (have just bought the book "PHP and MySQL Web
Deelopment") SAMS authors Luke Welling and Laura Thompson

I working with the examples in the book.

I have loaded MySQL, Apache and PHP onto a NT server. All the test passed as
per the examples in the book.

Working with the the first example in chapter one.

I have the HTML document that when the quantities are entered the
"processorder.php" should be called to show the results and do some calcs.

what happens is that the php file is called but I get an error message:

"Warning: Undefined variable typeqty in C:\apache
group\apache\htdocs\processorder.php on line 23"

this varialbe is defined in the html document exactly as in the php
document.

now this warning is repeated for all the variables that should have been
passed to the php for processing.

What am I missing ?


thank you in advance


Hendrik van Niekerk



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




[PHP] mail submission... from flash

2003-01-09 Thread travis
any one see why this wouldnt work?

";

$subject = "*www.test.com*"; 

$date = getdate(time()); 
$date = sprintf("%s %s %s %s:%s:%s", 
$date["mday"],$date["month"],$date["year"],$date["hours"],$date["minutes"],$date["seconds"]);

$from = sprintf("s s", $HTTP_POST_VARS["Name"], <$HTTP_POST_VARS["MailFrom"]>);

$header = "From:$from\n";
$header .= "Reply-To:$from\n";

$body = "The following comment was submitted by: \n"; 
$body .= "$name on $date\n\n"; 
$body .= "---\n\n"; 
$body .= sprintf("s s", $HTTP_POST_VARS["Body"], \n\n); 
$body .= "---\n\n"; 
$body .= " $REMOTE_HOST\n"; 
$body .= " $REMOTE_ADDR\n"; 
$body .= " $HTTP_USER_AGENT\n"; 

mail($to,$subject, $header, $body) or die (echo "&result=failure";);

echo "&result=success";

?>



[PHP] Re: forms and sessions ?

2003-01-09 Thread Munir
Scott wrote:

hi

I'm having some problems submitting forms while using sessions :o(

I have a form, that will only display if the session vars exist and are not
null or empty. I'm using this is the form handler




Write some more information so that we know what u want ok :)


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




[PHP] Newbee observation

2003-01-09 Thread Hendrik van Niekerk
Why does the webmaster not reject messages that are dates > today's date eq
there are numerous messages that have dates with year 2010 and up. A moron
who does not have the correct computer date on his machine should pack it up
and send it back to the company that sold it to them.

JMHO




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




Re: [PHP] undefined variable notice - how to furn of

2003-01-09 Thread Joseph W. Goff
In the php.ini file set error reporting to E_ALL & ~E_NOTICE

- Original Message -
From: "Borut Kovacec" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 09, 2003 9:57 AM
Subject: [PHP] undefined variable notice - how to furn of


Hi

I just installed new php 4.2.3 on Win XP, Apache 1.3.24..
Everything works fine, just now I'm getting "Notice" messages for every
undefined variable or undefined index in arrays..

So now I have to use issset() everytime to avoid this messages...

..is there any way to turn this messages off, because if prior versions I
never got them..??

Borut



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




Re: [PHP] newbee

2003-01-09 Thread Joseph W. Goff
This is because of the default error reporting setting in the newer version
of php.  This was not the case when your book was written.
In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will
quit getting the 'Undefined Variable' notices.
- Original Message -
From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 09, 2003 10:50 AM
Subject: [PHP] newbee


> Hi
>
> I'm very new to PHP. (have just bought the book "PHP and MySQL Web
> Deelopment") SAMS authors Luke Welling and Laura Thompson
>
> I working with the examples in the book.
>
> I have loaded MySQL, Apache and PHP onto a NT server. All the test passed
as
> per the examples in the book.
>
> Working with the the first example in chapter one.
>
> I have the HTML document that when the quantities are entered the
> "processorder.php" should be called to show the results and do some calcs.
>
> what happens is that the php file is called but I get an error message:
>
> "Warning: Undefined variable typeqty in C:\apache
> group\apache\htdocs\processorder.php on line 23"
>
> this varialbe is defined in the html document exactly as in the php
> document.
>
> now this warning is repeated for all the variables that should have been
> passed to the php for processing.
>
> What am I missing ?
>
>
> thank you in advance
>
>
> Hendrik van Niekerk
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Newbee observation

2003-01-09 Thread Tom Ray
Mail servers play a part in this too. Maybe the admins should pack up
their servers and send them back too :)

-Original Message-
From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 9 Jan 2003 11:11:30 -0600
Subject: [PHP] Newbee observation

> Why does the webmaster not reject messages that are dates > today's
> date eq
> there are numerous messages that have dates with year 2010 and up. A
> moron
> who does not have the correct computer date on his machine should pack
> it up
> and send it back to the company that sold it to them.
> 
> JMHO
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Interesting timeout issue

2003-01-09 Thread Ben Vaughn
Hello,

I just recently upgraded from 4.2.3 to 4.3.0 and a script of
mine has begun behaving erratically. The code is included at the bottom
of this message.  I am essentially updating a large (1.94m row) table to
include a new field...the queries needed to do this updating are
somewhat time consuming, so I have been updating all of this for about
fifteen months now.  However, since my 4.3.0 upgrade, this script can
get through maybe 110 lines before halting.  I get no errors posted with
regards to the script, and no HTTP errors or timeout messages, it's as
if the script thinks it's completed.  If anyone could give me a clue-in
as to what's up, I would be much obliged. 

Cheers,
Ben  

";


$qstart = sn_Msecs();
while ($row = mysql_fetch_row($result)) {
$owner = getcache($row[1]);
$id = $row[0];

$sqlu = "UPDATE b.c SET d = '$owner' WHERE ID = '$id';";

$resultu = mysql_query($sqlu);

}
$qstop = sn_Msecs();

$qtime = round($qstop-$qstart,2);
echo "the update took $qtime secs";

?>


--
Ben Vaughn
Security Analyst
Blackbird Technologies
703-796-1438 W / 703-868-5258 C
[EMAIL PROTECTED]
--
 

BEGIN:VCARD
VERSION:2.1
N:Vaughn;Ben
FN:Ben Vaughn
TEL;WORK;VOICE:703.796.1438
TEL;HOME;VOICE:703.205.9719
TEL;CELL;VOICE:703.868.5258
ADR;WORK:;217-C
LABEL;WORK:217-C
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020607T194757Z
END:VCARD



smime.p7s
Description: application/pkcs7-signature


RE: [PHP] Newbee observation

2003-01-09 Thread Larry Brown
Better yet a script should be run to have all the e-mails listed by the time
they were received at the server instead of what time the e-mail was
submitted.  That should take care of it I would think.

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 12:07 PM
To: Hendrik van Niekerk; [EMAIL PROTECTED]
Subject: Re: [PHP] Newbee observation

Mail servers play a part in this too. Maybe the admins should pack up
their servers and send them back too :)

-Original Message-
From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 9 Jan 2003 11:11:30 -0600
Subject: [PHP] Newbee observation

> Why does the webmaster not reject messages that are dates > today's
> date eq
> there are numerous messages that have dates with year 2010 and up. A
> moron
> who does not have the correct computer date on his machine should pack
> it up
> and send it back to the company that sold it to them.
>
> JMHO
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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



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




Re: [PHP] newbee

2003-01-09 Thread Hendrik van Niekerk
Joseph

I can get the errors to go away but then my example just shows a blank page!
The variable are not being passed through to the .php doc

hendrik

"Joseph W. Goff" <[EMAIL PROTECTED]> wrote in message
003201c2b803$ada54f60$bdcaa8c0@jg42000">news:003201c2b803$ada54f60$bdcaa8c0@jg42000...
> This is because of the default error reporting setting in the newer
version
> of php.  This was not the case when your book was written.
> In your php.ini file set error reporting = E_ALL & ~E_NOTICE and you will
> quit getting the 'Undefined Variable' notices.
> - Original Message -
> From: "Hendrik van Niekerk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 09, 2003 10:50 AM
> Subject: [PHP] newbee
>
>
> > Hi
> >
> > I'm very new to PHP. (have just bought the book "PHP and MySQL Web
> > Deelopment") SAMS authors Luke Welling and Laura Thompson
> >
> > I working with the examples in the book.
> >
> > I have loaded MySQL, Apache and PHP onto a NT server. All the test
passed
> as
> > per the examples in the book.
> >
> > Working with the the first example in chapter one.
> >
> > I have the HTML document that when the quantities are entered the
> > "processorder.php" should be called to show the results and do some
calcs.
> >
> > what happens is that the php file is called but I get an error message:
> >
> > "Warning: Undefined variable typeqty in C:\apache
> > group\apache\htdocs\processorder.php on line 23"
> >
> > this varialbe is defined in the html document exactly as in the php
> > document.
> >
> > now this warning is repeated for all the variables that should have been
> > passed to the php for processing.
> >
> > What am I missing ?
> >
> >
> > thank you in advance
> >
> >
> > Hendrik van Niekerk
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




Re: [PHP] mail submission... from flash

2003-01-09 Thread Jason Wong
On Friday 10 January 2003 00:57, travis wrote:
> any one see why this wouldnt work?

Why don't you tell us _how_ it doesn't work?

[snip]


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
static buildup
*/


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




Re: [PHP] mail submission... from flash

2003-01-09 Thread travis
well...
it returns nothing when using loadVars.sendAndLoad in flash and sends no
mail...

while
this script on the same server called from the same flash file works






"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Friday 10 January 2003 00:57, travis wrote:
> > any one see why this wouldnt work?
>
> Why don't you tell us _how_ it doesn't work?
>
> [snip]
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> static buildup
> */
>



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




[PHP] another 4.3.0 issue?

2003-01-09 Thread john
ive recently started experiencing a problem from broadcasts made over a
mailing list i wrote some time ago.  up until now its been functioning fine,
however recently it started sending out raw html unformatted (tags etc
appearing in email), instead of the usual interpreted results.  this
coincided, as best i can tell, with my isp upgrading their server to php
4.3.0.  the only change is in the subject line as follows;

this is the subject line from a working email;
-Subject: update 10:32pm Dec 6
this is the subject line im getting now since the change (incorrect!);
-Subject: update 9:54am Jan 9 MIME-Version: 1.0 Content-Type: text/html;
charset="iso-8859-1" Content-Transfer-Encoding: base64  From: [  ] <
 > Reply-To: 

as you can see its now putting EVERYTHING within the header on that one line
and ignoring the \n after each row (see relevant section of my code below)
..

   $br_subjectc = "$br_subjectbox\n";
   $br_subjectc .= "MIME-Version: 1.0\n";
   $br_subjectc .= "Content-Type: text/html;\n\tcharset=\"iso-8859-1\"\n";
   $br_subjectc .= "Content-Transfer-Encoding: base64\n\n";
   $br_subjectc .= "From: [$title] < $br_return >\n";
   $br_subjectc .= "Reply-To: $br_return\n";

any idea what is causing that? ive looked on php.net and i cant see anything
that catches my eye mentioned about this in the changelog. im not aware of
any alteration to email structure standards either.

tia
john


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




[PHP] Dynamic menu from DB

2003-01-09 Thread Cesar Aracena
Hi all,

I'm making a new site for a client and he needs to put several different
menus under a static FLASH menu. The bad part is that every item in the
flash menu leads to different categories and these need different number
of sub menus. I use MySQL & PHP 4. The categories and sub categories are
something like this:

* Products <-- Flash static menu
  - Item 1 <-- MySQL fetched menu
  - Item 2 <-- MySQL fetched menu
  - Item 3 <-- MySQL fetched menu
- Item 3-1 <-- MySQL fetched menu
- Item 3-2 <-- MySQL fetched menu

* Services <-- Flash static menu
  - Item 1 <-- MySQL fetched menu
- Item 1-1 <-- MySQL fetched menu
- Item 1-2 <-- MySQL fetched menu
  - Item 2 <-- MySQL fetched menu
  - Item 3 <-- MySQL fetched menu

What would be the best solution for this? Another problem to solve is
the creation of new children into the menu... sub categories AND items
dynamically.

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




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




  1   2   >