Re: [PHP] Hide Include-Files from the Web

2001-03-04 Thread mailing_list

  Hi!
 
  I want my include-files not be seen from outside AND not be executed!!!
  I don't have access to a directory outside DOCUMENT_ROOT and I don't
 have
  .htaccess!!!
 
  I think about something like:
  1.
  name: file.inc.php
  2.
  add code:
  if ($PHP_SELF==MY_NAME) exit;
  as first line in the inluded script.
  so, if the script is being included from another script, the code will
 be
  executed - but if the file will be called directly, no code is executed!
  BUT - how do I get the include-file's name?
 
  or is it safe enough, to use something like
  if (substr($SCRIPT_URL,-8)==".inc.php") exit;
 
 I'm not sure what is your $SCIRPT_URL is.
 It could be not safe if user request like,
 
 test.inc.php?abc=123
 test.inc.php?SCRIPT_URL=123
 
 Since it is comparing last 8 chars and it is not using
 $HTTP_SERVER_VARS['SCRIPT_NAME']
 (SCRIPT_URL is a typo of SCRIPT_NAME or SCRIPT_FILENAME??)
 
 If I were you, I will put
 
 if (substr($HTTP_SERVER_VARS['SCRIPT_NAME'], -8) == '.inc.php' )) {
log_error('Bad request from '.HTTP_SERVER_VARS['REMOTE_ADDR']);
 header('400: Bad Request');
 //  header('403: Forbidden'); // You might use this header instead or
 redirect to your own warning page.
   exit;
 }
 
 
 If you can use $HTTP_SERVER_VARS, using it is safer.

Many thanks!
I found the following Variables, that hold the scriptname, but no
Get-Variables (as QUERY_STRING would do!)
- and calling script.inc.php?SCRIPT_NAME=xxx.php doesn't change the
Variable!!!
HTTP_SERVER_VARS["SCRIPT_FILENAME"]
HTTP_SERVER_VARS["SCRIPT_URI"]
HTTP_SERVER_VARS["SCRIPT_URL"]
HTTP_SERVER_VARS["SCRIPT_NAME"]
HTTP_SERVER_VARS["PATH_TRANSLATED"]
HTTP_SERVER_VARS["PHP_SELF"]

So - which one should I use???

Thanks
michi

-- 
Sent through GMX FreeMail - http://www.gmx.net

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




Re: [PHP] Stripping HTML selectively?

2001-03-04 Thread Steve Edberg

At 09:43 PM 3/3/01 , Erick Papadakis wrote:
Thanks Brian, I have tried the allowable tags, but I need to remove the
ATTRIBUTES of a tag, not the tag itself. STRIP_TAGS totally removes the tag,
and ALLOWABLE_TAGS lets the tag be. WHat I wish to do is let the main tag be
but remove its attributes, as follows:

 Original text:
 font class="something" style=""Hi!/font

 Parsed text:
 fontHi!/font

Thanks/erick

Well, in this case, you'd have to use regular expressions. One way to do it 
would be:

 $SanitizedString = 
ereg_replace('[[:space:]]*([[:alnum:]]+)[^]*', "\\1", $String);

this _should_  work (haven't tested it). If you wanted to remove some tags 
entirely, and then remove the attributes of the remaining tags, you could 
(1) use strip_tags() with a list of allowable tags, then (2) run the regexp 
above. Incidentally, the above regexp also removes leading spaces from the 
tag. Eg,font style="unreadable" becomes font. If you don't want, 
that user the regexp

 '([[:space:]]*[[:alnum:]]+)[^]*'

instead.

 - steve


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01



++
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED] (530)754-9127 |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- Gort, Klaatu barada nikto! --+



[PHP] NETSCAPE Screws QUERY STRING!!!!!!

2001-03-04 Thread Thomas Edison Jr.

I'm passing variables in a query string to my php
pages. The variables whose values contain spaces due
to multiple words are being passed correctly to the
Internet Explorer browser and are working perfectly
there. However, they are not working at al in NETSCAPE
browser. What should i do?

The Internet Explorer converts the spaces in a query
string into it's hexadecimal value of "%20"
automatically, but netscape is not doing so. It's not
reading the space and thus not displaying the page at
all and giving the HTTP error 400. 

This the link i make :
a href="add_pro_over.php3?title=? echo $title ?"

if $title contains "Project", it goes.
But if it contains "Project One" ... it doesn't work
in NETSCAPE. 

When on to the next page, this $title also has to be
sent into the Database. 

what do i do?

regards,
T. Edison jr.




=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




[PHP] Help Please: Php configuration

2001-03-04 Thread archana sharma

Hi All,
   I am new in PHP world. I am trying to configure my php with IIS4. Here is 
the info what I downloaded and installed:

php version: php4.0.4 for win32 [2000-12-20] (from http://php4win.de site)
Web server: IIS4
But as soon as I do the step of "Add/Edit extension mapping " in IIS4, my 
webserver crashes. I don't know where I am doing wrong. I followed every 
step written in the book. Please HELP!!!

If you have answered the questions like this, please point me where can I 
find the solution or clue. Also is there any way where I can archieve the 
old message of this board.

Your help is highly appreciated.

Thanks.
...Archana





_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




Re: [PHP] Help Please: Php configuration

2001-03-04 Thread Michael Hall


I don't know a thing about IIS ... but the archives can be found at
http://www.php.net/support.php

Good Luck

Michael

On Sun, 4 Mar 2001, archana sharma wrote:

 Hi All,
I am new in PHP world. I am trying to configure my php with IIS4. Here is 
 the info what I downloaded and installed:
 
 php version: php4.0.4 for win32 [2000-12-20] (from http://php4win.de site)
 Web server: IIS4
 But as soon as I do the step of "Add/Edit extension mapping " in IIS4, my 
 webserver crashes. I don't know where I am doing wrong. I followed every 
 step written in the book. Please HELP!!!
 
 If you have answered the questions like this, please point me where can I 
 find the solution or clue. Also is there any way where I can archieve the 
 old message of this board.
 
 Your help is highly appreciated.
 
 Thanks.
 ...Archana
 
 
 
 
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] NETSCAPE Screws QUERY STRING!!!!!!

2001-03-04 Thread Meir Kriheli - MKsoft

You should use the urlencode() function.

See

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

--
Meir Kriheli
MKsoft computer systems

  'There's someone in my head but it's not me" - Pink Floyd
- Original Message - 
From: "Thomas Edison Jr." [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 04, 2001 2:20 PM
Subject: [PHP] NETSCAPE Screws QUERY STRING!!


 I'm passing variables in a query string to my php
 pages. The variables whose values contain spaces due
 to multiple words are being passed correctly to the
 Internet Explorer browser and are working perfectly
 there. However, they are not working at al in NETSCAPE
 browser. What should i do?
 
 The Internet Explorer converts the spaces in a query
 string into it's hexadecimal value of "%20"
 automatically, but netscape is not doing so. It's not
 reading the space and thus not displaying the page at
 all and giving the HTTP error 400. 
 
 This the link i make :
 a href="add_pro_over.php3?title=? echo $title ?"
 
 if $title contains "Project", it goes.
 But if it contains "Project One" ... it doesn't work
 in NETSCAPE. 
 
 When on to the next page, this $title also has to be
 sent into the Database. 
 
 what do i do?
 
 regards,
 T. Edison jr.



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




Re: [PHP] NETSCAPE Screws QUERY STRING!!!!!!

2001-03-04 Thread Juanma

Try urlencode ...


- Original Message - 
From: "Thomas Edison Jr." [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 04, 2001 1:20 PM
Subject: [PHP] NETSCAPE Screws QUERY STRING!!


 I'm passing variables in a query string to my php
 pages. The variables whose values contain spaces due
 to multiple words are being passed correctly to the
 Internet Explorer browser and are working perfectly
 there. However, they are not working at al in NETSCAPE
 browser. What should i do?
 
 The Internet Explorer converts the spaces in a query
 string into it's hexadecimal value of "%20"
 automatically, but netscape is not doing so. It's not
 reading the space and thus not displaying the page at
 all and giving the HTTP error 400. 
 
 This the link i make :
 a href="add_pro_over.php3?title=? echo $title ?"
 
 if $title contains "Project", it goes.
 But if it contains "Project One" ... it doesn't work
 in NETSCAPE. 
 
 When on to the next page, this $title also has to be
 sent into the Database. 
 
 what do i do?
 
 regards,
 T. Edison jr.
 
 
 
 
 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail. 
 http://personal.mail.yahoo.com/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
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 Cache.php

2001-03-04 Thread Martin Jansen

mj  Sun Mar  4 06:26:59 2001 EDT

  Modified files:  
/php4/pear  Cache.php 
  Log:
  fixed typo
  
  
Index: php4/pear/Cache.php
diff -u php4/pear/Cache.php:1.3 php4/pear/Cache.php:1.4
--- php4/pear/Cache.php:1.3 Sat Mar  3 11:21:49 2001
+++ php4/pear/Cache.php Sun Mar  4 06:26:58 2001
@@ -16,7 +16,7 @@
 // |  Sebastian Bergmann [EMAIL PROTECTED]   |
 // +--+
 //
-// $Id: Cache.php,v 1.3 2001/03/03 19:21:49 uw Exp $
+// $Id: Cache.php,v 1.4 2001/03/04 14:26:58 mj Exp $
 
 /**
 * Cache is a base class for cache implementations.
@@ -24,7 +24,7 @@
 * TODO: Simple usage example goes here.
 *
 * @author   Ulf Wendel [EMAIL PROTECTED]
-* @version  $Id: Cache.php,v 1.3 2001/03/03 19:21:49 uw Exp $
+* @version  $Id: Cache.php,v 1.4 2001/03/04 14:26:58 mj Exp $
 * @package  Cache
 * @access   public 
 */
@@ -86,7 +86,7 @@
 $storage_class = 'Cache_Container_' . $storage_driver;
 $storage_classfile = 'Cache/Container/' . $storage_driver . '.php';
 
-include_once $storage_classfile
+include_once $storage_classfile;
 $this-container = new $storage_class($storage_options);
 $this-garbageCollection();
 



-- 
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] PHP PostgreSQL

2001-03-04 Thread Marcelo Pereira

Hi, All.

I have to build a web site and I was
studying postgreSQL, but, whether I am
quite wrong or this database does not
support Foreign Key.

Does anyone use postgreSQL and know
how handle Foreign Keys ???

Thanks,

Marcelo Pereira
Computer Programmer


__
O BOL é Top10 no iBest! Vote já para torná-lo Top3!
http://www.bol.com.br/ibest.html





--
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 IIS4 (Win2k)

2001-03-04 Thread Phil Driscoll

Yeah after a net stop and net start I've got the cgi version working, but I
still can't
seem to get the PHP isapi module up.

This could be a permissions issue on any of the php files (php4ts.dll,
php4isapi.dll, php.ini or any extension dlls enabled in php.ini). For test
purposes, if you give full control for everyone for these files and it
starts to work, then it was a permissions problem.

What functionality is missing from the CGI version besides http-auth? can
it
handle
uploads?

I think that all you miss is some performance and the ability to get at the
headers before IIS has already acted on them. This affects authentication
and probably some other stuff as well.

You will probably also find that the CGI version is much more reliable than
the ISAPI module.

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] Static Classes

2001-03-04 Thread Alexander Wagner

ADnoctum wrote:
 Hello to everyone. First time here and already I have a question: PHP
 has static classes?. 
[..]
 Test.hello();

 Now I have a variable "Test" wich is a class that canot be
 instantiated nor inherited. Can I do that in PHP?.

PHP has static method calls with class::method()
Test::hello();

regards
Wagner

-- 
Assumption is the mother of all fuck-ups.

-- 
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] Content-Type: image/gif and send the image in hex

2001-03-04 Thread Christian Reiniger

On Sunday 04 February 2001 05:53, you wrote:
 Hi all,

 I'm trying to make a demonstration script (using PHP) that demonstrates
 the use of MIME types in HTTP headers. It should send the Content-Type
 header and than sends an image to the browser in hex.

What do you mean with "in hex"? Hex is a number system. It only exists to 
make handling binary data easier for humans.

 I run the script in my browser and get the bare decimal values
 displayed and not the GIF image:

Aha. So you just want to "send the image".

 I also tried to use:
 header("Content-type: image/gif");
 But no success.
 I don't want to use the header() function cause it doesn't help my
 demostration script show the workings.

Well, you *need* the header ("Content-type: image/gif"); to tell the 
browser that you're sending a gif. It can not determine that by itself.

If you don't send the header the browser will try to interpret you gif 
image as HTML code, which usually gives, well, fascinating results :)

 // 7x1 pixel GIF image data
 $img = array (
 0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x07, 0x00, 0x01, 0x00, 0xF7,
 0x00, 0x00, 0x00, 0x00, 0x00,
 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00,
 0x80, 0x80, 0x00, 0x80, 0x00,

[...]

 ) ;

 // Write content type to browser
 echo "Content-Type: image/gif\n\n";

 // Write GIF image data to browser
 foreach ($img as $val){
   echo $val;
 }

Try
echo pack ('c*', $img);

Or if that doesn't work:

foreach ($img as $val) {
echo pack ('c', $val);
}


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

...1000100011010101101010110100111010113...

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




Re: [PHP] PHP web based mailing list administrator

2001-03-04 Thread Christian Reiniger

