[PHP] Strange Error Reporting

2001-03-25 Thread Kristofer Widholm

Anyone know why I get this warning?

Warning: Bad escape sequence: \. in validate.inc.php on line 142

CODE:
Line 142: if (!eregi("index\.php",$PHP_SELF)) {
blah blah blah;
}

I didn't know there was any other escape sequence possible in RegEx!

I have error reporting set to
error_reporting(32+16+8+4+2+1);

and that's pretty picky error reporting. Still, I don't get what's wrong.

K
-- 
__

Kristofer Widholm
Web Pharmacy
[EMAIL PROTECTED]
191 Grand Street, Brooklyn  NY  11211
718.599.4893
__

-- 
PHP General Mailing List (http://www.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] FYI: compile php4 compress uncompress libmysqlclient issue

2001-03-25 Thread Grant Walters

Hi all.

Firstly apoligies to those on the list who receive every email to the
general list in their inbox like I do :-)

I've just spent a rather frustrating five days (15hrs/day) trying to compile
php 4 for use both at the command line and within apache 1.3.12
(openssl/mod_ssl).

I've scanned the lists and internet looking for solutions to the issue
outlined in the subject above and have found the following solution, which I
am posting for future refernce, so hopefully it will help others.  This is
the procedure I used to produce the php binary (CGI) but the mods to build
the apache stuff are minimal.

I haven't tested either of these yet but I think there are 2 options for the
apache side of things:
FOR APXS:
--with-apxs=/usr/local/apache/bin/apxs (or wherever your apache source tree
is)
FOR STATIC?:
--with-apache=../apache_1.3.12 (or wherever your apache source tree is)

Add either line to the Build_php4 script below.

If anything in here looks really wrong can somebody please modify it
accordingly and repost it.

If this is considered an inappropriate post, can somebody let me know a
better place to put it (or even better a Web Site to put it on).

The issue is with PHP not being able to find the compress and uncompress
routines when calling/compiling using the MySQL libmysqlclient library.
The 2 routines in questions belong to the Zlib compression.
(The nm tool can be used to show that the routines are marked as "UNDEF"
which means they are from another externally called library)

The scenario/setup
--
SCO Openserver 5.0.5
mysql-3.23.28-gamma
php-4.0.4pl1 (although I tried 4.0pl2 as well)
apache_1.3.12
zlib_1.1.2

Everything I build is from /usr/local/Build
I use /usr/local (the default) for the --prefix option to configure scripts.
I also have things like GD, OpenSSL, Mod_SSL, BerkeleyDB (what a drama) and
a whole bunch of stuff froim the SCO Skunkware brigade
(http://www.sco.com/skunkware).

What I did (My scripts etc)
--
The first tricky thing I found was to ensure that programs could find the
libraries when required.  Much searching of the NET came up with some things
I have put into a script:

---/usr/local/bin/LD.sh---
#!/bin/sh

LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/local/lib/mys
ql
LIBPATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/local/lib/mysql
SHLIB_PATH=/usr/lib:/lib:/usr/local/lib:/usr/ccs/lib:/usr/local/lib/mysql

if [ -f /usr/local/openlink/openlink.sh ]; then
  . /usr/local/openlink/openlink.sh
fi

export LD_LIBRARY_PATH LIBPATH SHLIB_PATH
--

I note that by default SCO looks for libraries in /lib and /usr/lib.
Creating symbolic links from /usr/local/lib etc into /usr/lib also seems to
work, rather than the variables.
I am not a C programmer so I have no real idea what the 3 environment
variables are and I believe that there is another one called LD_RUN_PATH as
well, but I don't seem to need it.
On the apache front, I modified my apachectl startup script to call this
script with ". /usr/local/bin/LD.sh" (the dot is crucial) to import the
variables into the script before starting apache so apache can find the
libraries and openlink stuff as well.
For Linux users this stuff is unnecessary (I think) as you can modify
/etc/ld.so.conf to add any non standard directory like /usr/local/mysql/lib
(the default I think).
Then run ldconfig to rebuild the list (I can't remember if a reboot is
necessary but I don't think so) and voila, linux can find the libraries
required.

MYSQL
- with zlib compression enabled
- my libz.* files reside in /usr/local/lib

Configured MySQL ready to run make with the following script:
-Build_mysql
rm -f config.cache
./configure \
  --prefix=/usr/local \
  --enable-assembler \
  --enable-large-files \
  --without-debug \
  --with-comment \
  --without-bench \
  --with-named-z-libs=z \
  --with-berkely-db=/usr/local


PHP4
1) I modified the PHP configure script (using information from a previous
post regarding modifying Makefiles) to add -lz (to have PHP include the Zlib
libraries any time is uses mysql).
In my case the relevant lines were:
25577
Changed From MYSQL_SHARED_LIBADD="-lmysqlclient $MYSQL_SHARED_LIBADD"
Changed To MYSQL_SHARED_LIBADD="-lmysqlclient -lz $MYSQL_SHARED_LIBADD"
25657
Changed From LIBS="-lmysqlclient $LIBS"
Changed To LIBS="-lmysqlclient -lz $LIBS"

2) Configured PHP ready to run make with the following script:
Most of the stuff is irrelevant to the issue and some of the options are
ignored, but I haven't work out which ones yet.
I think having the with-openlink line means the the without-iodbc line is
ignored.

-Build_php4-
rm -f config.cache
./configure \
  --with-openlink \
  --with-zlib-dir=/usr/local \
  --with-dbm \
  --with-mysql=/usr/local \
  --without-iodbc \
  --enable-discard-path=yes \
  --enable-magic-quotes=yes \
  --enable-track-vars=yes \
  

[PHP-CVS] cvs: php4 /pear/DB STATUS

2001-03-25 Thread Stig Bakken

ssb Sun Mar 25 02:25:11 2001 EDT

  Modified files:  
/php4/pear/DB   STATUS 
  Log:
  wrapped to 80 columns, replaced a few "-" with "n" for ifx (some
  features are emulated through DB_common)
  
  
Index: php4/pear/DB/STATUS
diff -u php4/pear/DB/STATUS:1.17 php4/pear/DB/STATUS:1.18
--- php4/pear/DB/STATUS:1.17Sat Mar 24 10:56:24 2001
+++ php4/pear/DB/STATUS Sun Mar 25 02:25:10 2001
@@ -9,16 +9,16 @@
   "n" - returns "not capable"
   "-" - no implementation of this feature
 
-FEATURE ibase   msqlmssql   mysql   oci8odbcpgsql   sybase   ifx
-simpleQuery   x   x   x   T   T   x   T   x   x
-numCols   x   x   x   T   T   x   T   x   x
-numRows   n   x   x   T   E   n   T   n   n
-errorNative   n   n   n   T   x   x   T   n   x
-prepare/execute   x   e   e   E   T   e   E   e   -
-sequences n   n   n   E   T   n   T   n   -
-affectedRows  n   n   n   T   T   n   T   n   x
-fetch modes   x   x   x   T   T   x   T   x   x
-transactions  x   n   n   n   x   x   x   n   -
-auto-commit   x   n   n   n   x   x   x   n   -
-error mapping -   -   -   T   T   x   E   -   x
-tableInfo n   n   n   T   n   n   n   n   -
+FEATURE ibase  ifx   msql   mssql  mysql  oci8   odbc   pgsql  sybase
+simpleQuery   x x  x  x  T  T  x  T  x
+numCols   x x  x  x  T  T  x  T  x
+numRows   n n  x  x  T  E  n  T  n
+errorNative   n x  n  n  T  x  x  T  n
+prepare/execute   x e  e  e  E  T  e  E  e
+sequences n n  n  n  E  T  n  T  n
+affectedRows  n x  n  n  T  T  n  T  n
+fetch modes   x x(t)   x  x  T  T  x  T  x
+transactions  x n  n  n  n  x  x  x  n
+auto-commit   x n  n  n  n  x  x  x  n
+error mapping - -  -  -  T  T  x  E  -
+tableInfo n n  n  n  T  n  n  n  n



-- 
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 /pear/DB ifx.php

2001-03-25 Thread Stig Bakken

ssb Sun Mar 25 02:34:31 2001 EDT

  Modified files:  
/php4/pear/DB   ifx.php 
  Log:
  * changed DB_ifx::errorCode to take a parameter, moved the error code
map into the constructor
  
  
Index: php4/pear/DB/ifx.php
diff -u php4/pear/DB/ifx.php:1.2 php4/pear/DB/ifx.php:1.3
--- php4/pear/DB/ifx.php:1.2Sat Mar 24 10:56:24 2001
+++ php4/pear/DB/ifx.phpSun Mar 25 02:34:31 2001
@@ -44,7 +44,18 @@
 'pconnect' = true,
 'transactions' = false
 );
-$this-errorcode_map = array();
+$this-errorcode_map = array(
+'-201'= DB_ERROR_SYNTAX,
+'-206'= DB_ERROR_NOSUCHTABLE,
+'-217'= DB_ERROR_NOSUCHFIELD,
+'-329'= DB_ERROR_NODBSELECTED,
+'-1204'   = DB_ERROR_INVALID_DATE,
+'-1205'   = DB_ERROR_INVALID_DATE,
+'-1206'   = DB_ERROR_INVALID_DATE,
+'-1209'   = DB_ERROR_INVALID_DATE,
+'-1210'   = DB_ERROR_INVALID_DATE,
+'-1212'   = DB_ERROR_INVALID_DATE 
+   );
 }
 
 /**
@@ -197,8 +208,8 @@
 
 function ifxraiseError($errno = null)
 {
-if ($errno == null) {
-$errno = $this-errorCode();
+if ($errno === null) {
+$errno = $this-errorCode(ifx_error());
 }
 
 return $this-raiseError($errno, null, null, null,
@@ -214,24 +225,12 @@
  * implementation has no mapping for the given error code.
  */
 
