Re: [PHP] Getting name of the main file from external included script..

2001-03-14 Thread Christian Reiniger

On Tuesday 13 March 2001 00:14, you wrote:

 I already asked this once before, but nobody seems to answer. That's
 why I'm re-writing
 my question.

Well, you waited about two hours. That's not much, even for a mailinglist 
like php-general.

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

Pretty cool, the kind of power information technology puts in our hands
these days.

- Securityfocus on probing 3600 hosts for known problems in 3 weeks

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




[PHP] round up number

2001-03-14 Thread Jacky

How do I round up a lot of decimal number like 10.232656898 to be 10.23 ? Should I use 
this?
$num = 10.26564787;
$Rnum = round($num);
What would be the function I am looking for and how?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] [Q] session variables wouldn't keep contents.

2001-03-14 Thread Yasuo Ohgaki

- Original Message -
From: "Chung Ha-Nyung" [EMAIL PROTECTED]
To: "Yasuo Ohgaki" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 5:07 PM
Subject: Re: [PHP] [Q] session variables wouldn't keep contents.



   I found something!
   If I set register_globals to Off in php.ini, then session *seems* to work
well.
   In /tmp, session data file contains both of variable name and value and I
can
   use $HTTP_SESSION_VARS["variable"].
   BUT, as before is there no HTTP_SESSION_VARS in PHP variables section of
phpinfo.

   I'm so confused and think things are getting weirder. ;(


I set "register_globals = Off" for many reasons.
Session may not work with "register_globals = On"??
It may be a bug. How about post it as a bug, if you don't like it and there is
no such a bug report.

Regards,

--
Yasuo Ohgaki

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




Re: [PHP] Using sessions

2001-03-14 Thread Yasuo Ohgaki
"Rosen" [EMAIL PROTECTED] wrote in message
98n8ut$m26$[EMAIL PROTECTED]">news:98n8ut$m26$[EMAIL PROTECTED]...
 Hi,
 When I use sessions, on the URL row of the browser shows
 "PHPSESSID=CXXX".
 Can I hide id ?

 Thanks,
 Rosen Marinov

Use cookie for session. It seems there are some browsers that will not take
cookie on initial request, and  fallback to URL mode. See notes session section
in Online PHP Manual for details.

Regards,
--
Yasuo Ohgaki



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


RE: [PHP] replacing a line in a file

2001-03-14 Thread Tim Ward

the point is that you can't replace part of a flat file. you can append to
the content or replace it all. if you want to replace part, you need to read
it all, amend the relevant line and then replace it all.

Tim Ward
Senior Systems Engineer

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


 -Original Message-
 From: enthalpy [mailto:[EMAIL PROTECTED]]
 Sent: 13 March 2001 23:56
 To: Henrik Hansen
 Cc: php general
 Subject: Re: [PHP] replacing a line in a file
 
 
 
 that could work but i dont want to append the new line a the 
 bottom which it looks like thats what your doing.
 i need to replace the line where it is
 
 -CoreComm-Internet-Services---http://core.com-
 (Jon Marshall CoreComm Services Chicago)
 ([EMAIL PROTECTED] Systems Engineer II)
 ([EMAIL PROTECTED]   Network Operations)
 -Enthalpy.org-http://enthalpy.org-
 ([EMAIL PROTECTED] The World of Nothing)
 --
 
 On Wed, 14 Mar 2001, Henrik Hansen wrote:
 
  maybe this?
  
  while($line = fgets($fp, 1024)) {
  $line = str_replace("replace_this", "with_this", $line);
  $content .= $line;
  }
  
  fwrite($fp, $content);
  
  --
  Henrik Hansen
  - Original Message -
  From: "enthalpy" [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, March 14, 2001 12:29 AM
  Subject: [PHP] replacing a line in a file
  
  
  
   having problems replacing a line in a file.
  
   need to search the whole document for a string and then 
 replace that line
  with a string.
  
   any ideas?
  
   this is causing lots of problems now.
  
   $fpoint3 = fopen ($testshadow, "r+") or die("couldnt open 
 shadow file
  again");
   $contents = fread ($fpoint3, $shadowfilesize);
   fputs ($fpoint3, ereg_replace("$data[0]:$shadow[1]", 
 "$data[0]:$data[1]",
  $contents));
   fclose ($fpoint3);
  
   any ideas?
  
   -CoreComm-Internet-Services---http://core.com-
   (Jon Marshall CoreComm Services Chicago)
   ([EMAIL PROTECTED] Systems Engineer II)
   ([EMAIL PROTECTED]   Network Operations)
   -Enthalpy.org-http://enthalpy.org-
   ([EMAIL PROTECTED] The World of Nothing)
   --
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
  
  
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
  
  
 
 

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




Re: [PHP] [Q] session variables wouldn't keep contents.

2001-03-14 Thread Chung Ha-Nyung

 "YO" == Yasuo Ohgaki [EMAIL PROTECTED] writes:

YO - Original Message -
YO From: "Chung Ha-Nyung" [EMAIL PROTECTED]
YO To: "Yasuo Ohgaki" [EMAIL PROTECTED]
YO Cc: [EMAIL PROTECTED]
YO Sent: Wednesday, March 14, 2001 5:07 PM
YO Subject: Re: [PHP] [Q] session variables wouldn't keep contents.

 
I found something!
If I set register_globals to Off in php.ini, then session *seems* to work
YO well.
In /tmp, session data file contains both of variable name and value and I
YO can
use $HTTP_SESSION_VARS["variable"].
BUT, as before is there no HTTP_SESSION_VARS in PHP variables section of
YO phpinfo.
 
I'm so confused and think things are getting weirder. ;(
 

YO I set "register_globals = Off" for many reasons.
YO Session may not work with "register_globals = On"??
YO It may be a bug. How about post it as a bug, if you don't like it and there is
YO no such a bug report.

  Then, is it not odd that there's no HTTP_SESSION_VARS in PHP Variables
  section of phpinfo?
  
YO Regards,

YO --
YO Yasuo Ohgaki

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

-- 
 Chung Ha-Nyung [EMAIL PROTECTED]

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




[PHP] RE: [?] Call a function with a button/link click?

2001-03-14 Thread Tim Ward

php works server side. you cannot get user to run anything in php without
resubmitting (posting or whatever) ... you need javascript if this is
something you can do client-side, if not you'll have to live with some sort
of resubmit.

Tim Ward
Senior Systems Engineer

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


 -Original Message-
 From: John Voth [mailto:[EMAIL PROTECTED]]
 Sent: 13 March 2001 18:23
 To: [EMAIL PROTECTED]
 Subject: [?] Call a function with a button/link click?
 
 
 
 I am wondering how to call a function simply by clicking a button
 or a hyperlink?
 
 I would like to use this technique to avoid passing things in a link
 
 Presently, I use this technique: 
 a href="../php/delete_something.php?tid=$thing_id"Delete/a
 
 I would like to clean things up by having one central or 
 common include
 file and just call functions out of it. The problem lies in 
 the passing
 of variables to that function - how to set something up so 
 that the user
 can click on something to activate that function with a variable.
 
 Psuedocode:
 
 if( buttonclick )
   delete_thing($thing_id)
 
 Am I making sense?
 
 Thanks in advance.
 John
 
 -- 
 
 /\
 | John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
 | [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
 \/
 

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




Re: [PHP] Using sessions

2001-03-14 Thread Rosen

Thanks,
but cookies are disabled !

Rosen Marinov



""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
98nai7$2gb$[EMAIL PROTECTED]">news:98nai7$2gb$[EMAIL PROTECTED]...
 "Rosen" [EMAIL PROTECTED] wrote in message
 98n8ut$m26$[EMAIL PROTECTED]">news:98n8ut$m26$[EMAIL PROTECTED]...
  Hi,
  When I use sessions, on the URL row of the browser shows
  "PHPSESSID=CXXX".
  Can I hide id ?
 
  Thanks,
  Rosen Marinov

 Use cookie for session. It seems there are some browsers that will not
take
 cookie on initial request, and  fallback to URL mode. See notes session
section
 in Online PHP Manual for details.

 Regards,
 --
 Yasuo Ohgaki



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




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




SV: [PHP] round up number

2001-03-14 Thread Johan Holst Nielsen

How do I round up a lot of decimal number like 10.232656898 to be 10.23 ?
Should I use this?
$num = 10.26564787;
$Rnum = round($num);
What would be the function I am looking for and how?


Try:
$num = 10.26564787;
$Rnum = round($num, 2);

/Johan


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




RE: [PHP] Using sessions

2001-03-14 Thread Stewart Taylor

An idea is to put the session id in your web page addresses.
e.g. http://level1/level2/12123234234234234234/test.php

Then setup your web server to filter all addresses to remove the session id
from the address before it is displayed in the browser window (you can set
apache to do this) so the user won't see it.

You can then write a little code to get the session id from the address (the
full address including session should be passed to your app).  And then
recreate the session etc..

I've got some code at home demonstrating this technique.  I can send it to
you later of you want it.



-Stewart


-Original Message-
From: Rosen [mailto:[EMAIL PROTECTED]]
Sent: 14 March 2001 08:52
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Using sessions


Thanks,
but cookies are disabled !

Rosen Marinov



""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message
98nai7$2gb$[EMAIL PROTECTED]">news:98nai7$2gb$[EMAIL PROTECTED]...
 "Rosen" [EMAIL PROTECTED] wrote in message
 98n8ut$m26$[EMAIL PROTECTED]">news:98n8ut$m26$[EMAIL PROTECTED]...
  Hi,
  When I use sessions, on the URL row of the browser shows
  "PHPSESSID=CXXX".
  Can I hide id ?
 
  Thanks,
  Rosen Marinov

 Use cookie for session. It seems there are some browsers that will not
take
 cookie on initial request, and  fallback to URL mode. See notes session
section
 in Online PHP Manual for details.

 Regards,
 --
 Yasuo Ohgaki



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




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

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




Re: [PHP] Session problem

2001-03-14 Thread Pavel Kalian

set the session.save_path to a directory that exists on your system (for
example: session.save_path = c:\temp)

Pavel


- Original Message -
From: "Brandon Orther" [EMAIL PROTECTED]
To: "PHP User Group" [EMAIL PROTECTED]
Sent: Tuesday, March 13, 2001 10:56 PM
Subject: [PHP] Session problem


 Hello,

 Does anyone know how to fix this error?

 Warning: open(/tmp\sess_4fb4c5778fe97ab351baca1d8db90abf, O_RDWR) failed:
m
 (2) in c:/htdocs/br/br.php on line 2

 Thank you,

 
 Brandon Orther
 WebIntellects Design/Development Manager
 [EMAIL PROTECTED]
 800-994-6364
 www.webintellects.com
 


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



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




Re: [PHP] [Q] session variables wouldn't keep contents.

2001-03-14 Thread Yasuo Ohgaki

SNIP
 
 I found something!
 If I set register_globals to Off in php.ini, then session *seems* to
work
 YO well.
 In /tmp, session data file contains both of variable name and value
and I
 YO can
 use $HTTP_SESSION_VARS["variable"].
 BUT, as before is there no HTTP_SESSION_VARS in PHP variables section
of
 YO phpinfo.
 
 I'm so confused and think things are getting weirder. ;(
 

 YO I set "register_globals = Off" for many reasons.
 YO Session may not work with "register_globals = On"??
 YO It may be a bug. How about post it as a bug, if you don't like it and
there is
 YO no such a bug report.

   Then, is it not odd that there's no HTTP_SESSION_VARS in PHP Variables
   section of phpinfo?


I think you might found a new bug in phpinfo().
I don't see HTTP_SESSION_VARS in PHP Variables section neither!! I didn't notice
it.
Question is 'Do developers consider this as a bug or the way it should be'.
How about post a mail to php-dev list?

Regards,
--
Yasuo Ohgaki

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




Re: [PHP] Multi-Step Script

2001-03-14 Thread Jens Nedal

on 14.03.2001 5:59 Uhr, Andrew V. Romero at [EMAIL PROTECTED]
wrote:

 Is it possible to use different parts of one php script for multiple
 html forms?  I am not seeing how people create multiple pages of html
 forms with each form importing information from the previous form.
 Right now, for each html form page I have, I create one php script to
 handle it but it would be nice to have just one php script in which only
 certain parts execute depending on have variables have assignments.  One
 way I was thinking of doing this is to have the html forms just keep
 posting the information to itself whenever the submit button is hit and
 then using a series of if else statements to evaluate where the program
 is in relationship to the forms, would this type of system work?
 What do you guys do?
 -Andrew V. Romero
 To reply personally, remove all numbers from address.
 

Like some mentioned, reverse-programming is kinda crucial for error
checking. About FORMS, yes you can have multiple forms aslong as the dont
mismatch, you can even assign names to the forms for them to remain
distinct.
like form name=bla .  I think it might even be possible to get that
formname and then see what you do with each form. The other way round with
if statements or switches works well though.

Jens Nedal


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




Re: [PHP-CVS] cvs: php4 /ext/mysql php_mysql.c php_mysql.h

2001-03-14 Thread Derick Rethans

On Tue, 13 Mar 2001, Zeev Suraski wrote:

 zeev  Tue Mar 13 14:52:53 2001 EDT

   Modified files:
 /php4/ext/mysql   php_mysql.c php_mysql.h
   Log:
   Implement mysql_unbuffered_query() - uses mysql_use_result() instead of
   mysql_store_result()

Don't you think this belongs in the NEWS file too?

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-
JDI Media Solutions - www.jdimedia.nl - [EMAIL PROTECTED]
 Boulevard Heuvelink 102 - 6828 KT Arnhem - The Netherlands
-


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




[PHP] I want this magic directory

2001-03-14 Thread Alex

I just want every customer on my site get his own unique id as his directory
name but the pages requested are all processed by the root.
Such as: customer1's url is http://www.mysite.com/2000123/
 customer2's url is http://www.mysite.com/2000124/
  ^^^UID
and the pages requested are actually processed by http://www.mysite.com/

I want it to implement security and personalization. I don't want to use
.php?uid=XXX because of lazy. :)
thanks.







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




Re: [PHP] update two frames at once?

2001-03-14 Thread Jens Nedal

Yes you can and there is even a neater script that does it.
with thise you can update any amount of frames a t the same time.
Just well i got to find it. msg back in a few.

Jens Nedal

on 12.03.2001 22:15 Uhr, Angerer, Chad at [EMAIL PROTECTED] wrote:

 Yes you can.. use Javascript
 
 Look here.. http://www.virtualgeoff.com/junkyard/frames/multiple/
 
 Chad
 
 -Original Message-
 From: Michael George [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 12, 2001 3:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] update two frames at once?
 
 
 Hello al!
 
 Is it possible to have two frames updated when cliking on one link?  I have
 a
 page that is broken into 4 parts:
 master title
 section title
 d section screen
 i
 r
 .
 
 what I want is that when a link is clicked on in the directory (the left
 column), I'd like to update the section title *and* the section screen...
 
 It seemed a cool layout at the time, but I'm thinking this isn't easily
 possible and I might just have to incorporate a section title on the section
 screen...  But before I rewrite it, I thought I'd ask here.
 
 Thanks!
 
 -Michael
 
 P.S. I'd like to commend the regular posters to this list on being SOOO
 informative and patient!  Every small question to this list always
 gets several useful answers, even when I've seen questions asked over
 and again.


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




[PHP] How to include in PHP?

2001-03-14 Thread Costas

Im new to PHP and want to know if it is possible to reference PHP scripts
from a html page,  the equivalent to an % include% tag in asp.

If so what is the syntax?

Thanks



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




Re: [PHP] How to include in PHP?

2001-03-14 Thread Tshering Norbu





?php
include ("file.php");
?


NOBBY



 - Original Message -
 From: Costas [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, March 14, 2001 4:37 PM
 Subject: [PHP] How to include in PHP?


  Im new to PHP and want to know if it is possible to reference PHP
scripts
  from a html page,  the equivalent to an % include% tag in asp.
 
  If so what is the syntax?
 
  Thanks
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




[PHP] database abstraction module

2001-03-14 Thread Marc Boeren


Hi!

I'ld like to announce the availability of a database abstraction module,
called 'dbx'.

It gives you the ability to code your database-enabled php-templates once
(for a specific database), and port to a different database later by just
changing the string "odbc" to "mysql" (e.g.) once. This assumes that you
have not built database-specific SQL-statements, of course. It still
actually uses the php database modules, so they are still a requirement.
What is taken of your hands is the looping through rows and fields (for
odbc) or just through rows (mysql) to retrieve your data. It gives you the
data in an array immediately, for both odbc and mysql.
For more info, read the documentation at http://www.guidance.nl/php/dbx/doc

It's freely (well, there is a license :-) available (incl. source and
documentation) at http://www.guidance.nl/php/dbx
Limitations: 
- so far it only supports the odbc and mysql module. Additional databases
could easily be supported too, so if you're a coder...
- only works with php4
- you must compile it yourself (but it compiles on Linux and Windows, I've
tried :-)

Any questions, remarks, whatever, please mail them directly to me
([EMAIL PROTECTED]) as I'm not subscribed to this list. I'ld be happy to
help, though!

Cheerio, Marc.

Guidance Rotterdam BV
http://www.guidance.nl


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




Re: [PHP] [Q] session variables wouldn't keep contents.

2001-03-14 Thread Christian Reiniger

On Wednesday 14 March 2001 09:33, you wrote:

 I set "register_globals = Off" for many reasons.
 Session may not work with "register_globals = On"??

Works fine here (php 4.0.4 / Linux / Apache)

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

"Never doubt that a small group of thoughtful, committed people can
change the world...
Indeed, it's the only thing that ever has."

- Margaret Mead

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




[PHP] Problems with mail function

2001-03-14 Thread Kike

Hi,
I have a seious problem with the mail function. It does not send the emails.
It returns 1 but does not send them. I think it may be a problem with
sendmail permissions. Can you help me? Please.


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




[PHP] Linking Libraries ...

2001-03-14 Thread James Marshall

Hi All,

This might be a really dumb question - I'm a bit of a newbie.

I have a hosting account that provides PHP, but it hasn't been compiled with
the IMAP libraries, and I really need these functions. Is there any way to
link the IMAP lib locally (ie: without root permissions)? I've used Perl
before and know that similar is possible.

Any help is much appreciated ...

Many Thanks
James Marshall



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




[PHP] switch with multiple case

2001-03-14 Thread Christian Dechery

In ASP, you can have something like:

snip
%
select case something
case "this" do that
case "those","them" do other
case "crap","doesn't matter","whatever" do nothing
case else print error
end select
%
/snip

IN PHP you can't do cases like that, because like in C, u must have a 
constant, not a list of them.
Is there anyway to get pass this? Doing a case for each thing even tough it 
does the exact same thing as 10 others is going to get a little stupid code.

. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


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




SV: [PHP] Linking Libraries ...

2001-03-14 Thread Johan Holst Nielsen

I have a hosting account that provides PHP, but it hasn't been compiled
with
the IMAP libraries, and I really need these functions. Is there any way to
link the IMAP lib locally (ie: without root permissions)? I've used Perl
before and know that similar is possible.

No, you have to compile PHP with the IMAP library! Try to contact your
provider an ask if they could install the library!

/Johan


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




Re: [PHP] switch with multiple case

2001-03-14 Thread Phil Driscoll

Same as C

switch($something)
{
 case "this": do that;break;
 case "those":case "them": do other; break
 ...
 default: print error
}

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



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




RE: [PHP] switch with multiple case

2001-03-14 Thread Matt Williams

switch($something)
{
  case "this":
do this;
break;
  case "those":
  case "them":
do other;
break;
  case "crap":
  case "doesn't matter":
  case "whatever":
do nothing;
break;
  default:
print error;
}

 snip
 %
   select case something
   case "this" do that
   case "those","them" do other
   case "crap","doesn't matter","whatever" do nothing
   case else print error
   end select
 %
 /snip
 
 IN PHP you can't do cases like that, because like in C, u must have a 
 constant, not a list of them.
 Is there anyway to get pass this? Doing a case for each thing 
 even tough it 
 does the exact same thing as 10 others is going to get a little 
 stupid code.
 
 . Christian Dechery (lemming)
 . http://www.tanamesa.com.br
 . Gaita-L Owner / Web Developer
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

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




[PHP] CGI Question?

2001-03-14 Thread Dan Pupek

On the latest version of Apache I have heard you can run Compiled C binaries
from the CGI bin. Is this true? If so how does it work?

--
Dan Pupek

On the Web:
http://www.sunnet.net/dnkp/dan

Email:
[EMAIL PROTECTED]



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




[PHP] writing to a text file

2001-03-14 Thread george

I have a script which the user enters information into a form and it returns
a enquiry number using mysql_insert_id
 Is it possible when the form is filled in to pull a unique order number
from a text file.

TIA

george



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




[PHP] install

2001-03-14 Thread hananet

how to install php on windows 98 or iis 5.0



[PHP] IMAP sort help.

2001-03-14 Thread Terrence Wong

This command works without problems on a local unix server.
However, when I tried the exact same code , $sortmail =
imap_sort($mailbox,SORTSIZE,1) on a remote imap server running on mac,
it produces problems. (no error messages)

I am unable to check the error messages as they are none. And adding on
to that, the HTML have been terminated without any error messages
without completing the entire html closing tags.

All functions works, except imap_sort?

Anyone? any ideas?
terrence


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




[PHP] (rac)Php dobut with an extension

2001-03-14 Thread Celestino Roberto Alejandro

Hey !! How are you
I've tried to do run PHP with JAVA support enabled, (in a Win32 plattform in
this case), and when i uncommented the extension=php_java.dll, all is ok,
then i configure the [JAVA] section, with...

[Java]
java.home = c:\java
java.library = c:\java\jre\bin\classic\jvm.dll
java.library.path = c:\user\php\extensions\
java.class.path="c:\user\php\extensions\php_java.jar;c:\usr\php\java\classes
";

...then, when i run an example as...
///Java
class uno{
 public int numberer(){
   return 800;
 }
 public static void main(String[] args){
  System.out.println("Hello WORLD! Rober trying");
 }
}
/
and   i put the .class in c:\usr\php\java\classes (my class path...i suppose
:-))
/Php
?php
  dl("php_java.dll");
  print "Robert Celestino\n";
  $myj = new Java("uno");
  print "Loaded\n";
  print $myj-numberer();
  print "Right Loaded and called\n";

