[PHP] Php with Frames

2001-04-01 Thread Diego Pérez Rández


Hi to all:

I have a page with two frames. In the top frame I have a form where
I can select some options. When I press the send button a php program
generate a html page that I want to show in the Botton frame. I don't
know how I can load the new page generate in the botton frame. I only
want to change the botton frame not the top.

Probably its easy to do.

Can someone help me?

Thanks.


Best regards, Diego


-- 
PHP General Mailing List (http://www.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 1 Apr 2001 09:25:46 -0000 Issue 601

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


php-general Digest 1 Apr 2001 09:25:46 - Issue 601

Topics (messages 46467 through 46499):

Re: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah lookingfor? .h? .so? .a? 
what?!
46467 by: Daevid Vincent

Saving file
46468 by: Adi Wibowo
46485 by: Yasuo Ohgaki
46486 by: Yasuo Ohgaki

sessions and cookies
46469 by: David Hynes
46470 by: \[Inf\] F!RE-WALL

Remembering variables during Ping-Pong session
46471 by: David Minor

mail() and a Data format error
46472 by: Chris Cameron

Can a WHILE be done inside an array?
46473 by: Kenneth R Zink II

fetching MS SQL errors...
46474 by: Christian Dechery

RH7, Oracle 8i: Curiouser and Curiouser
46475 by: Jon Jacob

registering an array into a session (?)
46476 by: Christian Dechery

Re: php...]
46477 by: Yasuo Ohgaki
46491 by: Yasuo Ohgaki

Re: Compiling under RH7
46478 by: Yasuo Ohgaki
46498 by: Jon Jacob

Re: hash suggestions wanted
46479 by: Yasuo Ohgaki

Re: Question using chop :-)
46480 by: Yasuo Ohgaki

Re: Install
46481 by: Yasuo Ohgaki

Re: Disk Quota Through web
46482 by: Yasuo Ohgaki

Re: problem loading extension
46483 by: Yasuo Ohgaki

PHP4.04pl1/pdflib3.0.3 compile issue
46484 by: Lindsay Adams

APC version 1.0.9 pushed
46487 by: George Schlossnagle

form
46488 by: LDL Enterprise
46489 by: Michael Hall
46494 by: Chris Adams
46496 by: Sean Weissensee
46497 by: Chris Adams

ereg
46490 by: Michael Hall
46495 by: Chris Adams

Reading db fetched values from files.
46492 by: Thomas Edison Jr.

Re: Passing Special Characters in Query String
46493 by: Thomas Edison Jr.

Php with Frames
46499 by: Diego Pérez Rández

Administrivia:

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

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

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


--



I get the "No such file or directory" right after the "license box" shows up
in the PHP4 compile. Like this (no matter what directory I've tried in that
big old list so far):

./WTConfigure: --with-openlink=/usr/local/openlink/lib: No such file or
directory