On Saturday 03 March 2001 13:59, you wrote:
 Yes, they are about. Try hotscripts.com.

And if you don't insist that the manager is written in PHP, try GNU 
Mailman. It comes with its own /very nice) web-based admin software.

  does there exist a web based mailing list administrator in PHP (Tying
  in with some open source mailing list software)?
  Ideally, something like egroups (now groups.yahoo.com). I just want
  to be able to easily administrate (or have other people administrate)
  mailing lists. I have access to my own server (linux, php4, ...)
  thanks!
-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...1000100011010101101010110100111010113...

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




Re: [PHP] any way to count subscribers to PHP lists?

2001-03-04 Thread Ned Lilly

Thanks to all who responded. Sounds like there's no built-in way for list subscribers 
to access this info on demand, but this info gives me a baseline.

If anyone has any ideas on how to regularly collect this info, I'd welcome any 
thoughts.  My idea is to try and track subscriber and list activity for certain 
projects on a running basis, to create kind of a "open source activity index."

There is apparently a command for the list owner, [EMAIL PROTECTED] ... 
maybe a hack to ezmlm to allow list members to access it, like majordomo has?

Anyway, thanks again.

Ned


 Subject: Re: [PHP] any way to count subscribers to PHP lists?
 Date: Sat, 3 Mar 2001 16:56:24 -0500
 From: Brian Clark [EMAIL PROTECTED]
 To: "PHP is not a drug." [EMAIL PROTECTED]

 Hi Ned,

 @ 9:27:57 AM on 3/3/2001, Ned Lilly wrote:

  Hi, I'm wondering if there's an ezmlm equivalent of the "lists-full"
  command for majordomo.   That command returns data like the
  following (from the PostgreSQL list):

 While not exactly what you wanted, this may provide some of those
 statistics:

 http://www.zend.com/cgi-bin/m_stats.pl?list=php-generaldate=200101
 http://www.zend.com/cgi-bin/m_stats.pl?list=php-generaldate=200102
 http://www.zend.com/cgi-bin/m_stats.pl?list=php-generaldate=200103

 January 2001, February 2001, and March 2001 respectively.

 -Brian
 --
  Please do not carbon copy me on list replies.

   

 Subject: Re: [PHP] any way to count subscribers to PHP lists?
 Date: Sat, 03 Mar 2001 17:20:01 +0800
 From: "Jim Winstead" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]

 In article [EMAIL PROTECTED], [EMAIL PROTECTED]
 wrote:
  Hi, I'm wondering if there's an ezmlm equivalent of the "lists-full"
  command for majordomo.   That command returns data like the following
  (from the PostgreSQL list):

 no ezmlm equivalent that i'm aware of, but here's the subscription
 figures for the php lists:

 php-announce   3031
 php-beta333
 php-cvs134
 php-cvs-digest  1
 php-cvs-daily525
 php-cvs-daily-digest  3
 php-cvsroot  4
 php-db   1167
 php-db-digest577
 php-dev659
 php-general   1914
 php-general-digest974
 php-gtk187
 php-gtk-digest  1
 php-i18n168
 php-i18n-digest 82
 php-install627
 php-install-digest366
 php-kb   2556
 php-lang 23
 php-lang-digest  0
 php-migration133
 php-migration-digest 49
 php-mirrors 33
 php-notes  8
 php-notes-digest  0
 php-pear377
 php-qa 60
 php-qa-digest  0
 php-template126
 php-template-digest 15
 php-test  3
 php-windows544
 php-windows-digest329
 phpdoc244

 jim



-- 
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] newbie---cookie help

2001-03-04 Thread McShen

hi

Please help a newbie.

I have 2 links on my website. It wil show  "NEW" if my visitors have only
visited my site once in 24h. If my visitors visit my site for more than once
in 24h, i wanna show "OLD".   I know cookie can do it. but i don't know how,
Please help. Any script will be greatly appreciately.

Thank You.



-- 
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 output.c

2001-03-04 Thread Zeev Suraski

zeevSun Mar  4 07:46:13 2001 EDT

  Modified files:  
/php4/ext/standard  output.c 
  Log:
  Improve memory consumption on chunked output buffering
  
  
Index: php4/ext/standard/output.c
diff -u php4/ext/standard/output.c:1.42 php4/ext/standard/output.c:1.43
--- php4/ext/standard/output.c:1.42 Sat Mar  3 17:45:19 2001
+++ php4/ext/standard/output.c  Sun Mar  4 07:46:13 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: output.c,v 1.42 2001/03/04 01:45:19 zeev Exp $ */
+/* $Id: output.c,v 1.43 2001/03/04 15:46:13 zeev Exp $ */
 
 #include "php.h"
 #include "ext/standard/head.h"
@@ -106,7 +106,11 @@
if (OG(lock)) {
return FAILURE;
}
-   php_ob_init(40*1024, 10*1024, output_handler, chunk_size);
+   if (chunk_size) {
+   php_ob_init((chunk_size*3/2), chunk_size/2, output_handler, 
+chunk_size);
+   } else {
+   php_ob_init(40*1024, 10*1024, output_handler, chunk_size);
+   }
OG(php_body_write) = php_b_body_write;
return SUCCESS;
 }