?
///
..then this run, and say...

/*OUTPUT*/
Robert Celestino
security properties not found. using defaults.
Loaded
...and Died...Why?...(...i wait but, some is bad, because its wait, and
wait, and wait).
..If you can help my.THANKS!



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




RE: [PHP] install

2001-03-14 Thread Jon Haworth

It's truly amazing what you can find three clicks away from the main page
of www.php.net.

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

HTH
Jon


-Original Message-
From: hananet [mailto:[EMAIL PROTECTED]]
Sent: 14 March 2001 12:53
To: [EMAIL PROTECTED]
Subject: [PHP] install


how to install php on windows 98 or iis 5.0


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

**


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

**

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




[PHP] Day of Week??

2001-03-14 Thread Bruno Freire

Hi It's me again!
Bruno...From Brazil...

Hi wanna know How can i take the day of week of aany date...

Example:

How to know that 14 of march of 2001 is a Wednesday??

Thanks...
Bruno.



[PHP-CVS] cvs: php4 /ext/standard browscap.c

2001-03-14 Thread Sascha Schumann

sas Wed Mar 14 05:38:03 2001 EDT

  Modified files:  
/php4/ext/standard  browscap.c 
  Log:
  Fix ZTS build
  
  
Index: php4/ext/standard/browscap.c
diff -u php4/ext/standard/browscap.c:1.43 php4/ext/standard/browscap.c:1.44
--- php4/ext/standard/browscap.c:1.43   Tue Mar 13 15:20:23 2001
+++ php4/ext/standard/browscap.cWed Mar 14 05:38:03 2001
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: browscap.c,v 1.43 2001/03/13 23:20:23 zeev Exp $ */
+/* $Id: browscap.c,v 1.44 2001/03/14 13:38:03 sas Exp $ */
 
 #include "php.h"
 #include "php_regex.h"
@@ -196,6 +196,7 @@
zval **agent_name,**agent;
zval *found_browser_entry,*tmp_copy;
char *lookup_browser_name;
+   PLS_FETCH();
 
if (!INI_STR("browscap")) {
RETURN_FALSE;



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




[PHP] Script returns an image?

2001-03-14 Thread Paul Warner

I am trying to make a call from one page (pure HTML) that would include a
tag as follows:

img src=http://mydomain.com/returnimage.php?var1=value1var2=value2
width="100" height="50" alt="Description"

My question is how to get the php script to return the proper headers as
well as the image to the client.  This will be used for tracking when
certain copyrighted images (actually blueprints) are accessed, and by whom
by making some db entries when called, then returning the image.  The image
is static and is not dynamically generated based on any of the values in the
uri.  So far all I get are broken images.  I'm guessing that it has to do
with the headers...

-- P


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




RE: [PHP] CGI Question?

2001-03-14 Thread John Huggins

This has been true since CGI began in the NSCA days.  Any program that can
take input from STDIN and output to STDOUT works as a CGI program.
Languages I have actually used in the CGI bin include, C, C++, AWK, Sh, PHP
and of course Perl.

The C program simply has to deal with the CGI variables coming in on STDIN.
There are probably many C libraries available to help parse this out into an
array or something.

This is actually a very good method if you want the fastest speed possible
form a web application.  Compile the C program statically for the best
speed.

John

 -Original Message-
 From: Dan Pupek [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 14, 2001 7:40 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] CGI Question?


 On the latest version of Apache I have heard you can run Compiled
 C binaries
 from the CGI bin. Is this true? If so how does it work?

 --
 Dan Pupek

 On the Web:
 http://www.sunnet.net/dnkp/dan

 Email:
 [EMAIL PROTECTED]



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



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




Re: [PHP] Linux/Apache/PHP Windows/IIS/ColdFusion

2001-03-14 Thread Michael Kimsal

What they've got now is completely fine - why necessarily change it?

OK OK - I know many of the reasons why, but moving to another platform,
you will most likely 'lose' that 'advanced authentication'.  Oo.

To gain the flexibility and stability of PHP on Linux/Apache, everyone in
the company will have to learn to remember their name and password.
If management thinks that's too difficult for people (a distinct possibilty,
especially if you have thousands of people) you'll be better off staying where
you
are.  You could go CGI PHP on NT, which might be a compromise,
but you lose the raw speed advantage PHP as an Apache module has.