"./WTConfigure" is just a shell script with make clean, all my --options,
make, make install, since I have to compile in mysql, and some other stuff.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 4:00 PM
> To: Daevid Vincent; [EMAIL PROTECTED]; PHP General
> Subject: Re: [PHP-DB] RE: [PHP] RE: what exactly are /path/to/blah
> lookingfor? .h? .so? .a? what?!
>
>
> Daevid,
>
> just --with-iodbc or --with-openlink is fine.
>
> you should be using either:
>
> --with-iodbc=/usr/local/openlink/odbcsdk \
> or
> --with-openlink=/usr/local/openlink/lib \
>
> depending on which you use and where you installed the sdk.
> what error are you getting?
>
> Best regards,
> Andrew
>
>
> On 3/30/01 6:54 PM, "Daevid Vincent" <[EMAIL PROTECTED]> wrote:
>
> > thanks for replying Andrew, but that's not working for me either.
> >
> > Also, do I need both "--with-iodbc" and "--with-openlink" or do
> I just need
> > one of them?
> >
> > These are the instructions I've been following:
> > http://www.iodbc.org/odbc-phpHOWTO.html
> >
> > so now I've tried:
> >
> >#--with-iodbc=/usr/local/openlink/odbcsdk/lib \
> >#--with-iodbc=/usr/local/openlink/odbcsdk \
> >#--with-iodbc=/usr/local/openlink/lib \
> >#--with-iodbc=/usr/local/bin \
> >#--with-iodbc=/usr/local \
> >#--with-iodbc=/usr/local/include \
> >#--with-iodbc=../libiodbc \
> >#--with-openlink=/usr/local/openlink/odbcsdk/lib \
> >#--with-openlink=/usr/local/openlink/odbcsdk \
> >#--with-openlink=/usr/local/openlink \
> >#--with-openlink=/usr/local/openlink/lib \
> >
> > here is my dir structure:
> > the files are there, why won't PHP see them? In fact I have the
> > "libiodbc.so" library in TWO places I see: "openlink/lib/" and
> > "openlink/odbcsdk/lib/"
> >
> > [root=pts/1]3:45pm@content:{/usr/local/openlink}> ll -r
> > /usr/local/openlink/*
> > -rw-rw-rw-1 nobody   html0 Mar 29 20:20
> > /usr/local/openlink/oplrqb.ini
> > -rwxr-xr-x1 nobody   html  707 Mar 30 15:16
> > /usr/local/openlink/openlink.sh*
> > -rwxr-xr-x1 nobody   html  619 Mar 30 15:16
> > /usr/local/openlink/openlink.csh*
> > -rw-rw-rw-1 nobody   html  180 Mar 29 20:21
> > /usr/local/openlink/odbcinst.ini
> > -rw-rw-rw-1 nobody   html  541 Mar 30 13:51
> > /usr/local/openlink/odbc.ini
> > -rw-rw-rw-1 nobody   html   196347 Mar 29 17:54
> > /usr/local/openli

Re: [PHP] login without database

2001-04-01 Thread Erick Papadakis

Does this work on Windows machines?  WHat is the $PHP_AUTH_USER and where
does it come from? What should my access.inc.php look like? I saw the
PHP_AUTH_USER on the www.php.net website but looks like it is only possible
on PHP module, not pHP CGI?

Thanks in advance




-
"Romeo Manzur" <[EMAIL PROTECTED]> wrote:

> require('acces.inc.php');
> if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) && (
> $PHP_AUTH_PW == "$st_PASSWORD" )) ) {
>   header("WWW-Authenticate: Basic entrer=\"Admin Basta\"");
>   header("HTTP/1.0 401 Unauthorized");
>   echo "Access in-autorizado...";
>   exit;
> }
>
> where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for
> authenticate you login, you have to put this code before the  tag...
> luck...



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



-- 
PHP General Mailing List (http://www.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] mail(): "\r\n" gives extra empty line between each line in Outlook

2001-04-01 Thread Erick Papadakis

I am not sure what you want to do, but you could try this:

$myText = nl2br($dataFromSubmittedTextBox);


Then $myText will have the correct values.

Cheers


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



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




[PHP] Re: Compiling PHP4, & Re: Image resizing

2001-04-01 Thread Daniel B I

Hey, man, you dont look at this list too often, isnt it?
Some days ago I wrote about this.
Here is the message one more time:

You need the jpeg support. Shortly, do this:
(I will use my version names, so you can easyly
find something, if you find newer ones, it's your bussiness)

1. search the internet for: 
jpegsrc.v6b.tar.gz 
gd-1.8.3.tar.gz
apache_1.3.14.tar.gz
php-4.0.4.tar.gz

2. unzip all files in a tmp directory (let's say /tmp ):
tar zxvf jpegsrc.v6b.tar.gz 
the same for gd, php, apache...

3. modify the 'Makefile' of the jpeg kit, to meet your requirements
(only the paths to be correct, as your are)
then issue: 
 ./configure --enable-shared --enable-static
then
 make 
 make install

4. modify the gd Makefile:
put there the your paths and uncomment the 'CFLAGS' line that 
enables the jpeg support (something like CFLAGS -DHAVE jpeg)
then issue:
 make
 make install

5. now configure php and apache and compile them. it should work.
it took me alot these days to discover all of this..

I hope it helps.





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




[PHP-CVS] cvs: php4 / NEWS

2001-04-01 Thread Sebastian Bergmann

sbergmann   Sun Apr  1 07:13:10 2001 EDT

  Modified files:  
/php4   NEWS 
  Log:
  Fixed some glitches in NEWS. (Yes, you may call me pedantic :-)
  

Index: php4/NEWS
diff -u php4/NEWS:1.624 php4/NEWS:1.625
--- php4/NEWS:1.624 Mon Mar 26 12:10:19 2001
+++ php4/NEWS   Sun Apr  1 07:13:09 2001
@@ -4,9 +4,8 @@
 ?? ??? 200?, Version 4.0.6
 - Modified get_parent_class() and get_class_methods() to accept a class name as
   well as a class instance. (Andrei, Zend Engine)
-- Added support for UNC style paths (\\server\share\file & //server/share/file)
+- Added support for UNC style paths. (\\server\share\file, //server/share/file)
   (Daniel, TSRM)
-- Changed C++ style comments to C-style comments (Marc)
 - Added dbx module (database abstraction) to the repository. (Marc)
 - Using ITypeInfo instead of IDispatch if possible. This makes DCOM calls
   and even COM calls much faster.
@@ -14,11 +13,10 @@
   Now you need not provide a path to the file containing the typelib, you can
   also provide the GUID of the TypeLib - entry or an IID for preloading
   type - information. (phanto)
-- Rewrite of domxml. It's now mostly DOM Level 2 conform (Uwe)
+- Rewrite of domxml. It's now mostly DOM Level 2 conform. (Uwe)
 - Added array_map() function that applies a callback to the elements
   of given arrays and returns the result. It can also be used with a
   null callback to transpose arrays. (Andrei)
-- New FastCGI server module. (Ben Mansell)
 - Added array_filter(), which allows filtering of array elements via
   the specified callback. (Andrei)
 - Fixed all relevant array functions to avoid moving the internal array
@@ -29,6 +27,7 @@
   (Zeev)
 
 ?? ??? 200?, Version 4.0.5
+- New FastCGI server module. (Ben Mansell)
 - Added array_reduce(), which allows iterative reduction of an array
   to a single value via a callback function. (Andrei)
 - The imageloadfont function of the gd extension should be not platform
@@ -39,30 +38,32 @@
   and vice versa. ([EMAIL PROTECTED])
 - Fixed argument checking for call_user_func* functions and allowed
   specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
-- Fixed parent::method() to also work with runtime bindings (Zeev, Zend Engine)
+- Fixed parent::method() to also work with runtime bindings.
+  (Zeev, Zend Engine)
 - Implemented high-performance zlib-based output compression - see
-  zlib.output_compression INI directive (Zeev)
-- Improved ob_gzhandler() to support chunked output buffering - it's recommended
-  to use it with 4KB chunks (Zeev)
-- Fixed chunked output buffering (Zeev)
+  zlib.output_compression INI directive. (Zeev)
+- Improved ob_gzhandler() to support chunked output buffering - it's 
+  recommended to use it with 4KB chunks. (Zeev)
+- Fixed chunked output buffering. (Zeev)
 - Forced call_user_method() and call_user_method_array() to take the
   object argument by reference. (Andrei)
 - Fixed binding of ROWIDs in OCI8. (Thies)
 - Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache)
-- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via
-  c-client2000 (kalowsky)
+- Added IMAP quota support (imap_set_quota, imap_get_quota), enabled/added via
+  c-client2000. (kalowsky)
 - Upgraded PCRE to version 3.4. (Andrei)
 - Added array_search which works similar to in_array but returns
   the key instead of a boolean. ([EMAIL PROTECTED])
-- Fixed pgsql transaction support (Stig, PEAR/DB)
+- Fixed pgsql transaction support. (Stig, PEAR/DB)
 - Added new object VARIANT() to encapsulate values for use with
   the COM and DOTNET module. Therefore it is now possible to pass
   values by reference, convert php values to extended variant types (currency,
   date, idispatch, iunknown, ...) and define the codepage that should
   be used for unicode - conversion.
-- Improved overall speed of IRCG, added URL handling to message scanner (Sascha)
+- Improved overall speed of IRCG, added URL handling to message scanner.
+  (Sascha)
 - Fixed some modules to allow using output-buffering. (Thies)
-- Added the chroot() function (Derick)
+- Added the chroot() function. (Derick)
 - PostgreSQL now does a rollback at the end of a request on every
   persistent connection. This is done by doing an "empty" transaction
   on the connection. This was advised by someone from the PostgreSQL
@@ -70,8 +71,8 @@
 - Fixed PostgeSQL pg_connect() bug. We would sometimes close the default
   link by accident. (Patch by: [EMAIL PROTECTED])
 - Improved OCI8 dead-session detection. (Patch by: George Schlossnagle)
-- Fixed get_meta_tags() multiline bug #4556 (Sean)
-- Prefer random() over *rand48() (JimJag)
+- Fixed get_meta_tags() multiline bug #4556. (Sean)
+- Prefer random() over *rand48(). (JimJag)
 - Sped up WDDX serialization 2x. (Andrei)
 - Added a new parameter to mail() which appends aditional command line
   parameters to the mail program. (Derick)
@@ -81,7 +82,7 @@
 - Static methods can now be called via call_us

[PHP] <$B%9%H%l%92r>C(B>

2001-04-01 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 Fun! Fun!! Fun!!!

$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B
$B!!(B  $B:#=5$N$*>)$a%5%$%H$r$*CN$i$;$$$?$7$^$9(B
$B!!(B http://sv.g-spot.to/check/mail.html
$B!!(B  $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]


[PHP-CVS] cvs: php4(PHP_4_0_5) / NEWS

2001-04-01 Thread Sebastian Bergmann

sbergmann   Sun Apr  1 07:33:30 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4   NEWS 
  Log:
  Fixed some glitches in NEWS. (Yes, you may call me pedantic :-)
  

Index: php4/NEWS
diff -u php4/NEWS:1.611.2.1 php4/NEWS:1.611.2.2
--- php4/NEWS:1.611.2.1 Tue Mar 13 08:27:40 2001
+++ php4/NEWS   Sun Apr  1 07:33:29 2001
@@ -2,8 +2,7 @@
 |||
 
 ?? ??? 200?, Version 4.0.5
-- IMPORTANT: removed /F modifier handling from preg_replace(). Instead
-  one should use new preg_replace_callback() function. (Andrei)
+- New FastCGI server module. (Ben Mansell)
 - Added array_reduce(), which allows iterative reduction of an array
   to a single value via a callback function. (Andrei)
 - The imageloadfont function of the gd extension should be not platform
@@ -14,30 +13,32 @@
   and vice versa. ([EMAIL PROTECTED])
 - Fixed argument checking for call_user_func* functions and allowed
   specifying array($obj, 'method') syntax for call_user_func_array. (Andrei)
-- Fixed parent::method() to also work with runtime bindings (Zeev, Zend Engine)
+- Fixed parent::method() to also work with runtime bindings.
+  (Zeev, Zend Engine)
 - Implemented high-performance zlib-based output compression - see
-  zlib.output_compression INI directive (Zeev)
-- Improved ob_gzhandler() to support chunked output buffering - it's recommended
-  to use it with 4KB chunks (Zeev)
-- Fixed chunked output buffering (Zeev)
+  zlib.output_compression INI directive. (Zeev)
+- Improved ob_gzhandler() to support chunked output buffering - it's 
+  recommended to use it with 4KB chunks. (Zeev)
+- Fixed chunked output buffering. (Zeev)
 - Forced call_user_method() and call_user_method_array() to take the
   object argument by reference. (Andrei)
 - Fixed binding of ROWIDs in OCI8. (Thies)
 - Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache)
-- IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via
-  c-client2000 (kalowsky)
+- Added IMAP quota support (imap_set_quota, imap_get_quota), enabled/added via
+  c-client2000. (kalowsky)
 - Upgraded PCRE to version 3.4. (Andrei)
 - Added array_search which works similar to in_array but returns
   the key instead of a boolean. ([EMAIL PROTECTED])
-- Fixed pgsql transaction support (Stig, PEAR/DB)
+- Fixed pgsql transaction support. (Stig, PEAR/DB)
 - Added new object VARIANT() to encapsulate values for use with
   the COM and DOTNET module. Therefore it is now possible to pass
   values by reference, convert php values to extended variant types (currency,
   date, idispatch, iunknown, ...) and define the codepage that should
   be used for unicode - conversion.
-- Improved overall speed of IRCG, added URL handling to message scanner (Sascha)
+- Improved overall speed of IRCG, added URL handling to message scanner.
+  (Sascha)
 - Fixed some modules to allow using output-buffering. (Thies)
-- Added the chroot() function (Derick)
+- Added the chroot() function. (Derick)
 - PostgreSQL now does a rollback at the end of a request on every
   persistent connection. This is done by doing an "empty" transaction
   on the connection. This was advised by someone from the PostgreSQL
@@ -45,8 +46,8 @@
 - Fixed PostgeSQL pg_connect() bug. We would sometimes close the default
   link by accident. (Patch by: [EMAIL PROTECTED])
 - Improved OCI8 dead-session detection. (Patch by: George Schlossnagle)
-- Fixed get_meta_tags() multiline bug #4556 (Sean)
-- Prefer random() over *rand48() (JimJag)
+- Fixed get_meta_tags() multiline bug #4556. (Sean)
+- Prefer random() over *rand48(). (JimJag)
 - Sped up WDDX serialization 2x. (Andrei)
 - Added a new parameter to mail() which appends aditional command line
   parameters to the mail program. (Derick)
@@ -56,7 +57,7 @@
 - Static methods can now be called via call_user_method_* functions, e.g.
   call_user_method('method', 'class'), and also array('class', 'method')
   constructs (for array_walk(), for example). (Andrei, Zend Engine)
-- microtime under windows now returns accurate values (James)
+- microtime() under Windows now returns accurate values. (James)
 - Added PREG_SPLIT_DELIM_CAPTURE flag to preg_split() that allows for Perl-like
   functionality of capturing parenthesized delimiter expression. (Andrei)
 - Fixed strip_tags() to not strip a lone > character. (Rasmus)
@@ -70,12 +71,12 @@
 - Major change of the php pdf api. It could break some functions though
   backwards compatibility was tried to maintain. Adding some still
   missing functions as well. (Uwe)
-- Added mnoGoSearch extension - http://search.mnogo.ru (Sergey K)
-- Allow url encoding in DB usernames and passwords (Stig, PEAR)
-- Added raiseError and setErrorHandling methods to PEAR class (Stig, PEAR)
+- Added mnoGoSearch extension - http://search.mnogo.ru. (Sergey K)
+- Allow URL encoding in DB usernames and passwords. (Stig, PEAR)
+- Added raiseError and setErrorHandling me

[PHP] Execute Shell command?

2001-04-01 Thread KPortsmout

Hi,

Does anyone know if there is a way to execute a shell command in a php 
script? I am trying to execute the following:

/usr/sbin/cadduser -d www.domain.com -f Adrian -u testing -p testing -q 10 -w 
[EMAIL PROTECTED]

I have tried passthru(), system(), exec() and none seem to work. I also tried 
the backtick and that never worked. Any ideas anyone?

Adrian

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




[PHP] Database connections

2001-04-01 Thread David Hynes

I'm using PHP on a windows box to access a MySQL database.

I noticed that I do not need to open a database connection before performing
a mysql_db_query().  Is this bad coding ?  Should the database connection
always be made ?  Is this specific to Windows ?

# $databaseConnection = mysql_connect ("localhost", "", "");  ## I don't
seem to need this line, or the last one
mysql_db_query("dbnam", "SQL query");
# mysql_close ($databaseConnection);

Thanks,
David.

---
Fed202 Solutions
www.fed202solutions.com
Mobile : 07779 293368
---


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




Re: [PHP] PHP SITE SUGGESTION

2001-04-01 Thread Joe Stump

wget works fine with redirects, etc. I've never had any problems downloading
php with wget (even on the new site).

--Joe

On Fri, Mar 30, 2001 at 10:40:50AM -0500, Michael Kimsal wrote:
> With the hope that someone at php.net is listening...
> 
> I understand you want to track how many downloads you've got, etc. but
> can you make the download more direct somehow?  I can't do a wget
> against
> the php.net site to download the latest version.  :(  I think it's the ?
> in the
> URL that gives me a problem.
> 
> Thanks.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

-- 
PHP General Mailing List (http://www.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 a WHILE be done inside an array?

2001-04-01 Thread Reuben D Budiardja

Builld the string in a variables by concatenating them (using while), and 
then put the string in the array. It should be something like this:

while($modyear <= $curyear)
   {
   echo "".$modyear.;
   $options = $options . "$modyear" ;
   $modyear++;
   }

And then in the array, do:

$make = array('Make','12','keyword','1:30','select', $temp_option ,'text');

Hope that helps.
Reuben D. Budiardja

At 06:35 PM 3/31/01 -0600, Kenneth R Zink II wrote:
>I'm trying to figure out how to do a WHILE inside of an array.
>
>Here is the while statement.
>
>$modyear = "1982";
>$curyear = date("Y");
>$curyear = $curyear + 1;
>
>while($modyear <= $curyear){
>echo "".$modyear.;
>$modyear++;
>}
>
>The array I want to use the WHILE in, looks like this.  The X is where I
>want to insert the WHILE.
>
>'year' => array('Year','12','keyword','1:30','select','X','text'),
>
>Here is what a functioning array statment in my script looks like for
>referance.
>
>'make' =>
>array('Make','12','keyword','1:30','select','ChevroletGMCtion>IsuzuOldsmobile','text'),
>
>Can someone please give me some pointers. =)
>
>Thanks.
>
>
>Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094
>'87 GMC S-15 Ext. Cab (Hurricane) ...BBC 524 being built !!!
>http://www.s-series.org/htm/windstorm/project-windstorm.htm
>'85 Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI !!!
>http://www.s-series.org/htm/firestorm/firestorm.htm
>'84 Oldsmobile Delta 88 Delta 88 Royal Brougham.
>Racing by the grace of God!!!
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reuben D. Budiardja
Web Database Application Programmer / Analyst
Devcorps, ITS
Goshen College, IN 46526


-- 
PHP General Mailing List (http://www.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] known problems with session_register()?

2001-04-01 Thread Felix Kronlage

Hi,

are there any knows problems/bugs with session_register()?

With openbsd  as a platform (not tested on others) I have the problem 
that 20% of the times sessions don't get initialized correctly.
The session-file is created in /tmp (cookies for session-use are turned off), 
just the variables registered via session_registered are not written into the file. 
The same piece of code works on the same box, with same php 80% of the times.
(Had this problem with php4.0.4x up to php4.0.5rc3).

any hints on this?
-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]




[PHP-CVS] cvs: php4(PHP_4_0_5) / configure.in /main php_version.h

2001-04-01 Thread Zeev Suraski

zeevSun Apr  1 09:30:23 2001 EDT

  Modified files:  (Branch: PHP_4_0_5)
/php4   configure.in 
/php4/main  php_version.h 
  Log:
  YARC
  
  
Index: php4/configure.in
diff -u php4/configure.in:1.221.4.7 php4/configure.in:1.221.4.8
--- php4/configure.in:1.221.4.7 Wed Mar 28 15:23:05 2001
+++ php4/configure.in   Sun Apr  1 09:30:22 2001
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.221.4.7 2001/03/28 23:23:05 zeev Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.221.4.8 2001/04/01 16:30:22 zeev Exp $ -*- sh -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -51,7 +51,7 @@
 dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
 
 dnl ## This is where the version number is changed from now on!
-AM_INIT_AUTOMAKE(php, 4.0.5RC4, nodefine)
+AM_INIT_AUTOMAKE(php, 4.0.5RC5, nodefine)
 
 PHP_VERSION=$VERSION
 echo "/* automatically generated by configure */" > php_version.h.new