@@ -301,7 +305,6 @@
if (OG(active_ob_buffer).chunk_size
 OG(active_ob_buffer).text_length = 
OG(active_ob_buffer).chunk_size) {
zval *output_handler = OG(active_ob_buffer).output_handler;
-   uint chunk_size = OG(active_ob_buffer).chunk_size;
 
if (output_handler) {
output_handler-refcount++;



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




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

2001-03-04 Thread Zeev Suraski

zeevSun Mar  4 07:49:38 2001 EDT

  Modified files:  
/php4/ext/standard  info.c 
  Log:
  Fix phpinfo() bug that crept in
  
  
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.130 php4/ext/standard/info.c:1.131
--- php4/ext/standard/info.c:1.130  Sat Mar  3 18:41:27 2001
+++ php4/ext/standard/info.cSun Mar  4 07:49:38 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.130 2001/03/04 02:41:27 fmk Exp $ */
+/* $Id: info.c,v 1.131 2001/03/04 15:49:38 zeev Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -60,7 +60,7 @@
 
 static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
 {
-   zval **data, **tmp, *tmp2;
+   zval **data, **tmp, tmp2;
char *string_key;
ulong num_key;
 
@@ -68,7 +68,6 @@
 ((*data)-type==IS_ARRAY)) {
zend_hash_internal_pointer_reset((*data)-value.ht);
while (zend_hash_get_current_data((*data)-value.ht, (void **) tmp) 
== SUCCESS) {
-
PUTS("TR VALIGN=\"baseline\" BGCOLOR=\"" PHP_CONTENTS_COLOR 
"\"");
PUTS("TD BGCOLOR=\"" PHP_ENTRY_NAME_COLOR "\"B");
PUTS(name);
@@ -87,11 +86,11 @@
zend_print_zval_r(*tmp, 0);
PUTS("/PRE");
} else if ((*tmp)-type != IS_STRING) {
-   tmp2 = *tmp;
-   zval_copy_ctor(tmp2);
-   convert_to_string(tmp2);
-   PUTS(tmp2-value.str.val);
-   zval_dtor(tmp2);
+   tmp2 = **tmp;
+   zval_copy_ctor(tmp2);
+   convert_to_string(tmp2);
+   PUTS(tmp2.value.str.val);
+   zval_dtor(tmp2);
} else {
PUTS((*tmp)-value.str.val);
}



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




Re: [PHP] PHP PostgreSQL

2001-03-04 Thread The Hermit Hacker

On Sun, 4 Mar 2001, Marcelo Pereira wrote:

 Hi, All.

 I have to build a web site and I was
 studying postgreSQL, but, whether I am
 quite wrong or this database does not
 support Foreign Key.

 Does anyone use postgreSQL and know
 how handle Foreign Keys ???

Yes, it supports Foreign Keys ... how to use them is another story, as its
something I keep meaning to dive into and just never seem to find the time
for :(

Check out:

http://postgresql.readysetnet.com/users-lounge/docs/7.0/user/sql-createtable.htm

which talks about using CONSTAINTS on tables, where 'REFERENCES' is
discussed ...


-- 
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] Hebrew websites transition with php3 ..

2001-03-04 Thread Manuel Lemos

Hello Aviv,

On 28-Feb-01 20:07:21, you wrote:

Hey!

So what do YOU offer me to do?

Should I use visual Hebrew (write a php3 script which will reverse Hebrew
words), or should I stick only to Logical Hebrew?

In the ideal world you would figure if the browser supports logical Hebrew
or not and would serve pages formatted encoded accordingly.  In the ideal
world you also would have time and budget to implement alternative content
formats, but this may not be what is like in your real world.


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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] Hebrew websites transition with php3 ..

2001-03-04 Thread Manuel Lemos

Hello Boaz,

On 01-Mar-01 04:17:25, you wrote:

The IE / NN war was one that left no chance for NN in Israel.
While MS spent millions in making all of their products in Hebrew,
including the free IE, NN refused to support Hebrew.

I don't think this is a matter of browser wars.  Ideally, portals should
target their target audience not the other way arround.  If your portal
pages can't display in users browsers, they simply go away and won't bother
telling you why.


While the 3% is correct for Israel, it's far from being true on an
international basis.

If you got me right, if your portal only displays right in logical Hebrew,
there is no reason for those 3% be just 0% because nobody returns to a
portal that does not display in their browser, right?


With all due respect to people that like other browsers, developing
for all browsers costs lots of $$$ and as long as portals are free 
and loosing lots of $$$ it's not profitable to develop for all.

Bottom line, as the CTO of one of those portals I say go
with Logical Hebrew and dump Netscape (In Israel Only).

Personally I don't care about Netscape.  My point was just to bring to the
attention that when you think your are just dumping Netscape or whatever
browser, what you are actually dumping is share of users that you believe
that it is 3% but might be actually much more.  I know that over here
people assumed that was 10% but was in reality 30%.

In a market like the Internet portals where the winner takes almost all, it
may be worthy for you to rethink your options before you realize that your
portal is not the winner because your not really evaluating the real user
audience figures, but rather those that are technically more convinient.

Just my 0.02 EUR. :-)


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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] system() and stdout

2001-03-04 Thread Michael Robbins

I am trying to use system() to run an external command and have the output
placed into a variable using:

$output = system("/usr/local/bin/somecommand");

the output is placed into $output, and it also places it instream with the
HTML.  Anyone know why this is happening? or how to properly put data from
STDOUT into a variable?

Any help is appreciated.

Mike Robbins


-- 
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/standard info.c

2001-03-04 Thread Sebastian Bergmann

Zeev Suraski wrote:
 zeevSun Mar  4 07:49:38 2001 EDT
 
   Modified files:
 /php4/ext/standard  info.c
   Log:
   Fix phpinfo() bug that crept in

  Now I'm getting these warnings:

info.c
D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) :
warning C4047: 'function' : Anzahl der Dereferenzierungen bei 'const char *'
und 'char ** ' unterschiedlich
D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) :
warning C4024: 'php_body_write' : Unterschiedliche Typen fuer formalen und
uebergebenen Parameter 1
D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) :
warning C4047: 'function' : Anzahl der Dereferenzierungen bei 'const char *'
und 'char ** ' unterschiedlich
D:\Programme\MS Visual Studio\Projekte\php\php4\ext\standard\info.c(92) :
warning C4024: 'strlen' : Unterschiedliche Typen fuer formalen und
uebergebenen Parameter 1

  But the crash is gone :-)

-- 
 sebastian bergmann e-mail :  [EMAIL PROTECTED]
  homepage :  http://www.sebastian-bergmann.de
   make a gift : http://wishlist.sebastian-bergmann.de
 measure the usability of your web application - http://phpOpenTracker.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]




[PHP-CVS] cvs: CVSROOT / avail gen_acl_file.m4

2001-03-04 Thread Andrei Zmievski

andrei  Sun Mar  4 09:36:30 2001 EDT

  Modified files:  
/CVSROOTavail gen_acl_file.m4 
  Log:
  PHP-GTK docs access for James Moore.
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.109 CVSROOT/avail:1.110
--- CVSROOT/avail:1.109 Fri Mar  2 13:48:11 2001
+++ CVSROOT/avail   Sun Mar  4 09:36:30 2001
@@ -9,6 +9,7 @@
 
avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb
 
avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr|phpdoc
 avail|andrei,fmk,zimt,jan,changelog|php-gtk
+avail|jmoore|php-gtk/docs
 avail|andrei,fmk|php-gtk-web
 avail|emile,davidg,alan_k,ab|php4/ext/midgard
 avail|rasmus|php4/ext/aspell
Index: CVSROOT/gen_acl_file.m4
diff -u CVSROOT/gen_acl_file.m4:1.113 CVSROOT/gen_acl_file.m4:1.114
--- CVSROOT/gen_acl_file.m4:1.113   Fri Mar  2 13:48:11 2001
+++ CVSROOT/gen_acl_file.m4 Sun Mar  4 09:36:30 2001
@@ -25,6 +25,7 @@
 avail|php_qa|qaweb
 avail|php_dev,php_ext,php_doc|phpdoc
 avail|andrei,fmk,zimt,jan,changelog|php-gtk
+avail|jmoore|php-gtk/docs
 avail|andrei,fmk|php-gtk-web
 avail|php_midgard|php4/ext/midgard
 dnl Access to individual dirs in the code tree



-- 
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] How much could you charge for a PHP-MySQL Spanish online course?

2001-03-04 Thread akio

Hello everyone!

How do you charge these things, per words? The amount of time spent? I've
never done this and I'm quite clueless. Any ideas would be really
appreciated.


TIA

Regards


-- 
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 big is too big?

2001-03-04 Thread Joe Sheble (Wizaerd)

Is there a practical limit one should make on a php file to be included?
I'm putting all my global variable declarations and function defintitions
into one file to be included across the site.  I had thought about splitting
them different files based on functionality, but then I thought it would be
easier to maintain one singular file broken down into sections.  But I don't
want to overtax anything... so what would be a good size limit on included
files?

On the same note, is there a practical limit to how much code should be used
within an eval() call?

Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.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] Re : [PHP] NETSCAPE screws QUERY STRING

2001-03-04 Thread Thomas Edison Jr.

The urlencode() is working fine with an echo statement
 normal query string.

But it's NOT working with complex query string in
printf() including $myrow[something] being picked up
by mySQL db. 

this works :

a href="add_pro_over.php3?title=? echo
urlencode($title) ?"

this doesn't work :

printf("a
href=\"pro_page1.php3?title='urlencode($myrow[title])'\"")

OR such combinations as given in the manual. I tried
out almost all!!!

HELP

T. Edison jr.



=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




Re: [PHP] Re : [PHP] NETSCAPE screws QUERY STRING

2001-03-04 Thread Julian Wood


Try  printf("a 
href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\"")

J

on 3/4/01 11:55 AM, Thomas Edison Jr. at [EMAIL PROTECTED] wrote:

 
 The urlencode() is working fine with an echo statement
  normal query string.
 
 But it's NOT working with complex query string in
 printf() including $myrow[something] being picked up
 by mySQL db. 
 
 this works :
 
 a href="add_pro_over.php3?title=? echo
 urlencode($title) ?"
 
 this doesn't work :
 
 printf("a
 href=\"pro_page1.php3?title='urlencode($myrow[title])'\"")
 
 OR such combinations as given in the manual. I tried
 out almost all!!!
 
 HELP
 
 T. Edison jr.
 


--
Julian Wood
Learning Technologies and Digital Media
University of Calgary



-- 
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] NETSCAPE screws QUERY STRING

2001-03-04 Thread Thomas Edison Jr.

Julian,

i tried this out  it's giving the single quotes in
the value... 'value+value2'

and on the next page where i'm printing the
value...the backslashes are also being added in front
of single quotes :

\'value value2\'

where can i go from here? this has made the urlencode
function to work...only part left now...

T. Edison jr.

--- Julian Wood [EMAIL PROTECTED] wrote:
 
 Try  printf("a 

href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\"")
 
 J
 
 on 3/4/01 11:55 AM, Thomas Edison Jr. at
 [EMAIL PROTECTED] wrote:
 
  
  The urlencode() is working fine with an echo
 statement
   normal query string.
  
  But it's NOT working with complex query string in
  printf() including $myrow[something] being picked
 up
  by mySQL db. 
  
  this works :
  
  a href="add_pro_over.php3?title=? echo
  urlencode($title) ?"
  
  this doesn't work :
  
  printf("a
 

href=\"pro_page1.php3?title='urlencode($myrow[title])'\"")
  
  OR such combinations as given in the manual. I
 tried
  out almost all!!!
  
  HELP
  
  T. Edison jr.
  
 
 
 --
 Julian Wood
 Learning Technologies and Digital Media
 University of Calgary
 
 
 
 -- 
 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]
 


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




[PHP] NETSCAPE screws up query string : more problems!

2001-03-04 Thread Thomas Edison Jr.

Julian,
i tried :

a
href=\"pro_page1.php3?title=".urlencode($myrow[title])."\"

instead

a
href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\"

notice the single quote ' missing. And that WORKED!!!
It displayed the right value in the next PHP page.
Unfortunately there's another problem. it only
DISPLAYED the right value...but when it adds the value
in the database...it adds with the plus + sign. i.e.,
it adds : Project+One instead of Project One. 


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




[PHP] date

2001-03-04 Thread george

  Can you mark the date when an entry is placed in the db and then get that
date to display  when the info is pulled out

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]




Re: [PHP] Re : [PHP] NETSCAPE screws QUERY STRING

2001-03-04 Thread Julian Wood


Where is the string 'value+value2' coming from? $myrow[title]? If it is
coming from the db (I'm guessing - it seems a little strange to me that this
would be your title, but in this code we're discussing there is no other
possible source), and it has slashes in it, you may need to use stripslashes
to get rid of the slashes. Also, why are you using printf, but not
formatting your string at all? Why don't you just use echo? I assume we're
still dealing with this line of code:

printf("a href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\"")

J

on 3/4/01 12:20 PM, Thomas Edison Jr. at [EMAIL PROTECTED] wrote:

 
 Julian,
 
 i tried this out  it's giving the single quotes in
 the value... 'value+value2'
 
 and on the next page where i'm printing the
 value...the backslashes are also being added in front
 of single quotes :
 
 \'value value2\'
 
 where can i go from here? this has made the urlencode
 function to work...only part left now...
 
 T. Edison jr.
 
 --- Julian Wood [EMAIL PROTECTED] wrote:
 
 Try  printf("a 
 
 href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\"")
 
 J
 
 on 3/4/01 11:55 AM, Thomas Edison Jr. at
 [EMAIL PROTECTED] wrote:
 
 
 The urlencode() is working fine with an echo
 statement
  normal query string.
 
 But it's NOT working with complex query string in
 printf() including $myrow[something] being picked
 up
 by mySQL db. 
 
 this works :
 
 a href="add_pro_over.php3?title=? echo
 urlencode($title) ?"
 
 this doesn't work :
 
 printf("a
 
 
 href=\"pro_page1.php3?title='urlencode($myrow[title])'\"")
 
 OR such combinations as given in the manual. I
 tried
 out almost all!!!
 
 HELP
 
 T. Edison jr.
 
 
 
 --
 Julian Wood
 Learning Technologies and Digital Media
 University of Calgary
 
 
 
 -- 
 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]
 
 
 
 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/

--
Julian Wood
Learning Technologies and Digital Media
University of Calgary



-- 
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] date

2001-03-04 Thread Stephan Ahonen

   Can you mark the date when an entry is placed in the db and then get
that
 date to display  when the info is pulled out

I'd put the UNIX timestamp of the entry date into a sort of parallel entry.
I don't know how DBs work, (never had a mySQL server to play with =( ) but
under a big blanket folder for each entry, you put variables (?) for the
timestamp, the general contents of the entry, etc.

Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email


-- 
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] Change the Input to st different..

2001-03-04 Thread Erdinc Guler

hi..
my problem is to change some characters from input data coming from a form
to something..i mean like :
inputoutput
---
i--  y
fire --  fyre

Is it possible??

erdinc..


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




[PHP] Php, Apache, mysql - make error

2001-03-04 Thread S Jha

HI Gurus,

I am getting this error. I saw few posting for this error and found someone suggesting 
"-lz"
option in Makefile in LIBS option.
However, I didn't found this line in apache Makefile.
Also I tried other methods including reloading zlib, reconf mysql ..but in vain. 
Please help.
I did -
#SSL_BASE=../openssl-0.9.6 RSA_BASE=../rsaref-2.0/local ./configure  
--enable-module=ssl
--activate-module=src/modules/php4/libphp4.a --enable-module=php4 
--prefix=/usr/local/apache
--enable-shared=ssl

#make 

The error message was - 

/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_uncompress':
my_compress.o(.text+0x9a): undefined reference to `uncompress'
/usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_compress_alloc':
my_compress.o(.text+0x12a): undefined reference to `compress'
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/sjha/apache_1.3.17/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/sjha/apache_1.3.17'
make: *** [build] Error 2



Thanks,

SJ

=
Sanjeev Jha, Unix System Administrator

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




php-general Digest 4 Mar 2001 21:30:04 -0000 Issue 547

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


php-general Digest 4 Mar 2001 21:30:04 - Issue 547

Topics (messages 42494 through 42525):

Re: Stripping HTML selectively?
42494 by: Steve Edberg

NETSCAPE Screws QUERY STRING!!
42495 by: Thomas Edison Jr.
42498 by: Meir Kriheli - MKsoft
42499 by: Juanma

Help Please: Php configuration
42496 by: archana sharma
42497 by: Michael Hall
42502 by: Phil Driscoll

PHP  PostgreSQL
42500 by: Marcelo Pereira
42508 by: The Hermit Hacker

Re: Problems with IIS4 (Win2k)
42501 by: Phil Driscoll

Re: Static Classes
42503 by: Alexander Wagner

Re: Content-Type: image/gif and send the image in hex
42504 by: Christian Reiniger

Re: PHP web based mailing list administrator
42505 by: Christian Reiniger

Re: any way to count subscribers to PHP lists?
42506 by: Ned Lilly

newbie---cookie help
42507 by: McShen

Re: Hebrew websites transition with php3 ..
42509 by: Manuel Lemos
42510 by: Manuel Lemos

system() and stdout
42511 by: Michael Robbins
42513 by: Clayton Dukes

How much could you charge for a PHP-MySQL Spanish online course?
42512 by: akio

How big is too big?
42514 by: Joe Sheble (Wizaerd)

file() function
42515 by: Felipe Lopes

Re : [PHP] NETSCAPE screws QUERY STRING
42516 by: Thomas Edison Jr.
42517 by: Julian Wood
42518 by: Thomas Edison Jr.
42521 by: Julian Wood

NETSCAPE screws up query string : more problems!
42519 by: Thomas Edison Jr.

date
42520 by: george
42522 by: Stephan Ahonen

Change the Input to st different..
42523 by: Erdinc Guler

Php, Apache, mysql - make error
42524 by: S Jha

Re: IE 5.5,authentication,PHP sessions: IE never stops
42525 by: Don Read

Administrivia:

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

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

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


--



At 09:43 PM 3/3/01 , Erick Papadakis wrote:
Thanks Brian, I have tried the allowable tags, but I need to remove the
ATTRIBUTES of a tag, not the tag itself. STRIP_TAGS totally removes the tag,
and ALLOWABLE_TAGS lets the tag be. WHat I wish to do is let the main tag be
but remove its attributes, as follows:

 Original text:
 font class="something" style=""Hi!/font

 Parsed text:
 fontHi!/font

Thanks/erick

Well, in this case, you'd have to use regular expressions. One way to do it 
would be:

 $SanitizedString = 
ereg_replace('[[:space:]]*([[:alnum:]]+)[^]*', "\\1", $String);

this _should_  work (haven't tested it). If you wanted to remove some tags 
entirely, and then remove the attributes of the remaining tags, you could 
(1) use strip_tags() with a list of allowable tags, then (2) run the regexp 
above. Incidentally, the above regexp also removes leading spaces from the 
tag. Eg,font style="unreadable" becomes font. If you don't want, 
that user the regexp

 '([[:space:]]*[[:alnum:]]+)[^]*'

instead.

 - steve


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01



++
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED] (530)754-9127 |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- Gort, Klaatu barada nikto! --+




I'm passing variables in a query string to my php
pages. The variables whose values contain spaces due
to multiple words are being passed correctly to the
Internet Explorer browser and are working perfectly
there. However, they are not working at al in NETSCAPE
browser. What should i do?

The Internet Explorer converts the spaces in a query
string into it's hexadecimal value of "%20"
automatically, but netscape is not doing so. It's not
reading the space and thus not displaying the page at
all and giving the HTTP error 400. 

This the link i make :
a href="add_pro_over.php3?title=? echo $title ?"

if $title contains "Project", it goes.
But if it contains "Project One" ... it doesn't work
in NETSCAPE. 

When on to the next page, this $title also has to be
sent into the Database. 

what do i do?

regards,
T. Edison jr.




=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




You should use 

[PHP] question about php sessions

2001-03-04 Thread Ed Lazor

Hi =)

Is it possible to track a user session across multiple domains?  We have 
several related web sites and want to enable a user to login through one 
site and end up logged in to them all. I tested and it didn't work and I'm 
guessing it's a limitation of cookies.  As in, a cookie created under one 
domain isn't available to another.  Is this right or is there a way to 
accomplish what I'm talking about?

Thanks =)

-Ed


-- 
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] User login using session algorithm

2001-03-04 Thread Arcady Genkin

I'm planning to write a simple user login module.  I want it to be a
stand-alone class, and not rely on cookies (I'm passing all variables
via GET method anyways, so I just want to pass a session ID in the
URL).

Before I go ahead and do some mistake, could somebody have a look at
the outline of the algorithm I've come up with?  Any opinions greately
appreciated.

http://www.thpoon.com/~antipode/tmp/user_auth.png

The algorithm is presented as a flowchart.

p.s. I'd like to "roll my own", even though I know that there is
authentication code available.

Many thanks,
-- 
Arcady Genkin
Nostalgia isn't what it used to be.

-- 
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] NEWEST CRAZE

2001-03-04 Thread newmarketing5644


Hey...Janet Here... We Haven't Talked In So Long!!  
How Have You Been?  Thought I would Forward you this email!

I usually delete these but I opened this one, like what I saw, 
and thought you would like to see this.

http://www.geocities.com/anewmarket/

IF THE LINK IS NOT HIGHLIGHTED OR YOU CANNOT CLICK ON IT.
COPY AND PASTE IT IN YOUR BROWSER.










-- 
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/midgard oop.c

2001-03-04 Thread Emiliano Heyns

emile   Sun Mar  4 13:54:00 2001 EDT

  Modified files:  
/php4/ext/midgard   oop.c 
  Log:
  Fetch sitegroup field if available
  
  
Index: php4/ext/midgard/oop.c
diff -u php4/ext/midgard/oop.c:1.9 php4/ext/midgard/oop.c:1.10
--- php4/ext/midgard/oop.c:1.9  Tue Feb 27 17:00:32 2001
+++ php4/ext/midgard/oop.c  Sun Mar  4 13:54:00 2001
@@ -1,4 +1,4 @@
-/* $Id: oop.c,v 1.9 2001/02/28 01:00:32 davidg Exp $
+/* $Id: oop.c,v 1.10 2001/03/04 21:54:00 emile Exp $
 Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED]
 Copyright (C) 2000 The Midgard Project ry
 Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED]
@@ -454,6 +454,12 @@
 
 void php_midgard_get_object(zval *return_value, int table, int id)
 {
+#if HAV_MIDGARD_SITEGROUPS
+#define MGD_GET_OBJECT_SITEGROUP_FIELD ",sitegroup"
+#else
+#define MGD_GET_OBJECT_SITEGROUP_FIELD ""
+#endif
+
switch (table) {
   case MIDGARD_OBJECT_ARTICLE:
  php_midgard_get(MidgardArticle, return_value,
@@ -467,37 +473,42 @@
"Unix_Timestamp(approved) AS approved,approver,"
"Unix_Timestamp(locked) AS locked,locker,"
"url,icon,view,print,"
-   CALENDAR_FIELDS,
+   CALENDAR_FIELDS
+MGD_GET_OBJECT_SITEGROUP_FIELD,
 "article", id);
  break;
 
   case MIDGARD_OBJECT_BLOBS:
  php_midgard_get(MidgardAttachment, return_value,
-"id,name,title,mimetype,score,author,created,ptable,pid",
+"id,name,title,mimetype,score,author,created,ptable,pid"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
   "blobs", id);
  break;
 
   case MIDGARD_OBJECT_ELEMENT:
  php_midgard_get(MidgardElement, return_value,
-"id,style,name,value",
+"id,style,name,value" MGD_GET_OBJECT_SITEGROUP_FIELD,
 "element", id);
  break;
 
   case MIDGARD_OBJECT_EVENT:
  php_midgard_get(MidgardEvent, return_value,
 "id,up,start,end,title,description,"
-   "type,extra,owner,creator,created,revisor,revised,revision,busy", 
+   "type,extra,owner,creator,created,revisor,revised,revision,busy"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
 "event", id);
  break;
 
   case MIDGARD_OBJECT_EVENTMEMBER:
- php_midgard_get(MidgardEventMember, return_value, "id,eid,uid,extra",
+ php_midgard_get(MidgardEventMember, return_value, "id,eid,uid,extra"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
 "eventmember", id);
  break;
 
   case MIDGARD_OBJECT_FILE:
  php_midgard_get(MidgardFile, return_value,
-"id,article,type,name,content,size,md5",
+"id,article,type,name,content,size,md5"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
 "file", id);
  break;
 
@@ -505,14 +516,16 @@
  php_midgard_get(MidgardGroup, return_value, 
 "id,name,official," ADDRESS_FIELDS ","
GROUP_HOMEPAGE_FIELDS "," GROUP_EMAIL_FIELDS ","
-   "extra,owner",
+   "extra,owner"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
 "grp", id);
  break;
 
   case MIDGARD_OBJECT_HOST:
  php_midgard_get(MidgardHost, return_value,
"id,name,port,online,root,style,info1 AS 
auth,owner,prefix,"
-   HOSTNAME_FIELD,
+   HOSTNAME_FIELD
+MGD_GET_OBJECT_SITEGROUP_FIELD,
"host", id);
  break;
 
@@ -520,32 +533,37 @@
  php_midgard_get(MidgardImage, return_value,
 "id,src,x,y,info1=1 AS offline,"
"If(info1,Concat('img src=\"/img/',src,"
-   "'\" width=\"',x,'\" height=\"',y,'\"'),'') AS img",
+   "'\" width=\"',x,'\" height=\"',y,'\"'),'') AS img"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
"image", id);
  break;
 
   case MIDGARD_OBJECT_MEMBER:
  php_midgard_get(MidgardMember, return_value,
-"id,gid,uid,extra", "member", id);
+"id,gid,uid,extra" MGD_GET_OBJECT_SITEGROUP_FIELD,
+"member", id);
  break;
 
   case MIDGARD_OBJECT_PAGE:
  php_midgard_get(MidgardPage, return_value,
 "id,up,name,style,title,changed,content,author,"
-   "info1=1 AS auth,info2=2 AS active",
+   "info1=1 AS auth,info2=2 AS active"
+MGD_GET_OBJECT_SITEGROUP_FIELD,
 "page", id);
  break;
 
   case MIDGARD_OBJECT_PAGEELEMENT:
  php_midgard_get(MidgardPageElement, return_value,
-"id,page,name,value,info1 AS inherit",
+"id,page,name,value,info1 AS inherit"
+

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

2001-03-04 Thread Zeev Suraski

zeevSun Mar  4 14:03:23 2001 EDT

  Modified files:  
/php4/ext/standard  info.c 
  Log:
  I don't know German, but I imagine that was the problem :)
  
  
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.131 php4/ext/standard/info.c:1.132
--- php4/ext/standard/info.c:1.131  Sun Mar  4 07:49:38 2001
+++ php4/ext/standard/info.cSun Mar  4 14:03:23 2001
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: info.c,v 1.131 2001/03/04 15:49:38 zeev Exp $ */
+/* $Id: info.c,v 1.132 2001/03/04 22:03:23 zeev Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -89,7 +89,7 @@
tmp2 = **tmp;
zval_copy_ctor(tmp2);
convert_to_string(tmp2);
-   PUTS(tmp2.value.str.val);
+   PUTS(tmp2.value.str.val);
zval_dtor(tmp2);
} else {
PUTS((*tmp)-value.str.val);



-- 
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] anchor # not working?

2001-03-04 Thread andrew

hi folks!

I've got a baffling, but probably simple problem (the worst kind)

In my index.php page, I'm dynamically generating links like this:
http://localhost/news.php#1


When I click the link, the url string get's passed in, and looking at the
source of the news.php page shows:

a href="#1"/a 

about half-way down.. but the page doesn't align with the anchor tag.

I assume PHP doesn't do anything funky?

Can anyone see what I've overlooked?

tia!
andrew



-- 
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] anchor # not working?

2001-03-04 Thread Brian White

Try:
a name="1"/a

At 06:02 PM 3/4/01 -0500, andrew wrote:
hi folks!

I've got a baffling, but probably simple problem (the worst kind)

In my index.php page, I'm dynamically generating links like this:
http://localhost/news.php#1


When I click the link, the url string get's passed in, and looking at the
source of the news.php page shows:

a href="#1"/a

about half-way down.. but the page doesn't align with the anchor tag.

I assume PHP doesn't do anything funky?

Can anyone see what I've overlooked?

tia!
andrew



--
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]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML  HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
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]




Re: [PHP] anchor # not working?

2001-03-04 Thread Simon Garner

From: "andrew" [EMAIL PROTECTED]

 hi folks!
 
 I've got a baffling, but probably simple problem (the worst kind)
 
 In my index.php page, I'm dynamically generating links like this:
 http://localhost/news.php#1
 
 
 When I click the link, the url string get's passed in, and looking at the
 source of the news.php page shows:
 
 a href="#1"/a 
 
 about half-way down.. but the page doesn't align with the anchor tag.


Change this to:

a name="1"/a




Cheers

Simon Garner


-- 
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] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Don Read


On 04-Mar-01 Ken wrote:
 Thanks for the idea, John.
 
 I know about the auth logout.  Unfortunately, that means that when a user
 clicks "logout", he gets a "log in" prompt!  And, in IE, he has to
 deliberately blank out the password field, THEN hit enter, THEN the prompt
 will come again, and he has to hit escape.

snip

 Any suggestions?
 

I'm still playing with this but ...

My script handles the authentication against a MySQL table;
and this might (probably) have to get tweaked to play well with .htaccess

The logout script creates a "mark" (tmpfile, db entry, whatever)
then redirects to a non-protected page. 

On entry to a protected script:

function authuser($realm) {
  global $PHP_AUTH_USER, $PHP_AUTH_PW;

  if (isset($PHP_AUTH_USER)) {
if (markset($PHP_AUTH_USER)) {
  markunset($PHP_AUTH_USER);
  // send a 401 to force re-authenticate 
  Header('WWW-authenticate: basic realm="'.$realm .'"');
  Header('HTTP/1.0 401 Unauthorized');
  echo "\n\n";
  echo 'META HTTP-EQUIV="Refresh" CONTENT="1; URL='.SITEHOME.'/"';
  exit;
}

if (! (validlogin($PHP_AUTH_USER,$PHP_AUTH_PW, $realm))) {
  Header('WWW-authenticate: basic realm="'.$realm .'"');
  Header('HTTP/1.0 401 Unauthorized');
  echo 'META HTTP-EQUIV="Refresh" CONTENT="1; URL='.SITEHOME.'/"';
  echo 'CENTERFailed LoginPInvalid name or password';
  exit;
}
  }
  return(true);
}


Regards,
-- 
Don Read [EMAIL PROTECTED]
-- If you are going to sin, sin against God, not the bureaucracy. 
  God will forgive you but the bureaucrats won't. 

-- 
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 the Week

2001-03-04 Thread Chris Anderson

Is there a function to return the day of the week? Or at least a number that I can use 
to determine this?

Thanks



Re: [PHP] anchor # not working?

2001-03-04 Thread andrew

thanks for the feedback, gents, but it's not working :/..

I changed to this, as suggested:

 a name="1"/a

actually, here is a snippet of the function I'm using the generate the link:

a href=\"news.php#$row[0]\"h5...more/h5/a

and the subsequent anchor on the next page

while ($row = mysql_fetch_row($result))
{
a name=\"$row[0]\"/a
trtdh3$row[2]/h3/td/tr
trtdh4$row[3]/h4/td/tr
}

I've verifeid that $row[0] is printing the exact same content on both
pages... quite odd that it's not working.

TIA,
andrew


-- 
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] Day of the Week

2001-03-04 Thread Alexander Wagner

Chris Anderson wrote:
  Is there a function to return the day of the week? Or at least a
 number that I can use to determine this?

RTM
http://php.net/date

Have a look at "D", "l" (lowercase L) and "w".

regards
Wagner

-- 
Assumption is the mother of all fuck-ups.

-- 
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] Please help!! how to compare an array with another

2001-03-04 Thread Jimmy Bäckström

Shu!
I am currently working on a site where I want to randomly show pictures. I am using 
sessions to save the id's of the pictures that a user has seen during his/hers visit. 
My first question is: Can I use an array as a session variable? like this:
$arr = array(1, 2, 3, 4, 5);
session_start();
session_register("arr");

This array is to be passed on as an argument to a function used to find a random id, 
that has not yet been seen. This array should be compared to another array with the 
picture id's. There is two functions to accomplish the following: Create a randomized 
array consisting of all the pictures id. Find one id in that randomized array that 
does not exist in the array of allready seen pictures. These are the functions:

function show_pic($pics_voted, $cat, $sex) {
 srand ((double) microtime() * 100);
 $result = query("SELECT id FROM $cat WHERE sex='$sex'");
 while ($row = mysql_fetch_row($result)) {
  $arr[] = $row[0];
 }
 shuffle($arr);
 $picture_id = find_id($pics_voted, $arr);
 echo "picture_id = $picture_id";
 return $picture_id;
}//show_pic


//Hitta id som inte finns bland $pics_voted[]
function find_id($pics_voted, $random, $x = 0) {
 for ($i = 0; $i  count($pics_voted); $i++) {
  if ($random[$x] == $pics_voted[$i] AND $x = count($random)) return "no_pics"; //If 
current key in $random[] is equal to current key in $pics_voted[] AND $x is greater 
than, or equal to the number of keys in $random[], that is if the last key in 
$random[] has been reached, return "no_pics"
  elseif ($random[$x] == $pics_voted[$i]) {
   find_id($pics_voted, $random, $x+1); //If current key in $random[] is equal to 
current key in $pics_voted[] run the function again, with $x+1 as an argument to be 
used in the $random[] array, that is: do the funtion again with the next key in 
$random[]
  }//elseif
 }//for
 return $random[$x];

}//find_id


Does anyone know why this ain't working? I get the same id over and over again. Maybe 
there is an easuer way to achive what I want?
Please help!!




[PHP] php, secure pages htdig

2001-03-04 Thread Miles Thompson

I've protected my PHP pages with this little fragment of script, at the 
very top of the page

? session_start();
if( !session_is_registered( "member_id" ) )
{
header("Location: user_logon.php\n");
}
?

When I try indexing the pages, using htdig, all I get is a redirect 
message. And of course the basic authentication won't work.

Has anyone had any experience of this?

What I am thinking of trying is creating a PHP page to establish a session 
and then exec'ing htdig from within the page. If that works it will be 
pretty useful as I'll be able to add it to my Maintenance page. No good, 
though, for running htdig

Before I try this, though, I'm going to r ead through Coli Viebrock's 
"Search This!" article.

If anyone has any experience or suggestions for an alternate search engine 
I'll welcome them.

Regards - Miles Thompson


-- 
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] anchor # not working?

2001-03-04 Thread Don Read


On 04-Mar-01 andrew wrote:
 thanks for the feedback, gents, but it's not working :/..
 
 I changed to this, as suggested:
 
 a name="1"/a
 
 actually, here is a snippet of the function I'm using the generate the link:
 
 a href=\"news.php#$row[0]\"h5...more/h5/a
 
 and the subsequent anchor on the next page
 
 while ($row = mysql_fetch_row($result))
 {
 a name=\"$row[0]\"/a
 trtdh3$row[2]/h3/td/tr
 trtdh4$row[3]/h4/td/tr
 }
 
 I've verifeid that $row[0] is printing the exact same content on both
 pages... quite odd that it's not working.


maybe faulty memory on my part, but i think I've seen something similar
(i.e. "a name" is flakey inside tables).

play with putting a name ../a within your tr or h3 tags. 

Regards,
-- 
Don Read [EMAIL PROTECTED]
-- If you are going to sin, sin against God, not the bureaucracy. 
  God will forgive you but the bureaucrats won't. 

-- 
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 PostgreSQL

2001-03-04 Thread Andrew Halliday

The following is an example demonstrating how to set up a foreign key
constraint in PostgreSQL 7:

CREATE SEQUENCE school_id_seq;
CREATE TABLE school (
  school_id   INT NOT NULL PRIMARY KEY DEFAULT nextval('school_id_seq'),
  school_name VARCHAR(80) NOT NULL
);

CREATE SEQUENCE student_id_seq;
CREATE TABLE student (
  student_id   INT NOT NULL PRIMARY KEY DEFAULT nextval('student_id_seq'),
  student_name VARCHAR(80) NOT NULL,
  school_idINT NOT NULL,
  CONSTRAINT school_exists
FOREIGN KEY(school_id) REFERENCES school
ON DELETE RESTRICT
);

INSERT INTO school (school_name) VALUES ('Alice''s School of Truck
Driving');
INSERT INTO school (school_name) VALUES ('Bob''s School of Underwater
Knitting');

INSERT INTO student (student_name, school_id) VALUES ('Charlie', 1);
INSERT INTO student (student_name, school_id) VALUES ('Doug', 1);
INSERT INTO student (student_name, school_id) VALUES ('Ernie', 2);

Note the 'ON DELETE RESTRICT' which will prevent you from deleting a school
if there is a student going to that school. First look at what's in the
tables:

SELECT * FROM school;
SELECT * FROM student;

Now attempt to delete the school:

DELETE FROM school WHERE school_id = 1;

If you try the above, you should see 'ERROR: school_exists referential
integrity violation - key in school still referenced from student' and
notice that nothing was deleted.

If you want to try the above more than once, the following may be handy:
DROP SEQUENCE school_id_seq;
DROP TABLE school;
DROP SEQUENCE student_id_seq;
DROP TABLE student;

Cascade  Update
Instead of 'ON DELETE RESTRICT' you could specify 'ON DELETE CASCADE'. This
would allow the delete (instead of preventing it like in the example above),
but it would 'cascade' the delete to the student table so that any students
going to the school you deleted would also be deleted.

As well as the 'ON DELETE ...' clause you can also specify what is to happen
on an update of the foreign key with either:

  a.. ON UPDATE RESTRICT or
  b.. ON UPDATE CASCADE
ON UPDATE RESTRICT would prevent UPDATE school SET school_id = 20 WHERE
school_id = 1 from proceeding if there were any students with a school_id of
1.

You might be able to guess that ON UPDATE CASCADE would allow the UPDATE
school SET school_id = 20 WHERE school_id = 1 to proceed, but it would also
update the school_id field in the student table appropriately.

Foreign Keys where the field names are different
Consider the following table setup:

CREATE SEQUENCE school_id_seq;
CREATE TABLE school (
  id   INT NOT NULL PRIMARY KEY DEFAULT nextval('school_id_seq'),
  name VARCHAR(80) NOT NULL
);

CREATE SEQUENCE student_id_seq;
CREATE TABLE student (
  idINT NOT NULL PRIMARY KEY DEFAULT nextval('student_id_seq'),
  name  VARCHAR(80) NOT NULL,
  school_id INT NOT NULL,
  CONSTRAINT school_exists
FOREIGN KEY(school_id) REFERENCES school(id)
ON DELETE RESTRICT
);

INSERT INTO school (name) VALUES ('Alice''s School of Truck Driving');
INSERT INTO school (name) VALUES ('Bob''s School of Underwater Knitting');

INSERT INTO student (name, school_id) VALUES ('Charlie', 1);
INSERT INTO student (name, school_id) VALUES ('Doug', 1);
INSERT INTO student (name, school_id) VALUES ('Ernie', 2);

Note how the field names don't match (school.id as opposed to
student.school_id); in this case we can put the field name in brackets after
the table name.

As before, the following will fail:

DELETE FROM school WHERE id = 1;


- AndrewH

- Original Message -
From: "Marcelo Pereira" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 05, 2001 1:00 AM
Subject: [PHP] PHP  PostgreSQL


Hi, All.

I have to build a web site and I was
studying postgreSQL, but, whether I am
quite wrong or this database does not
support Foreign Key.

Does anyone use postgreSQL and know
how handle Foreign Keys ???

Thanks,

Marcelo Pereira
Computer Programmer


__
O BOL  Top10 no iBest! Vote j para torn-lo Top3!
http://www.bol.com.br/ibest.html





--
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] Why doesnt pass-by-value work?

2001-03-04 Thread Andrew Halliday

When I call this function:

   function getColumnName($col)
   {
  if ($col  0  $col  pg_numfields($this-lastResultSet))
 return pg_fieldname($this-lastResultSet,$col);
  else
 return null;
   }


It returns null all the time !
The condition is NOT the problem ... Ive tested that with:

   function getColumnName($col)
   {
 return pg_fieldname($this-lastResultSet,$col);
  if ($col  0  $col  pg_numfields($this-lastResultSet))
 return pg_fieldname($this-lastResultSet,$col);
  else
 return null;
   }

And it still returns null.

If I do this:

   function getColumnName($col)
   {
 echo pg_fieldname($this-lastResultSet,$col);
 return pg_fieldname($this-lastResultSet,$col);
  if ($col  0  $col  pg_numfields($this-lastResultSet))
 return pg_fieldname($this-lastResultSet,$col);
  else
 return null;
   }

I do get the correct result printed to the browser ...
So what the HELL is going on?   Dont tell me that pass by reference doesnt
work with pg_* functions?
Just to test this, I did this:

   function getColumnName($col)
   {
 $test = pg_fieldname($this-lastResultSet,$col);
 return $test;
  if ($col  0  $col  pg_numfields($this-lastResultSet))
 return pg_fieldname($this-lastResultSet,$col);
  else
 return null;
   }


This made no difference ... WHAT AM I DOING WRONG?!

AndrewH


-- 
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 connect to PostgreSQL with phpPgAdmin

2001-03-04 Thread Paulo Parola

For the phpPgAdmin users, if you might help!!!

I am running PostgreSQL 7.1 over RedHat.

When trying to connect through the web everything goes right. A script that
is currently working:

?php

$link = pg_Connect("host=localhost port=5432 dbname=teste")
  or die ("Could not connect");

$comando = "select * from teste";
$result = pg_exec($link,$comando);
$linhas_retornadas = pg_numrows($result);

echo "tabletdbnome/b/tdtdbsobrenome/b";
for ($i=0; $i  $linhas_retornadas; $i++) {
  $row=pg_fetch_array($result,$i);
  echo "trtd" . $row["nome"] . "/td";
  echo "td" . $row["sobrenome"] . "/td/tr";
}
echo "/table";

pg_close ($link);
?


All *my databases are owned by user 'postgres'* and I had to create another
PostgreSQL *user 'apache' and give ownership of table 'teste' in database
'teste' to this user* (apache) in order for this connection to work.

My 'pg_hba.conf' file reads:
localall
trust
host all 127.0.0.1 255.255.255.255 trust

With phpPgAdmin I configured file 'config.inc.php' as follows:

// The default database is used to connect to the database to check the
adv_auth
//  This can actually be any database you currently have on your system.
It just
//  needs _a_ database to connect and check the system tables.
$cfgDefaultDB   = "teste";

// You should change the superuser if different from postgres
//  This is just used to filter out the system functions when listing
$cfgSuperUser   = "postgres";

//  Set to true if you want to authenticate against the passwd as well as
the username
//   In order to use adv_auth, you must update the passwords in the user
admin section.
//   It is suggested that you leave this as false until you are able to
get in and update the passwords.
$cfgUsePass = false;
$cfgServers[1]['local'] = true;
$cfgServers[1]['host']  = 'localhost';
$cfgServers[1]['port']  = '5432';
$cfgServers[1]['adv_auth']  = false;
$cfgServers[1]['stduser']   = 'apache';

No matter if I set
  $cfgServers[1]['host']  as 'localhost' or as '127.0.0.1'
  $cfgServers[1]['stduser'] as 'apache' or as 'postgres' or as none


No matter what I always get a blank Web page with the following messages:


ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: [no URL]

The following error was encountered:
Zero Sized Reply

Squid did not receive any data for this request.
Your cache administrator is webmaster.
Generated Sun, 04 Mar 2001 23:15:30 GMT by internet.gst.com.br
(Squid/2.3.STABLE3)


Please help!!! This shall most probably be some problem of permission, but
how do I manage to make phpPgAdmin to correctly connect and access my
databases?

TIA,
Paulo



-- 
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] Change the Input to st different..

2001-03-04 Thread David Robley

On Mon,  5 Mar 2001 08:59, Erdinc Guler wrote:
 hi..
 my problem is to change some characters from input data coming from a
 form to something..i mean like :
 inputoutput
 ---
 i--  y
 fire --  fyre

 Is it possible??

 erdinc..

Have a look in the String Functions section of the manual. In particular, 
substr_replace, str_replace or strtr. Also the Regular Expressions 
section if you want more complex replacement capabilities.

-- 
David Robley| WEBMASTER  Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

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




Re: [PHP] Why doesnt pass-by-value work?

2001-03-04 Thread Andrew Halliday

Ahh - dont worry about this post ... :)

AndrewH


- Original Message -
From: "Andrew Halliday" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 05, 2001 10:51 AM
Subject: [PHP] Why doesnt pass-by-value work?


 When I call this function:

function getColumnName($col)
{
   if ($col  0  $col  pg_numfields($this-lastResultSet))
  return pg_fieldname($this-lastResultSet,$col);
   else
  return null;
}


 It returns null all the time !
 The condition is NOT the problem ... Ive tested that with:

function getColumnName($col)
{
  return pg_fieldname($this-lastResultSet,$col);
   if ($col  0  $col  pg_numfields($this-lastResultSet))
  return pg_fieldname($this-lastResultSet,$col);
   else
  return null;
}

 And it still returns null.

 If I do this:

function getColumnName($col)
{
  echo pg_fieldname($this-lastResultSet,$col);
  return pg_fieldname($this-lastResultSet,$col);
   if ($col  0  $col  pg_numfields($this-lastResultSet))
  return pg_fieldname($this-lastResultSet,$col);
   else
  return null;
}

 I do get the correct result printed to the browser ...
 So what the HELL is going on?   Dont tell me that pass by reference doesnt
 work with pg_* functions?
 Just to test this, I did this:

function getColumnName($col)
{
  $test = pg_fieldname($this-lastResultSet,$col);
  return $test;
   if ($col  0  $col  pg_numfields($this-lastResultSet))
  return pg_fieldname($this-lastResultSet,$col);
   else
  return null;
}


 This made no difference ... WHAT AM I DOING WRONG?!

 AndrewH


 --
 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] undefined symbol: xmlXPtrNewContext

2001-03-04 Thread Jack Lauman

I get the following error when I attempt to start Apache 1.3.19
(RedHad 7.0):

apachectl start

Syntax error on line 230 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/apache/libphp4.so into server:
/usr/lib/apache/libphp4.so:
undefined symbol: xmlXPtrNewContext
/usr/sbin/apachectl start: httpd could not be started

I'm using libxml 2.3.3, and I assume the error is from the ./configure
statement --xith-dom

I'd appreciate any suggestions on how to resolve it.

TIA

Jack

-- 
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 file.c

2001-03-04 Thread Sean Bright

elixer  Sun Mar  4 16:20:41 2001 EDT

  Modified files:  
/php4/ext/standard  file.c 
  Log:
  get_meta_tags now handles single quoted attributes as well as those that
  are double quoted.
  
  
Index: php4/ext/standard/file.c
diff -u php4/ext/standard/file.c:1.144 php4/ext/standard/file.c:1.145
--- php4/ext/standard/file.c:1.144  Sun Feb 25 22:07:17 2001
+++ php4/ext/standard/file.cSun Mar  4 16:20:41 2001
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.144 2001/02/26 06:07:17 andi Exp $ */
+/* $Id: file.c,v 1.145 2001/03/05 00:20:41 elixer Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -2098,7 +2098,7 @@
 
 /* Tokenizes an HTML file for get_meta_tags */
 php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int 
*use_last_char, int *last_char, char **data, int *datalen) {
-   int ch;
+   int ch, compliment;
char buff[META_DEF_BUFSIZE + 1];
 
memset((void *)buff,0,META_DEF_BUFSIZE + 1);
@@ -2126,9 +2126,11 @@
 case '/':
 return TOK_SLASH;
 break;
+case '\'':
 case '"':
+compliment = ch;
 *datalen = 0;
-while (!FP_FEOF(socketd,fp,issock)  (ch = FP_FGETC(socketd,fp,issock)) 
 ch != '"') {
+while (!FP_FEOF(socketd,fp,issock)  (ch = FP_FGETC(socketd,fp,issock)) 
+ ch != compliment) {
buff[(*datalen)++] = ch;
 
if (*datalen == META_DEF_BUFSIZE)



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




[PHP-CVS] cvs: php4 /sapi/cgi cgi_main.c

2001-03-04 Thread Jani Taskinen

sniper  Sun Mar  4 17:26:36 2001 EDT

  Modified files:  
/php4/sapi/cgi  cgi_main.c 
  Log:
  Can't output any error messages if there isn't any function initialized
  to do it..
  # Bug report: #7650
  
  
Index: php4/sapi/cgi/cgi_main.c
diff -u php4/sapi/cgi/cgi_main.c:1.96 php4/sapi/cgi/cgi_main.c:1.97
--- php4/sapi/cgi/cgi_main.c:1.96   Sat Mar  3 17:08:46 2001
+++ php4/sapi/cgi/cgi_main.cSun Mar  4 17:26:36 2001
@@ -416,6 +416,9 @@
setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be 
binary */
 #endif
 
+   if (php_module_startup(cgi_sapi_module)==FAILURE) {
+   return FAILURE;
+   }
 
/* Make sure we detect we are a cgi - a bit redundancy here,
   but the default case is that we have to check only the first one. */
@@ -472,9 +475,6 @@
ap_php_optarg = orig_optarg;
}
 
-   if (php_module_startup(cgi_sapi_module)==FAILURE) {
-   return FAILURE;
-   }
 #ifdef ZTS
compiler_globals = ts_resource(compiler_globals_id);
executor_globals = ts_resource(executor_globals_id);



-- 
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] date

2001-03-04 Thread Michael Hall


Yes you can. Include a field in your db called 'date' or whatever.

Generate the date in your script using:

$today = date("Y-m-d");

Then simply add the date to the db along with everything else.
There are lots of ways to format dates, too many to describe here.
Have a look at the PHP manual.
Also, if you make the data-type of the date field 'date', your options for
formatting are more limited. That stuff is all in the MySQL manual.

Michael


On Sun, 4 Mar 2001, george wrote:

   Can you mark the date when an entry is placed in the db and then get that
 date to display  when the info is pulled out
 
 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 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] date

2001-03-04 Thread Simon Garner

From: "Michael Hall" [EMAIL PROTECTED]


 Yes you can. Include a field in your db called 'date' or whatever.

 Generate the date in your script using:

 $today = date("Y-m-d");

 Then simply add the date to the db along with everything else.
 There are lots of ways to format dates, too many to describe here.
 Have a look at the PHP manual.
 Also, if you make the data-type of the date field 'date', your options for
 formatting are more limited. That stuff is all in the MySQL manual.

 Michael


 On Sun, 4 Mar 2001, george wrote:

Can you mark the date when an entry is placed in the db and then get
that
  date to display  when the info is pulled out
 
  TIA
 
  george
 


If you make the field in the database of type "DATETIME" then you can insert
dates and select formatted date values using MySQL's date and time
functions. (I assume you're using a MySQL database.) There is no need to use
PHP's date functions.


Examples:

CREATE TABLE mytable (
...
mydate DATETIME,
...
)

To insert the current date, use NOW() as the date value:

INSERT INTO mytable VALUES (..., NOW(), ...)

To select the date formatted as "Saturday March 5th 2001 12:30 PM":

SELECT
col1,
col2,
DATE_FORMAT(mydate, '%W %M %D %Y %r') AS mydate,
col4
FROM mytable


http://www.mysql.com/doc/D/a/Date_and_time_functions.html


Cheers

Simon Garner


-- 
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] connecting do MS Access...

2001-03-04 Thread Christian Dechery

which is the best way to connect to MS Access and process and request queries?
is it with odbc_*() functions? cuz I found that not that good...

. 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] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Ken