What about security on a machine?  Last intranet I was at in a large company,
just because we were logged into the network on a machine didn't give us
automatic access to the intranet - people moved around too much.  You still
needed to present your name and password for the intranet - and everything
there
was NT/IIS/ASP and ColdFusion.



"Joe Sheble (Wizaerd)" wrote:

 Currently in-house our intranet is made up of Windows NT, IIS, and
 ColdFusion.  We've also settled on MS IE as our standard browser, and use
 advanced authentication for logging into the intranet.  This provides
 employees with one click access to the intranet without having to manually
 and physically login.

 We've been tossing around the idea of switching our Intranet to Linux,
 Apache and PHP but we would then lose that Advanced Atuthentication
 process, no?  And to even complicate it even a bit more, if accessing the
 intranet internally through the network (a combination of Novell and NT)
 nobody should be forced to login (it being an automatic process) but if
 they access the intranet externally though the internet they have to be
 prompted for their normal network login information.

 Are my managers smoking crack, or do the advanced developers here think
 this is do-able?  And if so, where could I find more information on setting
 this all up?


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




[PHP] TAB = ENTER ????

2001-03-14 Thread Marcel Henrique Scandolara - Wide

Please,

As I make to make keyboard key ENTER to function equal keyboard key
TAB

Thanks

Marcel Henrique
from Brazil


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




Re: [PHP] TAB = ENTER ????

2001-03-14 Thread Tim McGuire

Check out  
http://developer.irt.org/script/471.htm 

it is a document titled 
"How can I simulate the tab key when the enter key is pressed?"

 Marcel Henrique Scandolara - Wide [EMAIL PROTECTED] 03/14/01 08:38AM 
Please,

As I make to make keyboard key ENTER to function equal keyboard key
TAB

Thanks

Marcel Henrique
from Brazil


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



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




Re: [PHP] Script returns an image?

2001-03-14 Thread Yasuo Ohgaki

Did you read this page?
http://www.php.net/manual/en/features.images.php

What is your php code looks like? if you read this page already.

Yasuo Ohgaki
=
My favorite links
 [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/  
 [PHP Manual] http://www.php.net/manual/en/ 


- Original Message - 
From: "Paul Warner" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 11:24 PM
Subject: [PHP] Script returns an image?


 I am trying to make a call from one page (pure HTML) that would include a
 tag as follows:
 
 img src=http://mydomain.com/returnimage.php?var1=value1var2=value2
 width="100" height="50" alt="Description"
 
 My question is how to get the php script to return the proper headers as
 well as the image to the client.  This will be used for tracking when
 certain copyrighted images (actually blueprints) are accessed, and by whom
 by making some db entries when called, then returning the image.  The image
 is static and is not dynamically generated based on any of the values in the
 uri.  So far all I get are broken images.  I'm guessing that it has to do
 with the headers...
 
 -- P
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

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




[PHP] xml parsing

2001-03-14 Thread Jon A

please help me...

I'm working with some simple xml parsing.

in my xml document i have a tag like this: billede 
img="theme/bg.gif"/billede
which holds the path of a picture.

in the xml parser i'm trying to output it as an img src="" tag, but 
nothing seems to work.

some of the things i have tried:

case "BILLEDE":
  print "img src=\"$element_attrs['IMG']\"";
  break;

- this will output an error message: warning, expecting T_STRING, 
T_VARIABLE ETC...

case "BILLEDE":
  print "img src=\"{$element_attrs['IMG']}\"";
  break;

- this will let it parse, but it won't do anything with the html.

can somebody help me??


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




[PHP] variable on 2 forms

2001-03-14 Thread Miguel Loureiro

Hello all,
I have a normal form (form1) with a variable (var1) and a form inside a layer (form2) 
with a variable (var2).
After submit (form1), how can I have access to var2 ? (if I must use javascript should 
use: document.layer.var2 or document.form2.var2 or document.layer.form2.var2 
...???).I try to read directly $var2, but without result
T.Y all
Best Regards
Miguel Loureiro [EMAIL PROTECTED] 





Re: [PHP] Script returns an image?

2001-03-14 Thread pablo


Return document , other than HTML is very simple.
The type of the document is contained in the http content-type header.
You can easly set it by the header function.
header("Content-type: application/x-www-urlform-encoded");

Pablo
[EMAIL PROTECTED]


 Yasuo Ohgaki
 =
 My favorite links
  [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/
  [PHP Manual] http://www.php.net/manual/en/


 - Original Message -
 From: "Paul Warner" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, March 14, 2001 11:24 PM
 Subject: [PHP] Script returns an image?


  I am trying to make a call from one page (pure HTML) that would include
a
  tag as follows:
 
  img src=http://mydomain.com/returnimage.php?var1=value1var2=value2
  width="100" height="50" alt="Description"
 
  My question is how to get the php script to return the proper headers as
  well as the image to the client.  This will be used for tracking when
  certain copyrighted images (actually blueprints) are accessed, and by
whom
  by making some db entries when called, then returning the image.  The
image
  is static and is not dynamically generated based on any of the values in
the
  uri.  So far all I get are broken images.  I'm guessing that it has to
do
  with the headers...
 
  -- P
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

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




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




Re: [PHP] Linux/Apache/PHP Windows/IIS/ColdFusion

2001-03-14 Thread Joe Sheble (Wizaerd)

At 09:36 AM 3/14/01 -0500, Michael Kimsal wrote:
What they've got now is completely fine - why necessarily change it?

As you've stated, there are many reasons why changing would be a good 
thing, but mostly it's a manager (a higher up executive level mucky-muck) 
throwing out 'Hey what about this linux thingie..." and our IT Director 
(whom I often refer to as FDH for f*ckin d*ck head) saying we'll get right 
on it...


OK OK - I know many of the reasons why, but moving to another platform,
you will most likely 'lose' that 'advanced authentication'.  Oo.

To gain the flexibility and stability of PHP on Linux/Apache, everyone in
the company will have to learn to remember their name and password.
If management thinks that's too difficult for people (a distinct possibilty,
especially if you have thousands of people) you'll be better off staying where
you
are.  You could go CGI PHP on NT, which might be a compromise,
but you lose the raw speed advantage PHP as an Apache module has.

Yes, the company has deemed this to be too difficult for our employees to 
remember.


What about security on a machine?  Last intranet I was at in a large company,
just because we were logged into the network on a machine didn't give us
automatic access to the intranet - people moved around too much.  You still
needed to present your name and password for the intranet - and everything
there
was NT/IIS/ASP and ColdFusion.


Nope, there is no other security other than the Advanced 
Authentication.  The security is not tied to any specific machine but a 
network login.  So as soon as they login to any machine, their username and 
password is automatically passed to the browser and the advanced 
authentication takes place.  Now this if they access the intranet 
internally through our network.  There is also a basic authentication piece 
to access the intranet externally through the internet but requires a 
domain name, username and password.  The management feels this is 
acceptable because there are very few (VERY few) people accessing the 
intranet this way.




"Joe Sheble (Wizaerd)" wrote:

  Currently in-house our intranet is made up of Windows NT, IIS, and
  ColdFusion.  We've also settled on MS IE as our standard browser, and use
  advanced authentication for logging into the intranet.  This provides
  employees with one click access to the intranet without having to manually
  and physically login.
 
  We've been tossing around the idea of switching our Intranet to Linux,
  Apache and PHP but we would then lose that Advanced Atuthentication
  process, no?  And to even complicate it even a bit more, if accessing the
  intranet internally through the network (a combination of Novell and NT)
  nobody should be forced to login (it being an automatic process) but if
  they access the intranet externally though the internet they have to be
  prompted for their normal network login information.
 
  Are my managers smoking crack, or do the advanced developers here think
  this is do-able?  And if so, where could I find more information on setting
  this all up?


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




[PHP] simple I'm sure

2001-03-14 Thread Keith

Following loop works fine !
but I don't want $art_nr_1 (which is 4564)
I want to have $art_nr_$i
but if you use it you just get 1,2,3,4

for ($i=1; $i50; $i++) :
$varid = "quant".$i ;
if ($$varid != "") {
echo
"
input type=hidden name=\"art_nr\" value=\"$art_nr_1\"
input type=hidden name=\"quantity\" value=\"$quant1\" ";

}
endfor; 


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




Re: [PHP] TAB = ENTER ????

2001-03-14 Thread Yasuo Ohgaki

 Please,

 As I make to make keyboard key ENTER to function equal keyboard key
 TAB

 Thanks


Assuming you are talking about page that is displayed on user's browser.
You cannot use PHP to do that, PHP simple does not have control.
However, you can catch key pressed event (onkeydown) using JavaScript.
For example, if you can submit form when tab is pressed, you can write
JavaScript to do that.

Regards,

Yasuo Ohgaki

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




[PHP-CVS] cvs: php4 /ext/fbsql EXPERIMENTAL

2001-03-14 Thread Jani Taskinen

sniper  Wed Mar 14 05:42:33 2001 EDT

  Added files: 
/php4/ext/fbsql EXPERIMENTAL 
  Log:
  Missing.
  
  



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




Re: [PHP] variable on 2 forms

2001-03-14 Thread pablo


I think you'll need to use javascript.
put a input with the type "hidden" in the first form with no value.
Call a javascript function on the submit button or image action.
This javascript must set the hidden input in form1 with the var2 value
before submiting the form to the script.
the object structure for the forms in javascript is :
document.forms[].elements[].value

Good luck.
Pablo
[EMAIL PROTECTED]


- Original Message -
From: Miguel Loureiro [EMAIL PROTECTED]
To: php-gen [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 3:58 PM
Subject: [PHP] variable on 2 forms


Hello all,
I have a normal form (form1) with a variable (var1) and a form inside a
layer (form2) with a variable (var2).
After submit (form1), how can I have access to var2 ? (if I must use
javascript should use: document.layer.var2 or document.form2.var2 or
document.layer.form2.var2 ...???).I try to read directly $var2, but
without result
T.Y all
Best Regards
Miguel Loureiro [EMAIL PROTECTED] 





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




Re: [PHP] Script returns an image?

2001-03-14 Thread Paul Warner

I have been over that page, but did not know that it applied since I do not
want to modify an image, simply pass it on to the requestor.  Here;s my
relevant code:

?php

...database stuff...

Header("Content-type: image/jpg");
?
img src="image.jpg" width="100" height="50" alt="Description"

Do I need to use something more like:

?php

...database stuff...

Header("Content-type: image/jpg");
$im = imageCreateFromJpg("image.jpg");
ImageJpg($im);
ImageDestroy($im);
?

- Original Message -
From: "Yasuo Ohgaki" [EMAIL PROTECTED]
Subject: Re: [PHP] Script returns an image?


 Did you read this page?
 http://www.php.net/manual/en/features.images.php

 What is your php code looks like? if you read this page already.

 Yasuo Ohgaki

 - Original Message -
 From: "Paul Warner" [EMAIL PROTECTED]
 Subject: [PHP] Script returns an image?


  I am trying to make a call from one page (pure HTML) that would include
a
  tag as follows:
 
  img src=http://mydomain.com/returnimage.php?var1=value1var2=value2
  width="100" height="50" alt="Description"
 
  My question is how to get the php script to return the proper headers as
  well as the image to the client.  This will be used for tracking when
  certain copyrighted images (actually blueprints) are accessed, and by
whom
  by making some db entries when called, then returning the image.  The
image
  is static and is not dynamically generated based on any of the values in
the
  uri.  So far all I get are broken images.  I'm guessing that it has to
do
  with the headers...
 
  -- P


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




[PHP-CVS] cvs: php4 /ext/fbsql CREDITS

2001-03-14 Thread Jani Taskinen

sniper  Wed Mar 14 05:43:58 2001 EDT

  Added files: 
/php4/ext/fbsql CREDITS 
  Log:
  Forgot this one..
  
  



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




Re: [PHP-CVS] cvs: php4 /ext/standard browscap.c

2001-03-14 Thread Sebastian Bergmann

Sascha Schumann wrote:
 sas Wed Mar 14 05:38:03 2001 EDT
 
   Modified files:
 /php4/ext/standard  browscap.c
   Log:
   Fix ZTS build

  Works - thanks, Sascha.

-- 
 sebastian bergmann  e-mail : [EMAIL PROTECTED]
   homepage : http://www.sebastian-bergmann.de

 bonn.phpug.de || www.php.net || www.phpOpenTracker.de || www.titanchat.de

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




Re: [PHP] switch with multiple case

2001-03-14 Thread Yasuo Ohgaki

 In ASP, you can have something like:
 
 snip
 %
 select case something
 case "this" do that
 case "those","them" do other
 case "crap","doesn't matter","whatever" do nothing
 case else print error
 end select
 %
 /snip
 
 IN PHP you can't do cases like that, because like in C, u must have a
 constant, not a list of them.
 Is there anyway to get pass this? Doing a case for each thing even tough it
 does the exact same thing as 10 others is going to get a little stupid code.
 

Is this what you want?

?php
switch ($val) {
 case 'this':
 // do that
 break;
 case 'those':
 case 'them':
 // do that
 break;
  case 'crap':
  case 'doesnt matter':
  case 'whatever':
  break; // do nothing
  default:
 print('error');
 break;
}
?

BTW, this works C/C++.

Regards,

Yasuo Ohgaki

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




Re: [PHP] simple I'm sure

2001-03-14 Thread Jack Dempsey

try this...didn't test it, but i think it'll do the trick:

for($i=1;$i50;$i++){
$varid = "quant".$i;
if($$varid != ""){
echo 'input type=hidden name="art_nr" value="';
echo $art_nr . $i;
echo '"';
echo 'input type=hidden name="quantity" value="';
echo $quant . $i;
echo '"';
}
}

jack

Keith wrote:
 
 Following loop works fine !
 but I don't want $art_nr_1 (which is 4564)
 I want to have $art_nr_$i
 but if you use it you just get 1,2,3,4
 
 for ($i=1; $i50; $i++) :
 $varid = "quant".$i ;
 if ($$varid != "") {
 echo
 "
 input type=hidden name=\"art_nr\" value=\"$art_nr_1\"
 input type=hidden name=\"quantity\" value=\"$quant1\" ";
 
 }
 endfor;
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




RE: [PHP] variable on 2 forms

2001-03-14 Thread Rudolf Visagie

I don't know if this fixes your problem but this worked for me. Define a
Javascript function:

function PassRequest(what) {
document.fields_frm.p_request.value=what
}

and then in the form you could perhaps have:

td valign="top"
input type="hidden" name="p_request"
input type="image" src="images/insert.jpg" width="53" border=0
alt="Insert" onClick="PassRequest('Insert')"
/td

When the user clicks on the insert button it passes 'Insert' in $p_request.

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: pablo [mailto:[EMAIL PROTECTED]]
Sent: 14 March 2001 04:58
To: Miguel Loureiro; php-gen
Subject: Re: [PHP] variable on 2 forms



I think you'll need to use javascript.
put a input with the type "hidden" in the first form with no value.
Call a javascript function on the submit button or image action.
This javascript must set the hidden input in form1 with the var2 value
before submiting the form to the script.
the object structure for the forms in javascript is :
document.forms[].elements[].value

Good luck.
Pablo
[EMAIL PROTECTED]


- Original Message -
From: Miguel Loureiro [EMAIL PROTECTED]
To: php-gen [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 3:58 PM
Subject: [PHP] variable on 2 forms


Hello all,
I have a normal form (form1) with a variable (var1) and a form inside a
layer (form2) with a variable (var2).
After submit (form1), how can I have access to var2 ? (if I must use
javascript should use: document.layer.var2 or document.form2.var2 or
document.layer.form2.var2 ...???).I try to read directly $var2, but
without result
T.Y all
Best Regards
Miguel Loureiro [EMAIL PROTECTED] 





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

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




Re: [PHP] I want this magic directory

2001-03-14 Thread Joe Stump

Read up on forcetype'ing on phpbuilder.com - it will do just what you want it
to do.

--Joe

On Wed, Mar 14, 2001 at 06:08:18PM +0800, Alex wrote:
 I just want every customer on my site get his own unique id as his directory
 name but the pages requested are all processed by the root.
 Such as: customer1's url is http://www.mysite.com/2000123/
  customer2's url is http://www.mysite.com/2000124/
   ^^^UID
 and the pages requested are actually processed by http://www.mysite.com/
 
 I want it to implement security and personalization. I don't want to use
 .php?uid=XXX because of lazy. :)
 thanks.
 
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

---
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.geekshare.com http://www.care2.com http://www.miester.org/\\
"Those who can, create. Those who can't, complain."_\_V
---


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




Re: [PHP] simple I'm sure

2001-03-14 Thread Keith

It's bizarre it should work but I get back just 1, 2 or 3
Although with this just to test input type=\"hidden\" name=\"test\" 
value=\"$art_nr_1\" it works fine
and i get back input type="hidden" name="test" value="124478"

And really weird it this version
for ($i=1; $i50; $i++) :
$quantid = "quant".$i ;
if ($$quantid != "") {
 $artid = "art_nr_".$i;
 echo "
 input type=\"hidden\" name=\"artnr_$i\" value=\"$$artid\"
 input type=\"hidden\" name=\"quant_$i\" value=\"$$quantid\"
 input type=\"hidden\" name=\"test\" value=\"$art_nr_1\"
 ";
}
endfor;
which gives me back
 input type="hidden" name="artnr_1" value="$art_nr_1"
 input type="hidden" name="quant_1" value="$quant1"

I can't spot the problem at all ?

At 10:19 14/03/01 -0500, Jack Dempsey wrote:
try this...didn't test it, but i think it'll do the trick:

for($i=1;$i50;$i++){
 $varid = "quant".$i;
 if($$varid != ""){
 echo 'input type=hidden name="art_nr" value="';
 echo $art_nr_ . $i;
 echo '"';
 echo 'input type=hidden name="quantity" value="';
 echo $quant . $i;
 echo '"';
 }
}

jack

Keith wrote:
 
  Following loop works fine !
  but I don't want $art_nr_1 (which is 4564)
  I want to have $art_nr_$i
  but if you use it you just get 1,2,3,4
 
  for ($i=1; $i50; $i++) :
  $varid = "quant".$i ;
  if ($$varid != "") {
  echo
  "
  input type=hidden name=\"art_nr\" value=\"$art_nr_1\"
  input type=hidden name=\"quantity\" value=\"$quant1\" ";
 
  }
  endfor;
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

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


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




[PHP] shared memory questions

2001-03-14 Thread Monte Ohrt

Hi,

I have a situation where I'd like to store some data in shared memory as
opposed to repetitive database requests. Basically, I'd read in a
(small) database table and serialize the results into shared mem. I've
read through the semaphore and shared memory documentation, but some
things are left unclear.

1) which is better to use, the shm_* sem_*, or the shmop functions? It
looks like shmop may be easier to use and more efficient.

2) How do I test if a shared memory segment exists, and create one if it
doesn't? Here's a bit of psuedo code I'd like to emulate:

if ( shared mem exists ) {
open shared mem
read data from shared mem
close shared mem
unserialize data
}
else {
do sql query
serialize data
open new shared mem (size of serialized data?)
write data
close shared mem
}


3) What size should the opened shared mem size be? shm_* mentions that
the values are serialized implicitly. Does shmop do this, or does this
need to be serialized first in the PHP code?

4) How do I know what to use for the system id for the memory segment?
What is a "safe" value to use? Is there a valid range? Are there some
ranges I should stay away from?

5) Is there a way to tell the age of a shared memory segment, or must I
do this within the data that is stored?

6) Are there any good examples of usage out there? The one that comes
with shmop doesn't show a way to test if the shared memory segment
exists before trying to create a new one (and how do I open an existing
shared mem segment, not necessarily knowing its size?)


I'm using Sparc Solaris 2.8, if that makes a difference.

Thanks!

--
Monte Ohrt [EMAIL PROTECTED]
http://www.ispi.net/

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




[PHP] bug or feature?

2001-03-14 Thread indrek siitan

Hi,

?
  $value=0;
  if ($value=="NULL")
echo "Value is NULL!";
  else
echo "Value is not null.";
?

output: Value is NULL!


is it a bug or expected behaviour? tested it on 4.0.4pl1.
i got around it by using strcasecmp(), but just wondering. :)


Rgds,
  Tfr

  --== [EMAIL PROTECTED] == http://tfr.cafe.ee/ == +372-50-17621 ==-- 

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




[PHP] Function, array - problem (probably easy to solve)

2001-03-14 Thread Tobias Talltorp

I am constructing a function for retrieving records from a mysql database
and putting them into an array called $print_field[name][number].

My problem is that I only seem to get the first two records and I think I
know where the problem is, but I can´t seem to be able to solve it.

Any ideas anyone?

?
function print_query_array($query, $fields) {
 global $print_field;
 global $linkid;

  // Determine what fields are selected
  $field = explode("|",$fields);

  $mysql_res = mysql_query($query,$linkid);

  while ($strow = mysql_fetch_array($mysql_res))


   $print_field[$field[0]][] = $strow[$field[0]]; // Problem
   $print_field[$field[1]][] = $strow[$field[1]]; // Problem
  }
}

print_query_array("SELECT field1, field2 FROM table LIMIT 10",
"field1|field2");

for ($i=0; $isizeof($print_field); $i++)

 echo $print_field["field1"][$i]."br";
 echo $print_field["field2"][$i]."br";
}
?

Thanks,
// Tobias





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




Re: [PHP] Linux/Apache/PHP Windows/IIS/ColdFusion

2001-03-14 Thread Michael Kimsal



"Joe Sheble (Wizaerd)" wrote:

 At 09:36 AM 3/14/01 -0500, Michael Kimsal wrote:
 What they've got now is completely fine - why necessarily change it?

 As you've stated, there are many reasons why changing would be a good
 thing, but mostly it's a manager (a higher up executive level mucky-muck)
 throwing out 'Hey what about this linux thingie..." and our IT Director
 (whom I often refer to as FDH for f*ckin d*ck head) saying we'll get right
 on it...


You might want be careful about posting some of that stuff on a public board,
unless
you're using an alias.



 are.  You could go CGI PHP on NT, which might be a compromise,
 but you lose the raw speed advantage PHP as an Apache module has.

 Yes, the company has deemed this to be too difficult for our employees to
 remember.

 What about security on a machine?  Last intranet I was at in a large company,
 just because we were logged into the network on a machine didn't give us
 automatic access to the intranet - people moved around too much.  You still
 needed to present your name and password for the intranet - and everything
 there
 was NT/IIS/ASP and ColdFusion.

 Nope, there is no other security other than the Advanced
 Authentication.  The security is not tied to any specific machine but a
 network login.  So as soon as they login to any machine, their username and
 password is automatically passed to the browser and the advanced
 authentication takes place.  Now this if they access the intranet
 internally through our network.  There is also a basic authentication piece
 to access the intranet externally through the internet but requires a
 domain name, username and password.  The management feels this is
 acceptable because there are very few (VERY few) people accessing the
 intranet this way.

I'd be one of those very few if I had to remember by domain as well to log in -
I'd think this is more of a security risk from prying eyes.  Not only might someone

get my name/password by watching me, but they have a chance at learning just a bit
more about the internal organization of our network (a domain name).  Sheesh!

"You are too stupid to be expected to remember a name and password in the building,

but you need that PLUS the domain to connect from outside".  That seems
a DISCOURAGEMENT from using the bloody tool, rather than an encouragement!

I'd still point out that the advanced authentication thing is a security risk if
people
walk away from their machines, unless everyone ALWAYS logs off, even just to
pop to the kitchen for 5 minutes.  If they can't expect people to remember a
separate
name/password (or to type it twice) they surely can't expect people to log off
everytime
they're not physically at a machine.

Anyway, that's a bit off topic.

You're asking if this can be done with Linux?  Probably not, unless you got into
some
strange Samba stuff, which I don't think is capable of doing all that stuff
(someone
more familiar with samba please jump in at this point and correct me!)




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




Re: [PHP] xml parsing

2001-03-14 Thread Pavel Jartsev

Jon A wrote:
 
 ...

   print "img src=\"$element_attrs['IMG']\"";
   break;
 
 ...
   print "img src=\"{$element_attrs['IMG']}\"";
   break;
 
 - this will let it parse, but it won't do anything with the html.
 
 can somebody help me??
 

Try this:
print 'img src="'.$element_attrs['IMG'].'"';


-- 
Pavel a.k.a. Papi

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




Re: [PHP] bug or feature?

2001-03-14 Thread Pavel Jartsev

indrek siitan wrote:
 
 Hi,
 
 ?
   $value=0;
   if ($value=="NULL")
 echo "Value is NULL!";
   else
 echo "Value is not null.";
 ?
 
 output: Value is NULL!
 
 is it a bug or expected behaviour? tested it on 4.0.4pl1.
 i got around it by using strcasecmp(), but just wondering. :)
 

It's expected behaviour, i think.
'cause $value is integer, "NULL" is string and compare will convert
"NULL" into integer.
If condition is ($value==="NULL"), then output will be "Value is not
null.".

RTFM ;-)

-- 
Pavel a.k.a. Papi

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




RE: [PHP] Tutorial for RegExpressions

2001-03-14 Thread Nathan Cassano


Learning to Use Regular Expressions by Example
http://www.phpbuilder.com/columns/dario19990616.php3

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 6:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Tutorial for RegExpressions


Hi !

Does someone know a good tutorial fr regula-expression, like they are
used in ereg and preg ?

Martin



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


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




Re: [PHP] Problems with mail function

2001-03-14 Thread Colin May


Quoting Kike (Wed, Mar 14, 2001 at 11:59:32AM -)
 Hi,
 I have a seious problem with the mail function. It does not send the emails.
 It returns 1 but does not send them. I think it may be a problem with
 sendmail permissions. Can you help me? Please.

What do the sendmail mail logs say?  if you havent got access to them, ask 
someone who has?

-- 

Colin May  | "its an illusion, its a game, a reflection of
mailto:[EMAIL PROTECTED]  | someone elses name" - abacab, genesis
http://www.wibble.org.uk   | http://www.abacab.org.uk


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




[PHP] Re: [PHP-WIN] Print variables coming from a form not controled by me...

2001-03-14 Thread Dream

Hi Michael, 

Alos, when I run the page, it give me a parse error in line 22, that is:

while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )

Any idea?

Here's the complete page

html
head
titleUntitled Document/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/head

body bgcolor="#FF" text="#00"
?
function DumpHttpGetVars()
   {
  global $HTTP_GET_VARS;

  if( $HTTP_GET_VARS )
  {
 reset ( $HTTP_GET_VARS );
 while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )
 {
echo "$key = $valbr\n";
if ( "array" == GetType( $val )  )
{
   while ( list ( $key_child, $val_child ) = each
 $HTTP_GET_VARS ) )
   {
  echo "|-- $key = $valbr\n";
   }
}
 }
  }
   }


