Re: [PHP] Why won`t this work??

2001-01-21 Thread bard

Try this...

?php
 if (!$UN)
 {
?
SCRIPT LANGUAGE=JAVASCRIPT
alert('Please enter a User Name.');
self.history.back();
/SCRIPT
?
 }
?

Cheers,

Brad

On Sun, 21 Jan 2001 [EMAIL PROTECTED] wrote:

 Hi,
 
 Can anyone tell me before I rip my hair out, why this won`t work??
 
 if (!UN)
 {
 printf("SCRIPT LANGUAGE='JAVASCRIPT'alert('Please enter a User 
 Name.');self.history.back();/SCRIPT");
 }
 
 TIA
 Ade
 
 



-- 
PHP General Mailing List (http://www.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] my cookies arent working!

2001-01-21 Thread Lucas Young

Hmmm, ok, so what else could I be missing that is stopping my cookies
working?

-Original Message-
From: Markus Fischer [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 21 January 2001 10:31 p.m.
To: Php-General
Subject: Re: [PHP] my cookies arent working!


On Sun, Jan 21, 2001 at 05:45:44PM +1300, Lucas Young wrote :
 I'm actually using code from the web - sympoll from www.ralusp.net and
 authlib, both give me errors and neither seems to be writing cookies... I
 note in PHP the session save path is /tmp, where should this folder live?

Where you think its best secure. Or no files at all and
sessions saved to database (with session_handlers).

But, what about cookies ? Session file layout has nothing to do
make cookies work or not.

m.

--
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0

--
PHP General Mailing List (http://www.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] Why won`t this work??

2001-01-21 Thread bard

On Sun, 21 Jan 2001, Alexander Wagner wrote:

 [EMAIL PROTECTED] wrote:
  Hi,
 
  Can anyone tell me before I rip my hair out, why this won`t work??
 
  if (!UN)
  {
  printf("SCRIPT LANGUAGE='JAVASCRIPT'alert('Please enter a User
  Name.');self.history.back();/SCRIPT");
  }
 
  TIA
  Ade
 
 An undefined constant will return true. You have to explicitly define 
 it as 0 to make this work.
 I guess this is becauese PHP interpretes it as a string, and all 
 strings but '' are true. It has to, because it doesn't know it is a 
 constant.
 
 Wagner
 

Plus, this is PHP, not javascript. Variables look like this, "$UN" not this, "UN".

Brad 


-- 
PHP General Mailing List (http://www.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] Upgrading to 4.04 question, but won't stick

2001-01-21 Thread Team JUMP Lists

We've had 4.01 running since July so I thought I'd upgrade to 4.04 from the
tarball last night. Everything went fine w/ the compile, no errors. Install
said all OK, Then i went and HUP'd apache but when I run phpinfo() the old
module is still loaded.

What am I doing wrong?  Where should I look to solve my problem. When I look
in the /modules/ directory the dates on the new modules are yesterday, so
they've all moved correctly, etc. I intentionally tried to break the
phpmodule to see which one I'm actually using by changing the name of the
file but that didn't work.

Linux 6.2, Apache 1.3.12., MySQL, PHP 4.01

Any help appreciated. If someone can just point me to an RPM that'll install
on RH 6.2, I'll just use that. The current RPM's over at RH won't install
because they are for RH 7.

TIA,

Charlie


-- 
PHP General Mailing List (http://www.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] MySQL replication

2001-01-21 Thread Andi Gutmans

Hey,

Have any of you guys worked with the latest and greatest MySQL replication?
Does it work? What are its ups and downs?

Andi


-- 
PHP General Mailing List (http://www.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] GetImageSize problem

2001-01-21 Thread Sue Bailey

I have a bunch of images living on one ISP's server which I want to use
on another page on another ISP's server, with GetImageSize. I RTFM, and
see "The filename needs to be either relative to the current document,
or an absolute filesystem path. Thus absolute URL paths will not work."
which is absolutely correct - I get an error msg "cannot open file".
$DOCUMENT_ROOT  is obviously no use to me - does anyone know any way
round this?

TIA, 

Sue

-- 
PHP General Mailing List (http://www.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 selected in form changes in next php page?!

2001-01-21 Thread Chris Hayes

Dear group,

in my first page i have a form selcting a file.
The names i used were csvfile, csv_file, and my_file.

After submitting the form the filename changed to a totally different file, 
likeC:\PHP\php72C3.TMP or C:\PHP\phpD2B4.TMP
(windows, apache, php4, internet explorer 5 as well as Mozilla 6)
What is happening?
code below.

Chris

##FORM

form name="form1" enctype="multipart/form-data" method="post" ACTION=?php 
echo "$PHP_SELF";? NAME="beheerform"
 input type="hidden" name="FILE_INVOEREN" value="zoek file (op eigen 
computer)"
 input type="file" name="my_file" onChange='javascript:alert(this.value);'
 input type="submit" name="Submit" value="Invoeren"
/form

## NEXT PAGE  (in main)
if (isset($FILE_INVOEREN)):
echo $my_file;
if ($my_file==0) die ("Selecteer een file!");







--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --


 

-- 
PHP General Mailing List (http://www.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] GetImageSize problem

2001-01-21 Thread Romulo Roberto Pereira

Hello!

First - some ISP block you from get files from their server by a httpd
request (that is what php does... I think!). To be sure if this is set or
not, in the other ISP (not the one that the images are) write a simple html
like this:

htmlheadtitleloading images between servers/title/headbody
brbr
img src="http://Domain/ImagesDir/ImagesName.gif"
/body/html

In "http://Domain/ImagesDir/ImagesName.gif" be sure to put the correct
domain and location of the image.

This should show the image... If not you could have two problems: the link
is wrong or the filter is set.

Imagine this - I have a web site in an ISP with my domain like:
http://www.mydomain.com and all the paths are gting the images from a free
server like geocities.com so I don;t expend money on buying large amounts of
bandwith for my site... If you think this way you know why they do that.

if this works, just use thi path "http://Domain/ImagesDir/ImagesName.gif" in
all your scripts for getimagesize...

I expect that this helps.

Rom



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




Re: [PHP] GetImageSize problem

2001-01-21 Thread Romulo Roberto Pereira

If you relly don't like the text jumping you can do a little script
that can parse the width and height for each image, I mean get this info
from the html files... But you will have to pin point each one... The good
thing that the script is here...

? #
   ## GetURLImageSize( $urlpic ) determines the
   ## dimensions of local/remote URL pictures.
   ## returns array with ( $width,$height,$type )
   ##
   ## Thanks to: Oyvind Hallsteinsen aka Gosub / ELq - [EMAIL PROTECTED]
   ## for the original size determining code
   ##
   ## PHP Hack by Filipe Laborde-Basto Oct 21/2000
   ## FREELY DISTRIBUTABLE -- use at your sole discretion! :) Enjoy.
   ## (Not to be sold in commercial packages though, keep it free!)
   ## Feel free to contact me at [EMAIL PROTECTED] (http://www.rezox.com)
   #

define(GIF_SIG, "\x47\x49\x46");
define(JPG_SIG, "\xff\xd8\xff");
define(PNG_SIG, "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a");
define(JPG_SOF0, "\xc0");  /* Start Of Frame N */
define(JPG_SOF1, "\xc1");  /* N indicates which compression process */
define(JPG_SOF2, "\xc2");  /* Only SOF0-SOF2 are now in common use */
define(JPG_SOF3, "\xc3");
define(JPG_SOF5, "\xc5");  /* NB: codes C4 and CC are NOT SOF markers */
define(JPG_SOF6, "\xc6");
define(JPG_SOF7, "\xc7");
define(JPG_SOF9, "\xc9");
define(JPG_SOF10, "\xca");
define(JPG_SOF11, "\xcb");
define(JPG_SOF13, "\xcd");
define(JPG_SOF14, "\xce");
define(JPG_SOF15, "\xcf");
define(JPG_EOI, "\xd9");   /* End Of Image (end of datastream) */
define(JPG_SOS, "\xda");  /* Start Of Scan - image data start */
define(RD_BUF, 512);   /* amount of data to initially read */

function GetURLImageSize( $urlpic

   $fd= @fopen($urlpic,"r");

fd){  
  #read in 1k, enough for GIF,PNG. 
  #continue to read from file, if the JPG chunk exceeds this 
  $imgData = fread( $fd,RD_BUF ); 


  if( substr($imgData,0,3)==GIF_SIG

 $dim =unpack ("v2dim",substr($imgData,6,4) );
 $width=$dim["dim1"]; $height=$dim["dim2"];
 $type = 1;
  } elseif( substr($imgData,0,8)==PNG_SIG

 $dim =unpack ("N2dim",substr($imgData,16,8) );
 $width=$dim["dim1"]; $height=$dim["dim2"];
 $type = 3;
  } elseif( substr($imgData,0,3)==JPG_SIG

 # JPG CHUNK SCAN 
 $imgPos = 2; $type = 2; $buffer = RD_BUF-2;
 while($imgPos  strlen($imgData))

/* synchronize to the marker 0xFF */
$imgPos=strpos($imgData,0xFF,$imgPos)+1;
$marker = $imgData[$imgPos];
do { $marker = ord($imgData[$imgPos++]); } while ($marker ==
255);
/* find dimensions of block */
switch (chr($marker))

  /* Grab width/height from SOF segment (these are acceptable
chunk types) */
  case JPG_SOF0:  case JPG_SOF1:  case JPG_SOF2:
  case JPG_SOF3:  case JPG_SOF5:  case JPG_SOF6:
  case JPG_SOF7:  case JPG_SOF9:  case JPG_SOF10:
  case JPG_SOF11: case JPG_SOF12: case JPG_SOF13:
  case JPG_SOF14: case JPG_SOF15:
  $dim =unpack ("n2dim",substr($imgData,$imgPos+3,4) );
  $height=$dim["dim1"]; $width=$dim["dim2"];
  break 2; file://found it so exit
case JPG_EOI:
case JPG_SOS:
  return FALSE;/* End loop in case we find one of these
markers */
default:/* We're not interested in other markers */
  $skiplen =
(ord($imgData[$imgPos++])8)+ord($imgData[$imgPos++])-2;
  /* if the skip is more than what we've read in, read more */
  $buffer -= $skiplen;
  if( $buffer512 ){ #if the buffer of data is too low,read more
file.
  $imgData .= fread( $fd,$skiplen+1024 );
  $buffer += $skiplen+1024;
  };
  $imgPos += $skiplen;
  break;
}; file://endif check marker type
 }; file://endif loop through JPG chunks
  }; file://endif chk for valid file types

  # got the pic dimensions, close the file
  fclose ($fd);

  return array( $width,$height,$type );
} else

  return array( '','','' );
}; file://endif valid file pointer chk
}; // end function
?

Rom
- Original Message -
From: Sue Bailey [EMAIL PROTECTED]
To: Romulo Roberto Pereira [EMAIL PROTECTED]
Cc: php-general [EMAIL PROTECTED]
Sent: Sunday, January 21, 2001 10:35 AM
Subject: Re: [PHP] GetImageSize problem


Thanks Rom - I can get the pics with an img src tag, which is why I
assumed that GetImageSize would also work - but now I'm told it only
works on the local machine, so I guess I'll have to live with text
jumping about while pics download. :(


Romulo Roberto Pereira wrote:

 Hello!

 First - some ISP block you from get files from their server by a httpd
 request (that is 

Re: [PHP] charactor problem

2001-01-21 Thread CC Zona

In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Rick 
Ridgeway) wrote:

   I grab this line and try to make it an array like this:
  print "line: $thelinefromfile\n";   //Check the line
   $var1 = trim($thelinefromfile);
   $var2 = split(" ", $thelinefromfile);
   $count = count($var2);
 
  Are you sure $thelinefromfile is actually being set correctly?
 
  Regards,
 
  Sean
 
 Yes
 I print it out it says "Array"
 so i then do
 print $thelinefromfile[0];
 and it prints out the whole line instead of the first field from the
 line...

You're print()ing in the order shown above, right?  Print() then trim() 
then split()?  Because that sounds like you're attempting to do a "split()" 
on an array.  That function is for turning a string into an array; if it's 
already an array, then just get rid of the split() and do your count() on 
$thelinefromfile.

-- 
CC

-- 
PHP General Mailing List (http://www.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] Build with Apache on Linux

2001-01-21 Thread Chris Mulcahy

OK, I've built Apache and PHP on Linux 50 times already.  Now it's causing
me problems.

I've rebuilt my server, I've tried PHP 4.0.3 and PHP 4.0.4.  It keeps
causing me problems.

I could not find libphp4.a and found on the net where someone suggested to
rename libmodphp4.a to libphp4.a.

During configure, I'm getting an error:
  /usr/bin/ld: cannot find -lmodphp4
  collect2: ld returned 1 exit status

It's making me insane.  Attached below is a complete transcript (it's small)
of the apache configure.  PHP configure; make; make install appears to work
perfectly, but it's not going so well with Apache.

Any suggestions greatly appreciated.

Thanks in advance.
Chris

--- BEGIN Transcript ---
[root@gumby apache_1.3.14]#
./configure --activate-module=src/modules/php4/libphp4.a
Configuring for Apache, Version 1.3.14
make
 + using installation path layout: Apache (config.layout)
 + activated php4 module (modules/php4/libphp4.a)
Creating Makefile
Creating Configuration.apaci in src
cd ..;
gcc  -DLINUX=2 -I/home/cmulcahy/transfer/php-4.0.3pl1 -I/home/cmulcahy/trans
fer/php-4.0.3pl1/main -I/home/cmulcahy/transfer/php-4.0.3pl1/main -I/home/cm
ulcahy/transfer/php-4.0.3pl1/Zend -I/home/cmulcahy/transfer/php-4.0.3pl1/Zen
d -I/home/cmulcahy/transfer/php-4.0.3pl1/TSRM -I/home/cmulcahy/transfer/php-
4.0.3pl1/TSRM -I/home/cmulcahy/transfer/php-4.0.3pl1 -DUSE_EXPAT -I./lib/exp
at-lite -DNO_DL_NEEDED `./apaci` -o helpers/dummy
lpers/dummy.c   -rdynamic -Lmodules/php4 -L../modules/php4 -L../../modules/p
hp4 -lmodphp4  -lpam  -ldl -lttf -lgd -lresolv -lm -ldl -lcrypt -lnsl  -lres
olv   -lm -lcrypt
/usr/bin/ld: cannot find -lmodphp4
collect2: ld returned 1 exit status
make: *** [dummy] Error 1
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
o php4_module uses ConfigStart/End
 + checking sizeof various data types
 + doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed.  The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

 Error Output for sanity check 
= End of Error Report =

 Aborting!



-- 
PHP General Mailing List (http://www.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 With passthru, system, exec

2001-01-21 Thread Pete Lavetsky

Hi Everyone,

I've been trying to write something to ping a URL on the system level, and
keep the output in an array.  I've been trying to work with system, exec,
and passthru, but it looks as though they all return only the last line of
the output.  How would I put the whole output into the array?  A different
function, or possible it was with backtics, though I couldn't find any
examples that did this.  Any help would be appreciated.

if($IP)
{
   $systemstring=escapeshellcmd("ping $IP -c 1");
   $array = passthru("$systemstring",$returnvalue);
   echo $array;  --  This outputs only the last line
}

Thanks,
Pete


-- 
PHP General Mailing List (http://www.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] Looking for a web host provider

2001-01-21 Thread Pascal Clerin

Hello

I am bored with my web host provider (www.linuwebhost.com) because it becomes 
unreachable several times a month (since 5 this morning I am not able to access my 
site...). 
In fact I need a good web host provider where I can host my site, with PHP(3 or 4), 
MySQL, 50MB, and more features as mail, php modules etc... that can support 300 users 
a day accessing a site with a lot of MySQL requests (I doubt that a server that hosts 
250 domains and has 512 MB will serve me, or not?).

Suppose that it could be possible to find that for good price (what is a good price?).

Thanks for any suggestions.

Pascal
-- 
___
Get your free email from http://www.graffiti.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] Looking for a web host provider

2001-01-21 Thread Kristi Russell

Check out www.webintellects.com.  To date, I haven't had any problems and
the service is $18.95 a month. 200MB of diskspace, 50 user accounts, PHP4,
MySQL, domain name hosting, etc.

Kristi

- Original Message -
From: "Pascal Clerin" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 21, 2001 12:15 PM
Subject: [PHP] Looking for a web host provider


 Hello

 I am bored with my web host provider (www.linuwebhost.com) because it
becomes unreachable several times a month (since 5 this morning I am not
able to access my site...).
 In fact I need a good web host provider where I can host my site, with
PHP(3 or 4), MySQL, 50MB, and more features as mail, php modules etc... that
can support 300 users a day accessing a site with a lot of MySQL requests (I
doubt that a server that hosts 250 domains and has 512 MB will serve me, or
not?).

 Suppose that it could be possible to find that for good price (what is a
good price?).

 Thanks for any suggestions.

 Pascal
 --
 ___
 Get your free email from http://www.graffiti.net

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



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




Re: [PHP] MySQL replication

2001-01-21 Thread Sean Cazzell

Andi,

No personal experience (yet), but there's a good article on phpbuilder
that you might want to take a look at if you haven't already:

http://www.phpbuilder.com/columns/tanoviceanu2912.php3


Regards,

Sean


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




[PHP-CVS] cvs: php4 / configure.in /ext/mysql/libmysql libmysql.c /ext/standard basic_functions.c dns.c file.c filestat.c fsock.c ftp_fopen_wrapper.c http_fopen_wrapper.c mail.c syslog.c /main fopen-wrappers.c network.c php_open_temporary_file.c

2001-01-21 Thread Rasmus Lerdorf

rasmus  Sun Jan 21 09:26:44 2001 EDT

  Modified files:  
/php4   configure.in 
/php4/ext/mysql/libmysqllibmysql.c 
/php4/ext/standard  basic_functions.c dns.c file.c filestat.c 
fsock.c ftp_fopen_wrapper.c http_fopen_wrapper.c 
mail.c syslog.c 
/php4/main  fopen-wrappers.c network.c php_open_temporary_file.c 
  Log:
  @BeOS patch from [EMAIL PROTECTED] modified somewhat by Rasmus
  BeOS patch from [EMAIL PROTECTED] modified somewhat by Rasmus
  
  

Index: php4/configure.in
diff -u php4/configure.in:1.213 php4/configure.in:1.214
--- php4/configure.in:1.213 Wed Jan 17 04:32:45 2001
+++ php4/configure.in   Sun Jan 21 09:26:43 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.213 2001/01/17 12:32:45 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.214 2001/01/21 17:26:43 rasmus Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -106,6 +106,8 @@
 CPPFLAGS="$CPPFLAGS -traditional-cpp";;
 *bsdi*)
 BSD_MAKEFILE=yes;;
+*beos*)
+   LIBS="$LIBS -lbe -lroot"
 esac
 
 AM_PROG_CC_STDC
@@ -294,6 +296,7 @@
 stdlib.h \
 string.h \
 syslog.h \
+sysexits.h \
 sys/file.h \
 sys/mman.h \
 sys/resource.h \
@@ -301,6 +304,7 @@
 sys/socket.h \
 sys/statfs.h \
 sys/statvfs.h \
+sys/sysexits.h \
 sys/time.h \
 sys/types.h \
 sys/varargs.h \
@@ -360,6 +364,8 @@
 gcvt \
 getlogin \
 gethostbyaddr \
+getprotobyname \
+getprotobynumber \
 getrusage \
 gettimeofday \
 gmtime_r \
Index: php4/ext/mysql/libmysql/libmysql.c
diff -u php4/ext/mysql/libmysql/libmysql.c:1.5 php4/ext/mysql/libmysql/libmysql.c:1.6
--- php4/ext/mysql/libmysql/libmysql.c:1.5  Fri Oct 20 15:26:48 2000
+++ php4/ext/mysql/libmysql/libmysql.c  Sun Jan 21 09:26:43 2001
@@ -25,7 +25,9 @@
 #if !defined(MSDOS)  !defined(__WIN__)
 #include sys/socket.h
 #include netinet/in.h
+#ifdef HAVE_ARPA_INET_H
 #include arpa/inet.h
+#endif
 #include netdb.h
 #ifdef HAVE_SELECT_H
 #  include select.h
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.299 
php4/ext/standard/basic_functions.c:1.300
--- php4/ext/standard/basic_functions.c:1.299   Wed Jan 17 12:37:48 2001
+++ php4/ext/standard/basic_functions.c Sun Jan 21 09:26:43 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.299 2001/01/17 20:37:48 elixer Exp $ */
+/* $Id: basic_functions.c,v 1.300 2001/01/21 17:26:43 rasmus Exp $ */
 
 #include "php.h"
 #include "php_main.h"
@@ -34,7 +34,9 @@
 #include time.h
 #include stdio.h
 #include netdb.h
+#if HAVE_ARPA_INET_H
 #include arpa/inet.h
+#endif
 #if HAVE_UNISTD_H
 #include unistd.h
 #endif
@@ -233,13 +235,19 @@
PHP_FE(mt_srand,   
 NULL)
PHP_FE(mt_getrandmax,   NULL)
PHP_FE(getservbyname, NULL)
+#if HAVE_GETSERVBYPORT
PHP_FE(getservbyport, NULL)
+#endif
+#if HAVE_GETPROTOBYNAME
PHP_FE(getprotobyname, NULL)
+#endif
+#if HAVE_GETPROTOBYNUMBER
PHP_FE(getprotobynumber, NULL)
+#endif
PHP_FE(gethostbyaddr,   NULL)
PHP_FE(gethostbyname,   NULL)
PHP_FE(gethostbynamel,  NULL)
-#if !defined(PHP_WIN32)||HAVE_BINDLIB
+#if HAVE_BINDLIB  !(defined(__BEOS__)||defined(PHP_WIN32))
PHP_FE(checkdnsrr, 
 NULL)
PHP_FE(getmxrr,
 second_and_third_args_force_ref)
 #else
@@ -429,7 +437,7 @@
PHP_FALIAS(socket_set_timeout, warn_not_available,  NULL)
 #endif
PHP_FE(socket_get_status,   NULL)
-#if !defined(PHP_WIN32) || defined(ZTS)
+#if (!defined(PHP_WIN32)  !defined(__BEOS__)) || defined(ZTS)
PHP_FE(realpath,NULL)
 #else
PHP_FALIAS(realpath,warn_not_available, NULL)
@@ -2196,6 +2204,7 @@
 
 /* {{{ proto string getservbyport(int port, string protocol)
Returns service name associated with port. Protocol must be "tcp" or "udp". */
+#if HAVE_GETSERVBYPORT
 PHP_FUNCTION(getservbyport)
 {
pval **port,**proto;
@@ -2214,11 +2223,13 @@
 
RETURN_STRING(serv-s_name,1);
 }
+#endif
 /* }}} */
 
 
 /* {{{ proto int getprotobyname(string name)
Returns protocol number associated with name as per /etc/protocols */
+#if HAVE_GETPROTOBYNAME
 PHP_FUNCTION(getprotobyname)
 {
pval **name;
@@ -2240,11 +2251,13 @@
 
RETURN_LONG(ent-p_proto);
 }
+#endif
 /* }}} */
 
 
 /* {{{ proto string getprotobynumber(int proto)
Returns protocol name associated with protocol number proto */
+#if HAVE_GETPROTOBYNUMBER
 PHP_FUNCTION(getprotobynumber)
 {
pval 

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

2001-01-21 Thread Rasmus Lerdorf

rasmus  Sun Jan 21 09:29:25 2001 EDT

  Modified files:  
/CVSROOTavail cvsusers gen_acl_file.m4 
  Log:
  doc account for Anderson da Silveira Fortaleza
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.49 CVSROOT/avail:1.50
--- CVSROOT/avail:1.49  Fri Jan 19 11:45:17 2001
+++ CVSROOT/avail   Sun Jan 21 09:29:24 2001
@@ -6,7 +6,7 @@
 
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,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason|php4,php3,php31,phpfi
 
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,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,hholzgra|functable
 avail|rasmus,sterling,jimw|pres
-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,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,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|phpdoc
+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,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,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|phpdoc
 avail|rasmus|php4/ext/aspell
 avail|andi|php4/ext/bcmath
 avail|NOBODY|php4/ext/calendar
Index: CVSROOT/cvsusers
diff -u CVSROOT/cvsusers:1.191 CVSROOT/cvsusers:1.192
--- CVSROOT/cvsusers:1.191  Mon Jan 15 09:12:59 2001
+++ CVSROOT/cvsusersSun Jan 21 09:29:24 2001
@@ -238,3 +238,4 @@
 jbi1979   Bokin Jung  [EMAIL PROTECTED]Korean 
translation
 elixerSean Bright [EMAIL PROTECTED]locale 
stuff
 malo  J.Anton, Lee[EMAIL PROTECTED]   Korean 
translation
+afortalezaAnderson da Silveira Fortaleza [EMAIL PROTECTED] 
+Brazilian Portuguese translation
Index: CVSROOT/gen_acl_file.m4
diff -u CVSROOT/gen_acl_file.m4:1.49 CVSROOT/gen_acl_file.m4:1.50
--- CVSROOT/gen_acl_file.m4:1.49Fri Jan 19 11:45:17 2001
+++ CVSROOT/gen_acl_file.m4 Sun Jan 21 09:29:24 2001
@@ -3,7 +3,7 @@
 dnl PHP Developers (full access to the source trees)
 define(`php_dev', 
`php_group,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,waldschrott,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason')
 dnl PHP Documentation Group
-define(`php_doc', 
`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')dnl
+define(`php_doc', 

Re: [PHP] Upgrading to 4.04 question, but won't stick

2001-01-21 Thread webbie

Quoting Team JUMP Lists [EMAIL PROTECTED]:

 We've had 4.01 running since July so I thought I'd upgrade to 4.04 from
 the
 tarball last night. Everything went fine w/ the compile, no errors.
 Install
 said all OK, Then i went and HUP'd apache but when I run phpinfo() the
 old
 module is still loaded.
 
 What am I doing wrong?  Where should I look to solve my problem. When I
 look
 in the /modules/ directory the dates on the new modules are yesterday,
 so
 they've all moved correctly, etc. I intentionally tried to break the
 phpmodule to see which one I'm actually using by changing the name of
 the
 file but that didn't work.
 
 Linux 6.2, Apache 1.3.12., MySQL, PHP 4.01
 
 Any help appreciated. If someone can just point me to an RPM that'll
 install
 on RH 6.2, I'll just use that. The current RPM's over at RH won't
 install
 because they are for RH 7.

Well, it's my opinion that on an RPM-package based system it is wise to do 
custom package installations via RPM also - so that you don't break the RPM 
dependency checking.

It's not that hard to grab the PHP4 SRPM from RedHat's Rawhide stash, install 
it, replace the tarball with the latest from php.net, and then build the RPM 
and then install it.  It's a bit of extra work, but it keeps RPM functioning 
properly.  If you need things like pdflib, it's not that hard to create the 
spec file and build it, too.

Lee Howard

-- 
PHP General Mailing List (http://www.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 21 Jan 2001 17:48:15 -0000 Issue 468

2001-01-21 Thread php-general-digest-help


php-general Digest 21 Jan 2001 17:48:15 - Issue 468

Topics (messages 35881 through 35908):

Re: " " charactor problem
35881 by: Sean Cazzell
35893 by: Rick Ridgeway
35902 by: CC Zona

imap_createmailbox
35882 by: Jochen Kächelin

Re: Sending a mail in HTML format
35883 by: Kristi Russell

Re: Cookies...
35884 by: Kristi Russell

Re: problem listing directory contents
35885 by: Vahan Yerkanian

Why won`t this work??
35886 by: Website4S.aol.com
35887 by: bard
35889 by: Alexander Wagner
35891 by: bard
35892 by: Alexander Wagner

Re: my cookies arent working!
35888 by: Markus Fischer
35890 by: Lucas Young

Upgrading to 4.04 question, but won't stick
35894 by: Team JUMP Lists
35908 by: webbie.server.deanox.com

MySQL replication
35895 by: Andi Gutmans
35907 by: Sean Cazzell

GetImageSize problem
35896 by: Sue Bailey
35898 by: Romulo Roberto Pereira
35899 by: Sue Bailey
35901 by: Romulo Roberto Pereira

file selected in form changes in next php page?!
35897 by: Chris Hayes

Re: ibase_num_fields() -a workaround ?
35900 by: Meir Kriheli - MKsoft

Build with Apache on Linux
35903 by: Chris Mulcahy

Help With passthru, system, exec
35904 by: Pete Lavetsky

Looking for a web host provider
35905 by: Pascal Clerin
35906 by: Kristi Russell

Administrivia:

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

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

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


--



 I grab this line and try to make it an array like this:
print "line: $thelinefromfile\n";   //Check the line
 $var1 = trim($thelinefromfile);
 $var2 = split(" ", $thelinefromfile);
 $count = count($var2);

Are you sure $thelinefromfile is actually being set correctly?


Regards,

Sean





Sean Cazzell wrote:

  I grab this line and try to make it an array like this:
 print "line: $thelinefromfile\n";   //Check the line
  $var1 = trim($thelinefromfile);
  $var2 = split(" ", $thelinefromfile);
  $count = count($var2);

 Are you sure $thelinefromfile is actually being set correctly?

 Regards,

 Sean

Yes
I print it out it says "Array"
so i then do
print $thelinefromfile[0];
and it prints out the whole line instead of the first field from the
line...

-- Rick Ridgeway







In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Rick 
Ridgeway) wrote:

   I grab this line and try to make it an array like this:
  print "line: $thelinefromfile\n";   //Check the line
   $var1 = trim($thelinefromfile);
   $var2 = split(" ", $thelinefromfile);
   $count = count($var2);
 
  Are you sure $thelinefromfile is actually being set correctly?
 
  Regards,
 
  Sean
 
 Yes
 I print it out it says "Array"
 so i then do
 print $thelinefromfile[0];
 and it prints out the whole line instead of the first field from the
 line...

You're print()ing in the order shown above, right?  Print() then trim() 
then split()?  Because that sounds like you're attempting to do a "split()" 
on an array.  That function is for turning a string into an array; if it's 
already an array, then just get rid of the split() and do your count() on 
$thelinefromfile.

-- 
CC




i have the following problem:

i have the possibility to create 100 different
pop-boxes and 100 different email-addresses.

the pop-boxes must have the following name:

wp-jk, wp-info and so on where
 stands for my custumer number an the text
after the '-' for the part of the email-address
before the '@'.

when I want to catch all email for

[EMAIL PROTECTED] I need the following:

host: mail.domain.de
username:   wp-jk
passwort:   **

When I will create a new pop-box and a new email-adress I use

$link=imap_open($MAILSERVER,$username, $passwort, OP_HALFOPEN);
$test = imap_createmailbox ($link,imap_utf7_encode
("{$MAILSERVER}INBOX.$newname"));

But how can I set the passwort for the new created pop-box?

Please help me.
THANXS!

--
**
* Jochen Kchelin*
* Ihr WEBberater - Werbeagentur Pulvermller *
* Stuttgarter Str. 3 - D-73033 Gppingen *
* www.wa-p.de - mailto:[EMAIL PROTECTED]  *
**





Nothing special, just add html at the beginning of what you're trying to
send as HTML. Always worked for me?

Kristi

- Original Message -
From: "Pascal Clerin" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 20, 2001 8:46 PM
Subject: [PHP] Sending a mail in HTML format


 Hello,

 I want to send a mail in HTML format with the mail() function.
 I have tried to send html stuff in the message parameter, but when I read
it
 in my hotmail account, I just see the html code and not what 

Re: [PHP] GetImageSize problem

2001-01-21 Thread Thies C. Arntzen

On Sun, Jan 21, 2001 at 03:05:31PM +, Sue Bailey wrote:
 I have a bunch of images living on one ISP's server which I want to use
 on another page on another ISP's server, with GetImageSize. I RTFM, and
 see "The filename needs to be either relative to the current document,
 or an absolute filesystem path. Thus absolute URL paths will not work."
 which is absolutely correct - I get an error msg "cannot open file".
 $DOCUMENT_ROOT  is obviously no use to me - does anyone know any way
 round this?

try the latest snapshot of PHP 4 from snaps.php.net. it
supports URLs in the getinagesize() function.

tc

-- 
PHP General Mailing List (http://www.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] W98se, PWS 4.0, IE 5.5 php wird nicht interpretiert

2001-01-21 Thread Philipp Althaus

trotz viel Nachlesen und ben schaffe ich es nicht php zum Laufen zu bringen.
Bin neu in der PHP-Welt. 

ich mchte PHP ausprobieren und local installieren auf Notebook zum Testen. 
Leider wird der php-Code nicht interpretiert. Nachfolgend meine Daten:

Problem:  php-Code wird nicht interpretiert

html
head
titleBeispiel/title
/head
body
test 1
?php echo "Hallo, ich bin ein PHP-Skript!"; ?
/body
/html

es wird nur test 1 angezeigt



Windows 98 SE  mit  PWS 4.0  Explorer 5.5  ,  PWS funktioniert
PWS-Basis-Verzeichnis : d:\windows\wwwroot


php-4.0.4-win32.zip gemss Anleitung installiert
d:\programme\php


php-4.0.4-installer.exe ausgefhrt


php registriert:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]
".php"="D:\Programme\php\sapi\php4isapi.dll"
".php3"="D:\Programme\php\sapi\php4isapi.dll"
".php4"="D:\Programme\php\sapi\php4isapi.dll"

HKEY_CLASSES_ROOT
.phpphpfile
.php3   "
.php4   "

phpfile shell open command  : d:\programme\php\sapi\php4isapi.dll

Explorer  5.5 erkennt php-Files als PHP-Script


php.ini angepasst:

;
; Paths and Directories ;
;
include_path =   d:\windows\wwwroot  
doc_root = d:\windows\wwwroot 
user_dir = d:\programme\php 
extension_dir = d:\programme\php\extensions 
enable_dl  = On 

[browscap]
;browscap = extra/browscap.ini
browscap = d:\windows\system\inetsrv\browscap.ini


wer weiss was falsch ist ?

Danke fr eine kurze Nachricht.

freundlich grsst Philipp



Re: [PHP] CF vs PHP for Creating PDF's

2001-01-21 Thread Michael Kimsal

We are doing some PDF work for a client in PHP.  Not quite sure how many 'tags'
CF has, but, although there are many, it's not an easy thing.  Lots of 'exact
positioning' for everything, and we ended up writing some routines ourselves to
handle textboxes and such.  You'll need to invest a bit of time, but I'd
imagine you would under cold fusion as well.

The cpdf1 service from adobe looks neat, but it also looks like it takes a
while - doesn't look like it'd be a good 'realtime' service to integrate with
your site.  If you need 'real time' PDFs you'll need to roll your own I'd
think.

Good luck.

DPG Account wrote:

 Hi-

 I'm new to this list. I'll start out with hopefully a good question. I have
 a project coming up where I need to take some form input insert it into a
 premade template and create a custom pdf for a user. The pdf will then be
 e-mailed to the user or a link to download it e-mailed to them.

 My question is, which would be better for doing this? I see Cold Fusion has
 some tags for creating pdf's but it looks like PHP has more capabilities
 along these lines. Also, I see Adobe (http://cpdf1.adobe.com/) has its own
 pdf service that might somehow be able to be taken advantage of.

 If anyone has some expertise and knowledge to share along these lines I
 would be grateful.

 Thanks for any help,
 ---
 | D A R K  P O R T A L  G A M E STony K. Bounds, Web Wizard   |
 | http://www.darkportalgames.com [EMAIL PROTECTED]  |
 |_|
 |  You provide the paper. We provide the adventure.   |
 ---



 --
 PHP General Mailing List (http://www.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] GetImageSize problem

2001-01-21 Thread eschmid+sic

On Sun, Jan 21, 2001 at 07:02:07PM +0100, Thies C. Arntzen wrote:
 On Sun, Jan 21, 2001 at 03:05:31PM +, Sue Bailey wrote:
  I have a bunch of images living on one ISP's server which I want to use
  on another page on another ISP's server, with GetImageSize. I RTFM, and
  see "The filename needs to be either relative to the current document,
  or an absolute filesystem path. Thus absolute URL paths will not work."
  which is absolutely correct - I get an error msg "cannot open file".
  $DOCUMENT_ROOT  is obviously no use to me - does anyone know any way
  round this?
 
 try the latest snapshot of PHP 4 from snaps.php.net. it
 supports URLs in the getinagesize() function.

Hi Sue,

Thies Arntzen made a typo, it is the getimagesize() function. Look at page
497 and use "string imagefile" in newer versions as URL.

-Egon

-- 
http://www.linuxtag.de/
http://php.net/books.php 
http://www.concert-band.de/
mailto:[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] solutions to disadvantages when register_globals is off

2001-01-21 Thread Dale Robinson

Everyone seems to recommend turning off register_globals, but accessing them
through $HTTP_POST_VARS["var_name"], gets tedious.

I haven't found a better solution (not to say there isn't one) than this
small snippet.

The idea is to turn off "register_globals", as I believe is heavily
recommended by the PHP team, and declare what variables you are expecting on
a per script basis.
Magic-quotes would also be off. Hopefully this makes all external variables
safe.

I was hoping some experienced users would cast their eye over this and
suggest any improvements, and comment if it is worth doing at all

define("ALLOWABLE_HTML_TAGS", "BH1");

function use_ext_var($var_name, $var_location)
{
global $$var_name, $$var_location;

$$var_name = ${$var_location}[$var_name];
$$var_name = stripslashes($$var_name);
$$var_name = strip_tags($$var_name, ALLOWABLE_HTML_TAGS);

}

use_ext_var("sample_var", "HTTP_GET_VARS");
print $sample_var;

How are other people handling this, or are most of you 'lazy' and just use
globals :)

Regards

D Robinson



-- 
PHP General Mailing List (http://www.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] W98se, PWS 4.0, IE 5.5 php wird nicht interpretiert

2001-01-21 Thread Sterling Hughes

Hoi,
Das hier ist eine rein-deutschsprachige Liste.  Bitte schicke deutsche
Mails an die deutsche PHP liste (php-center.de).

Danke,
Sterling


Philipp Althaus wrote:
 
 trotz viel Nachlesen und ben schaffe ich es nicht php zum Laufen zu bringen.
 Bin neu in der PHP-Welt.
 
 ich mchte PHP ausprobieren und local installieren auf Notebook zum Testen.
 Leider wird der php-Code nicht interpretiert. Nachfolgend meine Daten:
 
 Problem:  php-Code wird nicht interpretiert
 
 html
 head
 titleBeispiel/title
 /head
 body
 test 1
 ?php echo "Hallo, ich bin ein PHP-Skript!"; ?
 /body
 /html
 
 es wird nur test 1 angezeigt
 
 Windows 98 SE  mit  PWS 4.0  Explorer 5.5  ,  PWS funktioniert
 PWS-Basis-Verzeichnis : d:\windows\wwwroot
 
 php-4.0.4-win32.zip gemss Anleitung installiert
 d:\programme\php
 
 php-4.0.4-installer.exe ausgefhrt
 
 php registriert:
 
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map]
 ".php"="D:\Programme\php\sapi\php4isapi.dll"
 ".php3"="D:\Programme\php\sapi\php4isapi.dll"
 ".php4"="D:\Programme\php\sapi\php4isapi.dll"
 
 HKEY_CLASSES_ROOT
 .phpphpfile
 .php3   "
 .php4   "
 
 phpfile shell open command  : d:\programme\php\sapi\php4isapi.dll
 
 Explorer  5.5 erkennt php-Files als PHP-Script
 
 php.ini angepasst:
 
 ;
 ; Paths and Directories ;
 ;
 include_path =   d:\windows\wwwroot
 doc_root = d:\windows\wwwroot
 user_dir = d:\programme\php
 extension_dir = d:\programme\php\extensions
 enable_dl  = On
 
 [browscap]
 ;browscap = extra/browscap.ini
 browscap = d:\windows\system\inetsrv\browscap.ini
 
 wer weiss was falsch ist ?
 
 Danke fr eine kurze Nachricht.
 
 freundlich grsst Philipp

-- 
PHP General Mailing List (http://www.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] solutions to disadvantages when register_globals is off

2001-01-21 Thread Rasmus Lerdorf

For experienced PHP developers having register_globals on should not be a
security issue.  Injecting arbitrary variables into your symbol table is
only a problem if you arbitrarily use such variables without initializing
or checking them for validity.

I think the main point of concern here is that register_globals makes life
very easy on inexperienced developers and these are the same people most
likely to do something silly like:

?
include $file;
...
?

Note that doing:

?
include $HTTP_POST_VARS['file'];
...
?

really isn't any safer.  People won't be able to put file=/etc/passwd
right in the URL, but they can still trivially fake up a form post and
inject whatever value for 'file' into the POST data.

It all boils down to verifying any and all user-supplied data.

-Rasmus

On Sun, 21 Jan 2001, Dale Robinson wrote:

 Everyone seems to recommend turning off register_globals, but accessing them
 through $HTTP_POST_VARS["var_name"], gets tedious.

 I haven't found a better solution (not to say there isn't one) than this
 small snippet.

 The idea is to turn off "register_globals", as I believe is heavily
 recommended by the PHP team, and declare what variables you are expecting on
 a per script basis.
 Magic-quotes would also be off. Hopefully this makes all external variables
 safe.

 I was hoping some experienced users would cast their eye over this and
 suggest any improvements, and comment if it is worth doing at all

 define("ALLOWABLE_HTML_TAGS", "BH1");

 function use_ext_var($var_name, $var_location)
 {
 global $$var_name, $$var_location;

 $$var_name = ${$var_location}[$var_name];
 $$var_name = stripslashes($$var_name);
 $$var_name = strip_tags($$var_name, ALLOWABLE_HTML_TAGS);

 }

 use_ext_var("sample_var", "HTTP_GET_VARS");
 print $sample_var;

 How are other people handling this, or are most of you 'lazy' and just use
 globals :)

 Regards

 D Robinson



 --
 PHP General Mailing List (http://www.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] file selected in form changes in next php page?!

2001-01-21 Thread Andrew Sitnikov

Hello Chris,

http://www.php.net/manual/en/features.file-upload.php

CH Dear group,

CH in my first page i have a form selcting a file.
CH The names i used were csvfile, csv_file, and my_file.

CH After submitting the form the filename changed to a totally different file, 
CH likeC:\PHP\php72C3.TMP or C:\PHP\phpD2B4.TMP
CH (windows, apache, php4, internet explorer 5 as well as Mozilla 6)
CH What is happening?
CH code below.

CH Chris

CH ##FORM

CH form name="form1" enctype="multipart/form-data" method="post" ACTION=?php 
echo "$PHP_SELF";? NAME="beheerform"
CH  input type="hidden" name="FILE_INVOEREN" value="zoek file (op eigen 
computer)"
CH  input type="file" name="my_file" onChange='javascript:alert(this.value);'
CH  input type="submit" name="Submit" value="Invoeren"
CH /form

CH ## NEXT PAGE  (in main)
CH if (isset($FILE_INVOEREN)):
CH echo $my_file;
CH if ($my_file==0) die ("Selecteer een file!");

CH 
CH --  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
CH 

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109



-- 
PHP General Mailing List (http://www.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] W98se, PWS 4.0, IE 5.5 php wird nicht interpretiert

2001-01-21 Thread Sterling Hughes

[EMAIL PROTECTED] wrote:
 
 On Sun, Jan 21, 2001 at 09:40:01PM +0100, Sterling Hughes wrote:
  Hoi,
Das hier ist eine rein-deutschsprachige Liste.  Bitte schicke deutsche
  Mails an die deutsche PHP liste (php-center.de).
 
 Hei Sterling, this is a English speaking list. I know in Sdtirol our
 language is also recogniced. Have you seen too much snow?
 

Typo, englishsprachige, duh!

Brain konfuse much :)

-Sterling

-- 
PHP General Mailing List (http://www.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] solutions to disadvantages when register_globals is off

2001-01-21 Thread Dale Robinson

Thank for the extremely quick response,

So setting error_reproting to E_ALL, and making sure you take heed of any
"Undefined variable" notices, will allow you to use register_globals in
safety?

Regards
Dale Robinson

- Original Message -
From: "Rasmus Lerdorf" [EMAIL PROTECTED]
To: "Dale Robinson" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, January 21, 2001 7:42 PM
Subject: Re: [PHP] solutions to disadvantages when register_globals is off


 For experienced PHP developers having register_globals on should not be a
 security issue.  Injecting arbitrary variables into your symbol table is
 only a problem if you arbitrarily use such variables without initializing
 or checking them for validity.

 I think the main point of concern here is that register_globals makes life
 very easy on inexperienced developers and these are the same people most
 likely to do something silly like:

 ?
 include $file;
 ...
 ?

 Note that doing:

 ?
 include $HTTP_POST_VARS['file'];
 ...
 ?

 really isn't any safer.  People won't be able to put file=/etc/passwd
 right in the URL, but they can still trivially fake up a form post and
 inject whatever value for 'file' into the POST data.

 It all boils down to verifying any and all user-supplied data.

 -Rasmus

 On Sun, 21 Jan 2001, Dale Robinson wrote:

  Everyone seems to recommend turning off register_globals, but accessing
them
  through $HTTP_POST_VARS["var_name"], gets tedious.
 
  I haven't found a better solution (not to say there isn't one) than this
  small snippet.
 
  The idea is to turn off "register_globals", as I believe is heavily
  recommended by the PHP team, and declare what variables you are
expecting on
  a per script basis.
  Magic-quotes would also be off. Hopefully this makes all external
variables
  safe.
 
  I was hoping some experienced users would cast their eye over this and
  suggest any improvements, and comment if it is worth doing at all
 
  define("ALLOWABLE_HTML_TAGS", "BH1");
 
  function use_ext_var($var_name, $var_location)
  {
  global $$var_name, $$var_location;
 
  $$var_name = ${$var_location}[$var_name];
  $$var_name = stripslashes($$var_name);
  $$var_name = strip_tags($$var_name, ALLOWABLE_HTML_TAGS);
 
  }
 
  use_ext_var("sample_var", "HTTP_GET_VARS");
  print $sample_var;
 
  How are other people handling this, or are most of you 'lazy' and just
use
  globals :)
 
  Regards
 
  D Robinson
 
 
 
  --
  PHP General Mailing List (http://www.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] getting from PHP the vars that are in the memory during the execution of the script...

2001-01-21 Thread Chris Lee

$GLOBALS[] should have all varibales right ? maybe someone could correct me.

?
foreach($GLOBALS as $pos = $val)
{
echo "$pos : $valbr\n";
}
?


Chris Lee
Mediawaveonline.com


"Romulo Roberto Pereira" [EMAIL PROTECTED] wrote in message
001101c082eb$6536f5c0$[EMAIL PROTECTED]">news:001101c082eb$6536f5c0$[EMAIL PROTECTED]...
Hey!

Is it possible to get the names of the variables allocated in the memory?

thank you,

Rom




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




Re: [PHP] solutions to disadvantages when register_globals is off

2001-01-21 Thread Chris Lee

Simple solution to make sure the variables are POST

somepage.php?var_1=asdvar_2=qwevar_3=zxc
?
$var_1 = $HTTP_POST_VARS['var_1'];
$var_2 = $HTTP_POST_VARS['var_2'];
$var_3 = $HTTP_POST_VARS['var_3'];
?

This way var_1, var_2, var_3 will allways be POST vars and you can still
access them through $var_1, $var_2, $var_3

Ramus had a good note though, dont think just because its not a GET or
Cookie var that a user cant whip up a simple html POST page in about 10sec.

Chris Lee
Mediawaveonline.com



"Dale Robinson" [EMAIL PROTECTED] wrote in message
000d01c083e1$54610aa0$0201a8c0@celery">news:000d01c083e1$54610aa0$0201a8c0@celery...
 Everyone seems to recommend turning off register_globals, but accessing
them
 through $HTTP_POST_VARS["var_name"], gets tedious.

 I haven't found a better solution (not to say there isn't one) than this
 small snippet.

 The idea is to turn off "register_globals", as I believe is heavily
 recommended by the PHP team, and declare what variables you are expecting
on
 a per script basis.
 Magic-quotes would also be off. Hopefully this makes all external
variables
 safe.

 I was hoping some experienced users would cast their eye over this and
 suggest any improvements, and comment if it is worth doing at all

 define("ALLOWABLE_HTML_TAGS", "BH1");

 function use_ext_var($var_name, $var_location)
 {
 global $$var_name, $$var_location;

 $$var_name = ${$var_location}[$var_name];
 $$var_name = stripslashes($$var_name);
 $$var_name = strip_tags($$var_name, ALLOWABLE_HTML_TAGS);

 }

 use_ext_var("sample_var", "HTTP_GET_VARS");
 print $sample_var;

 How are other people handling this, or are most of you 'lazy' and just use
 globals :)

 Regards

 D Robinson



 --
 PHP General Mailing List (http://www.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] solutions to disadvantages when register_globals is off

2001-01-21 Thread Alex Black

 ?
 include $HTTP_POST_VARS['file'];
 ...
 ?
 
 really isn't any safer.  People won't be able to put file=/etc/passwd
 right in the URL, but they can still trivially fake up a form post and
 inject whatever value for 'file' into the POST data.
 
 It all boils down to verifying any and all user-supplied data.
 
 -Rasmus

totally :)

I toyed with turning off register globals in binarycloud, only to a) have
that pointed out to me, and b) realize that it would be a total hassle.

we're extremely paranoid about user input, and you have to get used to
making your code only accept _exactly_ what it is expecting with regards to
user input.

I've seen:

file.php?message=hello[EMAIL PROTECTED]

can you say spam-engine ?

:)

_alex


-- 
PHP General Mailing List (http://www.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] Upgrading to 4.04 question, but won't stick

2001-01-21 Thread Rasmus Lerdorf

 We've had 4.01 running since July so I thought I'd upgrade to 4.04 from the
 tarball last night. Everything went fine w/ the compile, no errors. Install
 said all OK, Then i went and HUP'd apache but when I run phpinfo() the old
 module is still loaded.

 What am I doing wrong?  Where should I look to solve my problem. When I look
 in the /modules/ directory the dates on the new modules are yesterday, so
 they've all moved correctly, etc. I intentionally tried to break the
 phpmodule to see which one I'm actually using by changing the name of the
 file but that didn't work.

You renamed the library and restarted the server and it still came up with
4.0.1?  If so, you are doing something dumb.  Like perhaps you compiled
4.0.1 statically into your httpd.  Check this by doing "httpd -l".  If you
see php listed you know it was compiled statically into your binary.

If it isn't static, go look at your LoadModule line in your httpd.conf and
see where it is loading the module from.  Make sure this is pointing at
this new module you built.

Also make sure that the web server you restarted is the right one.  I have
seen many people who install Apache and PHP without realizing that they
already have an Apache instance on their server.  And when they do an
apachectl restart the apachectl script actually restarts the wrong server
on them.

-Rasmus


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




Re: [PHP] Build with Apache on Linux

2001-01-21 Thread Markus Fischer

Why not building apache with dso support and build a
libphp4.so shared image ? Much less hassle.

m.

-- 
Markus Fischer,  http://josefine.ben.tuwien.ac.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0

-- 
PHP General Mailing List (http://www.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/apache mod_php4.c

2001-01-21 Thread Zeev Suraski

zeevSun Jan 21 16:06:52 2001 EDT

  Modified files:  
/php4/sapi/apache   mod_php4.c 
  Log:
  Don't overwrite PATH_TRANSLATED if it exists
  
  
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.84 php4/sapi/apache/mod_php4.c:1.85
--- php4/sapi/apache/mod_php4.c:1.84Wed Jan  3 14:45:11 2001
+++ php4/sapi/apache/mod_php4.c Sun Jan 21 16:06:52 2001
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: mod_php4.c,v 1.84 2001/01/03 22:45:11 zeev Exp $ */
+/* $Id: mod_php4.c,v 1.85 2001/01/22 00:06:52 zeev Exp $ */
 
 #define NO_REGEX_EXTRA_H
 #ifdef WIN32
@@ -225,25 +225,35 @@
array_header *arr = table_elts(((request_rec *) 
SG(server_context))-subprocess_env);
table_entry *elts = (table_entry *) arr-elts;
char *script_filename=NULL;
+   zval **path_translated;
+   HashTable *symbol_table;
 
for (i = 0; i  arr-nelts; i++) {
char *val;
 
if (elts[i].val) {
val = elts[i].val;
-   if (!strcmp(elts[i].key, "SCRIPT_FILENAME")) {
-   script_filename = val;
-   }
} else {
val = empty_string;
}
php_register_variable(elts[i].key, val, track_vars_array  ELS_CC 
PLS_CC);
}
 
-   /* insert special variables */
-   if (script_filename) {
-   php_register_variable("PATH_TRANSLATED", script_filename, 
track_vars_array ELS_CC PLS_CC);
+   /* If PATH_TRANSLATED doesn't exist, copy it from SCRIPT_FILENAME */
+   if (track_vars_array) {
+   symbol_table = track_vars_array-value.ht;
+   } else if (PG(register_globals)) {
+   /* should never happen nowadays */
+   symbol_table = EG(active_symbol_table);
+   } else {
+   symbol_table = NULL;
+   }
+   if (symbol_table
+!zend_hash_exists(symbol_table, "PATH_TRANSLATED", 
+sizeof("PATH_TRANSLATED"))
+zend_hash_find(symbol_table, "SCRIPT_FILENAME", 
+sizeof("SCRIPT_FILENAME"), (void **) path_translated)) {
+   php_register_variable("PATH_TRANSLATED", Z_STRVAL_PP(path_translated), 
+track_vars_array ELS_CC PLS_CC);
}
+
php_register_variable("PHP_SELF", ((request_rec *) SG(server_context))-uri, 
track_vars_array ELS_CC PLS_CC);
 }
 



-- 
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 / NEWS

2001-01-21 Thread Zeev Suraski

zeevSun Jan 21 16:11:44 2001 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Update and pastify NEWS
  
  
Index: php4/NEWS
diff -u php4/NEWS:1.566 php4/NEWS:1.567
--- php4/NEWS:1.566 Sun Jan 21 09:36:46 2001
+++ php4/NEWS   Sun Jan 21 16:11:43 2001
@@ -2,7 +2,9 @@
 |||
 
 ?? ??? 200?, Version 4.0.5
-- Fix crash bug in highlight_string() (Rasmus)
+- Fixed the Apache module to overwrite PATH_TRANSLATED with SCRIPT_FILENAME,
+  only if PATH_TRANSLATED is not previously set (Zeev)
+- Fixed crash bug in highlight_string() (Rasmus)
 - Added URL support for getimagesize() function (Jani)
 - Added xslt_set_scheme_handler() function ([EMAIL PROTECTED])
 - Added the pg_lolseek and pg_lotell functions (Derick)
@@ -11,7 +13,7 @@
   offset. (Andrei)
 - Changed 'Z' flag to date() to always return timezone offset with
   negative sign if it's west of UTC. (Andrei)
-- Add the HTML_Processor class which provides common functions for processing HTML.
+- Added the HTML_Processor class which provides common functions for processing HTML.
   (Sterling)
 - Added localeconv() and strcoll() functions for localization. (Sean)
 - Added the xslt_set_base function. (Sterling)
@@ -26,7 +28,7 @@
 - Made fopen() of HTTP URL follow redirects, $http_response_header will
   contain all headers with empty string as delimiter (Stig Venaas)
 - Added Console_Getopt class for parsing command-line args. (Andrei, PEAR)
-- Add an experimental version of the ZZipLib extension which provides the
+- Added an experimental version of the ZZipLib extension which provides the
   ability to read zip files. (Sterling)
 - Allow access to uploaded files in safe_mode. Beware that you can only
   read the file. If you copy it to new location the copy will not have the
@@ -38,7 +40,7 @@
 - Changed ldap_search() and added functions ldap_parse_result(),
   ldap_first_reference(), ldap_next_reference() and ldap_parse_reference()
   to cope with LDAPv3 stuff like referrals and references. (Stig Venaas)
-- Fix date('r') overflow
+- Fixed date('r') overflow
 - Made the php.ini path reported in phpinfo() always point to the absolute
   path that was opened (Zeev)
 - Made the INI mechanism thread safe (Zeev, Zend engine)



-- 
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] CF vs PHP for Creating PDF's

2001-01-21 Thread Michael Stearne

You might look into HTMLDOC.  This progam takes HTML files as input and converts them 
to PDF.  You could create a template in HTML, use PHP to replace to user specific 
fields and then call HTMLDOC to create the PDF.  HTMLDOC is located at 
http://easysw.com/htmldoc/

Michael


On Saturday, January 20, 2001, at 08:45 PM, DPG Account wrote:

 Hi- 
  
 I'm new to this list. I'll start out with hopefully a good question. I have 
 a project coming up where I need to take some form input insert it into a 
 premade template and create a custom pdf for a user. The pdf will then be 
 e-mailed to the user or a link to download it e-mailed to them. 
  
 My question is, which would be better for doing this? I see Cold Fusion has 
 some tags for creating pdf's but it looks like PHP has more capabilities 
 along these lines. Also, I see Adobe (http://cpdf1.adobe.com/) has its own 
 pdf service that might somehow be able to be taken advantage of. 
  
 If anyone has some expertise and knowledge to share along these lines I 
 would be grateful. 
  
 Thanks for any help, 
 --- 
 | D A R K  P O R T A L  G A M E STony K. Bounds, Web Wizard   | 
 | http://www.darkportalgames.com [EMAIL PROTECTED]  | 
 |_| 
 |  You provide the paper. We provide the adventure.   | 
 --- 
  
   
  
  
 --  
 PHP General Mailing List (http://www.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] mysql_fetch_array strangeness

2001-01-21 Thread Jaxon

Hi,

I'm trying to echo out the field names used as key values in a
mysql_fetch_array:

$link_id = mysql_connect("localhost", "root", $pass);

mysql_select_db("database", $link_id);

$result = mysql_query("select * from lists where id = 1", $link_id);

$rowData = mysql_fetch_array($result);

while (list($fieldName) = each($rowData))
{ echo "$fieldName,"; }

I'm expecting to get this:

id,listname,joinconfirm,leaveconfirm,homepage,author,canjoin,bannedemails,de
scription,subject,masteremail,

but instead getting this:

0,id,1,listname,2,joinconfirm,3,leaveconfirm,4,homepage,5,author,6,canjoin,7
,bannedemails,8,description,9,subject,10,masteremail,

Why are the index numbers for the array showing up?  From the docs,
mysql_fetch_array should create an array of field names to field values...?
To make things worse, if I also echo the data:

while (list($fieldName,  $fieldValue) = each($rowData))
{ echo "$fieldName,$fieldValue," ;}

Then a value is echoed after both the index number and the field value, eg:

0,1,id,1,1,testlist,listname,testlist,  etc...

What am I doing wrong?

Regards,
Jaxon


-- 
PHP General Mailing List (http://www.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 / commitinfo loginfo

2001-01-21 Thread Jim Winstead

jimwSun Jan 21 18:12:51 2001 EDT

  Modified files:  
/CVSROOTcommitinfo loginfo 
  Log:
  the generated manuals are now gone from cvs, so enable cvs emails from phpweb/manual 
again
  
Index: CVSROOT/commitinfo
diff -u CVSROOT/commitinfo:1.10 CVSROOT/commitinfo:1.11
--- CVSROOT/commitinfo:1.10 Sun Jan 14 08:09:44 2001
+++ CVSROOT/commitinfo  Sun Jan 21 18:12:50 2001
@@ -1,5 +1,5 @@
 #
-#ident "@(#)cvs/examples:$Name:  $:$Id: commitinfo,v 1.10 2001/01/14 16:09:44 rasmus 
Exp $"
+#ident "@(#)cvs/examples:$Name:  $:$Id: commitinfo,v 1.11 2001/01/22 02:12:50 jimw 
+Exp $"
 #
 # The "commitinfo" file is used to control pre-commit checks.
 # The filter on the right is invoked with the repository and a list 
@@ -29,7 +29,6 @@
 # The next two lines prevent massive cvs commit messages from being
 # mailed out.  It would be nice if we could instead just send the 
 # commit log for these ones.
-.*manual.* /bin/true
 .*distributions.*  /bin/true
 
 DEFAULT$CVSROOT/CVSROOT/commitinfo.pl
Index: CVSROOT/loginfo
diff -u CVSROOT/loginfo:1.35 CVSROOT/loginfo:1.36
--- CVSROOT/loginfo:1.35Wed Dec 13 16:34:34 2000
+++ CVSROOT/loginfo Sun Jan 21 18:12:50 2001
@@ -1,5 +1,5 @@
 #
-#ident "@(#)cvs/examples:$Name:  $:$Id: loginfo,v 1.35 2000/12/14 00:34:34 jimw Exp $"
+#ident "@(#)cvs/examples:$Name:  $:$Id: loginfo,v 1.36 2001/01/22 02:12:50 jimw Exp $"
 #
 # The "loginfo" file is used to control where "cvs commit" log information
 # is sent.  The first entry on a line is a regular expression which is tested
@@ -38,11 +38,7 @@
 asf $CVSROOT/CVSROOT/log -s -f $CVSROOT/CVSROOT/mylog_asf -m 
[EMAIL PROTECTED] -u $USER %s
 imapd $CVSROOT/CVSROOT/log -s -f $CVSROOT/CVSROOT/mylog -m [EMAIL PROTECTED] -u 
$USER %s
 
-# this just goes to jim temporarily
-php-site $CVSROOT/CVSROOT/loginfo.pl [EMAIL PROTECTED] $USER %{sVv}
-
-# old php website
-.*manual.* $CVSROOT/CVSROOT/log -s -f $CVSROOT/CVSROOT/mylog -u $USER %s
+# php website
 .*distributions.* $CVSROOT/CVSROOT/log -s -f $CVSROOT/CVSROOT/mylog -u $USER %s
 phpweb $CVSROOT/CVSROOT/loginfo.pl [EMAIL PROTECTED] $USER %{sVv}
 phpdoc $CVSROOT/CVSROOT/loginfo.pl [EMAIL PROTECTED] $USER %{sVv}



-- 
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] Verifying against a file

2001-01-21 Thread Richard Lynch

 $fd=fopen("words.txt", "r");

Check that $fd is not 0.

 $words = fread($fd, 100);

 I then convert a string which is passed in a form to this script

 $FirstName=strtolower("$FirstName");

 And now I check to see if the lowercase version of $FirstName contains any
of
 the words from the $words

 if ($FirstName=="$words")
 {
 echo "Bad";
 }

 But it doesn`t seem to want to work, anyone give me a pointer as to where
I
 am going wrong with this??

What you have will work only if the file has *EXACTLY* the lower-case of the
$FirstName, with no newlines, and no other names in the file, and the one in
the file must not be Mixed Case.

You are probably looking for something more like this:

if (stristr($words, $FirstName)){
echo "Bad";
}

http://php.net/stristr



-- 
PHP General Mailing List (http://www.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] MySQL Access Denied

2001-01-21 Thread Richard Lynch

 I am trying to conect to a MySQL db and no matter what code I use I am
always
 getting denied, I know the password is correct as I have tested it
elsewhere.
 Just wondering if this could be caused by the fact that the password has a
+
 and a . in it. Would that get me denied, and how can I get around it other
 than changing the PW ??

Can you use the same username/password to start the "mysql" monitor on the
machine with the database on it?

If so, perhaps you've set it up so only the same machine can use that
username/password, but not an external machine.

By Day:|By Night:
Don't miss the Zend Web Store's|   There's not enough room here...
Grand Opening on January 23, 2001! |   Start here:
http://www.zend.com|   http://l-i-e.com/artists.htm



-- 
PHP General Mailing List (http://www.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 With passthru, system, exec

2001-01-21 Thread Richard Lynch

 I've been trying to write something to ping a URL on the system level, and
 keep the output in an array.  I've been trying to work with system, exec,
 and passthru, but it looks as though they all return only the last line of
 the output.  How would I put the whole output into the array?  A different

They all *return* the last line, but exec (and some others) accept an array
they can "fill up" with the data you want.

?php
$cmd = "ping $IP -c 1";
exec($cmd, $results, $error);
while (list(,$line) = each($results)){
echo $line, "BR\n";
}
if ($error){
echo "OS Error $error.  Usually path/permissions.";
}
?



-- 
PHP General Mailing List (http://www.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] RE: [PHP-CVS-DAILY] cvs: php4 / ChangeLog

2001-01-21 Thread Warwick Smith

unsubscribe

Regards,

Warwick Smith
Electronic Services Officer / Webmaster
Email: [EMAIL PROTECTED]
Web:   http://www.imvs.sa.gov.au

-Original Message-
From: changelog [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 12:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP-CVS-DAILY] cvs: php4 / ChangeLog


changelog   Sun Jan 21 18:09:11 2001 EDT

  Modified files:
/php4   ChangeLog
  Log:
  ChangeLog update

Index: php4/ChangeLog
diff -u php4/ChangeLog:1.595 php4/ChangeLog:1.596
--- php4/ChangeLog:1.595Sat Jan 20 18:09:12 2001
+++ php4/ChangeLog  Sun Jan 21 18:09:09 2001
@@ -1,3 +1,26 @@
+2001-01-21  Rasmus Lerdorf  [EMAIL PROTECTED]
+
+* NEWS: This probably should have a NEWS entry
+
+* main/fopen-wrappers.c
+  main/network.c
+  main/php_open_temporary_file.c
+  configure.in
+  ext/mysql/libmysql/libmysql.c
+  ext/standard/basic_functions.c
+  ext/standard/dns.c
+  ext/standard/file.c
+  ext/standard/filestat.c
+  ext/standard/fsock.c
+  ext/standard/ftp_fopen_wrapper.c
+  ext/standard/http_fopen_wrapper.c
+  ext/standard/mail.c
+  ext/standard/syslog.c:BeOS patch from [EMAIL PROTECTED]
modified somewhat by Rasmus
+
+2001-01-21  Jani Taskinen  [EMAIL PROTECTED]
+
+* ext/bz2/config.m4: Remove double 'yes' output.
+
 2001-01-20  Sterling Hughes  [EMAIL PROTECTED]

 * ext/sablot/sablot.c:



-- 
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] cookie paths are really confusing me...please help!

2001-01-21 Thread Noah Spitzer-Williams

ok here's what i get from php.net:

SetCookie()'s behavior is dependant on where it is called within the web
document tree. For example, setting a cookie from a php script in a
directory makes that cookie available only to other scripts in that
directory and its subdirectories. However, setting a cookie of the same name
from a script in the directory's parent directory will override all cookies
of that name in the parent directory's subdirectories.

scenario: im browsing a file in lets call directory 'test'. this file is
including a file in the parent directory. this included file is setting a
cookie.

the problem is when i goto directory 'test2' and use this same included file
in the parent directory, it cant find the cookie.

how should be setting this cookie??

- Noah



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




RE: [PHP] cookie paths are really confusing me...please help!

2001-01-21 Thread Jason Murray

 scenario: im browsing a file in lets call directory 'test'. 
 this file is including a file in the parent directory. this included 
 file is setting a cookie.

The point here is that the file is being *included*, therefore the
cookie will only be local to that "test" directory, regardless of
where the file that sets the cookie lives.

 the problem is when i goto directory 'test2' and use this 
 same included file in the parent directory, it cant find the 
 cookie.
 
 how should be setting this cookie??

I mainly set my cookies with a path of "/". Saves hassles, and the
cookie is accessible everywhere.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!

-- 
PHP General Mailing List (http://www.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] mysql_fetch_array strangeness

2001-01-21 Thread Kristi Russell

each() assigns four elements... (0 = index), (1 = value), (key = index), (value = 
value)

You are concerned with key and value.
So: list ($fieldname, $value) = each($row)

You may not be using $value but you still need to assign the data to a variable. Or 
list will only assign $fieldname the numerical
index and not the char index. At least that's from what I understand.  Anyone, please 
feel free to correct me.

Kristi


Beware of the false gods we sometimes
worship--money, power and fame--for they
are all fleeting, especially in death and often
in mortality.
   -Anonymous

- Original Message -
From: "Jaxon" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 21, 2001 8:07 PM
Subject: [PHP] mysql_fetch_array strangeness


 Hi,

 I'm trying to echo out the field names used as key values in a
 mysql_fetch_array:

 $link_id = mysql_connect("localhost", "root", $pass);

 mysql_select_db("database", $link_id);

 $result = mysql_query("select * from lists where id = 1", $link_id);

 $rowData = mysql_fetch_array($result);

 while (list($fieldName) = each($rowData))
 { echo "$fieldName,"; }

 I'm expecting to get this:

 id,listname,joinconfirm,leaveconfirm,homepage,author,canjoin,bannedemails,de
 scription,subject,masteremail,

 but instead getting this:

 0,id,1,listname,2,joinconfirm,3,leaveconfirm,4,homepage,5,author,6,canjoin,7
 ,bannedemails,8,description,9,subject,10,masteremail,

 Why are the index numbers for the array showing up?  From the docs,
 mysql_fetch_array should create an array of field names to field values...?
 To make things worse, if I also echo the data:

 while (list($fieldName,  $fieldValue) = each($rowData))
 { echo "$fieldName,$fieldValue," ;}

 Then a value is echoed after both the index number and the field value, eg:

 0,1,id,1,1,testlist,listname,testlist,  etc...

 What am I doing wrong?

 Regards,
 Jaxon


 --
 PHP General Mailing List (http://www.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] - printing 2 dim. array

2001-01-21 Thread Ray Iftikhar

Hello,
I have a file...its contents are as follows:
Name of person1, string1
Name of person, string
Name of person, string
Name of person, string
Name of person, string

-- 
PHP General Mailing List (http://www.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] - alphabetizing

2001-01-21 Thread Ray Iftikhar

Hello,
I was just typing a msg and accidentally hit send before I could
finish.. sorry..

I have a file, its contents are as follows:

Name of person1, string1
Name of person2, string2
Name of person3, string3
Name of person4, string4
Name of person5, string5

I want to alphabetize the list from A-Z (using the first column as the
primer key). I was planng on using an array, but I would have to use a 2
dimensional array and I am not too swift on those..

Thanx,
Ray..


-- 
PHP General Mailing List (http://www.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] - alphabetizing

2001-01-21 Thread Josh G

Just build an assosciative array like so

$arr["person1"] = "string1";
$arr["person2"] = "string2";
$arr["person3"] = "string3";

$arr = asort($arr);

this should do what you're looking for.

Gfunk -  http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
  

- Original Message - 
From: "Ray Iftikhar" [EMAIL PROTECTED]
To: "Php-General List" [EMAIL PROTECTED]
Sent: Monday, January 22, 2001 2:52 PM
Subject: [PHP] [php] - alphabetizing


 Hello,
 I was just typing a msg and accidentally hit send before I could
 finish.. sorry..
 
 I have a file, its contents are as follows:
 
 Name of person1, string1
 Name of person2, string2
 Name of person3, string3
 Name of person4, string4
 Name of person5, string5
 
 I want to alphabetize the list from A-Z (using the first column as the
 primer key). I was planng on using an array, but I would have to use a 2
 dimensional array and I am not too swift on those..
 
 Thanx,
 Ray..
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




Re: [PHP] [php] - alphabetizing

2001-01-21 Thread Sean Cazzell

Ray,

You could create an array where the keys are the person names and the
values are the strings. For example:

$people_strings = array ("joe" = "bar", "andy" = "foo");
ksort($people_strings);
reset($people_strings);
while (list ($key, $value) = each ($people_strings)) {
print "$key - $value\n";
}

That should print out:

andy - foo
joe - bar

The ksort is the magic part, it sorts arrays by their keys.


Regards,

Sean Cazzell


-- 
PHP General Mailing List (http://www.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] Build with Apache on Linux

2001-01-21 Thread johnny p.

Try following the instructions on the devshed page:
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/

This is an awesome tutorial to get things up and running for a standard web
serveer install with Apache, PHP, MySQL, and SSL, if you need it.

johnny p.

 -Original Message-
 From: Chris Mulcahy [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, January 21, 2001 10:07 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Build with Apache on Linux


 OK, I've built Apache and PHP on Linux 50 times already.  Now it's causing
 me problems.

 I've rebuilt my server, I've tried PHP 4.0.3 and PHP 4.0.4.  It keeps
 causing me problems.

 I could not find libphp4.a and found on the net where someone suggested to
 rename libmodphp4.a to libphp4.a.

 During configure, I'm getting an error:
   /usr/bin/ld: cannot find -lmodphp4
   collect2: ld returned 1 exit status

 It's making me insane.  Attached below is a complete transcript
 (it's small)
 of the apache configure.  PHP configure; make; make install
 appears to work
 perfectly, but it's not going so well with Apache.

 Any suggestions greatly appreciated.

 Thanks in advance.
 Chris

 --- BEGIN Transcript ---
 [root@gumby apache_1.3.14]#
 ./configure --activate-module=src/modules/php4/libphp4.a
 Configuring for Apache, Version 1.3.14
 make
  + using installation path layout: Apache (config.layout)
  + activated php4 module (modules/php4/libphp4.a)
 Creating Makefile
 Creating Configuration.apaci in src
 cd ..;
 gcc  -DLINUX=2 -I/home/cmulcahy/transfer/php-4.0.3pl1
 -I/home/cmulcahy/trans
 fer/php-4.0.3pl1/main -I/home/cmulcahy/transfer/php-4.0.3pl1/main
 -I/home/cm
 ulcahy/transfer/php-4.0.3pl1/Zend
 -I/home/cmulcahy/transfer/php-4.0.3pl1/Zen
 d -I/home/cmulcahy/transfer/php-4.0.3pl1/TSRM
 -I/home/cmulcahy/transfer/php-
 4.0.3pl1/TSRM -I/home/cmulcahy/transfer/php-4.0.3pl1 -DUSE_EXPAT
 -I./lib/exp
 at-lite -DNO_DL_NEEDED `./apaci` -o helpers/dummy
 lpers/dummy.c   -rdynamic -Lmodules/php4 -L../modules/php4
 -L../../modules/p
 hp4 -lmodphp4  -lpam  -ldl -lttf -lgd -lresolv -lm -ldl -lcrypt
 -lnsl  -lres
 olv   -lm -lcrypt
 /usr/bin/ld: cannot find -lmodphp4
 collect2: ld returned 1 exit status
 make: *** [dummy] Error 1
 Creating Makefile in src
  + configured for Linux platform
  + setting C compiler to gcc
  + setting C pre-processor to gcc -E
  + checking for system header files
  + adding selected modules
 o php4_module uses ConfigStart/End
  + checking sizeof various data types
  + doing sanity check on compiler and options
 ** A test compilation with your Makefile configuration
 ** failed.  The below error output from the compilation
 ** test will give you an idea what is failing. Note that
 ** Apache requires an ANSI C Compiler, such as gcc.

  Error Output for sanity check 
 = End of Error Report =

  Aborting!



 --
 PHP General Mailing List (http://www.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] MySQL Query Error

2001-01-21 Thread Matt Stone

Hi,
I have a MySQL statement, namely:
SELECT COUNT(*) AS Count FROM images i LEFT JOIN categories c ON
i.cat_id=c.id LEFT JOIN subcategories s ON i.subcat_id=s.id

I want to change the LEFT JOINs to INNER JOINs like so:
SELECT COUNT(*) AS Count FROM images i INNER JOIN categories c ON
i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_id=s.id

But as soon as I do that I get this error message:
MySQL Error: 1064 (You have an error in your SQL syntax near 'INNER JOIN
categories c ON i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_' at
line 1)
Session halted.

Help please. Thanks,

Matt Stone
___

This email may contain confidential and/or privileged information for the
sole use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you have received this email in error, please
contact the sender and delete all copies. Opinions, conclusions or other
information expressed or contained in this email are not given or endorsed
by the sender unless otherwise affirmed independently by the sender.

_


-- 
PHP General Mailing List (http://www.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 send the whole form content to database

2001-01-21 Thread hoo chong wei

Hi there,
  
I'm a beginner using php. Currently, I'm develope a online registration system. I face 
some problems, hope that some one can help me to solve it.

1. I have create a email sending form. After I enter all the particulars, while 
sending this mail to somebody. Can anybody tell me that how can I store the whole 
particular from that email form into my database.

2. Can I send the whole form for example this email form by using mail() function?

3. How can I provide the attachment facility in this mail form? I would like to allow 
user to attach their file and send it out. How can I attach that file and how can I 
send it out by mail function in php?

Please somebody tell me the solution. I am very appreciate your help.


Thanks!
tom
___
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.


--
PHP General Mailing List (http://www.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] MySQL Query Error

2001-01-21 Thread Matt Stone

No, that is exactly as the PHPLib Debug function is returning... :|

-Original Message-
From: Samantha Savvakis [mailto:[EMAIL PROTECTED]]
Sent: Monday, 22 January 2001 3:21 PM
To: Matt Stone
Subject: RE: [PHP] MySQL Query Error


I'm not sure why are getting that error.

Is the statement you are running exactly the same as the one posted in the
email? Check that you don't have a "comma" after the "images i" part. If i
put a comma there, I can simulate your error. Otherwise, your syntax to me
seems fine.

 -Original Message-
 From: Matt Stone [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 22 January 2001 15:01
 To: PHP List
 Subject: [PHP] MySQL Query Error


 Hi,
 I have a MySQL statement, namely:
 SELECT COUNT(*) AS Count FROM images i LEFT JOIN categories c ON
 i.cat_id=c.id LEFT JOIN subcategories s ON i.subcat_id=s.id

 I want to change the LEFT JOINs to INNER JOINs like so:
 SELECT COUNT(*) AS Count FROM images i INNER JOIN categories c ON
 i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_id=s.id

 But as soon as I do that I get this error message:
 MySQL Error: 1064 (You have an error in your SQL syntax near 'INNER JOIN
 categories c ON i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_' at
 line 1)
 Session halted.

 Help please. Thanks,

 Matt Stone
 ___

 This email may contain confidential and/or privileged information for the
 sole use of the intended recipient. Any review or distribution by
 others is
 strictly prohibited. If you have received this email in error, please
 contact the sender and delete all copies. Opinions, conclusions or other
 information expressed or contained in this email are not given or endorsed
 by the sender unless otherwise affirmed independently by the sender.

 _


 --
 PHP General Mailing List (http://www.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] file storage/downloader...

2001-01-21 Thread Jason Murray

 If I store the file in a non-apache directory, how does the 
 user download the file?

Use a file, "download.php" that will make sure the user is 
authenticated, then fetch the contents of the file, and send the 
file to the browser.

Jason

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




Re: [PHP] file storage/downloader...

2001-01-21 Thread Toby Butzon

Do just what you said and create a directory outside of your Apache doc
root. Just make sure the user PHP is running as has permissions to access
the directory ;) Then use PHP's fpassthru, etc., to send the content of the
file back.

You will need to send a mime-type header; take a look around - there are
tutorials over this on phpbuilder.com I'm pretty sure.

Regards,

--Toby

- Original Message -
From: "johnny p." [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 22, 2001 12:30 AM
Subject: [PHP] file storage/downloader...


 Ok, here's the prolem:  I'm trying to create a feature on my site similar
to
 xdrive.com.  Basically I want the user to be able to upload a file and
have
 it stored on my server.  I also want to have the ability for the user to
 download the file at a later time.  Account authentiaction is handled, no
 problem, but I have no idea where to put the files.  I create a
directory,
 it may be guessed and even the filename might be guessed and any user may
be
 able to download the file, breaking user authentication.  If I store the
 file in a non-apache directory, how does the user download the file?

 My goal is to have the second scenario work, create a directory for each
 user for file storage, and somehow get the user to be able to download it
 after being authenticated.  I do not want to use .htaccess files for
this,
 either.  I want it to be seemless with the rest of the features of the
site.

 Thanks in advance for any ideas,

 johnny p.


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




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




Re: [PHP] PHP Editors

2001-01-21 Thread Jeff Lacy

Textpad is pretty good on Micro$ucks products.  It has a free evaluation
which isn't very bothersome (unlike others...).  You can examine it as
www.textpad.com.


""Karl J. Stubsjoen"" [EMAIL PROTECTED] wrote in message
003701c0815f$b6f80e40$0afc020a@kstubsjoen">news:003701c0815f$b6f80e40$0afc020a@kstubsjoen...
 So what editor is recommended?  I'm a little familiar with Emacs (kinda
 cool, but I'm use to keywords and such being colored - as in Interdev).

 Thanks!


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




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




[PHP] Newsletter Software needed urgently...

2001-01-21 Thread Maxim Maletsky

Hello guys,
 
I am sure many of you have it on your websites:
 
 Newsletter
 
yup, that is, a newsletter software written in PHP.
 
Does anyone have/know/wrote a good one?
 
Basic features needed are:
 
 PHP/mySQL - written
 multiple lists
 import/export subscribers
 Name/Company support (in other words have custom messages such as "Dear
%name%" etc )
 reliability
 
I've tried several scripts claiming to do that already, by they all or
haven't had enough necessary files in distributions or weren't "free" enough
or just didn't want to work unless you mess with the code ending up
rewriting it all.
 
I need it VERY urgently. my boss is hacking my *ss...
Please help me with this one...
 
Thanks in advance,

Maxim Maletsky - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109

http://www.j-door.com http://www.j-door.com/ 
http://www.japaninc.net http://www.japaninc.net/ 
http://www.lincmedia.co.jp http://www.lincmedia.co.jp/ 


 



-- 
PHP General Mailing List (http://www.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] solutions to disadvantages when register_globals is off

2001-01-21 Thread mwaples

Dale Robinson wrote:
 
 Everyone seems to recommend turning off register_globals, but accessing them
 through $HTTP_POST_VARS["var_name"], gets tedious.
 
 I haven't found a better solution (not to say there isn't one) than this
 small snippet.
 
 The idea is to turn off "register_globals", as I believe is heavily
 recommended by the PHP team, and declare what variables you are expecting on
 a per script basis.
 Magic-quotes would also be off. Hopefully this makes all external variables
 safe.
 
 I was hoping some experienced users would cast their eye over this and
 suggest any improvements, and comment if it is worth doing at all
 
 define("ALLOWABLE_HTML_TAGS", "BH1");
 
 function use_ext_var($var_name, $var_location)
 {
 global $$var_name, $$var_location;
 
 $$var_name = ${$var_location}[$var_name];
 $$var_name = stripslashes($$var_name);
 $$var_name = strip_tags($$var_name, ALLOWABLE_HTML_TAGS);
 
 }
 
 use_ext_var("sample_var", "HTTP_GET_VARS");
 print $sample_var;
 
 How are other people handling this, or are most of you 'lazy' and just use
 globals :)
 
 Regards
 
 D Robinson

I was lazy but I've found turning globals off makes code easier to read
- If you've got HTTP_GET_VARS , HTTP_POST_VARS and session vars all in
one script - knowing where the variables are coming from makes it is
easier after coming back to your code months later, or when reading
someone elses code.

-- 
PHP General Mailing List (http://www.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] GD = ImagePNG: No transparency

2001-01-21 Thread Rasmus Lerdorf

How many colours in your image?  Don't forget that GD can only handle
8-bit colour.

-Rasmus

On Mon, 22 Jan 2001, Niklas Saers wrote:

 Hi. I'm afraid I have to say that the transparency in PHP with GD doesn't
 seem to work. Let me give you an example. The included file, midblob.png, has
 a transparent area where the color is #bcbcad. Take a look at the
 following code:

 if(!isset($text)) $text="Remember to define \$text";
 $font = 5;
 $size = GetImageSize("midblob.png"); // 0=x, 1=y
 $buffer= Array(5,(($size[1]-ImageFontHeight($font))/2)-3);
 $width=(ImageFontWidth($font)*strlen($text))+($buffer[0]*2)-1;
 $if = ImageCreateFromPNG ("midblob.png"); /* Attempt to open */
 $im=ImageCreate($width,$size[1]);
 $resize = ImageCopyResized($im,$if,0,0,0,0,$width,$size[1],$size[0],$size[1]);
 $colal = ImageColorAllocate($im,0xbc,0xbc,0xad);
 $trans = ImageColorTransparent($im,$colal);
 $tc  = ImageColorAllocate ($im, 255, 255, 255);
 ImageString ($im, $font, $buffer[0], $buffer[1], $text,$tc);
 header ("Content-type: image/png");
 ImagePng ($im);

 Now, the line $colal = ...  and $trans = ... shouldn't be necessary because
 it already has a transparent region. However, ImagePng doesn't seem to output
 this transparently, but rather as #99. Putting in these two lines doesn't
 help either. Now, this is really strange. PNG has transparency, and the loaded
 image does. Why doesn't ImagePng output the transparancy right?

 Cheers


  Niklas Saers






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




[PHP] Convert DBF tu MySQL

2001-01-21 Thread Roman

Hello !!


Please, help me someone. How to convert dbf file from FOXPRO(for DOS) to
MySQL database if it's posible, or if not how to connect this dbf file form
php script and apply sql command for
used data from this file...

Thanx

Roman



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




[PHP] convert ASP to be PHP

2001-01-21 Thread [EMAIL PROTECTED]

Hi people,
I have one ASP site that need to be converted to be PHP3 ( on Linux OS). Is there any 
proper way to do this? The database detail is that the ASP site is using SQL7.0.  And 
the database server that is avaliable on my Linux server is MySql.
Any thoughts?  
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"