-function errorCode()
+function errorCode($nativecode)
 {
-if (ereg('SQLCODE=(.*)]', ifx_error(), $match)) {
+if (ereg('SQLCODE=(.*)]', $nativecode, $match)) {
 $code = $match[1];
-$codes = array(
-'-201'= DB_ERROR_SYNTAX,
-'-206'= DB_ERROR_NOSUCHTABLE,
-'-217'= DB_ERROR_NOSUCHFIELD,
-'-329'= DB_ERROR_NODBSELECTED,
-'-1204'   = DB_ERROR_INVALID_DATE,
-'-1205'   = DB_ERROR_INVALID_DATE,
-'-1206'   = DB_ERROR_INVALID_DATE,
-'-1209'   = DB_ERROR_INVALID_DATE,
-'-1210'   = DB_ERROR_INVALID_DATE,
-'-1212'   = DB_ERROR_INVALID_DATE
-);
-if (isset($codes[$code])) {
-return $codes[$code];
+if (isset($this-errorcode_map[$code])) {
+return $this-errorcode_map[$code];
 }
 }
 return DB_ERROR;



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




SV: [PHP] PHP vs Servlet

2001-03-25 Thread Jesper Blomström

Okey, sorry about that.

Communicating with a servlet via http is not different from other
php-http-methods:

For example:

# First declare some parameters which shall be sent to the Servlet/JSP

$eqid = '1';
$oparameter = 'tablist';
$nocolumn = '1';

$request = '?eqid=' . urlencode($eqid);
$request .= 'oparameter=' . urlencode($oparameter);
$request .= 'nocolumn=' . urlencode($nocolumn);

# Then it is just a simple as reading a file via http (NOTE! the client does
not care whether it is a file or a stream)

# To be able to access the server I must also submit a userId and a pwd.

$elements =
file("http://userid:[EMAIL PROTECTED]/servlets/XQuery".$request);

Then all you have to do is to iterate the returned array (there are many way
ie: for ($i = 0; $i  sizeof($elements); $i++)).


If you want to split the stream with a RE you can try to use a method like
this one:

function readandsplit($filename, $separator) {
   $fd = fopen($filename, "r");
   $contents = "";
   $chunksize = 1000;
   do {
$tmpstr = fread ($fd, $chunksize);
$contents = $contents.$tmpstr;
   } while (strlen($tmpstr) == $chunksize);
   fclose($fd);

   # And for example use the preg_split-method which takes the RE and splits
the string
   $elements=preg_split($separator, $contents);

   return($elements);
}




By from Stockholm, Sweden!

/ Jeppe


Krznaric Michael [EMAIL PROTECTED] skrev i
diskussionsgruppsmeddelandet:81A3043681E6824EBE672F7421C30E7E2A1952@SRVTORON
TO.RAND.COM...
So tell us?

Mike

-Original Message-
From: Jesper Blomstrm [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 4:51 PM
To: [EMAIL PROTECTED]
Subject: SV: [PHP] PHP vs Servlet


I found out how to do it.

Thx anyway

/ J

Jesper Blomström [EMAIL PROTECTED] skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
 Hi!

 I am sure you have a solution to this...

 How shall I communicate with a servlet from PHP?
 I have a servlet which makes a DB-query and returns the
 result.

 Thanks!



 / Jeppe



 --
 Jesper Blomström
 [EMAIL PROTECTED]
 Arbete: 08-566 280 08
 Hem:08-669 23 10
 Mobil:  070-30 24 911

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




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

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




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




[PHP] PDF support in PHP

2001-03-25 Thread Phil Allsopp

I am having some problems getting PDF support enabled with PHP4.04pl1

Using FreeBSD 4.2, Apache 1.3.9, PHP4.04pl1 and Pdflib 3.0

When doing a PHP ./configure, I see :

  Checking whether to include Pdflib 3.x support... /usr/local yes
  (and)
  creating ext/pdf/Makefile

when doing a make, I see:

  making all in pdf

When doing a make install, I see:

  Making install in pdf

But when running the standard example code through MS I.E 5.5, I see 

  Fatal error: Call to undefined function: pdf_new()
  in /usr/www/htdocs/index.html on line 6

Anyone any ideas on this one ?

Regards

Phil.

-- 
PHP General Mailing List (http://www.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] Let the Server do the downloading

2001-03-25 Thread techzeus

Is it possible?

Have anyone made a script that allows you to grab a file from another URL directly 
from the server so that you don't need to download the file and upload it again?


Chua Zhi Hon aka. Zeus
-
Founder/CEO, Frozened Network
"We provide you with the tools needed to setup an online business"
http://www.frozened.com
Editorial, paGn.net
http://www.pagn.net 



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

2001-03-25 Thread Stig Bakken

ssb Sun Mar 25 03:35:22 2001 EDT

  Modified files:  
/CVSROOTavail gen_acl_file.m4 
  Log:
  * added "ufux"
  
  
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.126 CVSROOT/avail:1.127
--- CVSROOT/avail:1.126 Thu Mar 22 12:10:57 2001
+++ CVSROOT/avail   Sun Mar 25 03:35:21 2001
@@ -7,7 +7,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,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,hholzgra|functable
 avail|rasmus,sterling,jimw|pres
 
avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb
-avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,mboeren|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,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective,mboeren,ufux|phpdoc
 avail|andrei,fmk,zimt,jan,changelog|php-gtk
 avail|jmoore,adrianz,protoman,sfox|php-gtk/docs
 avail|andrei,fmk,jmoore,jskinner|php-gtk-web
Index: CVSROOT/gen_acl_file.m4
diff -u CVSROOT/gen_acl_file.m4:1.130 CVSROOT/gen_acl_file.m4:1.131
--- CVSROOT/gen_acl_file.m4:1.130   Thu Mar 22 12:10:57 2001
+++ CVSROOT/gen_acl_file.m4 Sun Mar 25 03:35:21 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,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,romolo')
 dnl PHP Documentation Group
-define(`php_doc', 

[PHP] writing to a file

2001-03-25 Thread adam

how do i write to the beginning of a file instead of the end?



-- 
PHP General Mailing List (http://www.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] Regular Expr. on access.log

2001-03-25 Thread Andre

Hello,
i am writing a script to read out the apaches´ access.log.
Now i want to set a counter when the following String includes the
expression
"MAR"  "test.php"  "a=5" and  "d=6901"
127.0.0.1 - - [21/Mar/2001:21:19:17 +0100] "GET
/test.php?a=5b=4c=42d=6901 HTTP/1.1" 200 54
can someone tell me how i can realize this?
Thanks a lot list!!




-- 
PHP General Mailing List (http://www.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] $B#J#u#s#t(B$B#i#n(B$B#M#a#i#l(B$B>pJs(B

2001-03-25 Thread [EMAIL PROTECTED]
$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(B
$B>pJsDs6!4k6HL>(B   $B%P%J!<%3%`(B

$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B
   $B:#=5$N$*>)$a%5%$%H$r$*CN$i$;$$$?$7$^$9(B
  http://www.hh.iij4u.or.jp/~g-spot/check/mail.html
   $B!#(B

$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(B

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

2001-03-25 Thread Felix Kronlage

On Sun, Mar 25, 2001 at 03:39:28AM -0800, adam wrote:

 how do i write to the beginning of a file instead of the end?

fseek will help. With it you con move the pointer to the file beginning.

http://www.php.net/manual/en/function.fseek.php will have details.

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 

 PGP signature


Re: [PHP] writing to a file

2001-03-25 Thread Mukul Sabharwal

heyo,

http://devhome.net/php/tutorials/230101.html

will be nice

--- adam [EMAIL PROTECTED] wrote:  how do i write to
the beginning of a file instead of
 the end?
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


=
To find out more about me : http://www.geocities.com/mimodit
My bookmarks are available @ http://mukul.free.fr

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

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




[PHP] Can You get a file unlinked after one month?

2001-03-25 Thread Jan Grafström

Hi!
I wonder if it is possible to delete a file using unlink and a time
function.
I wont the file to be automtically unlinked after a month.

I am very thankful for any help.

Regards
Jan Grafstrom


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

2001-03-25 Thread Brooks, Ken

Joe,

I love you!! (In a 'Happy I now have something working' sort of way of
course)  :)

It hasn't finished (it's still running now), but it is sure going *alot*
further
than it had before.

-ken

-Original Message-
From: Joe Brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 5:33 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] ODBC  Oracle


There is a timeout, that should halt a script if it runs too long.  If you
can, check
php.ini
set max_execution_time to something greater than 30 seconds, see if that
helps.

""Brooks, Ken"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I thought maybe the php script was running to fast for the network
 connection.
 So i put in a sleep(1)
 It still only ran for about the same amount of time (less records pulled
of
 course).

 Could it be losing the connection instead because of lack of activity?

 Would a persistent connection make any difference?

 -Original Message-
 From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 22, 2001 4:04 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] ODBC  Oracle


 Are there any limitations on how many records I can pull from an Oracle
 Database
 over ODBC?

 I have it pulling one record just fine, but when I tell it to pull all
 records,
 which should be about 75,000, it only gets about 600 or so.

 Does the php script time out (i'm running it thru a web browser).

 What could it be?...

 thanks,
 ken

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

 --
 PHP General Mailing List (http://www.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] attachments with mail() function

2001-03-25 Thread BlackLord

Thank you Michael. I will look for mime_mail classes.


"Michael Hall" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I'm not sure about including them in the mail function as such, but it can
 certainly be done using one of several mime_mail classes that are around.
 I don't have one handy right now but you can find them by searching the
 php archives
 and/or the annotated php manual. I know the one by Schumann and
 Ratschiller works OK.


 Mick

 On Sun, 25 Mar 2001, BlackLord wrote:

  Is there anyway to include attachments in mail() function?
 
  If you give a small example, it will be great.
 
  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 General Mailing List (http://www.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] Can You get a file unlinked after one month?

2001-03-25 Thread Christian Reiniger

On Sunday 25 March 2001 15:45, you wrote:
 Hi!
 I wonder if it is possible to delete a file using unlink and a time
 function.
 I wont the file to be automtically unlinked after a month.

man cron
man tmpreaper

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

CPU not found. retry, abort, ignore?

--
PHP General Mailing List (http://www.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] String Functions (replace)

2001-03-25 Thread Brooks, Ken

I know this is completely stupid but how can i take something with a single
quote '  and replace it in the string with \'

Ex:
Bain's Deli
to
Bain\'s Deli

$fieldcontents = strtr($fieldcontents, "'", "\\\'"); -or-
$fieldcontents = strtr($fieldcontents, "'", "\\'");
doesn't work. I feel dumb, but my brain isn't going yet this morning.

Thanks,
ken

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




RE: [PHP] String Functions (replace)

2001-03-25 Thread Brooks, Ken

Nevermind, stumbled across addslashes().

What a wonderful language. :)

-ken

-Original Message-
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 10:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] String Functions (replace)


I know this is completely stupid but how can i take something with a single
quote '  and replace it in the string with \'

Ex:
Bain's Deli
to
Bain\'s Deli

$fieldcontents = strtr($fieldcontents, "'", "\\\'"); -or-
$fieldcontents = strtr($fieldcontents, "'", "\\'");
doesn't work. I feel dumb, but my brain isn't going yet this morning.

Thanks,
ken

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

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

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

Yo!
Does anyone know how I can change a line in a textfile?
I want to find a specific line, and then change it a bit...



[PHP] huge time/memory consuming script

2001-03-25 Thread Christian Dechery

I'm thinking about building a PHP script that loads an entire database on a 
weekly basis, based on a text catalog.

The reason I'm doing it, it's because the catalog is too generic and has 
lots off stuff to be done in it (such as lots of string replacements and 
'fixing') before I can really parse it and create the insert statements.

The doubt I have is this: it's kinda of BIG catalog, I'm talking about more 
than 20MB of text files, and I have to 'clean' the whole DB and load it 
entirely again (I don't make the rules, this is how it works)...
I'm worried about the time it will take and the memory it'll cost, so I was 
thinking of a step-by-step solution, like break the process into several 
'steps' that of course would be carried out automatically.

Like I'd have
?php
do this this this and that
reload the page to go to the next step
?

So... just by reloading the page, I get a good 'memory cleaning' so I can 
be sure everything is going to get carried out??... there are steps that 
I'm worried about taking over 30min to finish, like loading the main table 
with 140.000 rows...

thanks...

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


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




RE: [PHP] huge time/memory consuming script

2001-03-25 Thread Brooks, Ken

I don't know exactly what you are asking.

But I'm running a script as we speak that is pulling 75000+ rows from
an oracle database over ODBC (from a remote server) and creating
a table in a local mysql database, dumping all records into it.

-ken

-Original Message-
From: Christian Dechery [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 10:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] huge time/memory consuming script


I'm thinking about building a PHP script that loads an entire database on a 
weekly basis, based on a text catalog.

The reason I'm doing it, it's because the catalog is too generic and has 
lots off stuff to be done in it (such as lots of string replacements and 
'fixing') before I can really parse it and create the insert statements.

The doubt I have is this: it's kinda of BIG catalog, I'm talking about more 
than 20MB of text files, and I have to 'clean' the whole DB and load it 
entirely again (I don't make the rules, this is how it works)...
I'm worried about the time it will take and the memory it'll cost, so I was 
thinking of a step-by-step solution, like break the process into several 
'steps' that of course would be carried out automatically.

Like I'd have
?php
do this this this and that
reload the page to go to the next step
?

So... just by reloading the page, I get a good 'memory cleaning' so I can 
be sure everything is going to get carried out??... there are steps that 
I'm worried about taking over 30min to finish, like loading the main table 
with 140.000 rows...

thanks...

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


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

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




Re: [PHP] Strange Error Reporting

2001-03-25 Thread CC Zona

In article p04320407b6e35b98ce1b@[209.246.86.33],
 [EMAIL PROTECTED] (Kristofer Widholm) wrote:

 Warning: Bad escape sequence: \. in validate.inc.php on line 142
 
 CODE:
 Line 142: if (!eregi("index\.php",$PHP_SELF)) {
 blah blah blah;
 }
 
 I didn't know there was any other escape sequence possible in RegEx!

In a way, there is another "escape": using square braces.

eregi("index[.]php",$PHP_SELF)

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




Re: [PHP] [PHP4]

2001-03-25 Thread Dddogbruce \(@home.com\)

All the variables are true.  When I "post" the information to a nother file from
the form, it works.

This is the form script, if you're wondering..

HTML
TITLESubmit news/TITLE
BODY
form action="newSubmit.php" method="post"
 tdName:/td
 tdinput type="text" name="frmName" size="24"br
tdEmail:/td
 tdinput type="text" name="email" size="24"br
tdSubject:/td
 tdinput type="text" name="subject" size="24"br
Message:
textarea name="message" rows="8" cols="70"/textareabr
input type="submit" name ="formSubmit value="Submit"
/BODY
/HTML




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




Re: [PHP] Delaying Printed Output

2001-03-25 Thread Greg Scott

 Have you looked into javascript/java?

This client has worked up a Power Point slide presentation that he wants 
me to duplicate on the web.  I had a PHP solution that was working fine, 
but then he decided to jazz up his Power Point presentation some.  The 
adding a single line of text at time didn't seem to complicated so I was 
going to see if I could find a PHP solution to it that would work with 
all browsers.  But now he's decided that he wants motion involved with 
it too, so I guess I'll start learning a little more about FLASH.  I did 
discover I have an Adobe program I have can use to create FLASH files so 
I guess I'll try that route and just warn him that he may be eliminating 
some web visitors this way (actually I'll probably keep the old PHP 
slide show and give them an option). 

Thanks everyone for your input into this.
Greg


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




SV: [PHP] Changing within a file

2001-03-25 Thread Jesper Blomström

Hi!

This is what you want:

http://www.php.net/manual/en/function.preg-replace.php


The preg_replace-method uses a ordinary RE to search and replace.




Hoppas det går vägen!



/ Jeppe


Jimmy Bäckström [EMAIL PROTECTED] skrev i
diskussionsgruppsmeddelandet:001901c0b543$329648c0$[EMAIL PROTECTED]
Yo!
Does anyone know how I can change a line in a textfile?
I want to find a specific line, and then change it a bit...




-- 
PHP General Mailing List (http://www.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] set_error_handler and parse errors

2001-03-25 Thread Dean Hall

Is it just me, or do parse errors get reported by the engine even if you use
your own error handler?

I've registered my own error handler with "set_error_handler()", but it
doesn't get called on parse errors -- the manual seems to hint that this is
the case (without actually saying it), and I searched the list archives and
came across someone who hacked the PHP source to make parse errors get
passed to the error handler. Anyone know for sure?

Dean.



-- 
PHP General Mailing List (http://www.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 25 Mar 2001 18:29:24 -0000 Issue 588

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


php-general Digest 25 Mar 2001 18:29:24 - Issue 588

Topics (messages 45471 through 45500):

Re: Text fading with PHP?
45471 by: Kristofer Widholm

Re: What is session.cookie_secure?
45472 by: Yasuo Ohgaki

Re: [PHP4]
45473 by: Joe Brown
45496 by: Dddogbruce \(.home.com\)
45497 by: Dddogbruce \(.home.com\)

Compiling, How to resolve COM
45474 by: Joe Brown

Strange Error Reporting
45475 by: Kristofer Widholm
45495 by: CC Zona

Re: compile php4 compress uncompress libmysqlclient issue
45476 by: Grant Walters

Re: PHP_SELF problems!
45477 by: almir

Re: PHP vs Servlet
45478 by: Jesper Blomström

PDF support in PHP
45479 by: Phil Allsopp

Let the Server do the downloading
45480 by: techzeus.pacific.net.sg

writing to a file
45481 by: adam
45484 by: Felix Kronlage
45485 by: Mukul Sabharwal

Regular Expr. on access.log
45482 by: Andre

$B#J#u#s#t(B$B#i#n(B$B#M#a#i#l(B$BpJs(B
45483 by: ka.tkk.att.ne.jp

Can You get a file unlinked after one month?
45486 by: Jan Grafström
45489 by: Christian Reiniger

Re: ODBC  Oracle
45487 by: Brooks, Ken

Re: attachments with mail() function
45488 by: BlackLord

String Functions (replace)
45490 by: Brooks, Ken
45491 by: Brooks, Ken

Changing within a file
45492 by: Jimmy Bäckström
45499 by: Jesper Blomström

huge time/memory consuming script
45493 by: Christian Dechery
45494 by: Brooks, Ken

Re: Delaying Printed Output
45498 by: Greg Scott

set_error_handler and parse errors
45500 by: Dean Hall

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]


--



Here's what you wrote, 01.03.24:

Hi

Is it possible to do text fading with PHP.  For instance, I want to one line
of text fade in, have another line fade in later, and a third line after
that.  Then all three lines will fade out at the same time and start over
with three different lines.  Is this possible with php?

Thanks

Jamie

No, due to some browsers waiting for all a complete document object 
before outputting text. Even with browsers that will parse and 
display a partial feed, you really can't achieve a smooth effect due 
to network latency. The best thing to do is to work with JavaScript 
and CSS. Look into the setTimeout() function in JavaScript and use it 
to step through different color values for your text using CSS.

Or, just use an animated gif.

K
-- 
__

Kristofer Widholm
Web Pharmacy
[EMAIL PROTECTED]
191 Grand Street, Brooklyn  NY  11211
718.599.4893
__




I guess its for make use of cookie's secure option. (Send cookie only when
encryption (SSL) is enabled)
I haven't look into code, so I can be wrong.

--
Yasuo Ohgaki


"Michael Champagne" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I noticed the setting session.cookie_secure in my php_info(), but could not
 find anything mentioned about it in the documentation.  Does anyone know what
 this setting does?

 --
 Michael Champagne, Software Engineer
 Capital Institutional Services, Inc.
 wk: [EMAIL PROTECTED]
 hm: [EMAIL PROTECTED]



 **
 This communication is for informational purposes only.  It is not
 intended as an offer or solicitation for the purchase or sale of
 any financial instrument or as an official confirmation of any
 transaction, unless specifically agreed otherwise.  All market
 prices, data and other information are not warranted as to
 completeness or accuracy and are subject to change without
 notice.  Any comments or statements made herein do not
 necessarily reflect the views or opinions of Capital Institutional
 Services, Inc.  Capital Institutional Services, Inc. accepts no
 liability for any errors or omissions arising as a result of
 transmission.  Use of this communication by other than intended
 recipients is prohibited.
 **

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






if($formSubmit) {
echo "form submitted: $frmName"; //= have you tried this to make sure
$formSubmit is true?
  $newsSubmit = file("news.txt"); //RTM, your not using file() the way it's
inteneded.
  $fp = fopen("news.txt", 'a');  //looks good
  fwrite($fp, $frmName); //looks good, but does $frmName contain anything?
  fclose($fb); //$newsSubmit is not a file pointer and should not be used as
such, use 

[PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

I'm writing a news script, and I just got it working earlier this
morning.  Now it writes the variables from the form to the .txt file;
but when I go to write again (another news article) it does it beside,
not above.  Me, thinking so brilliantly at 6AM, thought append would
mean above, but it means beside.  This is the script in working
condition, although it only writes one varibale since I was testing.
I'm not using mysql, only a .txt file and two PHP documents.

?
if( $formSubmit )
 {
echo "Your news has been processed.";
$newsSubmit = file( "news.txt" );
$fp = fopen( "news.txt", 'a' );
fwrite( $fp, $frmName );
fclose( $fp );
 }
else
 {
include ( "newsForm.php" );
 }
?

What I want it to do is post $frmName in the .txt file, and when another
entry is processed it will add that above.  I hope this is possible,
because I don't have access to a MySQL database *yet.*

Post all suggestions, please.

-Owen


-- 
PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Jack Dempsey

i believe there was a post about 10 messages ago regarding this same
problem--try fseek:
http://www.php.net/manual/en/function.fseek.php

-jack

-Original Message-
From: Dddogbruce (@home.com) [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 1:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [PHP4] $fp = fopen( "news.txt", 'a' ); // 'a' = append!
Wah!


I'm writing a news script, and I just got it working earlier this
morning.  Now it writes the variables from the form to the .txt file;
but when I go to write again (another news article) it does it beside,
not above.  Me, thinking so brilliantly at 6AM, thought append would
mean above, but it means beside.  This is the script in working
condition, although it only writes one varibale since I was testing.
I'm not using mysql, only a .txt file and two PHP documents.

?
if( $formSubmit )
 {
echo "Your news has been processed.";
$newsSubmit = file( "news.txt" );
$fp = fopen( "news.txt", 'a' );
fwrite( $fp, $frmName );
fclose( $fp );
 }
else
 {
include ( "newsForm.php" );
 }
?

What I want it to do is post $frmName in the .txt file, and when another
entry is processed it will add that above.  I hope this is possible,
because I don't have access to a MySQL database *yet.*

Post all suggestions, please.

-Owen


--
PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

Thanks for the quick reply, looking in to it!




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




Re: [PHP] URL parsing

2001-03-25 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Jaxon) wrote:

 Any way to combine both forms of url parsing?
 I want to use standard slash notation for navigation ,but also account for
 the occasional variable used within a single page.
 
 e.g. URL can be either:
 domain.com/index.php/main/index.html?ii=1
 
 or: 
 domain.com/index.php/main/index.html?ii=1

Umm, how are these different?

(If you're trying to extract info from a url, perhaps 
parse_url(),basename(), and/or dirname() are what you're seeking...?)

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




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

Ok, with this fseek..

Could you give me an example of how to implement it?




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




Re: [PHP] URL parsing

2001-03-25 Thread Jaxon

oops :)

http://www.domain.com/index.php/main/index.html?ii=1
versus
http://www.domain.com/index.php/main/index.html

I want to get "index.html" and "main" into variables, as the two items will
always be present - if $ii is set, I want to strip it from the URI before
parsing the items out.

I suppose with parse_url() I could do something..but I really only want to
deal with the URI.

currently, this seems to work:

$path_array = explode('/', $REQUEST_URI);

if (isset($ii))   array_pop($path_array); // remove $ii
$page_name  = array_pop($path_array); //get page name from end of array
$tpl= array_pop($path_array); //get page type from next item

but is inelegant :)

regards,
jaxon

 In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Jaxon) wrote:
 
 Any way to combine both forms of url parsing?
 I want to use standard slash notation for navigation ,but also account for
 the occasional variable used within a single page.
 
 e.g. URL can be either:
 domain.com/index.php/main/index.html?ii=1
 
 or: 
 domain.com/index.php/main/index.html?ii=1
 
 Umm, how are these different?
 
 (If you're trying to extract info from a url, perhaps
 parse_url(),basename(), and/or dirname() are what you're seeking...?)


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

2001-03-25 Thread Jack Dempsey

someone was asking about fseek...try this:
http://www.php.net/manual/en/function.rewind.php

i haven't tried it, but it seems to return the pointer to the beginning,
which is where you wanted...

-jack


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




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Richard

You should find it on
http://www.php.net/manual/en/functions.fseek.php

Or something. There are examples that are quite clear.

- Richard

""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ok, with this fseek..

 Could you give me an example of how to implement it?




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




-- 
PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Joe Brown

Re-create the file.  You're most of the way there.

if( $formSubmit )
 {
echo "Your news has been processed.";
$filename = "news.txt";

//This is simpler than messing with an array of the original content.
$fp = fopen ($filename, "r");
$newsSubmit  = fread ($fd, filesize ($filename));
fclose ($fp);

$fp = fopen( $filename, "w" );  // change append to write (a to w)
fwrite( $fp, $frmName );//write the new
fwrite( $fp, $newsSubmit);//write the old
fclose( $fp );
 }
else
 {
include ( "newsForm.php" );
 }

if you want to use fseek, then try this:

if( $formSubmit )
 {
echo "Your news has been processed.";
$filename = "news.txt";

//This is simpler than messing with an array of the original content.
$fp = fopen ($filename, "r+");
$newsSubmit  = fread ($fd, filesize ($filename));
fseek($fp,0);
fwrite( $fp, $frmName );//write the new
fwrite( $fp, $newsSubmit);//write the old
fclose( $fp );
 }
else
 {
include ( "newsForm.php" );
 }

""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ok, with this fseek..

 Could you give me an example of how to implement it?




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




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

2001-03-25 Thread Philip Olson

Hi!

Check out these two related articles (and user comments) :

  Building Dynamic Pages With Search Engines in Mind :
  
* http://phpbuilder.com/columns/tim19990117.php3 
* http://phpbuilder.com/columns/tim2526.php3 

Also check phpinfo() for available predefined variables and plan
accordingly.

  Predefined Variables   :
  
* http://www.php.net/manual/en/language.variables.predefined.php

And for the brave, check out mod_rewrite :

  Mod-Rewrite:
  
* http://httpd.apache.org/docs/mod/mod_rewrite.html
* http://www.engelschall.com/pw/apache/rewriteguide/
* http://marc.theaimsgroup.com/?l=php-generals=mod_rewrite


Regards,

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


On Sun, 25 Mar 2001, Jaxon wrote:

 oops :)
 
 http://www.domain.com/index.php/main/index.html?ii=1
 versus
 http://www.domain.com/index.php/main/index.html
 
 I want to get "index.html" and "main" into variables, as the two items will
 always be present - if $ii is set, I want to strip it from the URI before
 parsing the items out.
 
 I suppose with parse_url() I could do something..but I really only want to
 deal with the URI.
 
 currently, this seems to work:
 
 $path_array = explode('/', $REQUEST_URI);
 
 if (isset($ii))   array_pop($path_array); // remove $ii
 $page_name  = array_pop($path_array); //get page name from end of array
 $tpl= array_pop($path_array); //get page type from next item
 
 but is inelegant :)
 
 regards,
 jaxon
 
  In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Jaxon) wrote:
  
  Any way to combine both forms of url parsing?
  I want to use standard slash notation for navigation ,but also account for
  the occasional variable used within a single page.
  
  e.g. URL can be either:
  domain.com/index.php/main/index.html?ii=1
  
  or: 
  domain.com/index.php/main/index.html?ii=1
  
  Umm, how are these different?
  
  (If you're trying to extract info from a url, perhaps
  parse_url(),basename(), and/or dirname() are what you're seeking...?)
 
 
 -- 
 PHP General Mailing List (http://www.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] rewind

2001-03-25 Thread Dddogbruce \(@home.com\)

Thanks!  :)

Jack Dempsey wrote:

 someone was asking about fseek...try this:
 http://www.php.net/manual/en/function.rewind.php

 i haven't tried it, but it seems to return the pointer to the beginning,
 which is where you wanted...

 -jack

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


-- 
PHP General Mailing List (http://www.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] finding primary key with oci8

2001-03-25 Thread almir

is there any why to find out from php with oci8 functionen , which colomn/s
is/are primary key in a table in oracle

almir





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




[PHP] script filename?

2001-03-25 Thread Kurth Bemis

i was pretty sure that there was a function to return JUST the script 
filename..  Unlike $php_self and $script_name i need something that till 
ruturn JUST the scriptname.  ie /test/test/blah.php returns blah.php.

any ideas? or am i going to have to reverse the string find the first "/" 
drop the rest of the string and return the file name. :-)

~kurth


-- 
PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

When you say $newsSubmit  = fread ($fd, filesize ($filename));

Do you mean specify the filename?  $news.txt then?




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




Re: [PHP] script filename?

2001-03-25 Thread Philip Olson

Hi Kurth,

Check out basename() and use it against a predefined variable such as
SCRIPT_NAME.  Example :

///apples/foo.php?fruit=apple

  print basename($SCRIPT_NAME); // foo.php

Be sure to check out :

  http://www.php.net/manual/en/language.variables.predefined.php
  http://www.php.net/manual/en/function.basename.php

Also check phpinfo() to view how your server deals with such things.


Regards,

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

On Sun, 25 Mar 2001, Kurth Bemis wrote:

 i was pretty sure that there was a function to return JUST the script 
 filename..  Unlike $php_self and $script_name i need something that till 
 ruturn JUST the scriptname.  ie /test/test/blah.php returns blah.php.
 
 any ideas? or am i going to have to reverse the string find the first "/" 
 drop the rest of the string and return the file name. :-)
 
 ~kurth
 
 
 -- 
 PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Joe Brown

Take a closer look at the previous message I sent $filename was defined as:
$filename="news.txt";

""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 When you say $newsSubmit  = fread ($fd, filesize ($filename));

 Do you mean specify the filename?  $news.txt then?




 --
 PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

Oh.  Duh!  Thanks.  ;P

Joe Brown wrote:

 Take a closer look at the previous message I sent $filename was defined as:
 $filename="news.txt";

 ""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  When you say $newsSubmit  = fread ($fd, filesize ($filename));
 
  Do you mean specify the filename?  $news.txt then?
 
 
 
 
  --
  PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

$fp = fopen ($filename, "r");
$newsSubmit  = fread ($fd, filesize ($filename));

These are giving me a parse error:
Warning: Supplied argument is not a valid File-Handle resource in
C:/XITAMI/owen/website/php/newsSubmit.php on line 10







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

2001-03-25 Thread Chris Anderson

it would help if you showed a snippet of your mail code
- Original Message -
From: "Atet Sugiharto" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 24, 2001 1:49 AM
Subject: [PHP] Sendmail


 Hi ,

 I'm at a lossI've searched throught the knowledgebase, archives, docs,
 etc but I can't figure out what's going on.  The problem is when using the
 mail() function nothing gets send and I don't get any error messages
either.
 It's like the message gets eaten by a black hole.

 I already put "-t -i" in the path, but still doesn't work ..
 Anybody can help me ?

 Regards,

 Atet Sugiharto


 --
 PHP General Mailing List (http://www.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] getting numeric index of array

2001-03-25 Thread Christian Dechery

I wanna get the numeric index for a multi-dimensional associative array...

I have like

$myArray = array(
"one" = "something",
"two" = "otherthing",
"three" = "whatever"
);

I want to, given the key (or value), it returns me the numeric index for 
that ocurrence... examples:

given "one" - returns 0
given "whatever" - returns 2
given "two" - returns 1
given "four" - returns NULL or false...

anyone?

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


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




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Joe Brown

maybe spinning the 'd' in $fd 180 degrees to make it a p will help...

Sorry, haven't tried this myself, typo's happen.

heh, I'm still trying to compile php 4 windows :-(  been hoping for a
helping hand.


""Dddogbruce (@home.com)"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 $fp = fopen ($filename, "r");
 $newsSubmit  = fread ($fd, filesize ($filename));

 These are giving me a parse error:
 Warning: Supplied argument is not a valid File-Handle resource in
 C:/XITAMI/owen/website/php/newsSubmit.php on line 10







 --
 PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

I'm such a pest.  g



-- 
PHP General Mailing List (http://www.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] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

Ok, it wrote, but didn't write above.. *grins*




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




Re: [PHP] script filename?

2001-03-25 Thread Kurth Bemis

At 03:53 PM 3/25/2001, Philip Olson wrote:

thank you - that was the function that i was looking for!

~kurth

Hi Kurth,

Check out basename() and use it against a predefined variable such as
SCRIPT_NAME.  Example :

///apples/foo.php?fruit=apple

   print basename($SCRIPT_NAME); // foo.php

Be sure to check out :

   http://www.php.net/manual/en/language.variables.predefined.php
   http://www.php.net/manual/en/function.basename.php

Also check phpinfo() to view how your server deals with such things.


Regards,

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

On Sun, 25 Mar 2001, Kurth Bemis wrote:

  i was pretty sure that there was a function to return JUST the script
  filename..  Unlike $php_self and $script_name i need something that till
  ruturn JUST the scriptname.  ie /test/test/blah.php returns blah.php.
 
  any ideas? or am i going to have to reverse the string find the first "/"
  drop the rest of the string and return the file name. :-)
 
  ~kurth
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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


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




[PHP] How to jump 7 rows in array

2001-03-25 Thread Christian Dechery

I'm loading a set of txt files into a DB. The first 7 lines of each file 
are useless to me...
I want some way I can always jump those 7 lines... I tought of doing a 
little function like jumpfirstsevenrows(array), but then I'd have to pass 
the whole array as parameter and that can get real memory consuming for 
such a small task. I'll have arrays with more than 100.000 lines...

since there are pointers in PHP, I'm lost... I don't wanna have to get the 
same 'for bla bla bla code' in each and every function that processes this 
file (there is one function per file, more then 20 overall)...

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


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




[PHP] drop down used to redirect?

2001-03-25 Thread duirfire


Hi, can anyone point me towards an example of how to use a drop down select
as a navigation jump, maybe by sending a redirect header?

thanks!
duirfire




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

2001-03-25 Thread Chris Cocuzzo

hey-

Alright I noticed that question about URL parsing. I could've sworn I saw
some article on PHPBuilder.com that said that instead of doing all that
modifying with apache, you could simply write something to change the URL
with '?' and '' and '=' so that they symbols could be represented using a
simple /, does anyone remember seeing it?...

In any case, I'll ask, what would be the best way to do this with
scripting, something like str_replace() or perhaps a regular expression to
both modify the URL and then allow pages using that modified URL to
recognized the variable/value pairs? Or is that even possible?

My other question is this: Sometimes I notice URL's where it looks like
this, http://www.whatever.com/?blah=blahd=d, or
http://www.whatever.com/local?name=named=d. How is that done, where there
is no file extension after the file name, or no file name at all, just a
question mark directly after the slash?

thanks
Chris


-- 
PHP General Mailing List (http://www.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 jump..' part 2

2001-03-25 Thread Christian Dechery

Regarding my last email (about jumping the first 7 rows of an array)...

why does this code doesnt work?

for(reset($array),$count=0;$count6;next($array),$count++);

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


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




Re: [PHP] [PHP4] $fp = fopen( news.txt, 'a' ); // 'a' = append! Wah!

2001-03-25 Thread Dddogbruce \(@home.com\)

Ok, I'll get this eventually.  groan



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

2001-03-25 Thread Jaxon

Chris,

a few answers :)

On 3/25/01 5:43 PM, "Chris Cocuzzo" [EMAIL PROTECTED] wrote:

 hey-
 
 Alright I noticed that question about URL parsing. I could've sworn I saw
 some article on PHPBuilder.com that said that instead of doing all that
 modifying with apache, you could simply write something to change the URL
 with '?' and '' and '=' so that they symbols could be represented using a
 simple /, does anyone remember seeing it?...

dunno - think it's in the php.ini?
 
 In any case, I'll ask, what would be the best way to do this with
 scripting, something like str_replace() or perhaps a regular expression to
 both modify the URL and then allow pages using that modified URL to
 recognized the variable/value pairs? Or is that even possible?

You could... I'm hacking through using:

$path_array = explode('/', $REQUEST_URI);

$last_item  =   array_pop($path_array);
$next_to_last_item  =   array_pop($path_array); / item

only drawback is the positional stuff is fixed.
now I am trying to figure out how to generate my hrefs in the page to have a
matching structure
 
 My other question is this: Sometimes I notice URL's where it looks like
 this, http://www.whatever.com/?blah=blahd=d, or
 http://www.whatever.com/local?name=named=d. How is that done, where there
 is no file extension after the file name, or no file name at all, just a
 question mark directly after the slash?

probably the a .htaccess  or apache.conf directive:

Location /local 
ForceType application/x-httpd-php3
/Location 

This would send everything to a script called "local".
This is from: http://phpbuilder.com/columns/tim19990117.php3

hth,

regards,
jaxon
 
 thanks
 Chris
 


-- 
PHP General Mailing List (http://www.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] Requesting username/pwd with apache and aqcuiring input

2001-03-25 Thread NoSpeed

Hi

I wondered if it was possible in PHP to let it pop up a screen which
reqcuires username/pwd from the visitor, just like you can tell apache to do
so with the .htaccess files.

And if yes, how to retrieve the input from the user ?

--
- NoSpeed
--
- Carpe Noctem

"The stickers on the side of the box said "Supported Platforms: Windows 98,
Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported
platform."



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

2001-03-25 Thread Chris Cocuzzo

I think I just slightly unsure of how that explode() function works in this
situation...could you clarify further?

chris



-Original Message-
From: Jaxon [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 6:06 PM
To: [EMAIL PROTECTED]; PHP General List (E-mail)
Subject: Re: [PHP] A few questions...


Chris,

a few answers :)

On 3/25/01 5:43 PM, "Chris Cocuzzo" [EMAIL PROTECTED] wrote:

 hey-

 Alright I noticed that question about URL parsing. I could've sworn I saw
 some article on PHPBuilder.com that said that instead of doing all that
 modifying with apache, you could simply write something to change the URL
 with '?' and '' and '=' so that they symbols could be represented using a
 simple /, does anyone remember seeing it?...

dunno - think it's in the php.ini?

 In any case, I'll ask, what would be the best way to do this with
 scripting, something like str_replace() or perhaps a regular expression to
 both modify the URL and then allow pages using that modified URL to
 recognized the variable/value pairs? Or is that even possible?

You could... I'm hacking through using:

$path_array = explode('/', $REQUEST_URI);

$last_item  =   array_pop($path_array);
$next_to_last_item  =   array_pop($path_array); / item

only drawback is the positional stuff is fixed.
now I am trying to figure out how to generate my hrefs in the page to have a
matching structure

 My other question is this: Sometimes I notice URL's where it looks like
 this, http://www.whatever.com/?blah=blahd=d, or
 http://www.whatever.com/local?name=named=d. How is that done, where there
 is no file extension after the file name, or no file name at all, just a
 question mark directly after the slash?

probably the a .htaccess  or apache.conf directive:

Location /local
ForceType application/x-httpd-php3
/Location

This would send everything to a script called "local".
This is from: http://phpbuilder.com/columns/tim19990117.php3

hth,

regards,
jaxon

 thanks
 Chris



--
PHP General Mailing List (http://www.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] Requesting username/pwd with apache and aqcuiring input

2001-03-25 Thread Jaxon

check this out:
http://www.zend.com/zend/tut/authentication.php

regards,
jaxon


On 3/25/01 5:59 PM, "NoSpeed" [EMAIL PROTECTED] wrote:

 Hi
 
 I wondered if it was possible in PHP to let it pop up a screen which
 reqcuires username/pwd from the visitor, just like you can tell apache to do
 so with the .htaccess files.
 
 And if yes, how to retrieve the input from the user ?
 
 --
 - NoSpeed
 --
 - Carpe Noctem
 
 "The stickers on the side of the box said "Supported Platforms: Windows 98,
 Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported
 platform."
 
 


-- 
PHP General Mailing List (http://www.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 numeric index of array

2001-03-25 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Christian Dechery) wrote:

 $myArray = array(
   "one" = "something",
   "two" = "otherthing",
   "three" = "whatever"
   );
 
 I want to, given the key (or value), it returns me the numeric index for 
 that ocurrence... examples:
 
 given "one" - returns 0
 given "whatever" - returns 2
 given "two" - returns 1
 given "four" - returns NULL or false...

http://php.net/manual/en/function.array-search.php

(It's only avaliable in PHP4 CVS so far, but see the annotations for 
examples of user functions to do the same thing.)

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




Re: [PHP] Requesting username/pwd with apache and aqcuiring input

2001-03-25 Thread NoSpeed

Wow, great !! Just what I was looking for !

Thanks :

--
- NoSpeed
--
- Carpe Noctem

"The stickers on the side of the box said "Supported Platforms: Windows 98,
Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported
platform."
"Jaxon" [EMAIL PROTECTED] schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| check this out:
| http://www.zend.com/zend/tut/authentication.php
|
| regards,
| jaxon
|
|
| On 3/25/01 5:59 PM, "NoSpeed" [EMAIL PROTECTED] wrote:
|
|  Hi
| 
|  I wondered if it was possible in PHP to let it pop up a screen which
|  reqcuires username/pwd from the visitor, just like you can tell apache
to do
|  so with the .htaccess files.
| 
|  And if yes, how to retrieve the input from the user ?
| 
|  --
|  - NoSpeed
|  --
|  - Carpe Noctem
| 
|  "The stickers on the side of the box said "Supported Platforms: Windows
98,
|  Windows NT 4.0, Windows 2000 or better", so clearly Linux was a
supported
|  platform."
| 
| 
|
|
| --
| PHP General Mailing List (http://www.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] A few questions...

2001-03-25 Thread Jaxon

Chris,

 I think I just slightly unsure of how that explode() function works in this
 situation...could you clarify further?
 
 
 $path_array = explode('/', $REQUEST_URI);
 
 $last_item  =   array_pop($path_array);
 $next_to_last_item  =   array_pop($path_array); / item
 
$REQUEST_URI contains the non-domin path (the URI) - it's a predefined
variable like $PHP_SELF, etc

http://www.php.net/manual/en/language.variables.predefined.php

in this explode() example, the '/' is the devider, so if you have

http://www.somedomain.com/dir1/dir2/dir3/somepage3.php

The URI is: /dir1/dir2/dir3/somepage3.php

and 'exploding' divides that into array elements (dir1, dir2, dir3,
somepage.php)

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] PHP and MySQL insert problem

2001-03-25 Thread Pinwang Chao

Can any one help me with the following problem?

I have a very simple query:

 ...
$sql="insert into tt (a, b) values ('1', '2')";
$result=mysql_query($sql);
 ...

I always got the following error message when I run it from my browser.

Warning: MySQL: Unable to save result set in /usr/local/apache/htdocs/tt.php
on line 9

But even with this message, the values are still inserted into tt.

When I change $sql to sql="select * from tt";

There were no such error message.

It puzzled me? Why?

My system: PHP 4.0.4pl1, MySQL 3.23.32

Thanks in advance.


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

2001-03-25 Thread Chris Anderson

Is there any way to decrypt dat encrypted using the crypt function? If not, then what 
purpose does that function have?



RE: [PHP] A few questions...

2001-03-25 Thread Chris Cocuzzo

right. ok I understand that explode function. But what I'm asking is not so
much once I have a URL in the form of /something/something/something
...etc.., but more if I have a URL like /something?d=af=g, to make it like
/something/d/a/f/g  ... do you know what I mean?


Chris

-Original Message-
From: Jaxon [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 25, 2001 6:32 PM
To: [EMAIL PROTECTED]; PHP General List (E-mail)
Subject: Re: [PHP] A few questions...


Chris,

 I think I just slightly unsure of how that explode() function works in
this
 situation...could you clarify further?


 $path_array = explode('/', $REQUEST_URI);

 $last_item  =   array_pop($path_array);
 $next_to_last_item  =   array_pop($path_array); / item

$REQUEST_URI contains the non-domin path (the URI) - it's a predefined
variable like $PHP_SELF, etc

http://www.php.net/manual/en/language.variables.predefined.php

in this explode() example, the '/' is the devider, so if you have

http://www.somedomain.com/dir1/dir2/dir3/somepage3.php

The URI is: /dir1/dir2/dir3/somepage3.php

and 'exploding' divides that into array elements (dir1, dir2, dir3,
somepage.php)

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]




RE: [PHP] Decrypt Function?

2001-03-25 Thread Opec Kemp \( Ozemail \)

Unix "Crypt" function is a one way encrypytion algorithm therefore you
can not technically decrupted as such. The way that you can check to
see if the given uncrypted value is equals to its crypted value is to

1) Crypt the string with the same "salt"
2) Compare this with the crypted version

If these 2 are the same then you assume that the 2 strings are equal.
If you really want to "decrypt" the string i.e. turn the encrypted
version into its original readable text then you'll have to use
Mcrypt() functions in PHP instead (if you have PHP 4 and above ).
There are also other Encrytion functions available, check in the
manual:

http://www.php.net/manual/en/ref.mcrypt.php


 -Original Message-
 From: Chris Anderson [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, March 24, 2001 8:44 AM
 To: PHP
 Subject: [PHP] Decrypt Function?


 Is there any way to decrypt dat encrypted using the crypt
 function? If not, then what purpose does that function have?



-- 
PHP General Mailing List (http://www.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] Making a function/method private

2001-03-25 Thread Reuben D Budiardja


Hi all,
I know that we can't make a class method or variable private in php (I hope 
this get improved sometimes). But, I'm wondering if anyone has found a 
smart way to limit that only a certain file can call the function/method 
from another file.

Say, I have the file function_def.inc that has a whole bunch of function in 
it. I want to make it private. I want that only the file wrapper.inc can 
use the function inside function.def, by including it.

If I have another file, say application.php, and I include function_def.inc 
in application.php, I want that application.php still cannot use any 
function defined in function_def.inc.

Can I do that? If there is a way to do that, maybe there is a way to make 
some method in a class private by the putting it in certain file, using 
this same analogy. I want to do that because I'm developing an API/Wrapper 
for other developers, and I want to make some methods/functions private, 
for security reason.

Thanks for any help.
Reuben D. Budiardja






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

2001-03-25 Thread Jaxon

while a bit ugly, you could just use array_pop() to get each item into a
variable and then echo them back out into your variable assignment...

somewhat cleaner would be to create an assoc array of config vars:

$uri_items_num=count($path_array);
for ($i=1, $i = $uri_items_num, $i++)
{
$key=array_pop($path_array);
$value=array_pop($path_array);
config_array[$key] = $value
}

or something.

regards,
jaxon

On 3/25/01 6:54 PM, "Chris Cocuzzo" [EMAIL PROTECTED] wrote:

 right. ok I understand that explode function. But what I'm asking is not so
 much once I have a URL in the form of /something/something/something
 ...etc.., but more if I have a URL like /something?d=af=g, to make it like
 /something/d/a/f/g  ... do you know what I mean?
 
 
 Chris
 
 -Original Message-
 From: Jaxon [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, March 25, 2001 6:32 PM
 To: [EMAIL PROTECTED]; PHP General List (E-mail)
 Subject: Re: [PHP] A few questions...
 
 
 Chris,
 
 I think I just slightly unsure of how that explode() function works in
 this
 situation...could you clarify further?
 
 
 $path_array = explode('/', $REQUEST_URI);
 
 $last_item  =   array_pop($path_array);
 $next_to_last_item  =   array_pop($path_array); / item
 
 $REQUEST_URI contains the non-domin path (the URI) - it's a predefined
 variable like $PHP_SELF, etc
 
 http://www.php.net/manual/en/language.variables.predefined.php
 
 in this explode() example, the '/' is the devider, so if you have
 
 http://www.somedomain.com/dir1/dir2/dir3/somepage3.php
 
 The URI is: /dir1/dir2/dir3/somepage3.php
 
 and 'exploding' divides that into array elements (dir1, dir2, dir3,
 somepage.php)
 
 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]




Re: [PHP] Decrypt Function?

2001-03-25 Thread Stephan Ahonen

 Is there any way to decrypt dat encrypted using the crypt function? If
not, then what purpose does that function have? 

Crypt cannot be decrypted. One use of the function is for storing passwords
on a server where people can access them. If you crypt the passwords before
you store them on the server, nobody can see the actual passwords. Now when
someone tries to login with one of those passwords, you crypt the password
he enters, compare it with the version on the server, and if they match,
it's the right password.

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


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




Re: [PHP] Sendmail

2001-03-25 Thread Atet Sugiharto


Dear All,

I put the code like this :

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

html
head
 titleEmail/title
/head

body bgcolor="FEEBCC" link="#80" vlink="#80"" leftmargin="0"
topmargin="0" marginheight="0" marginwidth="0"
?php
  $to = '[EMAIL PROTECTED]';
  $from = '[EMAIL PROTECTED]';
  $body = " Hello World\r\n";
  $headers = "From: $from\r\n";
  $headers .= "Reply-To: $from\r\n";
  $success = mail($to, "Posted " . date("m/d/Y"), $body, $headers);
  if
uccess){ 
  echo "BCENTERThank you for your input/CENTER/B\n"; 
  } 
  else{ 
  echo "Error \n"; 
  } 
?



/body
/html

I've try to put this code to another server and it's work.
I really lost to figure out what's wrong with my configuration (I'm new in PHP too..)

Thanks for all answer ...

regards,

Atet



it would help if you showed a snippet of your mail code
- Original Message -
From: "Atet Sugiharto" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 24, 2001 1:49 AM
Subject: [PHP] Sendmail


 Hi ,

 I'm at a lossI've searched throught the knowledgebase, archives, docs,
 etc but I can't figure out what's going on.  The problem is when using the
 mail() function nothing gets send and I don't get any error messages
either.
 It's like the message gets eaten by a black hole.

 I already put "-t -i" in the path, but still doesn't work ..
 Anybody can help me ?

 Regards,

 Atet Sugiharto


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

2001-03-25 Thread Valter Santos


 Is there any way to decrypt dat encrypted using the crypt 
 function? If not, then what purpose does that function have?

Encrypt data!  ;)
crypt is a one-way finction, it produces a hash from some
plain text, and its result is suitable to store sensitive
data in database, like passwords...

If you want to store information that you want to get back to
the initial state (plain text) you should not use crypt() or
md5()...

If you only want to store encrypted passwords crypt is enought..
When you want to confirm that a inputed text is equals to the 
stored and encrypted password, you just have to encrypt the inputed text
and compare it with the previously stored password...




Valter Santos
WEB/WAP Consultant

Email : [EMAIL PROTECTED]
Mobile: +351 93 9650075

WeDo Consulting - http://www.wedo.pt



 -Original Message-
 From: Chris Anderson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 23, 2001 10:44 PM
 To: PHP
 Subject: [PHP] Decrypt Function?
 
 
 Is there any way to decrypt dat encrypted using the crypt 
 function? If not, then what purpose does that function have?
 

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

2001-03-25 Thread David Robley

On Sun, 25 Mar 2001 08:52, Paulo Vincius Vitto Ruthes wrote:
 folks,
 i installed php4 by a RPM, it wasn't compiled --enable-gd-imgstrttf ,
 so, when I use a function like
 ImageTTFText(), it returns me the text mirrowed (inverted like a
 mirror) and the angulation doesn't work right...
 but, when I try to compile the tar.gz php installation,
 it don't let me compile because can't find libgd.*
 not in /usr /usr/lib... can anybody give me a really good reason for
 this not working?

1) You don't have libgd installed?
2) You have it somewhere else like /usr/local/lib?

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

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




Re: [PHP] 'How to jump..' part 2

2001-03-25 Thread David Robley

On Mon, 26 Mar 2001 08:25, Christian Dechery wrote:
 Regarding my last email (about jumping the first 7 rows of an array)...

 why does this code doesnt work?

 for(reset($array),$count=0;$count6;next($array),$count++);
 
 . Christian Dechery (lemming)
 . http://www.tanamesa.com.br
 . Gaita-L Owner / Web Developer

I don't think PHP will understand commas as command separators.

Perhaps what you could try is a simple loop 0 to 6 and for each iteration 
of the loop, unset the corresponding array element

for($i=0; $i = 6; $i++) {
 unset($array[$i];
 }

Better still if you have PHP4, use array_shift to pop the first however 
many elements from the front of the array.

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

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




Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-25 Thread David Robley

On Sat, 24 Mar 2001 11:07, YoBro wrote:
 What could I possibly be doing wrong here. The information just will
 not insert into my database.
 ARGH!

 Please help if you can...

 ?php

 $user = "xyz";
 $pass = "123";


 //Connect to Database xyz
 $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect
 to database");

 mysql_select_db("xyz",$db) OR DIE("Unable to connect to database");

 $sql = ("INSERT INTO orders VALUES
 'product,name,email'($product,$name,$email)");
 $result = mysql_query($sql);

echo mysql_error();

  echo "Order for the $product has been sent";


 ?

I think you got the solution to your problem, but for future debugging 
you might want to add the line above which will spit out a meaningful 
error message. You could of course combine that with mysql_errno() for 
some error handling branching.

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

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




Re: [PHP] I want to execute a cgi

2001-03-25 Thread David Robley

On Sat, 24 Mar 2001 14:58, Brandon Orther wrote:
 Hello,

 I have a cgi that I run in telnet by doing this:

 perl /script/cgi-script.cgi name=cgi+script purpose=test

 is there a way I can run a cgi script and pass it variables?

 Thanks
 Brandon

Check the Program execution functions; exec, system or the backtick 
operator should do what you want.

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

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




Re: [PHP] I need an expert to tell me what I am doing wrong

2001-03-25 Thread trogers

Hi
what you need is:
$sql = "INSERT INTO orders (product,name,email)
:VALUES ('$product','$name','$email')";
You will also need to escape any single quotes in the variables
Tom

At 01:05 PM 24/03/01 +1200, YoBro wrote:
I have tried that, and I have been reading all sorts of info and been
copying it exact, but it still doesn't work. I am not receiving any errors,
but the data just doesn't appear in the database. I have the table set up
and it all works fine in phpMyAdmin, but I cant get my own form to work.

There is a page called order.php with a form that on submit goes to the
discussed page. All field variables are correct. Any other ideas.

: You don't say where the failure is, but I'm guessing its when you do the
: mysql_query. Your INSERT statement looks a bit odd.
: Try:
:
:  $sql = "INSERT INTO orders (product,name,email)
:VALUES ($product,$name,$email)";
:
: John
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:



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


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




[PHP] about:home

2001-03-25 Thread JCampbell

I know it is possible to redirect a user to their home page, but is it possible to 
determine what home page they are using?





Re: [PHP] URL parsing

2001-03-25 Thread Jaxon

K, read em all, and understood more than I thought I :)


I still don't see how you can 'sanitize' a URI, eg discard anything
including and after "//" or "??".  I think this is needed if you want to
discard a query string or irregular syntax from your URI.

ereg's don't work reliably, due to the possibility of special chars in the
URI.

regards,
jaxon

On 3/25/01 3:18 PM, "Philip Olson" [EMAIL PROTECTED] wrote:

 Hi!
 
 Check out these two related articles (and user comments) :
 
 Building Dynamic Pages With Search Engines in Mind :
 
   * http://phpbuilder.com/columns/tim19990117.php3
   * http://phpbuilder.com/columns/tim2526.php3
 
 Also check phpinfo() for available predefined variables and plan
 accordingly.
 
 Predefined Variables   :
 
   * http://www.php.net/manual/en/language.variables.predefined.php
 
 And for the brave, check out mod_rewrite :
 
 Mod-Rewrite:
 
   * http://httpd.apache.org/docs/mod/mod_rewrite.html
   * http://www.engelschall.com/pw/apache/rewriteguide/
   * http://marc.theaimsgroup.com/?l=php-generals=mod_rewrite
 
 
 Regards,
 
 Philip Olson
 http://www.cornado.com/
 
 


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




Re: [PHP] Decrypt Function?

2001-03-25 Thread Chris Anderson

A, I see. Thank youthat is actually a great idea. Why didn't I think of
that?
/me hits himself in the head
- Original Message -
From: "Opec Kemp ( Ozemail )" [EMAIL PROTECTED]
To: "PHP List" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, March 25, 2001 6:57 PM
Subject: RE: [PHP] Decrypt Function?


 Unix "Crypt" function is a one way encrypytion algorithm therefore you
 can not technically decrupted as such. The way that you can check to
 see if the given uncrypted value is equals to its crypted value is to

 1) Crypt the string with the same "salt"
 2) Compare this with the crypted version

 If these 2 are the same then you assume that the 2 strings are equal.
 If you really want to "decrypt" the string i.e. turn the encrypted
 version into its original readable text then you'll have to use
 Mcrypt() functions in PHP instead (if you have PHP 4 and above ).
 There are also other Encrytion functions available, check in the
 manual:

 http://www.php.net/manual/en/ref.mcrypt.php


  -Original Message-
  From: Chris Anderson [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, March 24, 2001 8:44 AM
  To: PHP
  Subject: [PHP] Decrypt Function?
 
 
  Is there any way to decrypt dat encrypted using the crypt
  function? If not, then what purpose does that function have?
 


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

2001-03-25 Thread Chien-pin Wang


If you use sequence to generate your last_inserted_id, then you can always
get that ID by calling

SELECT sequence_name.CURRVAL
FROM DUAL;

within the same session.

Chien-pin

On Sun, 25 Mar 2001, almir wrote:

 is there a way to get last inserted id from oracle as
 mysql_inerted_id() or
 SELECT @@IDENTITY AS LastId
 in mssql server
 
 i have a function that does only that, takes insert statement and returns
 last id,  but this function have to work for all tables (different triggers
 in oracle) , right now the only thing i can imagine is to give this function
 the name of ID column and read name of table with regex and then do
 select max(parametar_id) from regex_table
 and then to do commit ,
 this way is somehow realy stupid but is my only solution in this moment so
 if you have any better ideas plese help
 
 almir
 
 
 
 


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

2001-03-25 Thread Aaron Tuller

why can't you str_replace the $QUERY_STRING frm the $REQUEST_URI?

give an example of what you are trying to do?  (I'm sorry if you did 
and I missed it)

-aaron

At 9:06 PM -0500 3/25/01, Jaxon wrote:
K, read em all, and understood more than I thought I :)


I still don't see how you can 'sanitize' a URI, eg discard anything
including and after "//" or "??".  I think this is needed if you want to
discard a query string or irregular syntax from your URI.

ereg's don't work reliably, due to the possibility of special chars in the
URI.

regards,
jaxon

On 3/25/01 3:18 PM, "Philip Olson" [EMAIL PROTECTED] wrote:

  Hi!

  Check out these two related articles (and user comments) :

  Building Dynamic Pages With Search Engines in Mind :
  
* http://phpbuilder.com/columns/tim19990117.php3
* http://phpbuilder.com/columns/tim2526.php3

  Also check phpinfo() for available predefined variables and plan
  accordingly.

  Predefined Variables   :
  
* http://www.php.net/manual/en/language.variables.predefined.php

  And for the brave, check out mod_rewrite :

  Mod-Rewrite:
  
* http://httpd.apache.org/docs/mod/mod_rewrite.html
* http://www.engelschall.com/pw/apache/rewriteguide/
* http://marc.theaimsgroup.com/?l=php-generals=mod_rewrite


  Regards,

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




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


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




Re: [PHP] URL parsing

2001-03-25 Thread Jaxon

whups, sorry - here is the example:

I want to turn URI's like:

/script.php/main/index.html?junk=junk
/script.php/main/index.html//
/script.php/main/index.html??

all into:

/script.php/main/index.html

best regards,
jaxon

On 3/25/01 9:25 PM, "Aaron Tuller" [EMAIL PROTECTED] wrote:

 why can't you str_replace the $QUERY_STRING frm the $REQUEST_URI?
 
 give an example of what you are trying to do?  (I'm sorry if you did
 and I missed it)
 
 -aaron
 
 At 9:06 PM -0500 3/25/01, Jaxon wrote:
 K, read em all, and understood more than I thought I :)
 
 
 I still don't see how you can 'sanitize' a URI, eg discard anything
 including and after "//" or "??".  I think this is needed if you want to
 discard a query string or irregular syntax from your URI.
 
 ereg's don't work reliably, due to the possibility of special chars in the
 URI.
 
 regards,
 jaxon
 
 On 3/25/01 3:18 PM, "Philip Olson" [EMAIL PROTECTED] wrote:
 
  Hi!
 
  Check out these two related articles (and user comments) :
 
  Building Dynamic Pages With Search Engines in Mind :
  