?
p 
  ? echo $SERVER_ADDR; ?
/p
p 
  ? echo $REMOTE_ADDR; ?
/p
p
  ? echo $HTTP_USER_AGENT; ?
/p
/body
/html

""Michael Rudel"" [EMAIL PROTECTED] escribi en el mensaje 
news:002001c0aba9$4fc50ab0$[EMAIL PROTECTED]...
// Dumps out all HTTP_GET_VARS:
function DumpHttpGetVars()
{
   global $HTTP_GET_VARS;
 
   if( $HTTP_GET_VARS )
   {
  reset ( $HTTP_GET_VARS );
  while ( list ( $key, $val ) = each ( $HTTP_GET_VARS ) )
  {
 echo "$key = $valbr\n";
 if ( "array" == GetType( $val )  )
 {
while ( list ( $key_child, $val_child ) = each
  $HTTP_GET_VARS ) )
{
   echo "|-- $key = $valbr\n";
}
 }
  }
   }
}
 
 So you just call the function 'DumpHttpGetVars()'
 and all of them will be printed out.
 
 Greetinx,
   Mike
 
 Michael Rudel
 - Web-Development, Systemadministration -
 ___
 
 Suchtreffer AG
 Bleicherstrae 20
 D-78467 Konstanz
 Germany
 fon: +49-(0)7531-89207-17
 fax: +49-(0)7531-89207-13
 e-mail: mailto:[EMAIL PROTECTED]
 internet: http://www.suchtreffer.de
 ___
 
 
 
 -Original Message-
 From: Tom Mathews [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, March 13, 2001 10:38 AM
 Cc: PHP Windows lista
 Subject: Re: [PHP-WIN] Print variables coming from a form not controled
 by me...
 
 
 Anything in the querystring can be translated as a php variable.
 
 Say you have the string coming in as
 ...?result=1age=23...
 then in the called page/script, the querystring are already variables.
 eg $result will have the value 1, $age will have the value 23...
 
 Hope this is what you're after
 
 Tom
 Dream wrote:
 
  Any idea of how to get information from a form (not a form controlled by
 me,
  through GET method, i.e. info coming with the URL, like this
  http://www.xxx.com/xxx.cgi?result=1age=23name=john)  and print it
 through
  php v.3?
 
  I don't know how to get the info (coming from an outside form) and pass it
  throught the php3 variables..
 
  Thanks,
 
  marc
 
  --
  PHP Windows Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 -- 
 PHP Windows Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



[PHP] sort in mysql

2001-03-14 Thread McShen

hi

I have a database with some urls and numbers. There are currently 2 records
in the database. I wanna sort them by the numbers. How should i do it?
my table is like

name hits
john 343
scott   3423

any suggestions would be greatly appreciated!




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




[PHP] stopping readfile dumping file contents to apache's error_log on error?

2001-03-14 Thread Seth Ladd

Hi,

I'm experiencing an odd situation.  I am returning a large file back to a
client w/ readfile().  If I cancel the stream before it is done, it will
cause the PHP script to write the rest of the file's contents to Apache's
error_log (creating quite a huge log file).

I'm afraid I don't understand how to control PHP's logging and error
reporting functions.  I did place a @ infront of the readfile() call, but
that didn't help.  It also looks that it's not only readfile() that places
the contents of its stream into error_log.  Other PHP scripts that generate
huge amounts of data, if canceled, also log their streams (text or binary)
to error_log.

How can I control this?  I checked my php.ini file, but it didn't seem to
give me any leads.  Any hints or pointers would be greatly appreciated.

Thanks very much,
Seth


Seth Ladd | Software Engineer, Product Development
Brivo Systems, Inc.
[EMAIL PROTECTED]

Confidential and Proprietary, Brivo Systems, Inc.



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




Re: [PHP] foreach() faster than while()?

2001-03-14 Thread Dennis Gearon

I meant to write about this last week!

I see a LOT of examples on the PHP website, both by contributions and by
the staff responsible for the manual, of using functions inside of loops
to get a value that doesn't change, i.e. the end or beginning of an
array.

A lot of code out there would speed up tremendously if the necessary
value was stored in a temporary variable, which would then be used in
the loop. Probably, using echo() or print() in a loop also slows things
down, buffering into a variable first is much faster, I bet.

One thing I've taken to doing that is related to this, is any object
method() that would normally have a printed output, I make two output
functions, 'getValue()' and 'printValue()'. the getValue() buffers to a
variable in the object and this can be used inline in another place
thats buffering output. If I want it printed right away, the
printValue() calls getValue().

And because I like readable web page HTML, I also have begun to start
including an 'indention' argument to those functions, or sometimes an
'indention' attribute. At the beginning of the buffering and also
following a '\n' in the HTML being buffered, I place the number of
spaces to cause proper indention in the HTML output to make tables etc
line up. It does make the files a little bigger, but it's lot's easier
to see what's going on in the code. I suppose if I wanted to, I could
make a global variable that said, 'INDENTION_ON/OFF' for production.

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




Re: [PHP] Problems with mail function

2001-03-14 Thread stas

I have the same problem. Mail function works fine on my NT development box,
but when I transfer files over to Unix, it doesn't, as if mail goes into the
void. The only setting you need on Unix is the sendmail path, no? SMTP and
sendmail_from are not required and are ignored, is that correct?


stas


- Original Message -
From: "Colin May" [EMAIL PROTECTED]
To: "Kike" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 11:01 AM
Subject: Re: [PHP] Problems with mail function



 Quoting Kike (Wed, Mar 14, 2001 at 11:59:32AM -)
  Hi,
  I have a seious problem with the mail function. It does not send the
emails.
  It returns 1 but does not send them. I think it may be a problem with
  sendmail permissions. Can you help me? Please.

 What do the sendmail mail logs say?  if you havent got access to them, ask
 someone who has?




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




[PHP] values for extensive

2001-03-14 Thread Marcel Henrique Scandolara - Wide

As I could make a function to write values for extensive,  example:
It types 10
soon below appears (Ten)

Obliged for the attention

Marcel Henrique


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




[PHP] Have any body built the SWF snmp extensions for Redhat 7.0?

2001-03-14 Thread Mohammed Mahmoud Abdel'al

Hi all;
I am using PHP4.0.4pl1 build 3 of rpms Redhat 7.0

I need the swf  snmp extensions very badly
rpmfind.net seems went offline

so do any one there have those 2 extensions as rpms?

if not could any body help me build those extensions from the source =
code as external extension?

thnx alot






Re: [PHP] update two frames at once?-Revised

2001-03-14 Thread Jeanne Pelletier

Whoops I forgot to include the whole buildquerystring function in my last
post
Sorry about that

function build_querystring() {
 global  $HTTP_GET_VARS;
 $vars=array();
 $varlist=array("cID","dID","editreturn","return","action","editpers");
 while (list($key,$value)=each($HTTP_GET_VARS)){
   reset($varlist);
if (in_array($key,$varlist)){
 $key=trim($key);
   $value=trim($value);
   $vars[]="$key=$value";
}
}
while (list($junk,$val)=each($vars)) {
}
$queryvars=implode($vars,"");
return $queryvars;
}


- Original Message -
From: "Jeanne Pelletier" [EMAIL PROTECTED]
To: "Jens Nedal" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 12:58 PM
Subject: Re: [PHP] update two frames at once?


 Here's what works for me-- You might adapt this to work on your frames.


 on the frameset page--index.php ---I put the following:
 ?php

 function build_querystring() {
  global  $HTTP_GET_VARS;
  $vars=array();
 //I use a list of the variables I want to be parsed here so as to avoid
some
 mischief
  $varlist=array("var1","var2","var3");
  while (list($key,$value)=each($HTTP_GET_VARS)){
reset($varlist);
 if (in_array($key,$varlist)){
  $key=trim($key);
$value=trim($value);
$vars[]="$key=$value";
 }
 }

 $dir="directoryname";
 $thesevars=build_querystring();
 $page=(isset($page)  $page !="")?"$page":"defaultpage";
 $gopage=(!$thesevars=="")?"$page.php?":"$page.php";
 $framepage="$dir$gopage$thesevars";
 ?

 Then in the frameset I make the url of mainFrame the value of $framepage

 frameset rows="100,561*" frameborder="NO" border="0" framespacing="0"
 cols="*"
 frame name="topNav" scrolling="NO" noresize src="topnav.php"
  frame name="mainFrame" src="?php echo($framepage);?"
  /frameset


 Then your links  are coded like so:
 a href="/index.php?page=whatevervar1=foovar2=bar"

 Maybe not the most elegant solution, but it works for me.
 Jeanne

 - Original Message -
 From: "Jens Nedal" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, March 14, 2001 5:05 AM
 Subject: Re: [PHP] update two frames at once?


  Yes you can and there is even a neater script that does it.
  with thise you can update any amount of frames a t the same time.
  Just well i got to find it. msg back in a few.
 
  Jens Nedal
 
  on 12.03.2001 22:15 Uhr, Angerer, Chad at [EMAIL PROTECTED] wrote:
 
   Yes you can.. use Javascript
  
   Look here.. http://www.virtualgeoff.com/junkyard/frames/multiple/
  
   Chad
  
   -Original Message-
   From: Michael George [mailto:[EMAIL PROTECTED]]
   Sent: Monday, March 12, 2001 3:06 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] update two frames at once?
  
  
   Hello al!
  
   Is it possible to have two frames updated when cliking on one link?  I
 have
   a
   page that is broken into 4 parts:
   master title
   section title
   d section screen
   i
   r
   .
  
   what I want is that when a link is clicked on in the directory (the
left
   column), I'd like to update the section title *and* the section
 screen...
  
   It seemed a cool layout at the time, but I'm thinking this isn't
easily
   possible and I might just have to incorporate a section title on the
 section
   screen...  But before I rewrite it, I thought I'd ask here.
  
   Thanks!
  
   -Michael
  
   P.S. I'd like to commend the regular posters to this list on being
SOOO
   informative and patient!  Every small question to this list always
   gets several useful answers, even when I've seen questions asked over
   and again.
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



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




[PHP] [?] How to make many one line forms in a loop?

2001-03-14 Thread John Voth

Howdy Folks!

I am wondering how to make a giant list of forms in a loop. 

My goal is to search the database for the data in the cell clicked.

This is step by step process that I would like to achieve:
 1. Dump the contents of the website_log db to the browser in a table
format.
 2. User clicks on any cell in the table.
 3. A new sql query is submitted to mysql based on the data in that
cell.
 4. The sql results are redisplayed in table format in the browser.


Presently, here's what I have:

I have a mysql db filled with access logs - things like HTTP_REFERER,
etc.
Presently, I dump them out to the browser like this:

?php

  error_reporting(E_ALL);
  include("/home/httpd/php/open_db.inc");

  // default setting for $sort_term
  if ($sort_term == null)
 $sort_term = "lid";

  $sql = "SELECT lid, remote_addr, php_self, uid, event_time
  FROM website_log
  ORDER BY $sort_term ASC";

  $result = mysql_query($sql, $db);
  $rows = mysql_num_rows($result);

  echo "centerbuLog File Dump/u/bbrBr";

  echo "table bgcolor=#00
   tr
  td bgcolor=#00table cellpadding=4 cellspacing=0
bgcolor=#ff";
  echo "tr
tha href='$PHP_SELF?sort_term=lid'Log ID#/a/th
tha href='$PHP_SELF?sort_term=remote_addr'Remote
Address/a/th
tha href='$PHP_SELF?sort_term=php_self'File
Accessed/a/th
tha href='$PHP_SELF?sort_term=uid'Accessed By/a/th
tha href='$PHP_SELF?sort_term=event_time'On this
Date/a/th
 /tr";

  while ($row = mysql_fetch_array($result))
  {
$log_id = $row["lid"];
$remote_address = $row["remote_addr"];
$file_id = $row["php_self"];
$user_id = $row["uid"];
$time_of_event = $row["event_time"];

echo "tr
  td$log_id/td
  td$remote_address/td
  td$file_id/td
  td$user_id/td
  td$time_of_event/td
/tr";
  }
  
  echo "/table/td/tr/table";
  echo "/center";

  mysql_free_result($result);
  mysql_close($db);

?


What I would like to do is convert the echo statement in the while loop
into 
something like this:

  echo "tr
td
  FORM NAME="log_id_search" ACTION="$PHP_SELF" METHOD=POST
  INPUT TYPE=HIDDEN NAME="sql_search_type" VALUE="log_id"
  INPUT TYPE=HIDDEN NAME="search_key" VALUE="$log_id"
  INPUT TYPE=SUBMIT NAME="search_this" VALUE="$log_id"
  /FORM  
/td
td$remote_address/td
td$file_id/td
td$user_id/td
td$time_of_event/td
   /tr";

I've tried the above modification but PHP silently barfs on it.

Would anyone have any insights or suggestions?

Thanks in advance!

John
-- 

/\
| John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
| [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
\/

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




[PHP] seminer

2001-03-14 Thread ugur coskun



Merhabalar

  ITU ve serbestyazilim.org.tr ortak etkinligi kapsaminda pazartesi gunu
C++'in yaraticisi Bjarne Stroustrup tarafindan " Fundamental C++ programming
styles / Multiparadigm programming in C++ " konularinda ITU Suleyman Demirel
Kultur Merkezinde ucretsiz seminer verilecektir. Bununla birlikte pazar gunu
ITU Matematik ve Bilgisayar Kulubu ve WIOS ortak etkinlik kapsaminda PHPed
editorunun yazari Ergin Soysal ayni yerde Genel PHP semineri verecektir
Ayrintilar icin www.matbilg.itu.edu.tr/seminerler adresini ziyaret
edebilirsiniz. Tum yapilacak seminerler ucretsizdir. Istanbulda boyle
seminerlerin devam etmesi icin mumkun oldugu kadar katilmanizi rica
ediyoruz. Simdiden istiraklariniz icin tesekkur ederiz. Desteklerinizi
bekliyoruz.

19 Mart 2001 - C++ :
C++'in yaraticisi Bjarne Stroustrup

ITU Ayazaga Kampusu - 19 Mart 2001 Saat 16:00
Suleyman Demirel Kltr Merkezi


Konusmaci: Dr. Bjarne Stroustrup
AT  T Labs, Research Director

Konu:  C++
Fundamental C++ programming styles / Multiparadigm programming in C++


Dr. Stroustrup, C++'in do?u?u, ve geli?iminde nemli etkileri olmu?, C++'in
yaraticisidir. Konu uzerinde yazdigi kitaplar, temel basvuru kitaplaridir.
Dr. Stroustrup, daha oncede, INETD'nin atasi olan TRUUG tarafindan
Turkiye'ye getirilmi?ti.

Dr. Stroustrup, "serbest yazilim yarismasi"
(www.serbestyazilim.org.tr) nedeniyle Turkiye'ye gelmekte, ve
Istanbul'daki konu?maya ek olarak, Ankara'da ODTU'de 20 ve 21 Mart'ta 2
konusma yapacaktir.

Etkinlik her Internet meraklisina aciktir ve ucretsizdir.

Ayr?nt?l? bilgi: http://www.matbilg.itu.edu.tr/seminerler


--

--

18 Mart 2001  -Web Programlama Dili PHP
PHPed Adl? dnyaca nl program?n Yarat?c?s?

ITU Ayaza?a Kamps - Saat 10:00
Sleyman Demirel Kltr Merkezi

Konusmaci: Ergin Soysal
Pleksus Information Technologies http://www.pleksus.net.tr/ as director of
software research and development department and head developer.

Konu: PHP
Ergin Soysal, PHP konusunu 2 kisimda isleyecektir. 1. K?s?m 18 Mart 2001
tarihinde asag?dak? konularda verilecektir. 2. K?s?m iin Daha sonra tarih
belirtilecektir.

PHP-1:
Giris
Gerekli Dosyalar ve Kurulum
Yazim Kurallari
Degiskenler/Veritipleri
Operatrler
Diziler
if/elseif/else
switch
Dngler
Fonksiyonlar
Formlar
Form alanlari
Post ve Get
Dosya gnderme ve alma (upload)
PHP-2
?leri dzey
Siniflar
erezler
Oturumlar
Kullanici Dogrulama

Ergin Soysal, bir PHP editoru yazacak kadar PHP'i sevmis ve kullanmaktadir.
AB 2001 ve Inet-tr 2000'de Ergin Soysal benzeri seminerler vermistir.

~~
Ugur COSKUN
ISTANBUL TEKNIK UNIVERSITESI - Bilgi Islem Dairesi Baskanligi
http://www.matbilg.itu.edu.tr
[EMAIL PROTECTED]   [EMAIL PROTECTED]
Tel: (+90 212) 285 39 30 / 110
~~


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




[PHP] Using php to get javascript varibles

2001-03-14 Thread Morten Hansen

Hey :)

I'm in the need to fetch some javascript varibles from php, any ideas on 
how this
could be done ?

Regards, Morten Hansen


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




[PHP] prompts

2001-03-14 Thread Gary

Is there anyway in PHP to prompt the user for input like JavaScript's
prompt("Hello, what is your name?")

Thanks, Gary



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




[PHP] software localization with PHP

2001-03-14 Thread Tao

Kevin,

Thanks for the reply.  This will not solve my problem.  The problem is, for some
languages the sentence structure may be different.  For example, the sentence
may need to be,
$greeting = "$first_name, welcome!"
as opposed to,
$greeting = "Welcome, $first_name!"

Or, it can come in a different form, like,
$greeting = "Good morning, $first_name."

These specificity need to be in the language file, not the scripts.

Tao


Leavell Digital Design wrote:

 You can use constants:

 in your language file
 define("HELLO", OLA);

 in your script  which includes the language file you can write
 $greeting = HELLO . " $first_name";

 print $greeting;

 Kevin Leavell
 [EMAIL PROTECTED]
 P 406.829.8989
 C 406.240.4595

 --- -Original Message-
 --- From: Tao [mailto:[EMAIL PROTECTED]]
 --- Sent: Tuesday, March 13, 2001 9:50 PM
 --- To: [EMAIL PROTECTED]
 --- Subject: [PHP] software localization with PHP
 ---
 ---
 --- Hi all,
 ---
 --- I have a question about localizing PHP scripts.  I understand
 --- that for basic
 --- localization one can have a "strings" file for each language,
 --- which contains
 --- string variables and values such as:
 --- ?php
 --- $title = "Welcome!";
 --- $error = "An error occurred.";
 --- ?
 ---
 --- Then, in the scripts just "include" the language file at the
 --- beginning and
 --- simply call the strings by their variable names.  The issue I
 --- have is when
 --- embedding variables within these strings.  Suppose I need to
 --- call the user
 --- by his/her first name, in the strings file I would have a variable like
 --- this:
 --- $greeting = "Welcome! $first_name";
 ---
 --- The problem is, the strings file is loaded at the beginning of
 --- the script
 --- before $first_name was set, so the $greeting string will come out as
 --- "Welcome! ", with $first_name being an empty string.  Even if
 --- I loaded the
 --- strings file after the $first_name variable is set, the problem still
 --- remains - when $first_name variable is changed, the strings
 --- file has to be
 --- reloaded.
 ---
 --- What is the best way of dealing with this problem?  Is there a
 --- place to find
 --- "best practices" on localizing PHP software?
 ---
 --- Tao
 ---
 ---
 ---
 --- --
 --- PHP General Mailing List (http://www.php.net/)
 --- To unsubscribe, e-mail: [EMAIL PROTECTED]
 --- For additional commands, e-mail: [EMAIL PROTECTED]
 --- To contact the list administrators, e-mail:
 --- [EMAIL PROTECTED]

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


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




[PHP] software localization with PHP

2001-03-14 Thread Tao

Kevin,

Thanks for the reply.  This will not solve my problem.  The problem is, for some
languages the sentence structure may be different.  For example, the sentence
may need to be,
$greeting = "$first_name, welcome!"
as opposed to,
$greeting = "Welcome, $first_name!"

Or, it can come in a different form, like,
$greeting = "Good morning, $first_name."

These specificity need to be in the language file, not the scripts.

Tao


Leavell Digital Design wrote:

 You can use constants:

 in your language file
 define("HELLO", OLA);

 in your script  which includes the language file you can write
 $greeting = HELLO . " $first_name";

 print $greeting;

 Kevin Leavell
 [EMAIL PROTECTED]
 P 406.829.8989
 C 406.240.4595

 --- -Original Message-
 --- From: Tao [mailto:[EMAIL PROTECTED]]
 --- Sent: Tuesday, March 13, 2001 9:50 PM
 --- To: [EMAIL PROTECTED]
 --- Subject: [PHP] software localization with PHP
 ---
 ---
 --- Hi all,
 ---
 --- I have a question about localizing PHP scripts.  I understand
 --- that for basic
 --- localization one can have a "strings" file for each language,
 --- which contains
 --- string variables and values such as:
 --- ?php
 --- $title = "Welcome!";
 --- $error = "An error occurred.";
 --- ?
 ---
 --- Then, in the scripts just "include" the language file at the
 --- beginning and
 --- simply call the strings by their variable names.  The issue I
 --- have is when
 --- embedding variables within these strings.  Suppose I need to
 --- call the user
 --- by his/her first name, in the strings file I would have a variable like
 --- this:
 --- $greeting = "Welcome! $first_name";
 ---
 --- The problem is, the strings file is loaded at the beginning of
 --- the script
 --- before $first_name was set, so the $greeting string will come out as
 --- "Welcome! ", with $first_name being an empty string.  Even if
 --- I loaded the
 --- strings file after the $first_name variable is set, the problem still
 --- remains - when $first_name variable is changed, the strings
 --- file has to be
 --- reloaded.
 ---
 --- What is the best way of dealing with this problem?  Is there a
 --- place to find
 --- "best practices" on localizing PHP software?
 ---
 --- Tao
 ---
 ---
 ---
 --- --
 --- PHP General Mailing List (http://www.php.net/)
 --- To unsubscribe, e-mail: [EMAIL PROTECTED]
 --- For additional commands, e-mail: [EMAIL PROTECTED]
 --- To contact the list administrators, e-mail:
 --- [EMAIL PROTECTED]

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


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




[PHP] RE: software localization with PHP

2001-03-14 Thread Leavell Digital Design

You can still do:
in your language file (presumably called english.php)
define("ENGLISH_GREETING", "Hello, \$first_name");


Then in your script you just need to use
ENGLISH_GREETING

it should work as long as you have defined $first_name prior to using
ENGLISH_GREETING

you may have to declare $first_name as a global variable but I am not sure.

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: Tao [mailto:[EMAIL PROTECTED]]
--- Sent: Wednesday, March 14, 2001 12:14 PM
--- To: [EMAIL PROTECTED]
--- Subject: software localization with PHP
---
---
--- Kevin,
---
--- Thanks for the reply.  This will not solve my problem.  The
--- problem is, for some
--- languages the sentence structure may be different.  For
--- example, the sentence
--- may need to be,
--- $greeting = "$first_name, welcome!"
--- as opposed to,
--- $greeting = "Welcome, $first_name!"
---
--- Or, it can come in a different form, like,
--- $greeting = "Good morning, $first_name."
---
--- These specificity need to be in the language file, not the scripts.
---
--- Tao
---
---
--- Leavell Digital Design wrote:
---
---  You can use constants:
--- 
---  in your language file
---  define("HELLO", OLA);
--- 
---  in your script  which includes the language file you can write
---  $greeting = HELLO . " $first_name";
--- 
---  print $greeting;
--- 
---  Kevin Leavell
---  [EMAIL PROTECTED]
---  P 406.829.8989
---  C 406.240.4595
--- 
---  --- -Original Message-
---  --- From: Tao [mailto:[EMAIL PROTECTED]]
---  --- Sent: Tuesday, March 13, 2001 9:50 PM
---  --- To: [EMAIL PROTECTED]
---  --- Subject: [PHP] software localization with PHP
---  ---
---  ---
---  --- Hi all,
---  ---
---  --- I have a question about localizing PHP scripts.  I understand
---  --- that for basic
---  --- localization one can have a "strings" file for each language,
---  --- which contains
---  --- string variables and values such as:
---  --- ?php
---  --- $title = "Welcome!";
---  --- $error = "An error occurred.";
---  --- ?
---  ---
---  --- Then, in the scripts just "include" the language file at the
---  --- beginning and
---  --- simply call the strings by their variable names.  The issue I
---  --- have is when
---  --- embedding variables within these strings.  Suppose I need to
---  --- call the user
---  --- by his/her first name, in the strings file I would have
--- a variable like
---  --- this:
---  --- $greeting = "Welcome! $first_name";
---  ---
---  --- The problem is, the strings file is loaded at the beginning of
---  --- the script
---  --- before $first_name was set, so the $greeting string
--- will come out as
---  --- "Welcome! ", with $first_name being an empty string.  Even if
---  --- I loaded the
---  --- strings file after the $first_name variable is set, the
--- problem still
---  --- remains - when $first_name variable is changed, the strings
---  --- file has to be
---  --- reloaded.
---  ---
---  --- What is the best way of dealing with this problem?  Is there a
---  --- place to find
---  --- "best practices" on localizing PHP software?
---  ---
---  --- Tao
---  ---
---  ---
---  ---
---  --- --
---  --- PHP General Mailing List (http://www.php.net/)
---  --- To unsubscribe, e-mail: [EMAIL PROTECTED]
---  --- For additional commands, e-mail: [EMAIL PROTECTED]
---  --- To contact the list administrators, e-mail:
---  --- [EMAIL PROTECTED]
--- 
---  --
---  PHP General Mailing List (http://www.php.net/)
---  To unsubscribe, e-mail: [EMAIL PROTECTED]
---  For additional commands, e-mail: [EMAIL PROTECTED]
---  To contact the list administrators, e-mail:
--- [EMAIL PROTECTED]


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




RE: [PHP] prompts

2001-03-14 Thread Leavell Digital Design

?PHP
if( $Submit ){
print "Your name is $name";
}
else{
print "FORM METHOD=\"post\" ACTION=\"$PHP_SELF\"";
print "Please Enter Your Name:";
print "INPUT TYPE=\"text\" name=\"name\"";
print "INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\"";
print "/FORM";
}
?

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595 

--- -Original Message-
--- From: Gary [mailto:[EMAIL PROTECTED]]
--- Sent: Wednesday, March 14, 2001 1:13 PM
--- To: [EMAIL PROTECTED]
--- Subject: [PHP] prompts
--- 
--- 
--- Is there anyway in PHP to prompt the user for input like JavaScript's
--- prompt("Hello, what is your name?")
--- 
--- Thanks, Gary
--- 
--- 
--- 
--- -- 
--- PHP General Mailing List (http://www.php.net/)
--- To unsubscribe, e-mail: [EMAIL PROTECTED]
--- For additional commands, e-mail: [EMAIL PROTECTED]
--- To contact the list administrators, e-mail: 
--- [EMAIL PROTECTED]

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




Re: [PHP] Linux/Apache/PHP Windows/IIS/ColdFusion

2001-03-14 Thread John McCreesh

In article [EMAIL PROTECTED], "Michael Kimsal"
[EMAIL PROTECTED] wrote:

[snip]
 You're asking if this can be done with Linux?  Probably not, unless you
 got into some
 strange Samba stuff, which I don't think is capable of doing all that
 stuff (someone
 more familiar with samba please jump in at this point and correct me!)
[snip]

There was a mod_ntlm under development for Apache which would be the
first step in solving your security problem - I think it relied on SAMBA
- but last time I looked (on SourceForge?) it was at a very early stage
of development and didn't seem to be getting anywhere.

John

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




[PHP] get content type from fopening url?

2001-03-14 Thread Noah Spitzer-Williams

is there a way so that if someone submits a web url (hopefully its a
picture), i can check to make sure its a valid picture?

i think its something like fopen(), but i dont know far i could get

thanks!

- Noah



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




[PHP] select * from nmensagem m, nusuario...

2001-03-14 Thread Augusto Cesar Castoldi

Something is not working here:


select * from nmensagem m, nusuario u, nprefuser p where
m.cdpreferencia=p.cdpreferencia and p.flag=1;

With "m.cdpreferencia=p.cdpreferencia" I should get just the values there
exists on m.preferencia and p.cdpreferencia?

thanks,

Augusto


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




[PHP] adding to functionality of mysql_fetch_field

2001-03-14 Thread Dennis Gearon

I'd like to see mysql_fetch_field() return as the last value in the
object, the allowable values for an enum field as an array. Could I get
a cc as well as a listserver group answer from the PHP guys as to
whether they think this is a good idea?

Is there any other EASY way to get that information about a field?

It would make making select inputs a lot easier and more tied to the
database without thinking by the programmer, and would track design
changes to the database.

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




Re: [PHP] PHP and Oracle Zombie processes

2001-03-14 Thread Rouvas Stathis

If you don't see --enable-sigchild in phpinfo() then :
(a) you are not running the version you compiled
(b) your config script had something wrong.
Baseline: if you don't see it, it's not there.
You have to recompile.
-Stathis.


Bob Kakalec wrote:
 
 When I execute an sql statement against my Oracle database from PHP, I
 create an  oracle zombie process.  This eventually hits a "number of
 zombie process" limit and prevents my page from executing.
 
 The queries work properly (except for the zombie problem).
 
 Here is a sample that creates the zombie process:
 
 putenv("ORACLE_HOME=/h/app/oracle/product/8.1.6");
 putenv("ORACLE_SID=dbase_name");
 putenv("TNS_ADMIN=/h/app/oracle/product/8.1.6/network/admin");//
 thought this might help the zombie problem
 
 $conn=OCILogon("get_rid_of" , "zombie");
 
 $sql_get_info="SELECT OppID, OppTitle  FROM TEST WHERE OppID=4";
 $stmt = OCIParse($conn,$sql_get_info);
 
 OCIExecute($stmt);
 
 OCIFetch($stmt));
 
 $valid_opp_id = OCIResult($stmt, "OPPID");
 $valid_opp_title = OCIResult($stmt, "OPPTITLE");
 
 OCIFreeStatement($stmt);
 
 / using  a separate query to get the clob..
 $clob_field="OPPTEXT"; // this field in UPPPER CASE
 $sql="SELECT $clob_field from TEST WHERE OppID=$oid";
 
 $stmt = OCIParse($conn, $sql);
 $clob_text = OCINewDescriptor($conn,OCI_D_LOB);
 OCIDefineByName($stmt, $clob_field, $clob_text);
 OCIExecute($stmt);
 OCIFetch($stmt);
 $valid_text=$clob_text-load();
 
 $clob_text-free();
 OCIFreeStatement($stmt);
 
 Here is how I configured PHP 4.0.3pl1 (this is from phpinfo();) :
 
 ./configure --with-apxs=/usr/local/apache/bin/apxs
 --with-config-file-path=/etc/httpd
 --with-oracle=/ora8/m01/app/oracle/product/8.1.6
 
 I also added OCI8 support via..
 --with-oci8=/ora8/m01/app/oracle/product/8.1.6  ... phpinfo(); states
 oci8 support is "enabled".
 
 I did --enable-sigchild  but I don't see it showing in the phpinfo();
 ???
 
 I am using: Oracle 8.1.6,   Apache 1.3.12 , RedHat 6.0  - all on one
 server.
 
 Any ideas on what I might be doing wrong?  Am I missing something?   Any
 help would be greatly appreciated.
 
 Thanks,
 
 Bob
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] adding to functionality of mysql_fetch_field

2001-03-14 Thread Mark Maggelet

On Wed, 14 Mar 2001 12:12:22 -0800, Dennis Gearon ([EMAIL PROTECTED])
wrote:
I'd like to see mysql_fetch_field() return as the last value in the
object, the allowable values for an enum field as an array. Could I
get
a cc as well as a listserver group answer from the PHP guys as to
whether they think this is a good idea?

Is there any other EASY way to get that information about a field?

It would make making select inputs a lot easier and more tied to
the
database without thinking by the programmer, and would track design
changes to the database.

you can do something like this:

$result=mysql_query("describe $table");
while($row=mysql_fetch_array($result)){
if($row["Field"]==$fieldname){
$enum=$row["Type"];
break;
}
}

$enum will look something like:
"enum('Yes','No')"
then you parse out $enum to get the values.
put it in a function called get_enum_values($table,$fieldname) and
youre all set.

maybe there's an easier way but I don't know of it.


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




[PHP] apache authentication

2001-03-14 Thread Michael A. Peters

This isn't a php problem as much as an apache problem, however, it is =
webmasters of php sites that would have dealt with this.

Here's the dilemna-

If you use mod_dav to maintain a php application that uses =
username/password authentication for the web app, it doesn't play very =
nice.
At least not how I have it set up- which is why I need help ;)

here's how the web application is set up in my httpd.conf:

Alias /obm/ /opt/php/obm/
Alias /obm-src/ /opt/php/obm/

Directory "/opt/php/obm/"
Options Indexes MultiViews
AllowOverride None
Order allow, deny
Allow from all
AuthType Basic
AuthName webDAV
AuthUserFile /etc/httpd/conf/dav.user
/Directory

(further down)

IfModule mod_dav.c
DAVLockDB /var/apache/dav/moddav
DAVMinTimeout 600
Location /obm-src/
DAV On
ForceType text/plain
Limit PUT POST DELETE PROPFIND MKCOL MOVE LOCK UNLOCK
Require user webmaster
/Limit
/Location
/IfModule

-=3D-
Works beautifully for webDAV updating of the web application.
However, when a user logs in to the web application, after they enter =
the username and password, they are prompted for a login for the webDAV =
realm, which is not what I want.

If I add the satisfy any directive to the directory authentication- =
i.e.-

Directory "/opt/php/obm/"
Options Indexes MultiViews
AllowOverride None
Order allow, deny
Allow from all
AuthType Basic
AuthName webDAV
AuthUserFile /etc/httpd/conf/dav.user
satisfy any
/Directory

Then the web applications authentication works perfectly (user not =
prompted for a webDAV realm login after their username/password are =
verified by the php) but this kills security for webDAV file uploading, =
and a webDAV client can connect without username/password.

What I need to do, is only require authentication in the webDAV realm if =
the user is accessing the client through webDAV (i.e. through the =
/obm-src/ alias) but not require webDAV realm authentication if the user =
is accessing through the /obm/ alias

As far as I can tell, apache authentication directives are directory =
based, not url based, which is where my problem is :(
I must define the webDAV authentication method in the =
Directory/Directory directive, but I only want it to take effect if =
being accessed through /obm-src/ and NOT take effect if being accessed =
through /obm/

Interestingly enough, this is NOT a problem if the web application uses =
Advanced Authentication to authenticate the users (such as phpMyAdmin) =
but it is a problem if the web application uses typical php =
authentication to authenticate the users. That triggers apache to want =
the realm authentication as well.

Any suggestions or ideas on how to resolve this issue?

I'm sorry for the length of the post...

-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Michael A. Peters
Abriasoft Senior Developer

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
Abriasoft Senior Developer

http://www.abriasoft.com/

(510)  623-9726x357
Fax: (510) 249-9125

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




RE: [PHP] [Q] session variables wouldn't keep contents.

2001-03-14 Thread Johnson, Kirk


 -Original Message-
 From: Chung Ha-Nyung [mailto:[EMAIL PROTECTED]]
 
  My second example program.
  a.php 
 ?php
 session_start();
 session_register("name");
 $HTTP_SESSION_VARS["name"] = "test";
 
 echo session_encode();
 ?
  a.php 
  result is as following.
 
 !name|
 
 
  Anybody has some clues about it? why session variables' contents
  wouldn't stored.

Chung, this is a complicated topic! See
http://www.php.net/manual/cs/ref.session.php, although the documentation
there does not go into much detail.

$HTTP_SESSION_VARS["name"] and $name are not the same variables, *while on
the current page*. To see this, add these lines to your code above just
above the echo session_encode() line:

$name = "another test";
echo "name is ".$name."br";
echo "array element name is ".$HTTP_SESSION_VARS["name"]."br";

See what session_encode() outputs now?   name|s:7:"another test";

Another way to think of these two variables is
$GLOBALS["HTTP_SESSION_VARS"]["name"] and $GLOBALS["name"]. Now, depending
on if register_globals is enabled or disabled in php.ini, determines what
happens to these two variables when you *redirect to the next page*. I
suggest you write some code that echo's out all elements of $GLOBALS,
including arrays. Then play around with assigning a value to
$HTTP_SESSION_VARS["name"] and leaving $name blank, and vice-versa. See what
happens to their values on the current page and then redirecting to another
page. Repeat with register_globals enabled and then disabled in php.ini. 

So, your original code above assigns the value "test" to an element of the
$HTTP_SESSION_VARS array. In my setup, *with register_globals enabled*,
session_encode() only encodes $GLOBALS["someVariableName"], and not elements
of the array $GLOBALS["HTTP_SESSION_VARS"]. I guess the conclusion is that
$HTTP_SESSION_VARS is not itself a registered variable, although its
elements may be, so that session_encode() doesn't encode it. Clear as mud?
Yeah, to me to...

Good luck!

Kirk

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




[PHP] header type for flash

2001-03-14 Thread Pierre-Yves Lemaire

Hello,

I am sending flash code stored in a database to the browser depending
on action taken by the user. It works fine on just about any platform and
browser except on Mac with IE 4.01 and IE 4.05.

Is there a specific type of header we need to send to the client when
we are sending a flash movie ?

py  

__
Pierre-Yves Lemaire
514.729.8100



[PHP] PHP saving forms on client side

2001-03-14 Thread mat t

I have new "blank" forms on the server and I would like to give my client an option to 
save a partially filled form to his computer. Is there any way I can do this with php? 


I know that if the client just saves the form using his browser then it will only save 
the initial HTML, and ignore the partially filled bits. Therefore I need to use 
post/get to send the partially filled bits to PHP, 

This means hard coding all the HTML (in php) and inserting the variables that are 
posted from the previous form.

Is there any simpler/easier way of doing this with PHP? because this is not feasible 
if there are 100s of forms.

Thanks,
Matt


_
Pick up your email anywhere in the world --- http://www.remail.net

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




[PHP] e-mail varification problems.

2001-03-14 Thread Kenneth R Zink II

I got the following code in a script I'm testing, but it seams to not verify all good 
e-mail address as valid.
echo "old email = ".$row[email]."br";
if (ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+" or 
"^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+",$email)){
$email = "none";
} else {
$email = $row[email];
}
echo "new email = ".$email."br";

It verifies "[EMAIL PROTECTED]" but not [EMAIL PROTECTED]
it verifies "[EMAIL PROTECTED]" but not [EMAIL PROTECTED]

for a look at the results, check out http://www2.ripcon.net/members/datacopy.php

I'm stumped.  Can someone shed light on this?

Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094
'87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!  
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!  
http://www.s-series.org/htm/firestorm/firestorm.htm
Racing by the Grace of God!!



Re: [PHP] [?] How to make many one line forms in a loop?

2001-03-14 Thread John Voth

Hi Chris,

THANKS!  Really BIG THANKS!!

That was the problem.

John

Chris Lee wrote:
 
 more lilly then not its the " ' problems.
 
  echo "
  tr
  td
  FORM NAME='log_id_search' ACTION='$PHP_SELF' METHOD=POST
  INPUT TYPE=HIDDEN NAME='sql_search_type' VALUE='log_id'
  INPUT TYPE=HIDDEN NAME='search_key' VALUE='$log_id'
  INPUT TYPE=SUBMIT NAME='search_this' VALUE='$log_id'
  /FORM
  /td
  td$remote_address/td
  td$file_id/td
  td$user_id/td
  td$time_of_event/td
  /tr
  ";
 
 is better
 
 --
 
  Chris Lee
  Mediawaveonline.com
 
  ph. 250.377.1095
  ph. 250.376.2690
  fx. 250.554.1120
 
  [EMAIL PROTECTED]
 

-- 

/\
| John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
| [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
\/

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




RE: [PHP] software localization with PHP

2001-03-14 Thread Maciek Uhlig

Check http://stphp.sourceforge.net

Maciek

 -Original Message-
 From: Tao [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 14, 2001 8:14 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP] software localization with PHP


 Kevin,

 Thanks for the reply.  This will not solve my problem.  The
 problem is, for some
 languages the sentence structure may be different.  For example,
 the sentence
 may need to be,
 $greeting = "$first_name, welcome!"
 as opposed to,
 $greeting = "Welcome, $first_name!"

 Or, it can come in a different form, like,
 $greeting = "Good morning, $first_name."

 These specificity need to be in the language file, not the scripts.

 Tao


 Leavell Digital Design wrote:

  You can use constants:
 
  in your language file
  define("HELLO", OLA);
 
  in your script  which includes the language file you can write
  $greeting = HELLO . " $first_name";
 
  print $greeting;
 
  Kevin Leavell
  [EMAIL PROTECTED]
  P 406.829.8989
  C 406.240.4595
 
  --- -Original Message-
  --- From: Tao [mailto:[EMAIL PROTECTED]]
  --- Sent: Tuesday, March 13, 2001 9:50 PM
  --- To: [EMAIL PROTECTED]
  --- Subject: [PHP] software localization with PHP
  ---
  ---
  --- Hi all,
  ---
  --- I have a question about localizing PHP scripts.  I understand
  --- that for basic
  --- localization one can have a "strings" file for each language,
  --- which contains
  --- string variables and values such as:
  --- ?php
  --- $title = "Welcome!";
  --- $error = "An error occurred.";
  --- ?
  ---
  --- Then, in the scripts just "include" the language file at the
  --- beginning and
  --- simply call the strings by their variable names.  The issue I
  --- have is when
  --- embedding variables within these strings.  Suppose I need to
  --- call the user
  --- by his/her first name, in the strings file I would have a
 variable like
  --- this:
  --- $greeting = "Welcome! $first_name";
  ---
  --- The problem is, the strings file is loaded at the beginning of
  --- the script
  --- before $first_name was set, so the $greeting string will
 come out as
  --- "Welcome! ", with $first_name being an empty string.  Even if
  --- I loaded the
  --- strings file after the $first_name variable is set, the
 problem still
  --- remains - when $first_name variable is changed, the strings
  --- file has to be
  --- reloaded.
  ---
  --- What is the best way of dealing with this problem?  Is there a
  --- place to find
  --- "best practices" on localizing PHP software?
  ---
  --- Tao
  ---
  ---
  ---
  --- --
  --- PHP General Mailing List (http://www.php.net/)
  --- To unsubscribe, e-mail: [EMAIL PROTECTED]
  --- For additional commands, e-mail: [EMAIL PROTECTED]
  --- To contact the list administrators, e-mail:
  --- [EMAIL PROTECTED]
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]


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





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




[PHP] my page is in the error log

2001-03-14 Thread Aaron Tuller

anyone run into this?

I was checking my error log and the entire post-PHP contents of a 
page was in my error log.  I checked the access log and the page was 
requested but the client got back 0 bytes.  very strange.

It looks like it happened a few times.

I'm using Apache 1.3.14 on RH 7.0 with PHP 4.0.4pl1.

any ideas?

thanks.

-aaron

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




[PHP-CVS] cvs: php4 /ext/standard credits.c credits.h info.h

2001-03-14 Thread James Moore

jmoore  Wed Mar 14 13:28:58 2001 EDT

  Modified files:  
/php4/ext/standard  credits.c credits.h info.h 
  Log:
  Adding webteam to credits. 
  
Index: php4/ext/standard/credits.c
diff -u php4/ext/standard/credits.c:1.5 php4/ext/standard/credits.c:1.6
--- php4/ext/standard/credits.c:1.5 Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/credits.c Wed Mar 14 13:28:58 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: credits.c,v 1.5 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: credits.c,v 1.6 2001/03/14 21:28:58 jmoore Exp $ */
 
 #include "php.h"
 #include "info.h"
@@ -95,6 +95,14 @@
php_info_print_table_start();
php_info_print_table_header(1, "PHP Quality Assurance Team");
php_info_print_table_row(1, "Andre Langhorst, Hellekin O. Wolf, Jalal 
Pushman, James Moore, Jani Taskinen, Joey Smith, Olivier Cahagne, Phil Driscoll, 
Sebastian Bergmann, Zak Greant");
+   php_info_print_table_end();
+   }
+
+   if (flag  PHP_CREDITS_WEB) {
+   /* Website Team */
+   php_info_print_table_start();
+   php_info_print_table_header(1, "PHP Website Team");
+   php_info_print_table_row(1, "Hojtsy Gabor, Colin Viebrock, Jim 
+Winstead");
php_info_print_table_end();
}
 
Index: php4/ext/standard/credits.h
diff -u php4/ext/standard/credits.h:1.2 php4/ext/standard/credits.h:1.3
--- php4/ext/standard/credits.h:1.2 Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/credits.h Wed Mar 14 13:28:58 2001
@@ -17,16 +17,26 @@
+--+
 */
 
-/* $Id: credits.h,v 1.2 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: credits.h,v 1.3 2001/03/14 21:28:58 jmoore Exp $ */
 
+#ifndef CREDITS_H
+#define CREDITS_H
 
+#ifndef HAVE_CREDITS_DEFS
+#define HAVE_CREDITS_DEFS
+
 #define PHP_CREDITS_GROUP  (10)
 #define PHP_CREDITS_GENERAL(11)
 #define PHP_CREDITS_SAPI   (12)
 #define PHP_CREDITS_MODULES(13)
 #define PHP_CREDITS_DOCS   (14)
 #define PHP_CREDITS_FULLPAGE   (15)
+#define PHP_CREDITS_QA (16)
+#define PHP_CREDITS_WEB (17)
 #define PHP_CREDITS_ALL0x
 
+#endif /* HAVE_CREDITS_DEFS */
+
 PHPAPI void php_print_credits(int flag);
 
+#endif
Index: php4/ext/standard/info.h
diff -u php4/ext/standard/info.h:1.21 php4/ext/standard/info.h:1.22
--- php4/ext/standard/info.h:1.21   Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/info.hWed Mar 14 13:28:58 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: info.h,v 1.21 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: info.h,v 1.22 2001/03/14 21:28:58 jmoore Exp $ */
 
 #ifndef INFO_H
 #define INFO_H
@@ -35,6 +35,8 @@
 #define PHP_INFO_LICENSE   (16)
 #define PHP_INFO_ALL   0x
 
+#ifndef HAVE_CREDITS_DEFS
+#define HAVE_CREDITS_DEFS
 
 #define PHP_CREDITS_GROUP  (10)
 #define PHP_CREDITS_GENERAL(11)
@@ -43,7 +45,10 @@
 #define PHP_CREDITS_DOCS   (14)
 #define PHP_CREDITS_FULLPAGE   (15)
 #define PHP_CREDITS_QA (16)
+#define PHP_CREDITS_WEB (17)
 #define PHP_CREDITS_ALL0x
+
+#endif /* HAVE_CREDITS_DEFS */
 
 #define PHP_LOGO_GUID"PHPE9568F34-D428-11d2-A769-00AA001ACF42"
 #define PHP_EGG_LOGO_GUID  "PHPE9568F36-D428-11d2-A769-00AA001ACF42"



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




Re: [PHP] Good Free PHP Editor?

2001-03-14 Thread chris

Do any of these editors support server mappings allowing one to
auomatically preview files through a  server? I find this invaluable in
HomeSite (which is also VERY stable for me using Win2K) and I think
HTMLKit does it too-- but do anyof the leaner text editors?

By server mappings I mean that I can map 
d:\inetpub\wwwroot\
to 
http://127.0.0.1/

so that when I hit the preview in browser button it automatically pulls
the poages up through the server. A small thing, but I need it SO often...

c



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




[PHP-CVS] cvs: php4 /pear/Experimental/HTML Menu.php

2001-03-14 Thread Ulf Wendel

uw  Wed Mar 14 14:33:58 2001 EDT

  Modified files:  
/php4/pear/Experimental/HTMLMenu.php 
  Log:
  - code beatifiying
  - minor inline doc update
  
  
Index: php4/pear/Experimental/HTML/Menu.php
diff -u php4/pear/Experimental/HTML/Menu.php:1.8 
php4/pear/Experimental/HTML/Menu.php:1.9
--- php4/pear/Experimental/HTML/Menu.php:1.8Tue Mar 13 14:03:28 2001
+++ php4/pear/Experimental/HTML/Menu.phpWed Mar 14 14:33:58 2001
@@ -206,13 +206,13 @@
 switch ($this-menu_type) {
 case "rows":
 case "prevnext":
-$html .= "table bordertr";
+$html .= 'table bordertr';
 break;
 
 case "tree":
 case "urhere":
 case "sitemap":
-$html .= "table border";
+$html .= 'table border';
 break;
 }
 
@@ -232,13 +232,13 @@
 switch ($this-menu_type) {
 case "rows":
 case "prevnext":
-$html .="/tr/table";
+$html .= '/tr/table';
 break;
 
 case "tree":
 case "urhere":
 case "sitemap":
-$html = "/table";
+$html .= '/table';
 break;
 }
 
@@ -462,7 +462,7 @@
 * 
 * @paramarray   menu item data (node data)
 * @paraminteger level in the menu tree
-* @paramstring  menu item type: 0, 1, 2. 0 = plain menu item,
+* @paraminteger menu item type: 0, 1, 2. 0 = plain menu item,
 *   1 = selected (active) menu item, 2 = item 
 *   is a member of the path to the selected (active) menu item
 *   3 = previous entry, 4 = next entry
@@ -475,11 +475,11 @@
 
 if ("tree" == $this-menu_type) {
 // tree menu
-$html .= "tr";
+$html .= 'tr';
 $indent = "";
 if ($level) 
 for ($i = 0; $i  $level; $i++)
-$indent .= "nbsp;nbsp;nbsp;";
+$indent .= 'nbsp;nbsp;nbsp;';
 }
 
 // draw the td/td cell depending on the type of the menu item
@@ -541,7 +541,7 @@
 }
 
 if ("tree" == $this-menu_type)
-$html .= "/tr";
+$html .= '/tr';
 
 return $html;
 } // end func getEnty



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




[PHP] exist?

2001-03-14 Thread Kenneth R Zink II

How would I go about checking to see if a file exist from php?

I didn't find anything on php.net when I did a search for exist.

basically, I'm trying to accomplish this.

if $file exist {
do something;
}else{
echo "$file doesn't exist";
}

thanks in advance.

Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094
'87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!  
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!  
http://www.s-series.org/htm/firestorm/firestorm.htm
Racing by the Grace of God!!



Re: [PHP] exist?

2001-03-14 Thread Simon Garner

From: "Kenneth R Zink II" [EMAIL PROTECTED]

 How would I go about checking to see if a file exist from php?
 
 I didn't find anything on php.net when I did a search for exist.
 


if (file_exists("/full/path/to/file.txt"))

http://php.net/manual/en/function.file-exists.php


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




Re: [PHP] PHP saving forms on client side

2001-03-14 Thread Andrew Halliday

I dont know what you call 'feasable' but this would be the most efficient
way of doing this:

FORM NAME="coolform" METHOD=POST ACTION='reference to self'
INPUT type="text" name="firstName" value="?=$firstName?"/INPUT
INPUT type="text" name="lastName" value="?=$lastName?"/INPUT
INPUT type="submit" onClick="submitToServer();" value="Submit to
server"/INPUT
INPUT type="submit" onClick="submitToRegenerator();" value="Generate
saveable form"/INPUT
/FORM

SCRIPT
function submitToServer()
{
   document.forms['coolform'].action = 'submit to server url';
   document.forms['coolform'].submit(); // May not be necessary
}

function submitToRegenerator()
{
   document.forms['coolform'].action = 'submit to self url';
   document.forms['coolform'].submit(); // May not be necessary
}
/SCRIPT

When the form is initially loaded, $firstName will not exist, therefore the
form filed will appear blank.  When a special type of submit is clicked (ie
a 'generate partially filled out form' submit) it would simply re-render the
page but with all the values in the actual HTML.  You can change the submit
locations of a single form depending on the button pressed using some simple
Java Script ... included ... but check the object paths of
document.forms['...'].action - I havent coded JS in a long while!

AndrewH

- Original Message -
From: "mat t" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 15, 2001 7:57 AM
Subject: [PHP] PHP saving forms on client side


 I have new "blank" forms on the server and I would like to give my client
an option to save a partially filled form to his computer. Is there any way
I can do this with php?

 I know that if the client just saves the form using his browser then it
will only save the initial HTML, and ignore the partially filled bits.
Therefore I need to use post/get to send the partially filled bits to PHP,

 This means hard coding all the HTML (in php) and inserting the variables
that are posted from the previous form.

 Is there any simpler/easier way of doing this with PHP? because this is
not feasible if there are 100s of forms.

 Thanks,
 Matt


 _
 Pick up your email anywhere in the world --- http://www.remail.net

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



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




  1   2   >