At 03:11 PM 3/4/01 -0600, Don Read wrote:
On 04-Mar-01 Ken wrote:
  I know about the auth logout.  Unfortunately, that means that when a user
  clicks "logout", he gets a "log in" prompt!  And, in IE, he has to
  deliberately blank out the password field, THEN hit enter, THEN the prompt
  will come again, and he has to hit escape.

I'm still playing with this but ...

My script handles the authentication against a MySQL table;
and this might (probably) have to get tweaked to play well with .htaccess

The logout script creates a "mark" (tmpfile, db entry, whatever)
then redirects to a non-protected page. 

My script does something very similar, but it's more advanced than that, because it 
handles these various scenarios:

- Someone clicks "logout", then closes browser, then starts new browser and logs in as 
same of different user
- Someone clicks "logout", then tries to log in again as same or different user
- Someone just closes browser, without clicking "logout"

This would all work perfectly if it weren't for IE5.5 completely refusing to behave 
like it has closed when it has closed.  So I have to require IE5.5 users to click 
logout, which is really no good.

Your script suffers the same problem: An IE5.5 user in the 3rd scenario would just get 
logged right back on without being prompted.

- Ken


-- 
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: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Ken

At 03:18 PM 3/4/01 -0800, Michael A. Peters wrote:
...
Generally, I don't think a login prompt when a user clicks logout is such bad thing.