* http://phpbuilder.com/columns/tim19990117.php3
* http://phpbuilder.com/columns/tim2526.php3
 
  Also check phpinfo() for available predefined variables and plan
  accordingly.
 
  Predefined Variables   :
  
* http://www.php.net/manual/en/language.variables.predefined.php
 
  And for the brave, check out mod_rewrite :
 
  Mod-Rewrite:
  
* http://httpd.apache.org/docs/mod/mod_rewrite.html
* http://www.engelschall.com/pw/apache/rewriteguide/
* http://marc.theaimsgroup.com/?l=php-generals=mod_rewrite
 
 
  Regards,
 
  Philip Olson
  http://www.cornado.com/
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




[PHP] array in cookie . . .

2001-03-25 Thread PHPretard

Im trying to get an array saved in a cookie, I have this snippet so far..

?
if (newuser == yes) {
   $user_reg[0]= $username;
   $user_reg[1]= $password;
   $user_reg[2]= $fullname;
   $user_reg[3]= $email;
   $user_reg[4]= $age;
setcookie ("user_reg" , $user_reg, time() + 360 * 86400);
   $done_message = "thankyou, $user_reg[0].";
}else{
  $done_message = $sign_form;
}
?

$username and the others vars are coming from a form submitted.
did I write this ok?