Index: php4/main/php_version.h
diff -u php4/main/php_version.h:1.44.4.4 php4/main/php_version.h:1.44.4.5
--- php4/main/php_version.h:1.44.4.4Wed Mar 28 15:23:06 2001
+++ php4/main/php_version.h Sun Apr  1 09:30:22 2001
@@ -1,3 +1,3 @@
 /* automatically generated by configure */
 /* edit configure.in to change version number */
-#define PHP_VERSION "4.0.5RC4"
+#define PHP_VERSION "4.0.5RC5"



-- 
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] Finally! Got PHP to work with RH7 and Oracle

2001-04-01 Thread Jon Jacob

Well, my bumbling determinism finally paid off.

After starting at the configuration laid down by the rpms, I could not
figure out what was wrong, so I decided to recompile the php source with
the OCI8 option (and -enable-sigchild which is advised in the
configuration output) and for whatever reason, it works.

Go figure.

I believe the bug lies in the OCI rpm but that is just a guess.

Thanks for all of you who tried to help.


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




Re: [PHP] Execute Shell command?

2001-04-01 Thread Steve Werby

<[EMAIL PROTECTED]> wrote:
> Does anyone know if there is a way to execute a shell command in a php
> script? I am trying to execute the following:
>
> /usr/sbin/cadduser -d www.domain.com -f Adrian -u testing -p testing -q
10 -w
> [EMAIL PROTECTED]

If you're running an Apache module version of PHP, the program you are
trying to execute will have to be owned by the same owner as Apache and user
executable (chmod u+x cadduser) or world executable (chmod o+x cadduser)
which is not good from a security standpoint.  I'm not certain, but cadduser
seems like the name of a script to add a user to Linux from the Cobalt
RaQ3/4 shell tool package so you're probably running PHP as an Apache
module.  The alternative is to install a second copy of PHP as a CGI, in
which case each PHP script runs as the owner of that script.  So if an
external program is owned by root, your PHP script can run it through a
shell command by making your PHP script owned by root.

Hopefully that will help you get closer to a solution.  If not, you'll
probably get better assistance if you post the answers to the following
questions:

What operating system, who owns the script and what are the permissions on
it?  Is PHP running as an Apache module or as a CGI?  If it's an Apache
module, what owner does Apache runs as?

Also, if your system is a Cobalt RaQ you may want to post to the
cobalt-users mailing list
(http://list.cobalt.com/mailman/listinfo/cobalt-users/) to signup.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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] How to send a mail in html format

2001-04-01 Thread Jan Grafström

Hi!
Can I add something in this string to get a htmlpage sent as mail?

mail($recipient,$subject,$corps,"From:
$admail\nReply-To:$admail\nX-Mailer: PHP/");
Thanks in advance.

Regards
Jan


-- 
PHP General Mailing List (http://www.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] setcookie().. how to retrieve data afterward?

2001-04-01 Thread Andrew Rose

Ive been playing with setcookie() and am stuck with trying to re-pull the
infomation I set,  I use:

 setcookie ("user_id", $userid, 1, "", "", 1);

 to set the cookie and:

if(isset( $user_id )){
 echo " cookie 'user_id': $user_id\n";
} else

 echo" no cookie set ...\n";
}

to see if its there.. now this is the closest Ive seen anyone else do it and
to me it dosnt make much sense at all the code for retrieving.. also it
dosnt work.. suprise suprise.. so anyone know how to do this?

thanks in advance

-Andrew Rose



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




Re: [PHP] Php with Frames

2001-04-01 Thread Lindsay Adams

The  tag can tag a TARGET attribute, just like the  tag can.



Adjust to match your script and frame names

On 4/1/01 2:30 AM, "Diego Pérez Rández" <[EMAIL PROTECTED]> wrote:

> 
>   Hi to all:
> 
>   I have a page with two frames. In the top frame I have a form where
> I can select some options. When I press the send button a php program
> generate a html page that I want to show in the Botton frame. I don't
> know how I can load the new page generate in the botton frame. I only
> want to change the botton frame not the top.
> 
>   Probably its easy to do.
> 
>   Can someone help me?
> 
>   Thanks.
> 
> 
>   Best regards, Diego
> 


--
PHP General Mailing List (http://www.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] setcookie().. how to retrieve data afterward?

2001-04-01 Thread Jack Sasportas

If you just echo $userid you will get the results.

do this
setcookie ("cookie_variable", "chocalate chip", 1, "", "", 1);

echo $cookie_variable

You can name the cookie_variable whatever you want and that will be referenced
as the variable to store "chocalate chip".
Now if you want to see the value from within a function you will need to also do
this:

 global $HTTP_COOKIE_VARS;

this will enable you to see the values stored in the cookies.

Andrew Rose wrote:

> Ive been playing with setcookie() and am stuck with trying to re-pull the
> infomation I set,  I use:
>
>  setcookie ("user_id", $userid, 1, "", "", 1);
>
>  to set the cookie and:
>
> if(isset( $user_id )){
>  echo " cookie 'user_id': $user_id\n";
> } else
>
>  echo" no cookie set ...\n";
> }
>
> to see if its there.. now this is the closest Ive seen anyone else do it and
> to me it dosnt make much sense at all the code for retrieving.. also it
> dosnt work.. suprise suprise.. so anyone know how to do this?
>
> thanks in advance
>
> -Andrew Rose
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



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




[PHP] Inserting into the middle of an array

2001-04-01 Thread Yoshi Melrose

Ok. I must be s blind. Is there a function to insert a value into the
middle of an array without rewriting 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] Inserting into the middle of an array

2001-04-01 Thread Lindsay Adams

On 4/1/01 11:32 AM, "Yoshi Melrose" <[EMAIL PROTECTED]> wrote:

> Ok. I must be s blind. Is there a function to insert a value into the
> middle of an array without rewriting it?
> 
> 
In PHP3, no.
PHP4, see http://www.php.net/manual/en/function.array.php

You could pull it off with combinations of array_slice, array_splice,
array_merge, array_push...

Lots of array functions in php4. 


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

2001-04-01 Thread Manuel Lemos

Hello Chris,

On 27-Mar-01 19:26:19, you wrote:

>I'm working with some forms that need the data validated.  Dates, times etc.

>my question is, how do I "reset" the form back to the original screen with
>variables  intact so they can make the changes?

It's better that you use the same script to display, validate and process the form.


>is there a code snippet some place i can work with?

You may want to look here at this PHP Form generation and validation class:

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

Regards,
Manuel Lemos

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


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




Re: [PHP] PHP as a general scripting language?

2001-04-01 Thread Manuel Lemos

Hello Gildas,

On 27-Mar-01 05:56:06, you wrote:

>What are the pros and cons to using PHP as a scripting language like Perl or
>Python?

PHP does not support multi-threading.  It's not important for serving Web
pages, but it is very important when you use it for executing tasks that
have to handle with many sources of input, like GUI apoplications, Network
applications, etc..


>Before going too far, I would like to know what other PHP users/gurus think
>about using PHP as a general scripting language, what should be avoided and
>what are the drawbacks I should take care of. Before someone ask me why not
>use Perl or Python: I don't like Perl, I prefer Python, I use it too but I'm
>not as easy with it as I am with PHP and I'd prefer put all my efforts in a
>single language if it can bring me all I expect...

Right, use it at will.  Most people is more confortable with programming
with only one language at a time.  I use only PHP to either setup or serve
my Web applications.  PHP can now be used to manage GUI applications.  I
have written a large meta-programming compiler in PHP.  All that requires
PHP to be run and standalone executable from the shell.  Despite the lack
of multi-threading, PHP is pretty capable and adequate for those purposes.


Regards,
Manuel Lemos

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


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




Re: [PHP] Inserting into the middle of an array

2001-04-01 Thread Yoshi Melrose

- Original Message -
From: "Lindsay Adams" <[EMAIL PROTECTED]>
> On 4/1/01 11:32 AM, "Yoshi Melrose" <[EMAIL PROTECTED]> wrote:
>
> > Ok. I must be s blind. Is there a function to insert a value into
the
> > middle of an array without rewriting it?
> >
> >
> In PHP3, no.
> PHP4, see http://www.php.net/manual/en/function.array.php
>
> You could pull it off with combinations of array_slice, array_splice,
> array_merge, array_push...
>
> Lots of array functions in php4.
>

Okay. that's what I was afraid of. I was kinda hoping for an array_insert()
function. =)