It lets the user know they are logged out, and the software is waiting for another 
login.

If they choose to go elsewhere, that's fine.

Why it's bad is that, if the user clicks "cancel", they are not logged out.  They have 
to manually clear the field, THEN OK, then they get prompted AGAIN, THEN they hit 
cancel.  That's nuts, and my users aren't going to understand that.

I personally in your situation would use php to determine the browser.
If its IE 5.5 state "Due to a bug in IE 5.5 that browser is not supported for use 
with this page."

You could give them the choice to continue anyway, or possibly do session 
authentication only with IE 5.5 if you really wanted to go out of your way to cover 
up for Microsofts bug.

Don't lessen security because of a browser bug, though- instead, refuse to support 
the browser.
...

Well, I guess nothing is going to solve my problem of making people hit "logout" 
instead of just closing the browsers, if they're using IE5.5, since both the 
user/password are still remembered by the browser, and the session is kept active.  I 
would love to not support IE5.5, but my client uses this version primarily.  I will 
ask them to downgrade...but I wouldn't be surprised if IE doesn't let you install an 
older version!

Anyway, can someone please test to see if this doesn't happen in IE5.0?

I really hate this situation, yessir.

- Ken

-- 
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] Unix-time problem

2001-03-04 Thread Nicklas af Ekenstam