is there a limit to how much I can save in the array ?

Thanx 

amd


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


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




[PHP] The ubitquitous forum project

2001-03-25 Thread Kath

I guess I'm doing another rite of passage for a PHP programmer: The forum

Any advice?

I did code forums once before, but they were rather rudimentary (No OOP, poorly 
written, no DB abstraction).

- Kath



Re: [PHP] The ubitquitous forum project

2001-03-25 Thread Stephan Ahonen

 Any advice?

USENET style threads. I *really* hate Phorum-style threads, where
everything's just tacked onto the end. Though Phorum-style is easier, it
really detracts from the conversation when you have to write whose post
you're replying to in your replies.

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


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




Re: [PHP] reading microsoft word, excel, pdf document text

2001-03-25 Thread Erick Papadakis

hi david,

thanks for the note. ok, here is what i want to do. i
want my users to upload WORD, XLS, PPT and PDF files.
when they upload, i store these files in the temp
directory, grab the text from them, and then put it
into my database for later searching. i dont care
about the formatting, i only care about the text
because i need the keywords later for searching. 

can i run some sort of a parser on the server side
like the wvware.com's word parser and just call it
through php? i have not been able to figure out how to
do this using php. 

i would really appreciate any ideas and suggestions! 

thanks/erick



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

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