-- 
PHP General Mailing List (http://www.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] Inserting into the middle of an array

2001-04-01 Thread Lindsay Adams

On 4/1/01 11:57 AM, "Yoshi Melrose" <[EMAIL PROTECTED]> wrote:

> - Original Message -
> From: "Lindsay Adams" <[EMAIL PROTECTED]>
>> On 4/1/01 11:32 AM, "Yoshi Melrose" <[EMAIL PROTECTED]> wrote:
>> 
>>> Ok. I must be s blind. Is there a function to insert a value into
> the
>>> middle of an array without rewriting it?
>>> 
>>> 
>> In PHP3, no.
>> PHP4, see http://www.php.net/manual/en/function.array.php
>> 
>> You could pull it off with combinations of array_slice, array_splice,
>> array_merge, array_push...
>> 
>> Lots of array functions in php4.
>> 
> 
> Okay. that's what I was afraid of. I was kinda hoping for an array_insert()
> function. =)
> 
> 
> 
Hmm, just looked at the phpclasses website that is listed at the bottom of
Manuel Lemos' posts, and found this:
http://phpclasses.UpperDesign.com/browse.html/package/109

It is a php class that allows you to insert data into any position.
That will take some of the work off your shoulders :)


-- 
PHP General Mailing List (http://www.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] setcookie().. how to retrieve data afterward?

2001-04-01 Thread Andrew Rose

cheers Jack but Ive tried this and get the error msg:

Warning: Undefined variable: user_id in
C:/XITAMI/webpages/netrux/intothemain.php on line 14

so its not setting the varible by the looks of it any ideas? cheers

Jack Sasportas wrote in message
<[EMAIL PROTECTED]>...
>If you just echo $userid you will get the results.
>
>do this
>setcookie ("cookie_variable", "chocalate chip", 1, "", "", 1);
>
>echo $cookie_variable
>
>You can name the cookie_variable whatever you want and that will be
referenced
>as the variable to store "chocalate chip".
>Now if you want to see the value from within a function you will need to
also do
>this:
>
> global $HTTP_COOKIE_VARS;
>
>this will enable you to see the values stored in the cookies.
>
>Andrew Rose wrote:
>
>> Ive been playing with setcookie() and am stuck with trying to re-pull the
>> infomation I set,  I use:
>>
>>  setcookie ("user_id", $userid, 1, "", "", 1);
>>
>>  to set the cookie and:
>>
>> if(isset( $user_id )){
>>  echo " cookie 'user_id': $user_id\n";
>> } else
>>
>>  echo" no cookie set ...\n";
>> }
>>
>> to see if its there.. now this is the closest Ive seen anyone else do it
and
>> to me it dosnt make much sense at all the code for retrieving.. also it
>> dosnt work.. suprise suprise.. so anyone know how to do this?
>>
>> thanks in advance
>>
>> -Andrew Rose
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>___
>Jack Sasportas
>Innovative Internet Solutions
>Phone 305.665.2500
>Fax 305.665.2551
>www.innovativeinternet.com
>www.web56.net
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] ZEND Encoder

2001-04-01 Thread KPortsmout

Hi,

I`m about to buy the Zend encoder from thier website and thought I better ask 
a pretty important question, unfortunately Zend couldn`t be bothered to 
follow up the lead on someone who might buy thier product so I thought I 
would turn to you guys to see if any of you know.

Is it possible in any instance that someone else will be able to de-code my 
PHP scripts once I have used the Zend Encoder on it, and be able to read it? 
Obviously they will be able to decode it to actually use it on the server, 
but will they ever be able to read the source?

Thanks
Adrian

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

2001-04-01 Thread Michael Kimsal

Without getting into the specifics of the zend product,
which we've not tested thoroughly, I'd hazard a wild speculation that
zend encoder-encoded scripts:

1. can be decoded
2. can NOT be decoded to the original source

Obviously anything encoded needs to be decoded to run, and someone
with enough time on their hands will be able to decode it to the point where
they can understand what's going on at a low level, including any algorithms
you've developed.  If the machine has to be able to run the commands, some
one else can eventually figure out what the machine will be doing.  That's
just a given.  How difficult it would be would be another question,
and my guess is it's not a trivial task, at least to casual users.

Is it going to be decodeable to the original source code?  I *highly* doubt it-
it would be pretty inefficient to encode all your whitespace, comments, etc.

Again, this isn't based on hands-on zend encoder experience, but experience with
other compilers, Java, the APC cache product, and other similar ideas
over the years.



[EMAIL PROTECTED] wrote:

> Hi,
>
> I`m about to buy the Zend encoder from thier website and thought I better ask
> a pretty important question, unfortunately Zend couldn`t be bothered to
> follow up the lead on someone who might buy thier product so I thought I
> would turn to you guys to see if any of you know.
>
> Is it possible in any instance that someone else will be able to de-code my
> PHP scripts once I have used the Zend Encoder on it, and be able to read it?
> Obviously they will be able to decode it to actually use it on the server,
> but will they ever be able to read the source?


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

2001-04-01 Thread James Moore


> Is it possible in any instance that someone else will be able to
> de-code my
> PHP scripts once I have used the Zend Encoder on it, and be able
> to read it?
> Obviously they will be able to decode it to actually use it on
> the server,
> but will they ever be able to read the source?

They will not be able to read the source as such. If they did mange to
decode your script, which is unlikley then they would have Zend opcode
rather than PHP Source Code which is the PHP equivilent of ASM. It would be
very difficult to reconstuct your source code from this opcode and probably
more hassle than actually rewriting the same functionality themselves (IE
thats a no its pretty much impossible to retrive source code from encoded
files).

James
--
James Moore
[EMAIL PROTECTED]
PHP Web Scripting: http://www.php.net/
PHP QA Team: http://qa.php.net/
PHP-GTK: http://gtk.php.net/
VL-SRM: http://www.vl-srm.net/


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




Re: [PHP] How to send a mail in html format

2001-04-01 Thread David Pieper

Jan Grafström wrote:
> 
> Hi!
> Can I add something in this string to get a htmlpage sent as mail?
> 
> mail($recipient,$subject,$corps,"From:
> $admail\nReply-To:$admail\nX-Mailer: PHP/");
> Thanks in advance.
> 
> Regards
> Jan
> 

Content-Type: text/html

Enjoy,
David Pieper

-- 
programmer n. /pro gram er/ A device for transmuting caffeine into code.

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




php-general Digest 1 Apr 2001 21:37:24 -0000 Issue 602

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


php-general Digest 1 Apr 2001 21:37:24 - Issue 602

Topics (messages 46500 through 46525):

Re: login without database
46500 by: Erick Papadakis

Re: "\r\n" gives extra empty line between each line in Outlook
46501 by: Erick Papadakis

Re: Compiling PHP4, & Re: Image resizing
46502 by: Daniel B I

<$B%9%H%l%92r>C(B>
46503 by: fun.juno.ocn.ne.jp

Execute Shell command?
46504 by: KPortsmout.aol.com
46510 by: Steve Werby

Database connections
46505 by: David Hynes

Re: PHP SITE SUGGESTION
46506 by: Joe Stump

Re: Can a WHILE be done inside an array?
46507 by: Reuben D Budiardja

known problems with session_register()?
46508 by: Felix Kronlage

Finally!  Got PHP to work with RH7 and Oracle
46509 by: Jon Jacob

How to send a mail in html format
46511 by: Jan Grafström
46525 by: David Pieper

setcookie().. how to retrieve data afterward?
46512 by: Andrew Rose
46514 by: Jack Sasportas
46521 by: Andrew Rose

Re: Php with Frames
46513 by: Lindsay Adams

Inserting into the middle of an array
46515 by: Yoshi Melrose
46516 by: Lindsay Adams
46519 by: Yoshi Melrose
46520 by: Lindsay Adams

Re: data entry validation
46517 by: Manuel Lemos

Re: PHP as a general scripting language?
46518 by: Manuel Lemos

ZEND Encoder
46522 by: KPortsmout.aol.com
46523 by: Michael Kimsal
46524 by: James Moore

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]


--



Does this work on Windows machines?  WHat is the $PHP_AUTH_USER and where
does it come from? What should my access.inc.php look like? I saw the
PHP_AUTH_USER on the www.php.net website but looks like it is only possible
on PHP module, not pHP CGI?

Thanks in advance




-
"Romeo Manzur" <[EMAIL PROTECTED]> wrote:

> require('acces.inc.php');
> if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) && (
> $PHP_AUTH_PW == "$st_PASSWORD" )) ) {
>   header("WWW-Authenticate: Basic entrer=\"Admin Basta\"");
>   header("HTTP/1.0 401 Unauthorized");
>   echo "Access in-autorizado...";
>   exit;
> }
>
> where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for
> authenticate you login, you have to put this code before the  tag...
> luck...



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






I am not sure what you want to do, but you could try this:

$myText = nl2br($dataFromSubmittedTextBox);


Then $myText will have the correct values.

Cheers


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






Hey, man, you dont look at this list too often, isnt it?
Some days ago I wrote about this.
Here is the message one more time:

You need the jpeg support. Shortly, do this:
(I will use my version names, so you can easyly
find something, if you find newer ones, it's your bussiness)

1. search the internet for: 
jpegsrc.v6b.tar.gz 
gd-1.8.3.tar.gz
apache_1.3.14.tar.gz
php-4.0.4.tar.gz

2. unzip all files in a tmp directory (let's say /tmp ):
tar zxvf jpegsrc.v6b.tar.gz 
the same for gd, php, apache...

3. modify the 'Makefile' of the jpeg kit, to meet your requirements
(only the paths to be correct, as your are)
then issue: 
 ./configure --enable-shared --enable-static
then
 make 
 make install

4. modify the gd Makefile:
put there the your paths and uncomment the 'CFLAGS' line that 
enables the jpeg support (something like CFLAGS -DHAVE jpeg)
then issue:
 make
 make install

5. now configure php and apache and compile them. it should work.
it took me alot these days to discover all of this..

I hope it helps.







$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(B
$B>pJsDs6!4k6HL>(B Fun! Fun!! Fun!!!

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

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



Hi,

Does anyone know if there is a way to execute a shell command in a php 
script? I am trying to execute the following:

/usr/sbin/cadduser -d www.domain.com -f Adrian -u testing -p testing -q 10 -w 
[EMAIL PROTECTED]

I have tried passthru(), system(), exec() and none seem to work. I also tried 
the backtick and that never worked. Any ideas anyone?

Adrian




<[EMAIL PROTECTED]> wrote:
> Does anyone know if there is a way to execute a shell command in a php
> script? I am trying to execute the following:
>
> /usr/sbin/cadduser -d w

[PHP] libpng error

2001-04-01 Thread Thalis A. Kalfigopoulos

Helloppl,
I have php compiled with GD support (version>1.8 so I have png support). I try 
the following code and get a broken image:

\n");
imagepng($image);
$blue = imageColorAllocate($image,0,0,255);
imageRectangle($image, 50, 50, 150, 150, $blue);

imagedestroy($image);
?>

I get this error in the Apache error log (Apache with DSO support and php as a .so):
gd-png:  fatal libpng error: Invalid number of colors in palette
gd-png error: setjmp returns error condition

Any ideas what's wrong?

regards,
thalis


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

2001-04-01 Thread Jon Jacob

I hope this is not off topic, but I need to ask a general audience this
question and this seems like the right group.

I have been out of work for two months and I am not sure why.  I am a
talented web programmer with three years experience, strong Perl,
JavaScript, CGI, and HTML skills and a great work ethic.  I have been
offered a job (which I turned down) but nothing desirable has come my
way.  I know the economy is slow, but I am shocked that I am out of work
for this long.  Are others experiencing this, or is it just me?

I live in Portland, OR which is not the center of the tech universe but
has strong tech companies nonetheless.  I am just confused and am
wondering if it is something I am doing or something that is being done
to me.  If the later, I can wait it out, but I just wanted to know if
anyone in my silimiar situation was experiencing something the same and
had any insight to share.

I apologize for the vent, but it is starting to become frustrating and
confusing.


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





Re: [PHP] C and PHP

2001-04-01 Thread Joe Stump

You might want to look in the PHP source code at the README.EXT_SKEL file for
info on how to incorporate that stuff.

--Joe

On Sat, Mar 31, 2001 at 08:49:30PM +0200, Ft Karras wrote:
> Somebody knows if it is possible to link C and PHP?
> 
> I have a C library and need to 'include' with PHP code, as it does PERL, 
> is it possible?
> 
> Thanks
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


/**\
 *Joe Stump - PHP/SQL/HTML Developer  *
 * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net   *
 * "Better to double your money on mediocrity than lose it all on a dream."   * 
\**/

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




[PHP] Question: Number of Characters

2001-04-01 Thread Marcus Ouimet

How can i determine the number of characters in a string? I am using substr
to cut off the last 4 characters of a string. Which is working great. But I
want to replace the 3 charcters with "..." only if there are over 20
charcters . I tried substr_replace but it appears on everything no matter
how many characters. I am trying to do this is simple terms:

if the string was:

hi my name is

it is returned shortened to:

hi ...

Any help appreciated.



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




Re: [PHP] Question: Number of Characters

2001-04-01 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Marcus Ouimet") wrote:

> How can i determine the number of characters in a string?

http://www.php.net/strlen/

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

2001-04-01 Thread Michael Kimsal

Perhaps you should have taken that job.  ???  I've heard (and found really)
that it's easier to find work if you're working.  It's harder to make
interviews
and whatnot, but it gets you out there, you meet others and network.  Who
knows where that can lead to?  But if your talent is being put to use
around other people and they can see that, that can be very good situation.


Jon Jacob wrote:

> I hope this is not off topic, but I need to ask a general audience this
> question and this seems like the right group.
>
> I have been out of work for two months and I am not sure why.  I am a
> talented web programmer with three years experience, strong Perl,
> JavaScript, CGI, and HTML skills and a great work ethic.  I have been
> offered a job (which I turned down) but nothing desirable has come my
> way.  I know the economy is slow, but I am shocked that I am out of work
> for this long.  Are others experiencing this, or is it just me?
>
> I live in Portland, OR which is not the center of the tech universe but
> has strong tech companies nonetheless.  I am just confused and am
> wondering if it is something I am doing or something that is being done
> to me.  If the later, I can wait it out, but I just wanted to know if
> anyone in my silimiar situation was experiencing something the same and
> had any insight to share.
>
> I apologize for the vent, but it is starting to become frustrating and
> confusing.


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




[PHP-CVS] cvs: php4 /ext/openssl CREDITS README openssl.c php_openssl.h

2001-04-01 Thread Wez Furlong

wez Sun Apr  1 16:06:14 2001 EDT

  Modified files:  
/php4/ext/openssl   CREDITS README openssl.c php_openssl.h 
  Log:
  Added whole bunch of PKCS7 (S/MIME) functions and made the key/cert params
  a bit more friendly to use.  See the README for more info.
  
  

Index: php4/ext/openssl/CREDITS
diff -u php4/ext/openssl/CREDITS:1.2 php4/ext/openssl/CREDITS:1.3
--- php4/ext/openssl/CREDITS:1.2Thu Nov 23 11:30:37 2000
+++ php4/ext/openssl/CREDITSSun Apr  1 16:06:14 2001
@@ -1,2 +1,2 @@
 OpenSSL
-Stig Venaas
+Stig Venaas, Wez Furlong
Index: php4/ext/openssl/README
diff -u php4/ext/openssl/README:1.1 php4/ext/openssl/README:1.2
--- php4/ext/openssl/README:1.1 Thu Nov 23 11:30:37 2000
+++ php4/ext/openssl/README Sun Apr  1 16:06:14 2001
@@ -1,53 +1,210 @@
 OpenSSL extension for PHP4
-$Id: README,v 1.1 2000/11/23 19:30:37 venaas Exp $
+$Id: README,v 1.2 2001/04/01 23:06:14 wez Exp $
 
-The functions implemented so far make it possible to seal and open data,
-and also create and verify signatures. To enable the extension, configure
-PHP with --with-openssl.
+The functions implemented so far make it possible to seal and open data, and
+also create and verify signatures.
 
+NEW: support for S/MIME encrypt/decrypt/sign/verify, as well as more
+flexibility for specifying certificates/keys.
 
-Functions:
+To enable the extension, configure PHP with --with-openssl.
 
-int openssl_get_privatekey(string key [, string passphrase])
+Specifying keys/certificates
+
 
+Most of the functions require a key or a certificate as a parameter; to make
+things easy for you to use openssl, this extension allows you
+to specify certificates in the following way:
+
+1. As an X.509 resource returned from openssl_x509_read
+2. As a string in the format file://filename, where filename is the path to the
+   certificate file (it will be opened and read automatically)
+3. As a string containing the data from the certificate file
+
+Similarly, you can use the following methods of specifying a public key:
+
+1. As a key resource returned from openssl_get_publickey
+2. An X509 resource - public key only
+3. As a string in the format file://filename
+4. As a string containing the data from the key file
+
+Additionally, for a private key, when the openssl extension function does not
+allow you to enter the passphrase as a parameter you may use the syntax
+array($key, "passphrase") where $key can be a key specified using one of the
+methods listed above.
+
+Certificate Verification
+
+When calling a function that will verify a signature/certificate, the cainfo
+parameter is an array containing file and directory names that specifiy the
+locations of trusted CA files.  If a directory is specified, then it must be a
+correctly hashed directory.
+
+Misc:
+-
+
+mixed openssl_error_string()
+
+returns the message from the last error that the OpenSSL library encountered
+and moves it's internal error pointer to the next message.  If there are no
+more error messages, returns false.
+
+General Key/Cert Functions:
+---
+
+resource openssl_get_privatekey(mixed key [, string passphrase])
+
 Parses the key data and returns a key resource identifier. If the key is
 encrypted a passphrase is needed. This can be supplied as second argument.
 
 
-int openssl_get_publickey(string cert)
+resource openssl_get_publickey(mixed cert)
 
 Extracts the public key from the given certificate and returns a key
 resource identifier.
 
 
-void openssl_free_key(int key)
+void openssl_free_key(resource key)
 
 Frees the resource given by the key resource identifier.
+Note that this function does not accept the extended key specification
+syntax mentioned above, as it doesn't make sense in this case!
+
+array openssl_x509_parse(mixed x509[, bool shortnames=true])
+
+Parses the certificate data and returns an array containing information
+about the certificate, it's intended purposes, subject, issuer, validity
+etc. etc.  If shortnames is true (the default) then the fields will be
+keyed by the shortname forms eg: CN as opposed to commonName (shortnames
+= false).
+
+
+bool openssl_x509_checkpurpose(mixed x509cert, int purpose,
+   array cainfo[, string untrustedfile])
+
+Verifies if the certificate can be used for a specific purpose.
+Purpose can be one of the following values:
+   X509_PURPOSE_SSL_CLIENT
+   X509_PURPOSE_SSL_SERVER
+   X509_PURPOSE_NS_SSL_SERVER
+   X509_PURPOSE_SMIME_SIGN
+   X509_PURPOSE_SMIME_ENCRYPT
+   X509_PURPOSE_CRL_SIGN
+   X509_PURPOSE_ANY
+
+cainfo is an array of CA information (as mentioned above).
+untrusted file specifies a file containing a bunch of certs that
+are not trusted but may be useful in validating the certificate.
+
+
+resource openssl_read_x509(mixed cert)
+
+Parses the cert and returns a resource that can be used with the
+other openssl functions
+
+
+void openssl_free_x509(reso

Re: [PHP] Question: Number of Characters

2001-04-01 Thread Steve Edberg

At 4:16 PM -0700 4/1/01, Marcus Ouimet wrote:
>   How can i determine the number of characters in a string? I 
>am using substr
>to cut off the last 4 characters of a string. Which is working great. But I
>want to replace the 3 charcters with "..." only if there are over 20
>charcters . I tried substr_replace but it appears on everything no matter
>how many characters. I am trying to do this is simple terms:


Use strlen(). For example:

$String = 'hi my name is';
if (strlen($String) > 20) {
$String = substr($String, 0, 17).'...';
}

In PHP4, you can use the substr_replace() function to replace the 
third line in the example above:

$String = 'hi my name is';
if (strlen($String) > 20) {
$String = substr_replace($String, '...', 17);
}

For more information, see

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

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

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

-steve


>if the string was:
>
>hi my name is
>
>it is returned shortened to:
>
>hi ...
>
>   Any help appreciated.
>

-- 
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- www.yurisnight.net --+

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




Re: [PHP] ereg

2001-04-01 Thread Steve Edberg

At 9:47 PM -0800 3/31/01, Chris Adams <[EMAIL PROTECTED]> wrote:
>On 31 Mar 2001 21:07:59 -0800, Michael Hall <[EMAIL PROTECTED]> wrote:
>>
>>I'm using the following expression to check input strings:
>>
>>if (!ereg("^[[:alnum:]_-]+$", $string)) { get outta here! }
>>
>>This works fine except for when a string has spaces, as in text. What do I
>>need to add to the expression to handle spaces (internal, not at the
>>beginning or end).
>
>if (!ereg("^[[:alnum:]_- ]+$", $string)) { get outta here! }
>
>Check out the regular expression documentation or "Mastering Regular
>Expressions" over at ora.com.
>

If by 'spaces' you want to include tabs, newlines & stuff, you can also do:

if (!ereg("^[[:alnum:][:space:]_-]+$", $string)) { get outta here! }

-steve

-- 
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+-- www.yurisnight.net --+

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




Re: [PHP] Executing a PHP file to write an html file

2001-04-01 Thread David Robley

On Sun,  1 Apr 2001 03:06, PHP User wrote:
> Here is my problem.
> I have a file, static.php
> static.php writes to index.html by way of...
> $filename = "/web/h16/docs/index.html";
> $fp = fopen("$filename","w");
> fwrite($fp, "\n");
> etc..
>
> If I hit static.php from the command line, index.html gets written just
> fine. static.php does it's job.
>
> If I try to exec(), or  system() static.php from a browser the browser
> just hangs. eg. I add:
> system ('/usr/local/bin/php web/h16/docs/index.html);
> or
> exec ('/usr/local/bin/php web/h16/docs/index.html);
> To a file and get nothing. I tried with and without the absolute paths
> in the commands.
>
> What I want to be able to do is every time I update a Db, at the same
> time I want the index page to be rewritten to reflect the changes in
> the Db. And I don't want to have to go to the command line everytime I
> want to rewrite the index page. So I would just hit "SAve" in the
> update.php page, it would save to the Db, which it does now, and at the
> same time it hits static.php and therefore rewrites index.html
>
> I also tried header() but that was no good due to echo in the pages,
> gives that header already sent error.
>
> Is there a funtion I am missing somehwere that does the job?
>
> It's a Unix box running php 4.03, and the Db is MySQL
>
> Thanks Much!!

Is it possible you have a permissions problem? Remember that your 
webserver will probably be running as something like nobody, which may 
not have the necessary permissions to wwrite to files in that particular 
directory.


-- 
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] Problems with files!!!!!

2001-04-01 Thread David Robley

On Sat, 31 Mar 2001 21:31, Ales Kunst wrote:
> Hi,
>
> I have a strange kind of a problem. I'm cannot write to files on a
> server (i'm having virtual host) where i got my domain name.
> The server is running Apache 1.3.x and is having php3.0.8 installed.
> The code looks like this:
>
> 
> 
>  $fcontents = "something";
> $fp = fopen("tmp/some.dat", "w");  // trying to open file in my
> directory tmp/ (i think)
> fwrite($fp, $fcontents);
> fclose($fp);
> ?>
> 
> 
>
> I cannot write to directory tmp.I get an error from Netscape that
> "document contains no data" (i changed the directory mode to 777
> (tmp/)). The strangest part is that this script works fine when i am
> running it at home. At home i tried to run the script under Windows 98
> and Linux Mandrake both with Apache 1.3.x with php 4.0.x installed (i
> don't think this code should have any compatibility problems). On Linux
> i have put the script to a user directory, just the kind on the server
> is, and it worked just fine. I think maybe it's the Apache
> configuration (on the server) which is causing my problem. I would very
> appreciate any help on this matter (clues what could be wrong).
>
> Ales!

Probably permissions still - the parent directory must also be accessible 
to the user that the web server runs as.

-- 
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] Executing a PHP file to write an html file

2001-04-01 Thread Matt Friedman

If you have the php cgi installed you can run a script like so:

exec("php -q /path/to/script.php")

You didn't include the command (php -q), you only included the path to the
script.

If you don't have the cgi, but you are running on *nix you can
exec("lynx http://www.host.com/script.php")
assuming lynx is installed.

Instead of exec, why not just include the script you want to run in your
page?

Matt Friedman
Spry New Media
http://www.sprynewmedia.com


- Original Message -
From: "David Robley" <[EMAIL PROTECTED]>
To: "PHP User" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, April 01, 2001 5:53 PM
Subject: Re: [PHP] Executing a PHP file to write an html file


> On Sun,  1 Apr 2001 03:06, PHP User wrote:
> > Here is my problem.
> > I have a file, static.php
> > static.php writes to index.html by way of...
> > $filename = "/web/h16/docs/index.html";
> > $fp = fopen("$filename","w");
> > fwrite($fp, "\n");
> > etc..
> >
> > If I hit static.php from the command line, index.html gets written just
> > fine. static.php does it's job.
> >
> > If I try to exec(), or  system() static.php from a browser the browser
> > just hangs. eg. I add:
> > system ('/usr/local/bin/php web/h16/docs/index.html);
> > or
> > exec ('/usr/local/bin/php web/h16/docs/index.html);
> > To a file and get nothing. I tried with and without the absolute paths
> > in the commands.
> >
> > What I want to be able to do is every time I update a Db, at the same
> > time I want the index page to be rewritten to reflect the changes in
> > the Db. And I don't want to have to go to the command line everytime I
> > want to rewrite the index page. So I would just hit "SAve" in the
> > update.php page, it would save to the Db, which it does now, and at the
> > same time it hits static.php and therefore rewrites index.html
> >
> > I also tried header() but that was no good due to echo in the pages,
> > gives that header already sent error.
> >
> > Is there a funtion I am missing somehwere that does the job?
> >
> > It's a Unix box running php 4.03, and the Db is MySQL
> >
> > Thanks Much!!
>
> Is it possible you have a permissions problem? Remember that your
> webserver will probably be running as something like nobody, which may
> not have the necessary permissions to wwrite to files in that particular
> directory.
>
>
> --
> David Robley| WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet| http://auseinet.flinders.edu.au/
> Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
PHP General Mailing List (http://www.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] Need project info from developers

2001-04-01 Thread Michael Kimsal

Hello all.

We're working on a project and need some information from other PHP
developers
about some of the projects you've developed, large and small.  We're
looking for
information such as development time, hardware, integration issues,
traffic/stats, etc.,
and you'd need to be willing to have this information made publicly
available at some point.

If you would like more information about this project, please contact me
privately
at [EMAIL PROTECTED]  I can't really post too much more publicly
at this time,
but hope to be able to make an announcement in the next couple weeks,
once
we have some other input from PHP developers.

Thanks in advance.  :)

Michael Kimsal


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

2001-04-01 Thread Stuart J. Browne

Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message
9a23cm$fuu$[EMAIL PROTECTED]">news:9a23cm$fuu$[EMAIL PROTECTED]...
> One more question!  Why does some PHP 4.0 & up does not have the php.ini
> file?  I noticed for the UNIX, there isn't one.  For Caldera, there is
one.
> For Windows, there is one.  So, what's up with that
>
> Scott
>
> ""Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message
> 9a04gk$116$[EMAIL PROTECTED]">news:9a04gk$116$[EMAIL PROTECTED]...
> > Hi!
> >
> > Can anyone tell me what the difference with those PHP version?  I
see
> > the version, "PHP 4.0.4pl1" with a "pl1" and some other version, "PHP
> 4.0.4"
> > without a "pl1".  Does either of these version had to do with php.ini
> file?


There is a PHP.INI.  You just didn't copy it.  The instructions state that
you have to 'cp php.ini.dist /...somewhere../php.in'..   can't remember
the locaiton.

if you dont, it just uses the defaults.

bkx



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




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

2001-04-01 Thread Wez Furlong

wez Sun Apr  1 18:31:07 2001 EDT

  Modified files:  
/php4/ext/openssl   openssl.c 
  Log:
  added some more error reporting and did a little tidying.
  
  
Index: php4/ext/openssl/openssl.c
diff -u php4/ext/openssl/openssl.c:1.10 php4/ext/openssl/openssl.c:1.11
--- php4/ext/openssl/openssl.c:1.10 Sun Apr  1 16:06:14 2001
+++ php4/ext/openssl/openssl.c  Sun Apr  1 18:31:07 2001
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.10 2001/04/01 23:06:14 wez Exp $ */
+/* $Id: openssl.c,v 1.11 2001/04/02 01:31:07 wez Exp $ */
 
 #include "php.h"
 #include "php_openssl.h"
@@ -152,7 +152,7 @@
if (resourceval)
*resourceval = -1;
 
-   if ((*val)->type == IS_RESOURCE){
+   if (Z_TYPE_PP(val) == IS_RESOURCE)  {
/* is it an x509 resource ? */
void * what;
int type;
@@ -210,7 +210,7 @@
 /* Given a zval, coerce it into a EVP_PKEY object.
It can be:
1. private key resource from openssl_get_privatekey()
-   2. X509 resource -> private key will be extracted from it
+   2. X509 resource -> public key will be extracted from it
3. if it starts with file:// interpreted as path to key file
4. interpreted as the data from the cert/key file and interpreted in 
same way as openssl_get_privatekey()
5. an array(0 => [items 2..4], 1 => passphrase)
@@ -225,13 +225,13 @@
int free_cert = 0;
long cert_res = -1;
char * filename = NULL;
-
+   
if (resourceval)
*resourceval = -1;
 
-   if ((*val)->type == IS_ARRAY)   {
+   if (Z_TYPE_PP(val) == IS_ARRAY) {
zval ** zphrase;
-
+   
/* get passphrase */
 
if (zend_hash_index_find(HASH_OF(*val), 1, (void **)&zphrase) == 
FAILURE)   {
@@ -248,7 +248,7 @@
}
}
 
-   if ((*val)->type == IS_RESOURCE){
+   if (Z_TYPE_PP(val) == IS_RESOURCE)  {
void * what;
int type;
 
@@ -1144,20 +1144,28 @@
convert_to_string_ex(zoutfilename);
 
privkey = php_openssl_evp_from_zval(zprivkey, 0, "", 0, &keyresource);
-   if (privkey == NULL)
+   if (privkey == NULL){
+   zend_error(E_ERROR, "%s(): error getting private key", 
+get_active_function_name());
goto clean_exit;
+   }
 
cert = php_openssl_x509_from_zval(zcert, 0, &certresource);
-   if (cert == NULL)
+   if (cert == NULL)   {
+   zend_error(E_ERROR, "%s(): error getting cert", 
+get_active_function_name());
goto clean_exit;
+   }
 
infile = BIO_new_file(Z_STRVAL_PP(zinfilename), "r");
-   if (infile == NULL)
+   if (infile == NULL) {
+   zend_error(E_ERROR, "%s(): error opening input file %s!", 
+get_active_function_name(), Z_STRVAL_PP(zinfilename));
goto clean_exit;
+   }
 
outfile = BIO_new_file(Z_STRVAL_PP(zoutfilename), "w");
-   if (outfile == NULL)
+   if (outfile == NULL){
+   zend_error(E_ERROR, "%s(): error opening output file %s!", 
+get_active_function_name(), Z_STRVAL_PP(zoutfilename));
goto clean_exit;
+   }
 
p7 = PKCS7_sign(cert, privkey, others, infile, flags);
if (p7 == NULL) {



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




[PHP] cookie working only 90% array missing one var and sql query burns [YIKES!]

2001-04-01 Thread PHPretard

hi peoples, Im going insane here, I have this script working great except
two things ...
for one , the sql query returns an error that couldnt run the query...
and the second is that the variable $user_reg[2]  holds nothing even though
I cheked the html form and also checked the cookie variable and all are set
except [2] .

heres my script snippet:

--
...
   $user_reg[0] = $user_name;
   $user_reg[1] = $pass_w;
   $user_reg[2] = $full_name;
   $user_reg[3] = $email;
   $user_reg[4] = $age;
   $user_reg[5] = $icq;
   $user_reg[6] = $aim;

function add_newuser() {
 $date = gmdate ( "M d Y H:i:s" );
 $sql = "INSERT INTO mytable (user_name, pass_w, full_name, email,
age, icq, aim, date) VALUES ('$user_reg[0]', '$user_reg[1]', '$user_reg[2]',
'$user_reg[3]', '$user_reg[4]', '$user_reg[5]', '$user_reg[6]', '$date')";
 $connection = mysql_connect("localhost", "mylog", "mypass") or die
("Could not connect to database");
 $db = mysql_select_db("mydb",$connection);
 $sql_result = mysql_query($sql, $connection) or die ("Couldnt run
query");
 }
?>
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]




Re: [PHP] No-refresh

2001-04-01 Thread trogers

Hi
I do it using sessions with:

//Check for a reload
$hash = mhash(MHASH_SHA1,serialize($HTTP_POST_VARS));
$hash = bin2hex($hash);
if($hash == $Hash):
 $reload = "Yes";
 echo "reload ";
endif;

$Hash is registered in the session.
Tom


At 02:54 AM 31/03/01 +0100, David Hynes wrote:
>Does anyone know of a way to stop the user from refreshing a page several
>times.
>
>i.e if I add a value to a database using a form and PHP, I don't want the
>user to be able to simply press refresh and add the value to the database
>again.
>
>Please help,
>Dvaid.
>
>---
>Fed202 Solutions
>www.fed202solutions.com
>Mobile : 07779 293368
>---
>
>
>--
>PHP General Mailing List (http://www.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] Attach File in PHP's Mail Function.

2001-04-01 Thread Mark Lo \(3\)

Hi,

 I would like to ask how to attach a file in PHP's Mail Function ??

Thank you

Mark


-- 
PHP General Mailing List (http://www.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] send mail in HTML format in Mail Function

2001-04-01 Thread Mark Lo \(3\)

Hi,

I would like to know how to send a mail in HTML format in Mail
Functions.

Thank you

Mark


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

2001-04-01 Thread nicuc.ac.jp

Hello

  I make change of your code by move some line to correct line and it's
work.
Here this a code

\n");
$blue = imageColorAllocate($image,0,0,255);
imageRectangle($image, 50, 50, 150, 150, $blue);
imagepng($image); //  I MOVE THIS LINE
imagedestroy($image);
?>

Hope this will help.
-Tuna-


""Thalis A. Kalfigopoulos"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Helloppl,
> I have php compiled with GD support (version>1.8 so I have png support). I
try the following code and get a broken image:
>
>  header("Content-type: image/png");
>
> $image= imagecreate(200,200) or die("Failed in call to
imagecreate()\n");
> imagepng($image);
> $blue = imageColorAllocate($image,0,0,255);
> imageRectangle($image, 50, 50, 150, 150, $blue);
>
> imagedestroy($image);
> ?>
>
> I get this error in the Apache error log (Apache with DSO support and php
as a .so):
> gd-png:  fatal libpng error: Invalid number of colors in palette
> gd-png error: setjmp returns error condition
>
> Any ideas what's wrong?
>
> regards,
> thalis
>
>
> --
> PHP General Mailing List (http://www.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] send mail in HTML format in Mail Function

2001-04-01 Thread Tyler Longren

$recipient = "Recipient <[EMAIL PROTECTED]>"
$headers .= "From: name <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "X-Priority: 1\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$message = "This is HTML!!!See!!!";
$subject = "TEST";

mail($recipient, $subject, $message, $headers);

-Original Message-
From: Mark Lo (3) [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 01, 2001 9:37 PM
To: PHP Mailing List
Subject: [PHP] send mail in HTML format in Mail Function


Hi,

I would like to know how to send a mail in HTML format in Mail
Functions.

Thank you

Mark


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


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




Re: [PHP] Problems with files!!!!!

2001-04-01 Thread Jon Jacob

David Robley wrote:

> On Sat, 31 Mar 2001 21:31, Ales Kunst wrote:
> > Hi,
> >
> > I have a strange kind of a problem. I'm cannot write to files on a
> > server (i'm having virtual host) where i got my domain name.
> > The server is running Apache 1.3.x and is having php3.0.8 installed.
> > The code looks like this:
> >
> > 
> > 
> >  > $fcontents = "something";
> > $fp = fopen("tmp/some.dat", "w");  // trying to open file in my
> > directory tmp/ (i think)
> > fwrite($fp, $fcontents);
> > fclose($fp);
> > ?>
> > 
> > 
> >
> > I cannot write to directory tmp.I get an error from Netscape that
> > "document contains no data" (i changed the directory mode to 777
> > (tmp/)). The strangest part is that this script works fine when i am
> > running it at home. At home i tried to run the script under Windows 98
> > and Linux Mandrake both with Apache 1.3.x with php 4.0.x installed (i
> > don't think this code should have any compatibility problems). On Linux
> > i have put the script to a user directory, just the kind on the server
> > is, and it worked just fine. I think maybe it's the Apache
> > configuration (on the server) which is causing my problem. I would very
> > appreciate any help on this matter (clues what could be wrong).
> >
> > Ales!
>
> Probably permissions still - the parent directory must also be accessible
> to the user that the web server runs as.
>
> --
> 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]

Ah, this may be too simple of an answer but usually the directory is /tmp
not tmp/


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




RE: [PHP] Problems with files!!!!!

2001-04-01 Thread Tyrone Mills

I don't know if it's been mentioned or not, but I have found that unless the
file exists, I can't open it. Have you verified that the file exists and the
user that the script will run as has the appropriate permissions?

-Original Message-
From: jon [mailto:jon]On Behalf Of Jon Jacob
Sent: Sunday, April 01, 2001 7:40 PM
Cc: Ales Kunst; [EMAIL PROTECTED]
Subject: Re: [PHP] Problems with files!


David Robley wrote:

> On Sat, 31 Mar 2001 21:31, Ales Kunst wrote:
> > Hi,
> >
> > I have a strange kind of a problem. I'm cannot write to files on a
> > server (i'm having virtual host) where i got my domain name.
> > The server is running Apache 1.3.x and is having php3.0.8 installed.
> > The code looks like this:
> >
> > 
> > 
> >  > $fcontents = "something";
> > $fp = fopen("tmp/some.dat", "w");  // trying to open file in my
> > directory tmp/ (i think)
> > fwrite($fp, $fcontents);
> > fclose($fp);
> > ?>
> > 
> > 
> >
> > I cannot write to directory tmp.I get an error from Netscape that
> > "document contains no data" (i changed the directory mode to 777
> > (tmp/)). The strangest part is that this script works fine when i am
> > running it at home. At home i tried to run the script under Windows 98
> > and Linux Mandrake both with Apache 1.3.x with php 4.0.x installed (i
> > don't think this code should have any compatibility problems). On Linux
> > i have put the script to a user directory, just the kind on the server
> > is, and it worked just fine. I think maybe it's the Apache
> > configuration (on the server) which is causing my problem. I would very
> > appreciate any help on this matter (clues what could be wrong).
> >
> > Ales!
>
> Probably permissions still - the parent directory must also be accessible
> to the user that the web server runs as.
>
> --
> 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]

Ah, this may be too simple of an answer but usually the directory is /tmp
not tmp/



_

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 General Mailing List (http://www.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] header() vs. no cache, it doesn't work.

2001-04-01 Thread Stuart J. Browne

> >When I use this script
> >
> >  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
> >  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
>
> ### oops, don't forget to escape these!  ^ ^

Umm, why would he need to escape those two "'s?  They arn't within anothe
set of quotes.

>
> >  header("Cache-Control: no-cache, must-revalidate");
> >  header("Pragma: no-cache");
> >
> >Next, I browse around and go back one page, the cache does not expire.
> >Sometime I get the error messages said that the header had already start
> >or something.  So, what is the other way around to fix this
> >problem?  Or how can I fix it

bkx



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

2001-04-01 Thread Joe Montiel

Hello,

I am new to the list and to php...I would like to know how php does with the
major search engines. Do I need to do something extra to make it work? Will
it index if I am pulling my content from text files? (If this is in an
archive somewhere, point me to it).

Thank you!

Joe


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

2001-04-01 Thread Matt Friedman

There are a few things that can help you get indexed by the search engines
if you are using a server side scripting language.

1. Try to avoid passing variables in the get string. That is, the stuff
after the "?" in a url.
2. If you want a page indexed, don't redirect from that page to another
page. The search spider will not follow the redirect.

Other than that, I can't think of more things that a spider wouldn't like
that have to do with php. If there are more, please correct me.

Matt Friedman
Spry New Media
http://www.sprynewmedia.com



- Original Message -
From: "Joe Montiel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 01, 2001 8:52 PM
Subject: [PHP] Search Engines


> Hello,
>
> I am new to the list and to php...I would like to know how php does with
the
> major search engines. Do I need to do something extra to make it work?
Will
> it index if I am pulling my content from text files? (If this is in an
> archive somewhere, point me to it).
>
> Thank you!
>
> Joe
>
>
> --
> PHP General Mailing List (http://www.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] php jobs?

2001-04-01 Thread Joseph Bannon


What is a good place to find PHP jobs?

J



Say I'm Hot! - Post Your Picture!
http://www.sayimhot.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] Search Engines

2001-04-01 Thread Steve Werby

"Joe Montiel" <[EMAIL PROTECTED]> wrote:
> I am new to the list and to php...I would like to know how php does with
the
> major search engines. Do I need to do something extra to make it work?
Will
> it index if I am pulling my content from text files?

PHP produces HTML output which is sent to a browser, spider, etc.
Everything else being equal about content on a webpage, a PHP generated file
and a static HTML file are identical, with the possible exception of the
file extension.  There are a few "gotchas".  A search engine can recognize a
.php* file extension and assign it a penalty, though I'm not aware of this
happening.  If that's a fear you can always configure your webserver to
parse .html files using PHP.  Some search engines will ignore or penalize
webpages with query strings in them (query strings are variable-value pairs
following a "?" after the webpage name).  The logic for this makes sense
since a lot of pages like that are dynamically generated and a search engine
will be less effective if it indexes a page and a few days later a user does
a search, it appears in the results and the user goes there and the page no
longer exists or contains different content than was indexed.  An easy way
around this (at least in Apache) is to create dynamically generated webpages
that appear static.  This can be accomplished by using AliasMatch lines in
your Apache config. file to point a group of URLs (such as all beginning
with '/books/') to a single PHP file.  Then within the PHP file use a
combination of regular expressions and environment variables (among other
solutions) to pull the proper content from a file or database.

For example if you have a URL like '/books/516.html' you can do:
eregi( '^/books/(.*).html', $SCRIPT_URL, $regs ) )
// $regs[1] will contain '516'.
// Grab record from database with id 516.

Offhand, the only other things to watch for are don't do fast meta redirects
(or any redirects at all) and if your PHP file hasn't been updated in
months, but the database data it pulls from has updated recently, it's
likely that browsers and spiders may think their cached copies of your
webpage are current.  A solution is to use a combination of header()
functions like:

header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . " GMT" );

Making your webpages appear at the top of search engines for your desired
search phrases is another story.  Though I live talking about search engine
optimization strategies and steps, this isn't the right forum for giving
away all of the secrets.  

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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] Problems with files!!!!!

2001-04-01 Thread Jon Jacob

Tyrone Mills wrote:

> I don't know if it's been mentioned or not, but I have found that unless the
> file exists, I can't open it. Have you verified that the file exists and the
> user that the script will run as has the appropriate permissions?
>
>

I think you are mistaken.  According to the PHP manual page, with fopen the
option 'w' does the following:

"Open for writing only; place the file pointer at the beginning of the file and
truncate the file to zero length. If the file does not exist, attempt to create
it. "

In this case the line:

$fp = fopen("tmp/some.dat", "w");  // trying to open file in my

Would create the file if it did not exist, but you make a good point that
permissions need to be set.  The directory would need to probably be world
writable (usually 755 or xrw-rw-rw).


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




Re: [PHP] php jobs?

2001-04-01 Thread Rick St Jean

try monster.com,
do a search for it jobs,
send your resume to head hunters.
buy big city news papers.\


At 11:04 PM 4/1/01 -0500, you wrote:

>What is a good place to find PHP jobs?
>
>J
>
>
>
>Say I'm Hot! - Post Your Picture!
>http://www.sayimhot.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]

##
#  Rick St Jean,
#  [EMAIL PROTECTED]
#  President of Design Shark,
#  http://www.designshark.com/,  http://www.phpmailer.com/
#  Quick Contact:  http://www.designshark.com/messaging.ihtml
#  Tel: 905-684-2952
##


-- 
PHP General Mailing List (http://www.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] session in php3 and in php4

2001-04-01 Thread Jacky

Hi all
I heard rumors saying there is no way to use session in php3, is that correct? ( only 
joking about the rumors, but really need to know this though:-)
If there is no way to get around this, what is syntax for assign session in php4 then?
thanks in advance
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] PHP3: suppressing error messages

2001-04-01 Thread Patrick Dunford

How can I prevent error messages from being displayed and sent to a log file 
instead?

-- 
===
Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/

   Now to him who is able to do immeasurably more than all we ask
or imagine, according to his power that is at work within us,   to
him be glory in the church and in Christ Jesus throughout all
generations, for ever and ever! Amen.
-- Ephesians 3:20-21
http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010331
===
Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

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

2001-04-01 Thread Chris Fry

I use a package called sudo which allows you to give limited root rights to the
user that your webserver is running as. Using this I'm able to add/delete a user
from a PHP script and also change passwords using poppassd.

http://www.courtesan.com/sudo/

Chris

[EMAIL PROTECTED] wrote:

> Hi,
>
> Does anyone know if there is a way to execute a shell command in a php
> script? I am trying to execute the following:
>
> /usr/sbin/cadduser -d www.domain.com -f Adrian -u testing -p testing -q 10 -w
> [EMAIL PROTECTED]
>
> I have tried passthru(), system(), exec() and none seem to work. I also tried
> the backtick and that never worked. Any ideas anyone?
>
> Adrian
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



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




Re: [PHP] session in php3 and in php4

2001-04-01 Thread Steve Werby

"Jacky" <[EMAIL PROTECTED]> wrote:
> If there is no way to get around this, what is syntax for assign session
in php4 then?

PHP session support is possible in PHP3 using a 3rd party module from the
PHP Base Library (http://phplib.netuse.de/) which is pretty widely used.
For session handling in PHP4 see the manual
(http://www.php.net/manual/en/ref.session.php) and you may want to check
zend.com, phpbuilder.com, etc. for tutorials, code snippets and examples.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


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




[PHP] RE:Zend Encoder

2001-04-01 Thread Nettie Feldman

I was sorry to read that Adrian said he received no
answers to his reply about the Zend Encoder Unlimited
from Zend.

We aim to be extremely responsive to all queries, but
if you find that you haven't received a reply, please
email [EMAIL PROTECTED] and I will make sure you receive
a reply.

Generally, however, you can email [EMAIL PROTECTED], 
[EMAIL PROTECTED] or [EMAIL PROTECTED]


Nettie Feldman
Marketing Product Manager, Zend Technologies Ltd.
email: [EMAIL PROTECTED]



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




Re: [PHP] registering an array into a session (?)

2001-04-01 Thread cam k

No idea if this will help, but not sure why you are serializing the array...

// sessionarray.php4

session_cache_limiter("");
session_start();

session_register('name');
session_register('city');
session_register('state');
session_register('postcode');
session_register('pagecount');

if (pagecount != "") {
 $name[] = $newName;
 $city[] = $newCity;
 $state[] = $newState;
 $postcode[] = $newPostcode;
}

?>






Enter a name:

Enter a city:

Enter a state:

Enter a postcode:




 $name[$i]   $city[$i] $state[$i] $postcode[$i] ";
}
$pagecount++;
?>



"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can somebody please help me out??
> I'm going nuts...
> what's wrong with this piece of code?
>
> 
>  if(!isset($script_total_time))
>  {
>  // register the session variables to keep track
of
> step times
>  $script_total_time=(float)$total_time;
>  session_register("script_total_time");
>  $step_times_array[$step]=$total_time;
>  $step_times=serialize($step_times_array);
>  //echo "step_times=\"$step_times\""; <- this
> echoes perfeclty
>  session_register("step_times");
>  }
>  else
>  {
>  // update session variables
>  $script_total_time+=(float)$total_time;
>  $step_times_array=unserialize($step_times);
>  $step_times_array[$step]=$total_time;
>  $step_times=serialize($step_times_array);
>  }
> 
>
> why doesn't $step_times gets registered correctly? it always register an
> empty var...
> 
> . 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] Accessing Intberase database in NT

2001-04-01 Thread elan

Hello,

Any idea how can i possibly access an Interbase database residing in NT4 from 
my web server running in Linux? 

Thanks a lot.


-- 
PHP General Mailing List (http://www.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] phpLinks 2.0b Released

2001-04-01 Thread Greg Donald

phpLinks v2.0b is released. - http://phplinks.org/

Changes - http://phplinks.org/changelog
  
Download - http://phplinks.org/?show=download
  
Please note, this is a beta release.

  
Regards,
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] Problem installing on BSD

2001-04-01 Thread natter

1, Ok, I checked my existing apache install (httpd -l and it has
mod_so.c)
2. Installed php using the following line: configure
--with-apxs=/usr/local/apache/bin
3. Changed my httpd.conf file to allow .php:
- AddType application/x-httpd-php .php
- AddType application/x-httpd-php-source .phps

I created a test file named: 1.php with the following code in it:


When I type this url in: http://64.133.38.28/1.php it asks me to save
it. (in netscape or IE)

Any help on what I'm doing wrong here?

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]




Re: [PHP] Programming Jobs

2001-04-01 Thread natter

You might want to add to some of your skills.

Grab some quick Oracle training. (Don't pay for it, just
go to free sites like: www.dbasupport.com and technet.oracle.com.)

Your resume would look alot more attractive if you knew SQL and Oracle
a bit more. This is just my opinion though.




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




Re: [PHP] Problem installing on BSD

2001-04-01 Thread David Robley

On Mon,  2 Apr 2001 15:31, natter wrote:
> 1, Ok, I checked my existing apache install (httpd -l and it has
> mod_so.c)
> 2. Installed php using the following line: configure
> --with-apxs=/usr/local/apache/bin
> 3. Changed my httpd.conf file to allow .php:
> - AddType application/x-httpd-php .php
> - AddType application/x-httpd-php-source .phps
>
> I created a test file named: 1.php with the following code in it:
> 
>
> When I type this url in: http://64.133.38.28/1.php it asks me to save
> it. (in netscape or IE)
>
> Any help on what I'm doing wrong here?
>
> Thanks in advance.

4. restart apache to read changes to config file?

-- 
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] Problem installing on BSD

2001-04-01 Thread natter

Sorry. :( Yes, I have done this many times.

My version below is just the 1st steps I took. I have spend
3 hours trying to reconfigure and try anything that I could think of.
Nothing.

Thanks though.

David Robley wrote:


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




Re: [PHP] Problem installing on BSD

2001-04-01 Thread Felix Kronlage

On Mon, Apr 02, 2001 at 12:01:08AM -0600, natter wrote:

> 3. Changed my httpd.conf file to allow .php:
> - AddType application/x-httpd-php .php
> - AddType application/x-httpd-php-source .phps

Do you have the directive to load the php-module in your httpd.conf?

| LoadModule php4_module/path/to/the/module/libphp4.so 

-fkr, and don't forget the 'apachectl restart'
-- 
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]




Re: [PHP] Accessing Intberase database in NT

2001-04-01 Thread Stuart J. Browne


<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Any idea how can i possibly access an Interbase database residing in NT4
from
> my web server running in Linux?

To do this, I believe you will have to compile PHP on the Linux box with the
Linux GDS libraries (as if you were going to use Interbase locally).

I've not done this however.

The Interbase install on Linux is GLibC only (which I found out the hard way
*mumble*), but is freely available.  We use it here.

When compiling PHP4, "./configure --with-interbase" is required, along with
your other options.

Hope this helps you.

Bkx



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




RE: [PHP] php jobs?

2001-04-01 Thread Boaz Yahav

http://www.weberjob.com

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.
 



-Original Message-
From: Joseph Bannon [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 6:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php jobs?



What is a good place to find PHP jobs?

J



Say I'm Hot! - Post Your Picture!
http://www.sayimhot.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]