Hi!

I wrote this simple function to return the current date minus supplied 
number of years:

function get_birthdate($age_in_years)   {

// get the current timestamp into an array
$timestamp =  time();
$date_time_array =  getdate($timestamp);
$hours =  $date_time_array["hours"];
$minutes =  $date_time_array["minutes"];
$seconds =  $date_time_array["seconds"];
$month =  $date_time_array["mon"];
$day =  $date_time_array["mday"];
$year =  $date_time_array["year"];

// use mktime to recreate the unix timestamp
// subtracting age_low and age_high from the years
$timestamp =  mktime($hours, $minutes,$seconds ,$month, $day,$year - 
$age_in_years);
$birthdate = strftime("%d/%m/%Y", $timestamp);

return($birthdate);
}

You, obviously, call it like this: echo get_birthdate(1);
Which would return a datestring that looks like this: 05/03/2000

Works nice, but the problem occurs when I try to subtract more than 31 
years which is naturall since, as far as UNIX is concerned, the world 
didn't exist then.
(Took me a while to figure this one out though.)

Any clues on how to fix this so that I can go beyond the past 31 years?

Sincerely,
Nicklas


-- 
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 OO question

2001-03-04 Thread John LYC

can i do this..?

//declaring class

class myclass{

//declaring properties
...


//declaring methods..
function mymethod(){

//can i declared variable in method?
var $myvar;
...
//do something

}//end of mymethod

///

if yes, do i access myvar like this.
$item = new myclass;
print $item-mymethod()-myvar;


thanks
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]




Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday

yes you can do all of this

but in no OO language so far have i seen the ability to access a variable
inside a method...you would have to do this:

class myclass
{
 var $myvar;
 function setmyvar($newmyvar)
 {
 $this-myvar = $newmyvar;
 }
}

Then you could do this:

$myclassObj = new myclass();
$myclassObj-setmyvar(10);
echo $myclassObj-myvar;

This would print '10'...

Cut and paste that exact program in and it should be a working demonstration
...

You should read the php manual more ...
see
www.php.net

AndrewH
- Original Message -
From: "John LYC" [EMAIL PROTECTED]
To: "PHP List" [EMAIL PROTECTED]
Sent: Monday, March 05, 2001 1:36 PM
Subject: [PHP] simple OO question


 can i do this..?

 //declaring class

 class myclass{

 //declaring properties
 ...
 

 //declaring methods..
 function mymethod(){

 //can i declared variable in method?
 var $myvar;
 ...
 //do something

 }//end of mymethod

 ///

 if yes, do i access myvar like this.
 $item = new myclass;
 print $item-mymethod()-myvar;


 thanks
 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 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] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Simon Garner

From: "Ken" [EMAIL PROTECTED]


 Why it's bad is that, if the user clicks "cancel", they are not logged
out.  They have to manually clear the field, THEN OK, then they get prompted
AGAIN, THEN they hit cancel.  That's nuts, and my users aren't going to
understand that.



Why do they need to be able to log out?

If the user doesn't want their password saved (e.g. they're on a public PC)
then they just uncheck the "Save password" box when logging in, and then
they can close the browser and be "logged out".

If they want their password saved then they can check the "Save password"
box and not worry.

It sounds to me like you're trying to implement something that no users are
actually going to need or want...

However, if you want more control over the authentication process I suggest
making your own login form and using cookies, instead of HTTP
authentication. Then you can log users out just by unsetting the cookie(s).


Cheers

Simon Garner


-- 
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] Question

2001-03-04 Thread Deependra B. Tandukar

Greetings !

I am using PHP4 and MySQL for database in the web. I am using two tables. I
made a search script for one table which displys the list on the web page
and want to put a link in one of the fields on that web page so that the
link takes browserts to the data of the other page.

I could not achieve this function.  Can anyone help?

Looking forward to hearing from you.

Warm Regards,
DT


-- 
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: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Ken

At 04:11 PM 3/5/01 +1300, Simon Garner wrote:
From: "Ken" [EMAIL PROTECTED]
  Why it's bad is that, if the user clicks "cancel", they are not logged
out.  They have to manually clear the field, THEN OK, then they get prompted
AGAIN, THEN they hit cancel.  That's nuts, and my users aren't going to
understand that.
 

Why do they need to be able to log out?

Because they are on a shared computer.

If the user doesn't want their password saved (e.g. they're on a public PC)
then they just uncheck the "Save password" box when logging in, and then
they can close the browser and be "logged out".

If they want their password saved then they can check the "Save password"
box and not worry.

Nope - with IE5.5, even with that box NOT checked, the user remains logged in until 
either a) the computer is restarted, or b) a new user-authentication header is sent, 
AND the user clears out the password field and hits OK.  Otherwise the user stays 
logged in, in spite of the HTTP spec.

It sounds to me like you're trying to implement something that no users are
actually going to need or want...

Nope, I'm working with a real client, who has multiple users on the same machine, and 
IE5.5 is installed on it, and, lo and behold, though the rest of the browsers work 
fine, IE5.5 has this awful bug.

However, if you want more control over the authentication process I suggest
making your own login form and using cookies, instead of HTTP
authentication. Then you can log users out just by unsetting the cookie(s).

This is how I will wind up going, EXCEPT the users will be required to click "logout", 
since merely closing the browser, in IE5.5, does not seem to clear the user/password 
from the browser's memory, NOR does it clear any session cookie.  Again, works fine in 
other browsers, per spec.

Thanks,

Ken

Cheers

Simon Garner


-- 
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: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Simon Garner

From: "Ken" [EMAIL PROTECTED]


 Nope - with IE5.5, even with that box NOT checked, the user remains logged
in until either a) the computer is restarted, or b) a new
user-authentication header is sent, AND the user clears out the password
field and hits OK.  Otherwise the user stays logged in, in spite of the HTTP
spec.


Admittedly I'm running IE5.01, but if I close and reopen the browser it will
pop up the authentication dialogue again (with values filled out, if I did
Save Password).

Does this really not happen in 5.5?



 This is how I will wind up going, EXCEPT the users will be required to
click "logout", since merely closing the browser, in IE5.5, does not seem to
clear the user/password from the browser's memory, NOR does it clear any
session cookie.  Again, works fine in other browsers, per spec.


You mean it doesn't clear per-session cookies (expiry=0) either? Cripes...

What Windows version is this under?



-- 
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] Page not found error

2001-03-04 Thread Randy Johnson