Re: [PHP] The ubitquitous forum project

2001-03-25 Thread Gfunk

What's the difference between newsgroup-style and phorum style threads?

I'm always doing messageboards, and this thread got my attention


  Gfunk - [EMAIL PROTECTED]
http://www.gfunk007.com/



- Original Message -
From: "Stephan Ahonen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 26, 2001 1:46 PM
Subject: Re: [PHP] The ubitquitous forum project


  Any advice?

 USENET style threads. I *really* hate Phorum-style threads, where
 everything's just tacked onto the end. Though Phorum-style is easier, it
 really detracts from the conversation when you have to write whose post
 you're replying to in your replies.

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


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



-- 
PHP General Mailing List (http://www.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] The ubitquitous forum project

2001-03-25 Thread Kath

I think what he means is this:

This is newsgroup style:

+ Main Post
|
| - Reply 1
|
| --- Reply 1 to Reply 1
| --- Reply 2 to Reply 1
   |
   | --- Reply 1 to Reply 2 to Reply 1
|
| - Reply 2

( I hope that formatted ok)

This is phorum style:

+ Main Post

- Reply 1

- Reply 2

- Reply 3

- Reply 4

I'm partial to phorum style, myself.

- Kath

- Original Message -
From: "Gfunk" [EMAIL PROTECTED]
To: "Stephan Ahonen" [EMAIL PROTECTED]; "PHP User Group"
[EMAIL PROTECTED]
Sent: Sunday, March 25, 2001 10:48 PM
Subject: Re: [PHP] The ubitquitous forum project


 What's the difference between newsgroup-style and phorum style threads?

 I'm always doing messageboards, and this thread got my attention

 --
--
   Gfunk - [EMAIL PROTECTED]
 http://www.gfunk007.com/
 --
--


 - Original Message -
 From: "Stephan Ahonen" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 26, 2001 1:46 PM
 Subject: Re: [PHP] The ubitquitous forum project


   Any advice?
 
  USENET style threads. I *really* hate Phorum-style threads, where
  everything's just tacked onto the end. Though Phorum-style is easier, it
  really detracts from the conversation when you have to write whose post
  you're replying to in your replies.
 
  Sig for a Day
  Stephan Ahonen, ICQ 491101
  "That's very funny Scotty, now beam down my clothes!"
  Come back tomorrow for a different sig!
  Backspace a single "s" to reply by email
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP General Mailing List (http://www.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] drop down used to redirect?

2001-03-25 Thread Data Driven Design

You can do it with javascript like this.

script language="javascript"
function go(selectBox) {
var where = selectBox.options[selectBox.selectedIndex].value;
if (where != "") window.location = where;
}
/script

form
select onchange="go(this)"
option value="page.html"Page/option
...

Or you can use PHP like this.

form action="nav.php" method="post"
select name="loc"
option value="page.html"page/option
...

--- nav.php ---
?php
header("Location:$loc");
?

- Original Message -
From: duirfire [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Sunday, March 25, 2001 2:39 PM
Subject: [PHP] drop down used to redirect?



 Hi, can anyone point me towards an example of how to use a drop down
select
 as a navigation jump, maybe by sending a redirect header?

 thanks!
 duirfire




 --
 PHP General Mailing List (http://www.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] The ubitquitous forum project

2001-03-25 Thread Matt Stone

I dont like any of them, the UBB style is the best.

-Original Message-
From: Kath [mailto:[EMAIL PROTECTED]]
Sent: Monday, 26 March 2001 2:02 PM
To: Gfunk; Stephan Ahonen; PHP User Group
Subject: Re: [PHP] The ubitquitous forum project


I think what he means is this:

This is newsgroup style:

+ Main Post
|
| - Reply 1
|
| --- Reply 1 to Reply 1
| --- Reply 2 to Reply 1
   |
   | --- Reply 1 to Reply 2 to Reply 1
|
| - Reply 2

( I hope that formatted ok)

This is phorum style:

+ Main Post

- Reply 1

- Reply 2

- Reply 3

- Reply 4

I'm partial to phorum style, myself.

- Kath

- Original Message -
From: "Gfunk" [EMAIL PROTECTED]
To: "Stephan Ahonen" [EMAIL PROTECTED]; "PHP User Group"
[EMAIL PROTECTED]
Sent: Sunday, March 25, 2001 10:48 PM
Subject: Re: [PHP] The ubitquitous forum project


 What's the difference between newsgroup-style and phorum style threads?

 I'm always doing messageboards, and this thread got my attention

 --
--
   Gfunk - [EMAIL PROTECTED]
 http://www.gfunk007.com/
 --
--


 - Original Message -
 From: "Stephan Ahonen" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 26, 2001 1:46 PM
 Subject: Re: [PHP] The ubitquitous forum project


   Any advice?
 
  USENET style threads. I *really* hate Phorum-style threads, where
  everything's just tacked onto the end. Though Phorum-style is easier, it
  really detracts from the conversation when you have to write whose post
  you're replying to in your replies.
 
  Sig for a Day
  Stephan Ahonen, ICQ 491101
  "That's very funny Scotty, now beam down my clothes!"
  Come back tomorrow for a different sig!
  Backspace a single "s" to reply by email
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


 --
 PHP General Mailing List (http://www.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] reading microsoft word, excel, pdf document text

2001-03-25 Thread Reinke Bonte

Hey Erick,

unfortunately I know little about this myself, but I'm sure, this article
will help you as a starting point.

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


Good luck


-ren



- Original Message -
From: "Erick Papadakis" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 26, 2001 11:50 AM
Subject: Re: [PHP] reading microsoft word, excel, pdf document text


 hi david,

 thanks for the note. ok, here is what i want to do. i
 want my users to upload WORD, XLS, PPT and PDF files.
 when they upload, i store these files in the temp
 directory, grab the text from them, and then put it
 into my database for later searching. i dont care
 about the formatting, i only care about the text
 because i need the keywords later for searching.

 can i run some sort of a parser on the server side
 like the wvware.com's word parser and just call it
 through php? i have not been able to figure out how to
 do this using php.

 i would really appreciate any ideas and suggestions!

 thanks/erick



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

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




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




Re: [PHP] reading microsoft word, excel, pdf document text

2001-03-25 Thread Erick Papadakis

hi renike,

thanks for that link, but looks like that tutorial
will only work on windows machines (because of COM
objects)?

i am on a linux box.


cheers/erick



--- Reinke Bonte [EMAIL PROTECTED] wrote:
 Hey Erick,
 
 unfortunately I know little about this myself, but
 I'm sure, this article
 will help you as a starting point.
 
 http://www.phpbuilder.com/columns/alain20001003.php3
 
 
 Good luck
 
 
 -ren



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

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




[PHP] Cookie problem

2001-03-25 Thread Martin Skjöldebrand

I'm experiencing all kinds of problems with, what we suppose is the cookie 
setting. This is the code:

if (isset($authentication)) {
  setcookie("status", $status, time()+600);
  setcookie("user", $user, time()+600);
  setcookie("group", $group, time()+600);
  setcookie("authentication", $authentication, time()+600);
  setcookie("laston", $laston, time()+600);
}
else {
  setcookie("status", "Logged In", time()+600);
  setcookie("user", $txtUsername, time()+600);
  setcookie("group", $row[4], time()+600);
  setcookie("authentication", "YES", time()+600);
  setcookie("laston", $row[6], time()+600);
}

(I have not coded this).

What seems to happen is that - with alarming regularity - people are 
getting logged off when choosing item from a menu. Either they are thrown 
out into the log on-screen or (as has happened to me recently) the app 
simply states I'm not logged on even if I am in the middle of using it (and 
must have logged on).

I'm not at all familiar with cookies (yet) but suspect that the timing of 
the critters could be a culprit. IS this correct?
How do I solve the problem?

M.

-- 
PHP General Mailing List (http://www.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] reading microsoft word, excel, pdf document text

2001-03-25 Thread Reinke Bonte

As far as I know, you can do very little in this respect on a non-windows
machine without some programming in a lower generation language. Don't you
have a windows machine somewhere in your network? Just pass it on to that
machine, and let it do this work. I personally would prefer doing this in
perl.

-ren

- Original Message -
From: "Erick Papadakis" [EMAIL PROTECTED]
To: "Reinke Bonte" [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, March 26, 2001 12:26 PM
Subject: Re: [PHP] reading microsoft word, excel, pdf document text


 hi renike,

 thanks for that link, but looks like that tutorial
 will only work on windows machines (because of COM
 objects)?

 i am on a linux box.


 cheers/erick



 --- Reinke Bonte [EMAIL PROTECTED] wrote:
  Hey Erick,
 
  unfortunately I know little about this myself, but
  I'm sure, this article
  will help you as a starting point.
 
  http://www.phpbuilder.com/columns/alain20001003.php3
 
 
  Good luck
 
 
  -ren



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

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




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




RE: [PHP] Delaying Printed Output

2001-03-25 Thread Andrew Braund

This topic comes up from time to time...

Some previous information, if you get any further please post it to the list.


A while ago I saw a web page explaining a system (written in Perl I
think) that was used to show a presentation to a number of different
sites simultaneously (and synchronised). A presenter was at the main
site and the browsers at 4 other remote sites would display the same
page the presenter was viewing on his web browser as he went to various
sites. I think it worked using multipart Content-type.
Unfortunately I have lost the URL to the explanation of how it was
done.

On Saturday, 5 August 2000 8:48 AM Mr Bruce Christensen posted the following links 
explaining browser push;
http://home.netscape.com/assist/net_sites/pushpull.html
and;
As for keeping the connection from timing out, see
http://www.php.net/manual/function.set-time-limit.php.


I have experimented with this but didn't get too far. I posted the following to the 
PHP list but didn't get any reply.



I have tried the following script on
 WinNT5, Apache/1.3.13-dev,  PHP Version 4.0.1pl2
and
 OpenBSD2.7 Apache/1.3.12, PHP Version 4.0.1pl2 (mod_php4)

push.php;

--8---snip---8--start
?php
header("HTTP/1.0 200 OK");
header("Content-type:
multipart/x-mixed-replace;boundary=ThisRandomString");
print("\n");
print( "--ThisRandomString\n");
print("Content-type: text/html\n");
print("\n");
print( "First update at ");
echo date("H:i:s");
print("\n\n");
print( "--ThisRandomString\n");
flush();
sleep(5);

print("Content-type: text/html\n");
print("\n");
print( "Second update at ");
echo date("H:i:s");
print("\n\n");
print("--ThisRandomString--\n");
?
--8---snip---8--end

On NT with the
 header("HTTP/1.0 200 OK");
statement I get an Apache error message;
  [Sun Aug 06 09:02:47 2000] [error] [client 192.168.0.60] malformed
  header from script. Bad header=HTTP/1.0 200 OK: f:/program files
  /novato/allcnet/php.exe

I do not get this error on OpenBSD.

I then removed the
 header("HTTP/1.0 200 OK");
statement and now NT and OpenBSD give the following output
to the browser(IE5.0);
(after a 5 second pause)

--8---snip---8--start
--ThisRandomString
Content-type: text/html

First update at 18:22:47

--ThisRandomString
Content-type: text/html

Second update at 18:22:52

--ThisRandomString
--8---snip---8--end

And the following output to the browser(Netscape 4.6);
(after a 5 second pause)

--8---snip---8--start
Second update at 18:23:19
--8---snip---8--end

ie With Netscape I never see the
 first update at ...
part of the output as I would expect.

I have also tried it with;
header("Content-type: multipart/mixed;boundary=ThisRandomString");

but it makes no difference, the behaviour is identical.

IE5 does not seem to understand multipart.
The multipart mime boundary does not seem to be working properly in
Netscape4.6.


Regards
Andrew Braund


 -Original Message-
 From: Greg Scott [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, 25 March 2001 04:49
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Delaying Printed Output
 
 
  You might try using flush() after the prints.
  
 I tried that too, but at least in Netscape 6, it still waits until 
 everything is done before displaying.  I think Jack must be correct that 
 this isn't possible for browser display.
 
 Thanks,
 Greg


-- 
PHP General Mailing List (http://www.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] imap_open() dosen't work :(

2001-03-25 Thread Nilesh Parmar

Hi  Gurus :)

 I have installed php4.0.4 on my windows 98 machine with apache .I am having
a problem while calling te imap_open() function.I get the following error.I
get this error also with Linux.(Redhat 7.0).
**
Call to undefined function: imap_open() in c:\Program Files\apache
group\apache\htdocs\imap.php

***
Do I require to configure any file or change any settings ?
 Can anyone figure out what is the problem.I can however telnet successfully
to my imap server.
 Thanx in advance
Nilesh Parmar



-- 
PHP General Mailing List (http://www.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] The ubitquitous forum project

2001-03-25 Thread Felix Kronlage

On Mon, Mar 26, 2001 at 02:11:46PM +1000, Matt Stone wrote:

 I dont like any of them, the UBB style is the best.

what's UBB-style like?

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 

 PGP signature


RE: [PHP] The ubitquitous forum project

2001-03-25 Thread Matt Stone

Like so http://www.planetveggie.com/ubb-bin/Ultimate.cgi?action=intro
Basically

Topic 1
Topic 2
Topic 3
Topic 4
Topic 5

say I click on topic 5 then

Topic 5
Post 1
Post 1
Post 1
Post 1

-Original Message-
From: Felix Kronlage [mailto:[EMAIL PROTECTED]]
Sent: Monday, 26 March 2001 2:52 PM
To: Matt Stone
Cc: PHP User Group
Subject: Re: [PHP] The ubitquitous forum project


On Mon, Mar 26, 2001 at 02:11:46PM +1000, Matt Stone wrote:

 I dont like any of them, the UBB style is the best.

what's UBB-style like?

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


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




  1   2   >