if I leave my browser on a php and then I click a link after lets say 5 or
10 minutes that links to another php page it says page not found even though
the page is there.  has anybody else experienced this error?


thanks

randy

-Original Message-
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 03, 2001 11:44 AM
To: Ernest E Vogelsinger; Randy Johnson
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Converting String to Variable


it may look weird but that is the way it needs to be done. here is a better
example

$str=myfunct()  this returns monday

then i want the monday to turn into this

$monday

so i can do this

$monday="BlaH";

thanks

randy

-Original Message-
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 03, 2001 11:35 AM
To: Randy Johnson
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Converting String to Variable


At 17:09 03.03.2001, Randy Johnson said:
[snip]
Is there anyway to convert a string to a variable

example

$str="monday";

I would like to then do this:

$monday="blah";
[snip]

RTFM ;-

$$str = "blah";
print $monday;



 ...ebird

   O Ernest E. Vogelsinger
   (\)http://www.1-at-web.at/
^ ICQ#   13394035



--
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] simple OO question

2001-03-04 Thread John LYC

class myclass{

$fields = mysql_list_fields("database1", "table1", $link);
$columns = mysql_num_fields($fields);

for ($i = 0; $i  $columns; $i++) {
var mysql_field_name($fields, $i);
}

}//class

now.. can i do this?
is there a performnance issue here?
can i put this in the constructor?

john




Andrew Halliday wrote:

 yes you can do all of this

 but in no OO language so far have i seen the ability to access a variable
 inside a method...you would have to do this:

 class myclass
 {
  var $myvar;
  function setmyvar($newmyvar)
  {
  $this-myvar = $newmyvar;
  }
 }

 Then you could do this:

 $myclassObj = new myclass();
 $myclassObj-setmyvar(10);
 echo $myclassObj-myvar;

 This would print '10'...

 Cut and paste that exact program in and it should be a working demonstration
 ...

 You should read the php manual more ...
 see
 www.php.net

 AndrewH
 - Original Message -
 From: "John LYC" [EMAIL PROTECTED]
 To: "PHP List" [EMAIL PROTECTED]
 Sent: Monday, March 05, 2001 1:36 PM
 Subject: [PHP] simple OO question

  can i do this..?
 
  //declaring class
 
  class myclass{
 
  //declaring properties
  ...
  
 
  //declaring methods..
  function mymethod(){
 
  //can i declared variable in method?
  var $myvar;
  ...
  //do something
 
  }//end of mymethod
 
  ///
 
  if yes, do i access myvar like this.
  $item = new myclass;
  print $item-mymethod()-myvar;
 
 
  thanks
  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 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] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Mitchell Kirschner


Nope, I'm working with a real client, who has multiple users on
the same machine, and IE5.5 is installed on it, and, lo and
behold, though the rest of the browsers work fine, IE5.5 has this
awful bug.


I don't have this session-terminating problem with IE 5.5 when using Apache
and PHP locally on my Win95 computer. I'm also pretty sure it works fine
when connected to a Linux/Apache/PHP server where I have some webspace.

Question: Do you have the latest bunch of fixes and security updates for IE
5.5? I remember after I first installed 5.5 a couple of months ago, there
were many megabytes of fixes, patches, security updates, etc. (There are
probably many more since then.) Perhaps there's already a fix for the bug.

Assuming you have an internet connection from each PC, go into IE 5.5, then
select Tools-Windows Update. The MS website should auto-detect the fixes etc
that you need and prompt you to install them.

Mitch


-- 
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] Page not found error

2001-03-04 Thread Lewis Bergman

 if I leave my browser on a php and then I click a link after lets say 5
 or 10 minutes that links to another php page it says page not found
 even though the page is there.  has anybody else experienced this
 error?
Is this link passed as a value or something that might expire with a 
session? Just a wild guess.


-- 
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] mail problem

2001-03-04 Thread Peter Houchin

Hiya,
am near completeion of a site only i can't get any mail to send to multiple recipients 
at all .. either in the  "To:" section or having on email in "To" and one email 
address in "CC" section.. and i need to be able to do this ... can any one offer any 
suggestions ...( I'd prefer to have one in the "To" section and one in the "CC" 
section 
I'm am using sendmail on solaris 2.6 to send the actual emails

-- Start of snip---
$address .= $email  ;
$subject = "VFSA-eRentals Calculation Results";
$body="blah blah\n";
$headers .= "CC: [EMAIL PROTECTED] "; 
mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain; 
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit"  );
--- end of snip---


any help would be greatful :)
Peter Houchin
Sun Rentals
[EMAIL PROTECTED]




Re: [PHP] mail problem

2001-03-04 Thread David Robley

On Mon,  5 Mar 2001 14:17, Peter Houchin wrote:

  Hiya,
 am near completeion of a site only i can't get any mail to send to
 multiple recipients at all .. either in the  "To:" section or having on
 email in "To" and one email address in "CC" section.. and i need to be
 able to do this ... can any one offer any suggestions ...( I'd prefer
 to have one in the "To" section and one in the "CC" section 
 I'm am
 using sendmail on solaris 2.6 to send the actual emails 
 -- Start of snip---
 $address .= $email  ;
 $subject = "VFSA-eRentals Calculation Results";
 $body="blah blah\n";
 $headers .= "CC: [EMAIL PROTECTED] "; 
 mail("$address", "$subject", "$body", "$headers \nContent-Type:
 text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit"  );
 --- end of snip---
 
 
 any help would be greatful :)
 Peter Houchin
 Sun Rentals
 [EMAIL PROTECTED]
 
Two things that may or may not be part of your problem; 

first, if there is already something in $headers then appending the cc to 
it may give you an invalid string; and

second, you might try Cc: instead of CC:

Cheers
-- 
David Robley| WEBMASTER  Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] what does $$ mean?

2001-03-04 Thread Ed Lazor

I'm studying some code from the net and was kinda curious.  There are 
places where it references variables like this:

$$testvar

What's the difference between that and

$testvar

?

-Ed


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




RE: [PHP] what does $$ mean?

2001-03-04 Thread Jason Murray

 I'm studying some code from the net and was kinda curious.  There are 
 places where it references variables like this:
 
   $$testvar
 
 What's the difference between that and
 
   $testvar
 
 ?

$testvar means "the value of the variable named 'testvar'".

$$testvar means "the value of the variable with the name of the 
value of 'testvar'". ie - testvar is "foo", $$testvar is equivalent
to $foo.

Jason

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




[PHP] max array size question..

2001-03-04 Thread Jeff

I'm trying to read in a text file that has 42620 lines.  Each line has
zip code information separated by commas.  I have no problem reading the
file into an array.  But when I try and read each element in the array
and put it into another array I get a "500 server error".  The second to
last line is what's causing the problem.

After doing some debugging I found out that at around iteration 18000 is
when the server error occurs.  Any ideas?  I know I should use a
database, but i'm intrigued by this problem.

Here's the code that does the work...

# read the file in, each line in the file is it's own element in the
array
$lineArray = file( "zips.txt" );

# initialize variable, showing that there's nothing in $ZIPS
$ZIPS = array();

# iterate through each element in the array, foreach() is probably
cleaner
for($i = 0; $i  count($lineArray); $i++ ) {
# set variable
$value = $lineArray[ $i ];

# set $tempArray to a new array
$tempArray = array();

# convert the line into an array
$tempArray = explode( ",", $value );

# add the line to the array in the format
# $ZIPS[ "zip code" ] = array( "zip code", "state", "city", "lat",
"long" )
$ZIPS[ $tempArray[ 0 ] ] = $tempArray;
}

Thanks in advance.

Jeff



-- 
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 OO question

2001-03-04 Thread Andrew Halliday

No, you cant do this as you coded it, however minor alterations will allow
this.
Last time i checked, you couldnt initialise variables in object scope ...
you can only declare them.  This makes sense, because thats what the
constructor is for.

Altered code for what you want to do is as follows:




class myclass{
   var $fields;
   var $columns;

function myclass { // constructor
  $this-fields =  mysql_list_fields("database1", "table1", $link);
  $this-columns = mysql_num_fields($fields);
 }

// all code must be declared in a function !! - This isnt Java Script :)
function doSomething() {
for ($i = 0; $i  $this-columns; $i++) {
var mysql_field_name($this-fields, $i);
   }
 }//function doSomething()
}//class


$myobj = new myclass();  // creates object and runs constructor (see above)
$myobj-doSomething(); // do whatever you want the object to do



Andrew H




 class myclass{

 $fields = mysql_list_fields("database1", "table1", $link);
 $columns = mysql_num_fields($fields);

 for ($i = 0; $i  $columns; $i++) {
 var mysql_field_name($fields, $i);
 }

 }//class

 now.. can i do this?
 is there a performnance issue here?
 can i put this in the constructor?

 john




 Andrew Halliday wrote:

  yes you can do all of this
 
  but in no OO language so far have i seen the ability to access a
variable
  inside a method...you would have to do this:
 
  class myclass
  {
   var $myvar;
   function setmyvar($newmyvar)
   {
   $this-myvar = $newmyvar;
   }
  }
 
  Then you could do this:
 
  $myclassObj = new myclass();
  $myclassObj-setmyvar(10);
  echo $myclassObj-myvar;
 
  This would print '10'...
 
  Cut and paste that exact program in and it should be a working
demonstration
  ...
 
  You should read the php manual more ...
  see
  www.php.net
 
  AndrewH
  - Original Message -
  From: "John LYC" [EMAIL PROTECTED]
  To: "PHP List" [EMAIL PROTECTED]
  Sent: Monday, March 05, 2001 1:36 PM
  Subject: [PHP] simple OO question
 
   can i do this..?
  
   //declaring class
  
   class myclass{
  
   //declaring properties
   ...
   
  
   //declaring methods..
   function mymethod(){
  
   //can i declared variable in method?
   var $myvar;
   ...
   //do something
  
   }//end of mymethod
  
   ///
  
   if yes, do i access myvar like this.
   $item = new myclass;
   print $item-mymethod()-myvar;
  
  
   thanks
   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 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] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Ed Lazor


 However, if you want more control over the authentication process I suggest
 making your own login form and using cookies, instead of HTTP
 authentication. Then you can log users out just by unsetting the cookie(s).

This is how I will wind up going, EXCEPT the users will be required to 
click "logout", since merely closing the browser, in IE5.5, does not seem 
to clear the user/password from the browser's memory, NOR does it clear 
any session cookie.  Again, works fine in other browsers, per spec.

I tried to read up on this thread before responding, so please excuse me if 
I don't know all the facts.  Have you tried using PHP's sessions to track 
user logins?  If cookies are available, it takes advantage of them.  If 
not, a session tracking variable is automatically appended to the url.

For my own web site, I register a session variable.  For my situation, it 
happens to be an array, but you may not need this.

 if (! IsSet($user) ) {
 $user = array();
 session_register("user");
 $user["Username"] = "Guest";
 }

 From there, present the visitor with a login form.  Process the login form 
and set the $user["Username"] variable after you've confirmed their 
login.  If you want them to log out, they click a link taking them to a 
page that sets the variable back to $user["Username"] = "Guest".  Best of 
all, if they close their browser, the browser session is lost.

That setup allows people to work at a computer, logout of the web site, and 
allow someone else to login.  Or, they can just close the browser window 
and let someone else sit down to open a new browser window and login.

There's one thing you'll want to keep in mind, in case you don't already 
know it.  Each browser window you spawn from the original uses the same 
session.  If you login and then press CTRL-N to open additional windows, 
they will all use the same session.  Of course, the way around this is to 
just run separate copies of the program to gain additional windows.

Another thing of note, in case it will help, I'm using IE5.5 and don't 
experience the problems you've described.

-Ed


-- 
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: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Simon Garner

From: "Ken" [EMAIL PROTECTED]


 What Windows version is this under?

 Windows 98 and Mac OS 8 or 9.

 - Ken



Is IE set to "Launch browser windows in a separate process" (if that option
still exists in 5.5)? Have a look in Tools  Options  Advanced.

Perhaps if that is not checked, closing the window does not count as exiting
the browser?




-- 
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 OO question

2001-03-04 Thread Andrew Halliday

Ahh damn - minor omission - add a '( )' after myclass constructor name :-)

AndrewH

- Original Message -
From: "Andrew Halliday" [EMAIL PROTECTED]
To: "John LYC" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 05, 2001 2:47 PM
Subject: Re: [PHP] simple OO question


 No, you cant do this as you coded it, however minor alterations will allow
 this.
 Last time i checked, you couldnt initialise variables in object scope ...
 you can only declare them.  This makes sense, because thats what the
 constructor is for.

 Altered code for what you want to do is as follows:




 class myclass{
var $fields;
var $columns;

 function myclass { // constructor
   $this-fields =  mysql_list_fields("database1", "table1", $link);
   $this-columns = mysql_num_fields($fields);
  }

 // all code must be declared in a function !! - This isnt Java Script :)
 function doSomething() {
 for ($i = 0; $i  $this-columns; $i++) {
 var mysql_field_name($this-fields, $i);
}
  }//function doSomething()
 }//class


 $myobj = new myclass();  // creates object and runs constructor (see
above)
 $myobj-doSomething(); // do whatever you want the object to do



 Andrew H




  class myclass{
 
  $fields = mysql_list_fields("database1", "table1", $link);
  $columns = mysql_num_fields($fields);
 
  for ($i = 0; $i  $columns; $i++) {
  var mysql_field_name($fields, $i);
  }
 
  }//class
 
  now.. can i do this?
  is there a performnance issue here?
  can i put this in the constructor?
 
  john
 
 
 
 
  Andrew Halliday wrote:
 
   yes you can do all of this
  
   but in no OO language so far have i seen the ability to access a
 variable
   inside a method...you would have to do this:
  
   class myclass
   {
var $myvar;
function setmyvar($newmyvar)
{
$this-myvar = $newmyvar;
}
   }
  
   Then you could do this:
  
   $myclassObj = new myclass();
   $myclassObj-setmyvar(10);
   echo $myclassObj-myvar;
  
   This would print '10'...
  
   Cut and paste that exact program in and it should be a working
 demonstration
   ...
  
   You should read the php manual more ...
   see
   www.php.net
  
   AndrewH
   - Original Message -
   From: "John LYC" [EMAIL PROTECTED]
   To: "PHP List" [EMAIL PROTECTED]
   Sent: Monday, March 05, 2001 1:36 PM
   Subject: [PHP] simple OO question
  
can i do this..?
   
//declaring class
   
class myclass{
   
//declaring properties
...

   
//declaring methods..
function mymethod(){
   
//can i declared variable in method?
var $myvar;
...
//do something
   
}//end of mymethod
   
///
   
if yes, do i access myvar like this.
$item = new myclass;
print $item-mymethod()-myvar;
   
   
thanks
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 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] Re: IE 5.5,authentication,PHP sessions: IE never stops

2001-03-04 Thread Don Read


On 05-Mar-01 Ken wrote:
 At 04:11 PM 3/5/01 +1300, Simon Garner wrote:
From: "Ken" [EMAIL PROTECTED]
  Why it's bad is that, if the user clicks "cancel", they are not logged
out.  They have to manually clear the field, THEN OK, then they get prompted
AGAIN, THEN they hit cancel.  That's nuts, and my users aren't going to
understand that.
 

Why do they need to be able to log out?
 
 Because they are on a shared computer.
 
If the user doesn't want their password saved (e.g. they're on a public PC)
then they just uncheck the "Save password" box when logging in, and then
they can close the browser and be "logged out".

If they want their password saved then they can check the "Save password"
box and not worry.
 
 Nope - with IE5.5, even with that box NOT checked, the user remains logged
 in until either a) the computer is restarted, or b) a new
 user-authentication header is sent, AND the user clears out the password
 field and hits OK.  Otherwise the user stays logged in, in spite of the HTTP
 spec.
 
It sounds to me like you're trying to implement something that no users are
actually going to need or want...
 
 Nope, I'm working with a real client, who has multiple users on the same
 machine, and IE5.5 is installed on it, and, lo and behold, though the rest
 of the browsers work fine, IE5.5 has this awful bug.
 
However, if you want more control over the authentication process I suggest
making your own login form and using cookies, instead of HTTP
authentication. Then you can log users out just by unsetting the cookie(s).
 
 This is how I will wind up going, EXCEPT the users will be required to click
 "logout", since merely closing the browser, in IE5.5, does not seem to clear
 the user/password from the browser's memory, NOR does it clear any session
 cookie.  Again, works fine in other browsers, per spec.
 

Is this a NT-Domain network ? It's been a few years since i was sysadmining,
but the user might have to log off the network domain/workgroup to
re-select the credential file (luser.pwl file or whatever Bill  the boys
from Redmond call it now).
But i'll agree that if IE keeps the authentication after you close the browser,
it _is_ borken. 

Regards,
-- 
Don Read [EMAIL PROTECTED]
-- If you are going to sin, sin against God, not the bureaucracy. 
  God will forgive you but the bureaucrats won't. 

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




Re: [PHP] what does $$ mean?

2001-03-04 Thread Philip Olson

Check out :

http://php.net/manual/en/language.variables.variable.php

Example :

$a  = 'hi';

$$a = 'sup';

$hi now equals 'sup'


Regards,

Philip Olson
http://www.cornado.com/

On Sun, 4 Mar 2001, Ed Lazor wrote:

 I'm studying some code from the net and was kinda curious.  There are 
 places where it references variables like this:
 
   $$testvar
 
 What's the difference between that and
 
   $testvar
 
 ?
 
 -Ed
 
 
 -- 
 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] Re : [PHP] NETSCAPE screws QUERY STRING

2001-03-04 Thread John LYC

try this
printf(" a href=\"pro_page1.php3?title='%s\" ", urlencode($myrow[title])')

john

"Thomas Edison Jr." wrote:

 The urlencode() is working fine with an echo statement
  normal query string.

 But it's NOT working with complex query string in
 printf() including $myrow[something] being picked up
 by mySQL db.

 this works :

 a href="add_pro_over.php3?title=? echo
 urlencode($title) ?"

 this doesn't work :

 printf("a
 href=\"pro_page1.php3?title='urlencode($myrow[title])'\"")

 OR such combinations as given in the manual. I tried
 out almost all!!!

 HELP

 T. Edison jr.

 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 Homepage : http://www.abraxastech.com
 Email : [EMAIL PROTECTED]
 Tel : 91-4546512/4522124
 ***

 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/

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


-- 
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] Problem getting PostgreSQL to compile

2001-03-04 Thread K Old

Yes, I've checked phpinfo() and not it is not compiled in.  That is the 
problem.  I have recompiled PHP with pgsql support and there is some 
problem.  I'm not sure why it isn't compiling it in.  I've tried everything 
I knowthe installation goes fine...no error messages, everything seems 
ok.

Any ideas?


From: The Hermit Hacker [EMAIL PROTECTED]
To: K Old [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Problem getting PostgreSQL to compile
Date: Fri, 2 Mar 2001 22:30:11 -0400 (AST)


have you checked phpinfo() to make sure that pgsql support is actually
compiled in?  if so, any errors on connection, or just silently fails?

On Fri, 2 Mar 2001, K Old wrote:

  Hello,
 
  I'm running RH 7 and Apache.  I have the latest version of PostgreSQL 
and it
  is installed and running correctly.  I have installed PHP with the
  --with-pgsql and it seems to install everything needed, but when I try 
to
  use pg_connect() it fails to connect.  Any ideas what I can do?
 
  Thanks,
  Kevin
  [EMAIL PROTECTED]
  _
  Get your FREE download of MSN Explorer at http://explorer.msn.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]
 
 

Marc G. Fournier   ICQ#7615664   IRC Nick: 
Scrappy
Systems Administrator @ hub.org
primary: [EMAIL PROTECTED]   secondary: 
scrappy@{freebsd|postgresql}.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]


_
Get your FREE download of MSN Explorer at http://explorer.msn.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] File Upload doesn't work with Netscape Serious problem!

2001-03-04 Thread Dhaval Desai

Hi!


File upload doesn't work with Netscape Navigato. I
have Netscape COmmunicator 4.5. I try to upload files
and I get Network Error.


If it is working for any of you guys please give me
the URL so that I can test it out and check my
problem..

Help me out.


Thank You!
Cheers!~
Dhaval Desai

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




[PHP] Function to compare an array with another array

2001-03-04 Thread Jimmy Bäckström

Shu!
I need some help here.
I have a script where I want to compare two arrays with eachother, and return one 
value from that does not exists in both arrays. I have an array of pictures id number 
created from a database query. I use sessions to save id numbers of pictures into an 
array. I want the first array to be compared to the second and return the first 
key/value-pair that are not found in the session array...
Is there a way I can do this? 

Thankful for any help!
/Broder B



[PHP] Object Oriented Databases

2001-03-04 Thread Fabian Fabela

Hello.


I want to use an object oriented database, I have not researched a lot in this theme 
but I hope you can help me.

I want to use php, can I use it with any object oriented database, like goods, sod, 
groovy, ozone, objstore, db40?

Thank you for your help.


Fabian Fabela
[EMAIL PROTECTED]
www.vacagorda.com

"La informacin transmitida en el presente mensaje tiene la intencin de estar 
dirigida nicamente a la persona o entidad que se refiere y puede contener informacin 
privilegiada y/o confidencial. Cualquier, revisin, retransmisin, diseminacin o 
cualquier uso impropio o relacionado con dicha informacin por persona alguna distinta 
a la que fue dirigido este mensaje queda estrictamente prohibido. Si Usted ha recibido 
 este mensaje o sus anexos por error, favor de contactar al remitente y elimine el 
material de cualquier computadora."

"The information transmitted is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged material.  Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon, this information by persons or entities other than the intended recipient is 
prohibited.   If you received this in error, please contact the sender and delete the 
material from any computer."



[PHP] dealing with no record

2001-03-04 Thread [EMAIL PROTECTED]

People
If I run a sniplet like this:

**
$query="select name from foo";
$result= mysql_query($query);
while($row = mysql_fetch_row($result))
 stuff...to display record found
...
***
what am I suppose to do if I also want the code to be able to deal with the case that 
no record found  and redirect user to other page?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] NETSCAPE screw query string : THANKS ALL !!!!! SOLVED!!

2001-03-04 Thread Thomas Edison Jr.

Thanks to all of you guys for helpin me out solve this
otherwise horrendous task of making the query string
work in netscape. 

much thanks to Julian!!

Cheers,
T. Edison jr.


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




Re: [PHP] PHP web based mailing list administrator

2001-03-04 Thread Manuel Lemos

Hello Peter,

On 03-Mar-01 10:00:55, you wrote:

does there exist a web based mailing list administrator in PHP (Tying in 
with some open source mailing list software)?
Ideally, something like egroups (now groups.yahoo.com). I just want to be 
able to easily administrate (or have other people administrate) mailing 
lists. I have access to my own server (linux, php4, ...)

Maybe you would like to try this Ezmlm mailing list manager class that was
just released:

http://phpclasses.UpperDesign.com/browse.html/package/177

Web interface class to create and manage mailing lists with ezmlm. It features:

- Displays a table with the lists already created, showing the list local and domain 
parts and the number of current subscribers.
- Creation and alteration of list properties.
- Alteration of list automatic message texts.
- Support for list virtual hosts.
- Multi-idiom Web interface.

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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] dealing with no record

2001-03-04 Thread David Robley

On Tue,  6 Mar 2001 06:36, [EMAIL PROTECTED] wrote:

  People
 If I run a sniplet like this:

 **
 $query="select name from foo";
 $result= mysql_query($query);
 while($row = mysql_fetch_row($result))
  stuff...to display record found
 ...
 ***
 what am I suppose to do if I also want the code to be able to deal with
 the case that no record found  and redirect user to other page? Jack

$query="select name from foo";
$result= mysql_query($query);
if(mysql_num_rows($result) ==0)) {
  redirect
 }
else...


-- 
David Robley| WEBMASTER  Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
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] comparing values

2001-03-04 Thread Paul

below is the code I am using, $sourcefile is a url var
for example http://url/?sourcefile=/this/path/to/whatever.php

$filelist = array("",
"db_auth.conf",
"config.php",
"master.functions.inc"
);/* these are the files I want to protect from this
script */

function check_hackers($sourcefile, $filelist) {
$checkfile = explode("/", $sourcefile);/* seperate the
sourcefile var */
$disallowed = $checkfile[count($checkfile) -1];/* use only
the last  part (filename.ext) */
$filecount = count($filelist);/* count how many files in
array */
while ($tempcount  $filecount) {
$tempfile = $filelist[$tempcount];
if ($tempfile == $disallowed) {
$sourcefile = "source.inc";/* this is not
returned to the global space  why not ??? */
echo $disallowed;/* this will echo
the correct thing (config.php) */
echo $tempfile;/* this will echo
the correct thing (config.php) */
return $sourcefile;/* this doesn't work
either  what the ??? */
}
$tempcount++;
}
}

check_hackers($sourcefile, $filelist);

Can somebody tell me why this is not return $sourcefile = "source.inc"
 what am I doing wrong.
Can you please reply to [EMAIL PROTECTED]  PLEASE PLEASE 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]




Re: [PHP] IE 5.5,authentication,PHP sessions: IE never stops running?

2001-03-04 Thread Harshdeep S Jawanda

Hi,

Ken wrote:

 I'm experiencing strange behavior with my user authentication scheme in my PHP app, 
with users using IE 5.5 (PC and Mac).

 I am using browser authentication (WWW-Authenticate and 401 headers), "no cache" 
headers, and PHP 4 sessions.

 I am finding that even when the user totally quits IE, if he then restarts IE, one 
or both (haven't isolated for sure yet) of the following happen:

 - The browser still knows the user and password, and so will send it to the server 
upon an authentication request under the same realm, without prompting the user.  
(The user does NOT have "save this password" checked on the user/password prompt when 
it first comes up.)
 - The session is still active.  A call to session_start() returns the pre-existing 
session, instead of getting a new one.

Yes, this is a problem with IE. A lot depends on how IE is configured and exactly what 
shortcut users are using to start IE.

In IE's Tools  Internet Options  Advanced tab, make sure that the "Launch browser 
windows in separate processes" option is checked.

DO NOT use Ctrl + N to start up a new IE window - that way users will not get prompted 
for passwords.

Using any other shortcut to start IE should make it prompt for password.

All of the above is based on my experience with IE 5.0 but should be equally 
applicable to IE 5.5.

--
Regards,
Harshdeep Singh Jawanda.




-- 
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]