OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 6 Jun 2003 02:14:05 -0000 Issue 2100

php-general-digest-helplists.php.net
Date: Thu Jun 05 2003 - 21:14:05 CDT


php-general Digest 6 Jun 2003 02:14:05 -0000 Issue 2100

Topics (messages 150354 through 150442):

PHP 4.3.2 Compiling error in native GD
        150354 by: Bix

Php 4.3.2 "stream does not support seeking" in includes
        150355 by: Nicolas Ross

How stable is CVS releases?
        150356 by: Timothy Arnold

Re: MySQL Problem
        150357 by: Esteban Fernandez

Re: header function problem
        150358 by: Daniel J. Rychlik

PHP CLI question
        150359 by: Monte Ohrt
        150361 by: Cal Evans
        150363 by: Monte Ohrt
        150366 by: Adam Voigt
        150380 by: Monte Ohrt
        150385 by: Jason Wong
        150400 by: Mark
        150405 by: Monte Ohrt

How do I display new lines in a textearea?
        150360 by: Petre Agenbag
        150362 by: CPT John W. Holmes
        150365 by: Bobby Patel

libphp4.so
        150364 by: Ryan Vennell

Re: Advice on script length please!
        150367 by: Wendell Brown

recursive displaying tree structure
        150368 by: Armand Turpel

Re: Browser detection script (css)
        150369 by: Øystein Håland

php4isapi.dll and header("Location: ...")
        150370 by: Eric Tonicello
        150375 by: Peter Clarke
        150430 by: CPT John W. Holmes

Re: PHP Class for IP CIDR notation
        150371 by: Mark

PDF
        150372 by: Lukas Gerhold
        150377 by: Philip Olson

PHP Mailing list software..
        150373 by: Chad Day
        150374 by: Adam Voigt

Passing values back to form
        150376 by: Daniel J. Rychlik
        150379 by: Kevin Stone
        150381 by: Daniel J. Rychlik

Initialized PHP Module frequently
        150378 by: andre.lagadec.education.gouv.fr

scheduled tasks
        150382 by: Matt Palermo
        150383 by: Jay Blanchard
        150401 by: Mark

Regex for Browser Versions
        150384 by: Gerard Samuel
        150387 by: Monty
        150393 by: Gerard Samuel

PHP/Javascript Help
        150386 by: Stephen

Re: Where to start?
        150388 by: Monty

Re: Needing Just a Little Advice!
        150389 by: sevenfiftyflat

Using the .htaccess file to extend the php.ini include path entry
        150390 by: Saint Urho

Re: Morph an object
        150391 by: Info.Best-IT

Approved
        150392 by: cadaver.planethalflife.com
        150407 by: Esteban Fernandez
        150414 by: \[cz\]Emo

Basic counter & users online..
        150394 by: PHPSpooky
        150413 by: Gustavo Del Castillo Meza

Allowing punctuation marks in regular expressions
        150395 by: Luis Lebron
        150396 by: Dan Joseph
        150399 by: Luis Lebron
        150403 by: Leif K-Brooks
        150434 by: CPT John W. Holmes

PHP Install help with gettext
        150397 by: Andrew Li

Re: Validating user input
        150398 by: Misha Peric

ob_get_contents returns FALSE?
        150402 by: Shawn McKenzie

Re: Using register_globals
        150404 by: Lars Torben Wilson

Automatic Headers and Footers
        150406 by: Wendell Brown
        150408 by: Tom Ray [Lists]
        150409 by: Mark
        150416 by: Wendell Brown
        150424 by: Robert Cummings

Re: Gracefully dealing with Cookies OFF
        150410 by: Monty
        150412 by: Leif K-Brooks
        150435 by: CPT John W. Holmes

Re: move_uploaded_file > 1MB
        150411 by: Maurício Valente

session_start questions.
        150415 by: Daniel J. Rychlik
        150431 by: Monty

$PHP_SELF
        150417 by: Johnny Martinez
        150418 by: Stephen

Re: [otro] Re: [PHP] $PHP_SELF
        150419 by: j0rd1 adame

PHP Webmail Solutions?
        150420 by: Richard Lynch

Trouble with fopen() || Win2k Machine
        150421 by: CF High

Heredoc question
        150422 by: Sparky Kopetzky
        150423 by: Jennifer Goodie
        150425 by: Sparky Kopetzky
        150426 by: Jennifer Goodie

Re: SQL Select on a DATE field
        150427 by: Lorenzo Ciani

Do not display page errors...
        150428 by: Vernon
        150429 by: CPT John W. Holmes
        150436 by: Leif K-Brooks

Re: Get the date&time from server
        150432 by: poetbox

imagearc() and imageline()
        150433 by: Dan Helmer
        150440 by: Tom Rogers

PHP, ODBC, Unable to Connect
        150437 by: Joseph McDonald

Is Session a Cookie?
        150438 by: Miranda, Joel Louie M
        150439 by: Miranda, Joel Louie M

Php handling apache's error directive?
        150441 by: Miranda, Joel Louie M
        150442 by: Leif K-Brooks

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


I'm compiling with:

./configure --with-apxs --with-mysql=/usr --with-mcrypt=/usr/local/lib/ --wi
th-imap=/home/redhat/SOURCES/imap-2001a/ --with-imap-ssl=/usr/local/ssl --wi
th-dba --with-gd --with-jpeg-dir=/usr/local/lib --with-zlib-dir=/usr/local/l
ib --enable-gd-native-ttf --with-png-dir=/usr/local/lib

This worked fine with 4.3.1 and in 4.3.2 it configures fine, but under
make...

ext/gd/gd.lo: In function `zm_deactivate_gd':
/home/src/php-4.3.2/ext/gd/gd.c:382: undefined reference to
`gdFreeFontCache'
ext/gd/gd.lo: In function `zif_imagecolorat':
/home/src/php-4.3.2/ext/gd/gd.c:1855: undefined reference to
`gdImageBoundsSafe'
/home/src/php-4.3.2/ext/gd/gd.c:1863: undefined reference to
`gdImageBoundsSafe'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Any ideas?

TIA. ;o)

attached mail follows:


Hi there !

I just upgraded to php 4.3.2 on several servers, and some of them uses
incldes of remote files (via include("http:...") functions.

I get :

Warning: main(): stream does not support seeking in ... on line ..

All the time, on all machines.

My "standard" configure line is :

./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr --with-
xml --enable-ftp --with-zlib --with-png --with-png-dir=/usr --with-jpeg --en
able-exif --with-jpeg-dir=/usr --with-gd --with-ttf --with-freetype-dir=/usr
 --with-tiff --enable-track-vars --enable-trans-sid --disable-debug

I just tried somthing, I disabled the Zend optimizer and it stoped doing
that...

Any hints ?

Nicolas

attached mail follows:


Hi all,

I am having a problem with compiling PHP 4.3.2 on Solaris 8. The compile
runs ok but blows up when I try a make install. Before submitting this a
bug I downloaded the latest CVS release to see if it has been fixed. It
has!

Unfortunatly, I do not know how stable the CVS version is for production
use? At present 4.3.1 has some serious bugs (i.e persistent connections
not working) but we hve implemented workarounds.

What I would like to know is, is it worth waiting for PHP 4.3.3 or just
use the CVS version?

Thanks,
Timothy

attached mail follows:


What's up

Supposing that the filename of the you code is create_table.php.
Try tipping in the URL: create_table.php?nueva_base=prueba

EF.
---

Que tal

Suponiendo que el archivo del codigo se llama create_table.php.
Prueba poniendo el la URL: create_table.php?nueva_base=prueba

EF.

"Felipe R." <feriosentelchile.net> escribió en el mensaje
news:20030604234056.24838.qmailpb1.pair.com...
> Hi everyone,
>
> first, sorry to all if my english is so poor.
> second, i have the follow question: when i create a existing MySQL DBase,
> what happend??
>
> how can i avoid this problem??
>
> i attached my create_table code. Thanks for all
>
> <html>
> <head>
> <title>Creación de una Base de Datos</title>
> </head>
> <body>
> <h2> Creando Base de Datos</h2>
>
> <?php
> $connection = mysql_connect("localhost","ferios","ferios") or die ("No se
> puede conectar a MySQL");
> if (!$connection) {
> die ("No se puede conectar a MySQL");
> }
>
> if (mysql_create_db("$nueva_base")) {
> print ("&nbsp&nbsp&nbsp&nbsp Base de Datos <font color=\"red\"
> size=\"5\">$nueva_base</font> Creada Satisfactoriamente!!<BR><BR>");
> $db_list = mysql_list_dbs($connection);
> $indice=0;
>
> while($row = mysql_fetch_array($db_list)){
> $bases[$indice]=$row[0];
> $indice++;
> }
>
> mysql_close($connection);
>
> echo "&nbsp&nbsp&nbsp&nbsp<B> Las Bases de Datos Disponibles son:
> </B><BR>";
> for($aux = 0; $aux < $indice; $aux++) {
> echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp $bases[$aux]<BR>";
> }
> }else{
> print ("Ërror Creando la Base de Datos: ". mysql_error());
> }
> ?>
>
> <font size="3"> <p>Volver a <a
> href="http://localhost/administrador.htm">Administrador de Bases de
> Datos</a></font>
> <font size="3"> <p>Volver a <a
href="http://localhost/nueva_base.htm">Crear
> un Base de Datos</a></font>
>
> </body>
> </html>
>
>
>
>

attached mail follows:


It works now. Are their any examples out there that will show how to pass
back the information that was entered and pass the error message back to the
form.htm ? Or a function that i need to read up on.

-Dan

----- Original Message -----
From: "Jason Wong" <php-generalgremlins.biz>
To: <php-generallists.php.net>
Sent: Thursday, June 05, 2003 1:01 AM
Subject: Re: [PHP] header function problem

> On Thursday 05 June 2003 07:01, Daniel J. Rychlik wrote:
> > Well, it works if I use the full path instead of relative.... So
obviously
> > its an apache permissions issue.
>
> It has nothing to do with apache. The specs require that the location is
> absolute.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> It is undignified for a woman to play servant to a man who is not hers.
> -- Spock, "Amok Time", stardate 3372.7
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hi,

A couple of questions:

1) Is there a way to make the CLI version of PHP ignore certain settings
in the php.ini file? For instance, I don't want the ioncube accelerator
invoked when using PHP from the command line. My current work around is
to use two separate init files, php.ini and php-cli.ini ... and this
brings me to my second question:

2) Is there a way to specify a different name for the php.ini file,
apart from hacking php_ini.c ? It seems I can only change the _path_ to
the file, but not the filename itself.

TIA
Monte

attached mail follows:


http://www.php.net/manual/en/function.ini-set.php

* Cal Evans
* http://www.christianperformer.com
* Stay plugged into your audience
* The measure of a programmer is not the number of lines of code he writes
but the number of lines he does not have to write.
*

----- Original Message -----
From: "Monte Ohrt" <monteispi.net>
To: <php-generallists.php.net>
Cc: <php-devlists.php.net>
Sent: Thursday, June 05, 2003 9:22 AM
Subject: [PHP] PHP CLI question

> Hi,
>
> A couple of questions:
>
> 1) Is there a way to make the CLI version of PHP ignore certain settings
> in the php.ini file? For instance, I don't want the ioncube accelerator
> invoked when using PHP from the command line. My current work around is
> to use two separate init files, php.ini and php-cli.ini ... and this
> brings me to my second question:
>
> 2) Is there a way to specify a different name for the php.ini file,
> apart from hacking php_ini.c ? It seems I can only change the _path_ to
> the file, but not the filename itself.
>
> TIA
> Monte
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi Cal,

I may be missing something, but I don't see how this page answers either
of my questions. ini_set() is for setting configuration options.

Monte

On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
> http://www.php.net/manual/en/function.ini-set.php
>
> * Cal Evans
> * http://www.christianperformer.com
> * Stay plugged into your audience
> * The measure of a programmer is not the number of lines of code he writes
> but the number of lines he does not have to write.
> *
>
> ----- Original Message -----
> From: "Monte Ohrt" <monteispi.net>
> To: <php-generallists.php.net>
> Cc: <php-devlists.php.net>
> Sent: Thursday, June 05, 2003 9:22 AM
> Subject: [PHP] PHP CLI question
>
>
> > Hi,
> >
> > A couple of questions:
> >
> > 1) Is there a way to make the CLI version of PHP ignore certain settings
> > in the php.ini file? For instance, I don't want the ioncube accelerator
> > invoked when using PHP from the command line. My current work around is
> > to use two separate init files, php.ini and php-cli.ini ... and this
> > brings me to my second question:
> >
> > 2) Is there a way to specify a different name for the php.ini file,
> > apart from hacking php_ini.c ? It seems I can only change the _path_ to
> > the file, but not the filename itself.
> >
> > TIA
> > Monte
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

attached mail follows:


>From a ./php -h:

 -c <path>|<file> Look for php.ini file in this directory

The "|" means "OR", so logic would dictate you can point
directly to the file with the -c option.

On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote:
> Hi Cal,
>
> I may be missing something, but I don't see how this page answers either
> of my questions. ini_set() is for setting configuration options.
>
> Monte
>
> On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
> > http://www.php.net/manual/en/function.ini-set.php
> >
> > * Cal Evans
> > * http://www.christianperformer.com
> > * Stay plugged into your audience
> > * The measure of a programmer is not the number of lines of code he writes
> > but the number of lines he does not have to write.
> > *
> >
> > ----- Original Message -----
> > From: "Monte Ohrt" <monteispi.net>
> > To: <php-generallists.php.net>
> > Cc: <php-devlists.php.net>
> > Sent: Thursday, June 05, 2003 9:22 AM
> > Subject: [PHP] PHP CLI question
> >
> >
> > > Hi,
> > >
> > > A couple of questions:
> > >
> > > 1) Is there a way to make the CLI version of PHP ignore certain settings
> > > in the php.ini file? For instance, I don't want the ioncube accelerator
> > > invoked when using PHP from the command line. My current work around is
> > > to use two separate init files, php.ini and php-cli.ini ... and this
> > > brings me to my second question:
> > >
> > > 2) Is there a way to specify a different name for the php.ini file,
> > > apart from hacking php_ini.c ? It seems I can only change the _path_ to
> > > the file, but not the filename itself.
> > >
> > > TIA
> > > Monte
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Hi Adam,

I know it can be altered with a command-line switch, but it is the
default that I want to change. I don't want to have to remember to set
the -c flag everytime, or go back and change all my existing scripts.

Monte

On Thu, 2003-06-05 at 09:53, Adam Voigt wrote:
> >From a ./php -h:
>
> -c <path>|<file> Look for php.ini file in this directory
>
> The "|" means "OR", so logic would dictate you can point
> directly to the file with the -c option.
>
>
> On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote:
> > Hi Cal,
> >
> > I may be missing something, but I don't see how this page answers either
> > of my questions. ini_set() is for setting configuration options.
> >
> > Monte
> >
> > On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
> > > http://www.php.net/manual/en/function.ini-set.php
> > >
> > > * Cal Evans
> > > * http://www.christianperformer.com
> > > * Stay plugged into your audience
> > > * The measure of a programmer is not the number of lines of code he writes
> > > but the number of lines he does not have to write.
> > > *
> > >
> > > ----- Original Message -----
> > > From: "Monte Ohrt" <monteispi.net>
> > > To: <php-generallists.php.net>
> > > Cc: <php-devlists.php.net>
> > > Sent: Thursday, June 05, 2003 9:22 AM
> > > Subject: [PHP] PHP CLI question
> > >
> > >
> > > > Hi,
> > > >
> > > > A couple of questions:
> > > >
> > > > 1) Is there a way to make the CLI version of PHP ignore certain settings
> > > > in the php.ini file? For instance, I don't want the ioncube accelerator
> > > > invoked when using PHP from the command line. My current work around is
> > > > to use two separate init files, php.ini and php-cli.ini ... and this
> > > > brings me to my second question:
> > > >
> > > > 2) Is there a way to specify a different name for the php.ini file,
> > > > apart from hacking php_ini.c ? It seems I can only change the _path_ to
> > > > the file, but not the filename itself.
> > > >
> > > > TIA
> > > > Monte
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
--
Monte Ohrt <monteispi.net>

attached mail follows:


On Friday 06 June 2003 01:43, Monte Ohrt wrote:

> I know it can be altered with a command-line switch, but it is the
> default that I want to change. I don't want to have to remember to set
> the -c flag everytime, or go back and change all my existing scripts.

You can run separate ./configure commands for the apache (or whatever) module
and for the CLI version, specifying a different "--with-config-file-path".

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Cold, adj.:
        When the politicians walk around with their hands in their own pockets.
*/

attached mail follows:


Wrap it in a shell script or batch file.

Something like:

REM ---Start cli.bat---
./cli/php.exe -c <<cli-php.ini location>> %1 %2 %3 %4 %5 %6 %7 %8 %9
exit
REM ---End cli.bat---

--- Monte Ohrt <monteispi.net> wrote:
> Hi Adam,
>
> I know it can be altered with a command-line switch, but it is the
> default that I want to change. I don't want to have to remember to
> set
> the -c flag everytime, or go back and change all my existing
> scripts.
>
> Monte
>
> On Thu, 2003-06-05 at 09:53, Adam Voigt wrote:
> > >From a ./php -h:
> >
> > -c <path>|<file> Look for php.ini file in this directory
> >
> > The "|" means "OR", so logic would dictate you can point
> > directly to the file with the -c option.
> >
> >
> > On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote:
> > > Hi Cal,
> > >
> > > I may be missing something, but I don't see how this page
> answers either
> > > of my questions. ini_set() is for setting configuration
> options.
> > >
> > > Monte
> > >
> > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
> > > > http://www.php.net/manual/en/function.ini-set.php
> > > >
> > > > * Cal Evans
> > > > * http://www.christianperformer.com
> > > > * Stay plugged into your audience
> > > > * The measure of a programmer is not the number of lines of
> code he writes
> > > > but the number of lines he does not have to write.
> > > > *
> > > >
> > > > ----- Original Message -----
> > > > From: "Monte Ohrt" <monteispi.net>
> > > > To: <php-generallists.php.net>
> > > > Cc: <php-devlists.php.net>
> > > > Sent: Thursday, June 05, 2003 9:22 AM
> > > > Subject: [PHP] PHP CLI question
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > A couple of questions:
> > > > >
> > > > > 1) Is there a way to make the CLI version of PHP ignore
> certain settings
> > > > > in the php.ini file? For instance, I don't want the ioncube
> accelerator
> > > > > invoked when using PHP from the command line. My current
> work around is
> > > > > to use two separate init files, php.ini and php-cli.ini ...
> and this
> > > > > brings me to my second question:
> > > > >
> > > > > 2) Is there a way to specify a different name for the
> php.ini file,
> > > > > apart from hacking php_ini.c ? It seems I can only change
> the _path_ to
> > > > > the file, but not the filename itself.
> > > > >
> > > > > TIA
> > > > > Monte
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> --
> Monte Ohrt <monteispi.net>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

=====
Mark Weinstock
mark_weinstockyahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

attached mail follows:


ok, so there are plenty of ways to work around it ;-) I guess my
original question should be answered as such? "No, you cannot specify a
different configuration file name other than php.ini, you must either
hack the C code or supply a workaround at runtime."

Monte

On Thu, 2003-06-05 at 15:07, Mark wrote:
> Wrap it in a shell script or batch file.
>
> Something like:
>
> REM ---Start cli.bat---
> ./cli/php.exe -c <<cli-php.ini location>> %1 %2 %3 %4 %5 %6 %7 %8 %9
> exit
> REM ---End cli.bat---
>
>
> --- Monte Ohrt <monteispi.net> wrote:
> > Hi Adam,
> >
> > I know it can be altered with a command-line switch, but it is the
> > default that I want to change. I don't want to have to remember to
> > set
> > the -c flag everytime, or go back and change all my existing
> > scripts.
> >
> > Monte
> >
> > On Thu, 2003-06-05 at 09:53, Adam Voigt wrote:
> > > >From a ./php -h:
> > >
> > > -c <path>|<file> Look for php.ini file in this directory
> > >
> > > The "|" means "OR", so logic would dictate you can point
> > > directly to the file with the -c option.
> > >
> > >
> > > On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote:
> > > > Hi Cal,
> > > >
> > > > I may be missing something, but I don't see how this page
> > answers either
> > > > of my questions. ini_set() is for setting configuration
> > options.
> > > >
> > > > Monte
> > > >
> > > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
> > > > > http://www.php.net/manual/en/function.ini-set.php
> > > > >
> > > > > * Cal Evans
> > > > > * http://www.christianperformer.com
> > > > > * Stay plugged into your audience
> > > > > * The measure of a programmer is not the number of lines of
> > code he writes
> > > > > but the number of lines he does not have to write.
> > > > > *
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Monte Ohrt" <monteispi.net>
> > > > > To: <php-generallists.php.net>
> > > > > Cc: <php-devlists.php.net>
> > > > > Sent: Thursday, June 05, 2003 9:22 AM
> > > > > Subject: [PHP] PHP CLI question
> > > > >
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > A couple of questions:
> > > > > >
> > > > > > 1) Is there a way to make the CLI version of PHP ignore
> > certain settings
> > > > > > in the php.ini file? For instance, I don't want the ioncube
> > accelerator
> > > > > > invoked when using PHP from the command line. My current
> > work around is
> > > > > > to use two separate init files, php.ini and php-cli.ini ...
> > and this
> > > > > > brings me to my second question:
> > > > > >
> > > > > > 2) Is there a way to specify a different name for the
> > php.ini file,
> > > > > > apart from hacking php_ini.c ? It seems I can only change
> > the _path_ to
> > > > > > the file, but not the filename itself.
> > > > > >
> > > > > > TIA
> > > > > > Monte
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > > >
> > > > > >
> > --
> > Monte Ohrt <monteispi.net>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> =====
> Mark Weinstock
> mark_weinstockyahoo.com
> ***************************************
> You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
> ***************************************
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com
--
Monte Ohrt <monteispi.net>

attached mail follows:


Hi

I want to have a textarea that contains details read from a mysql table,
but I want to echo each row so that it is on a new line. What is the
"new-line" character for a textarea? ( in effect the reverse of nl2br()
)

Thanks

attached mail follows:


> I want to have a textarea that contains details read from a mysql table,
> but I want to echo each row so that it is on a new line. What is the
> "new-line" character for a textarea? ( in effect the reverse of nl2br()

A newline is \n

$text = "word\nword\nword\n";

echo "<textarea>$word</textarea>";

will have each "word" on a different line.

---John Holmes...

attached mail follows:


this is discussed in the posted comments under the function section of nl2br
on php.net.

But from what I remember there is no br2nl() (unfortunately).

just goto php.net/nl2br and search the posted comments for br2nl

Bobby

"Petre Agenbag" <internetvsa.co.za> wrote in message
news:1054822904.3729.105.camelpetre...
> Hi
>
> I want to have a textarea that contains details read from a mysql table,
> but I want to echo each row so that it is on a new line. What is the
> "new-line" character for a textarea? ( in effect the reverse of nl2br()
> )
>
> Thanks
>
>
>

attached mail follows:


ok, when i compile php i dont get libphp4.so. i'm not a linux Newb or anything but i'm not an extremely advanced user either so any help would be useful... i cant exactly run apache w/ php w/out this module. thanks for any help any of you can give me.

Redhat 8/apache2 (ugh both)

-Ryan

attached mail follows:


On Thu, 5 Jun 2003 10:25:01 +0100, Bix wrote:

>My file is currently 1200 lines long and consist of 450 lines of case
>statements and then the rest are functions.

Obviously there are ways to optimize the code for speed. However, as
with many optimizations, there are trade offs... One way to do away
with the 450 lines of case would be to use a BUNCH of include modules.
For instance:

<?PHP
  include "standard_lib.php";
  include "/functions/" . $_POST['Opt'] . ".php";
?>

What this means is that you would need a "Function" file for each
option in your directory with only the code for that function. It
would be included when the "Opt" function matched. Of course, you
would need to either see if the file exists or catch the error if it
doesn't but you just compressed 450 lines of case into 2 lines. You
also probably compressed 2200 lines down to about 120 or so lines (3
lines for the driver, 80 for the standard includes and another 20-40
for the main function).

The down side to this is that you have to have 100+ php files that you
will have to maintain separately.

attached mail follows:


Hi,
May this can help you:

 <?php

 // recusive tree function
 //
 function tree($id_parent = 0, $indent = 0)
    {
        global $g_tree, $ret_tree;
        $tt = array();
        $x = 0;
        $loop = 0;

        foreach($g_tree as $n)
        {
            if( $n['id_parent'] == $id_parent)
            {
                $tt[$x++] = $loop;
            }
            $loop++;
        }
        /*-- if there are some parent ids --*/
        if( $x != 0){
            foreach($tt as $d)
            {
                $tmp = array();
                
                foreach($g_tree[$d] as $key => $value)
                {
                    $tmp[$key] = $value;
                }
                $tmp['indent'] = $indent;

                $ret_tree[] = $tmp;
                
                tree($tmp['id'], $indent+1);
            }
        }
        else
        {
            return 0;
        }
    }

 // This is your tree structure. It should be sorted by titles
 //
 $g_tree = array();
 
 $g_tree[] = array(
   'id' => 1,
   'id_parent' => 0,
   'title' => 'Astronomy'
  );
 $g_tree[] = array(
   'id' => 2,
   'id_parent' => 1,
   'title' => 'Radio-Astronomy'
  );
  $g_tree[] = array(
   'id' => 3,
   'id_parent' => 2,
   'title' => 'Radio-Observatories'
  );
  $g_tree[] = array(
   'id' => 4,
   'id_parent' => 0,
   'title' => 'Physics'
  );
  $g_tree[] = array(
   'id' => 5,
   'id_parent' => 4,
   'title' => 'Lasers'
  );
  $g_tree[] = array(
   'id' => 6,
   'id_parent' => 4,
   'title' => 'Photonics'
  );
  
  
 // This the the return array with indents
 //
 $ret_tree = array();
 
 tree(0,0);
 
 //Print the tree structure with indents
 //
 foreach($ret_tree as $cat)
 {
  $indent = '';
  for($i=0;$i<$cat['indent'];$i++)
   $indent .= '___';
  
  echo $indent.$cat['title'].'<br>';
 }

?>

It sould even work to print a subtree eg. tree(1,0)

atur

_______________________________________________

"Mike Klemin" <mike-kleminyandex.ru> wrote
> Hello,
>
> If anyone have expamples of displaying tree structure.
>
> Say I have array $result[x][y] with folloowing data
>
> X Y["ID"] Y["OWNER"]
> 0 1 0
> 1 2 1
> 2 3 2
> 3 4 2
> 4 5 3
> 5 6 2
> 6 7 2
>
>
> So, I want it displayed like
>
> ID1
> ID2
> ID3
> ID5
> ID4
> ID6
> ID7
>
> ========================
>
> Please, help I tryed to do it with recursing but failed.
>
> There is a test function which shows that php doesnt support recursing
> well:-
>

attached mail follows:


Maybe this could do the job as well. Thanks

"Emo" <emoemo-cz.net> skrev i meddelandet
news:20030604204148.54666.qmailpb1.pair.com...
> I don't know if you mean this ...
> I use for detect browser and send css for it this script:
>
> <?php
> // set default css file (MSIE)
> $css='main.css';
> // if browser is opera ...
> if (substr_count($_SERVER["HTTP_USER_AGENT"], 'Opera'))
> {
> // ... set opera css
> $css='main.opera.css';
> }
> // if browser is gecko-based (mozilla, etc...)
> elseif (substr_count($_SERVER["HTTP_USER_AGENT"], 'Gecko'))
> {
> // ... set gecko css
> $css='main.gecko.css';
> }
> ?>
> <html>
> <head>
> <title> Some title </title>
> <link rel=StyleSheet href="<? echo $css; ?>" type="text/css">
> <meta http-equiv="content-type" content="text/html;
charset=windows-1250">
> </head>
> <body>
> .....
> .....
> .....
> "ØYstein HåLand" <haematte.se> pí¹e v diskusním pøíspìvku
> news:20030604191122.15142.qmailpb1.pair.com...
> > Till now I've bin using the BrowserDetect.class.php by Harry Fuecks.
Since
> I
> > migrated to register_globals=off this produses a lot of error messages.
> Has
> > anyone a modification that work or another script doing the same?
> >
> >
>
>

attached mail follows:


Hi !

Have somebody successed with the function < header("Location: http://...")
> using the php4isapi.dll ???

My code works well with PHP using the CGI php.exe, but impossible to make it
work with the ISAPI module !!!

Configuration:
-Windows 2000 server
- PHP 4.3.2

"php.ini" :
- output_buffering = on
- zlib.output_compression = on

Any idea ???
Other bugs with ISAPI module ???

Thanks for help !

Eric Tonicello

attached mail follows:


Eric Tonicello wrote:
> Hi !
>
> Have somebody successed with the function < header("Location: http://...")
>
>>using the php4isapi.dll ???
>
>
> My code works well with PHP using the CGI php.exe, but impossible to make it
> work with the ISAPI module !!!
>
> Configuration:
> -Windows 2000 server
> - PHP 4.3.2
>
> "php.ini" :
> - output_buffering = on
Have you tried:
ob_end_clean();
header("Location: http://...");
to throw away the contents of the output buffer before sending the
Location header, then its nice and clean.

Peter

> - zlib.output_compression = on
>
> Any idea ??
> Other bugs with ISAPI module ???
>
> Thanks for help !
>
> Eric Tonicello
>
>

attached mail follows:


> Have somebody successed with the function < header("Location:
> http://...")
> > using the php4isapi.dll ???
>
> My code works well with PHP using the CGI php.exe, but impossible to
make
> it
> work with the ISAPI module !!!

Do you have exit(); after your header() call? I use header() all the
time with IIS and have never had an issue.

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


Here's a quick function of the top of my head. I'm not sure if
x.x.0.x or x.0.x.x are valid IP addresses. Adjust as necessary.

<?
function cidr($initial_ip, $net_prefix=32) {
  $octet=explode(".",$initial_ip);
  $num_ips=pow(2,(32-$net_prefix));
  $ip_list[]=implode(".",$octet);
  for ($i=1;$i<$num_ips;$i++) {
    if ($octet[3]<256) {
        $octet[3]++;
    }
    if ($octet[3]==256) {
      $octet[2]++;
      $octet[3]=0;
    }
    if ($octet[2]==256) {
      $octet[1]++;
      $octet[2]=0;
    }
    if ($octet[1]==256) {
      $octet[0]++;
      $octet[1]=0;
    }
    if ($octet[0]>255) {
      echo "First octet of IP address cannot exceed 255";
      return false;
    }
    $ip_list[]=implode(".",$octet);

  }
  return $ip_list;

}

$arr=cidr("192.168.1.0",23);
echo "<pre>";
print_r($arr);
echo "</pre>";

?>

--- Rob Lacey <phpextrememetal.co.uk> wrote:
> does anyone know of a class that is able to extrapolate a list of
> IPs given an
> address in cidr notation. I have used the Net::Netmask module in
> perl, so I
> was just wondering if there was a PHP equivalent.
>
> Thanks
>
> Rob
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

=====
Mark Weinstock
mark_weinstockyahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

attached mail follows:


Hy!

I have an existing pdf formular, which I have to fill up with data from a
mysql database.
Now, I know, that there are these pdf funktions which could do all the work.
But to use these functions I needed the PDFlib.
Only the 'lite PDFlib' is an open source product, and the full version
espezially PDFlib+PDI or PDFlib Personalization Server (PPS) costs an
amazing mount of money.

So my questions, is it possible, to fill in data using the 'lite PDFlib' in
an existing pdf form?
And if not, are there any other possibillities than to buy 'PDFlib+PDI' or
'PDFlib Personalization Server (PPS)' to do so?

I'm thankful for every post!
greetings to all of you!
lukas

attached mail follows:


Odds are you don't need PDFlib at all. The docs at php.net/pdf
link to the following faq:

   How can I generate PDF files without using the non-free and
   commercial libraries ClibPDF and PDFLib? I'd like something
   that's free and doesn't require external PDF libraries.
 
   http://us2.php.net/manual/en/faq.using.php#faq.using.freepdf

Consider using one of these alternatives.

Regards,
Philip

On Thu, 5 Jun 2003, Lukas Gerhold wrote:

> Hy!
>
> I have an existing pdf formular, which I have to fill up with data from a
> mysql database.
> Now, I know, that there are these pdf funktions which could do all the work.
> But to use these functions I needed the PDFlib.
> Only the 'lite PDFlib' is an open source product, and the full version
> espezially PDFlib+PDI or PDFlib Personalization Server (PPS) costs an
> amazing mount of money.
>
> So my questions, is it possible, to fill in data using the 'lite PDFlib' in
> an existing pdf form?
> And if not, are there any other possibillities than to buy 'PDFlib+PDI' or
> 'PDFlib Personalization Server (PPS)' to do so?
>
> I'm thankful for every post!
> greetings to all of you!
> lukas
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Can anyone make a recommendation for me? I'm looking to tie mailing lists
in to my existing site, which is coded in php/mysql. I would be looking for
a script that has browseable archives, ability to restrict access to them to
subscribers only, and the ability to send mail to the list a web form, which
would require a u/p stored in mysql, preferably in md5 format. I know I'll
have to do a lot of customization to get it to integrate into my site, but
I'm looking for a solid script that I need to tweak the least. Any
suggestions?

Thanks,
Chad Day

attached mail follows:


Probably not what you want, but you might
be able to adapt the phpBB forum software.

Very sweet program in general.

http://www.phpbb.com/

On Thu, 2003-06-05 at 12:13, Chad Day wrote:
> Can anyone make a recommendation for me? I'm looking to tie mailing lists
> in to my existing site, which is coded in php/mysql. I would be looking for
> a script that has browseable archives, ability to restrict access to them to
> subscribers only, and the ability to send mail to the list a web form, which
> would require a u/p stored in mysql, preferably in md5 format. I know I'll
> have to do a lot of customization to get it to integrate into my site, but
> I'm looking for a solid script that I need to tweak the least. Any
> suggestions?
>
> Thanks,
> Chad Day
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


Im new to PHP coming from a background in perl devlopement. I have a form that a user can fill out.

On submit the values are iterated over a foreach to check for empty(). If the an emtyp $key is found then it passes an error string to my error function.

I have 2 php files, one that is the Form called profile.php and one that processes the values from the form, called profileprocess.php. There are multiple functions in profileprocess.php. When the header function is called in the profileprocess.php it takes you back to the profile.php with empty values in the fields. I was wandering if their is a way, (which Im sure their is) to pass back all the data that was correctly entered back to the form, and then a nice little message that displays the error of the data that needs to be checked by the user. I could do this a number of ways, but the key is not writing code that you dont have to. Its just smarter programming.

Any ideas, or functions I could read on in the rtFM manual is greatly appreciated.

I appreciate you looking at this problem...
Thanks in advance,
Daniel

attached mail follows:


Hi Daniel,

My advice is to use php sessions. You can register both the filled and
empty values in the session after processing them. Then you can header()
redirect normally with no fuss and extract the values from the session file
on the form page.

And here's a tip. Set up some CSS in a switch() statement to highlight the
form fields that are left blank. This makes for a nice user interface,
esspecially on larger forms.

Read up on sessions..
http://www.php.net/manual/en/ref.session.php

HTH,
Kevin Stone

----- Original Message -----
From: "Daniel J. Rychlik" <drychliktcsconsult.com>
To: <php-generallists.php.net>
Sent: Thursday, June 05, 2003 10:31 AM
Subject: [PHP] Passing values back to form

Im new to PHP coming from a background in perl devlopement. I have a form
that a user can fill out.

On submit the values are iterated over a foreach to check for empty(). If
the an emtyp $key is found then it passes an error string to my error
function.

I have 2 php files, one that is the Form called profile.php and one that
processes the values from the form, called profileprocess.php. There are
multiple functions in profileprocess.php. When the header function is
called in the profileprocess.php it takes you back to the profile.php with
empty values in the fields. I was wandering if their is a way, (which Im
sure their is) to pass back all the data that was correctly entered back to
the form, and then a nice little message that displays the error of the data
that needs to be checked by the user. I could do this a number of ways, but
the key is not writing code that you dont have to. Its just smarter
programming.

Any ideas, or functions I could read on in the rtFM manual is greatly
appreciated.

I appreciate you looking at this problem...
Thanks in advance,
Daniel

attached mail follows:


Thanks so much for your time. These are great tips, thanks again.

----- Original Message -----
From: "Kevin Stone" <kevinhelpelf.com>
To: "Daniel J. Rychlik" <drychliktcsconsult.com>;
<php-generallists.php.net>
Sent: Thursday, June 05, 2003 12:37 PM
Subject: Re: [PHP] Passing values back to form

> Hi Daniel,
>
> My advice is to use php sessions. You can register both the filled and
> empty values in the session after processing them. Then you can header()
> redirect normally with no fuss and extract the values from the session
file
> on the form page.
>
> And here's a tip. Set up some CSS in a switch() statement to highlight
the
> form fields that are left blank. This makes for a nice user interface,
> esspecially on larger forms.
>
> Read up on sessions..
> http://www.php.net/manual/en/ref.session.php
>
> HTH,
> Kevin Stone
>
>
> ----- Original Message -----
> From: "Daniel J. Rychlik" <drychliktcsconsult.com>
> To: <php-generallists.php.net>
> Sent: Thursday, June 05, 2003 10:31 AM
> Subject: [PHP] Passing values back to form
>
>
> Im new to PHP coming from a background in perl devlopement. I have a form
> that a user can fill out.
>
> On submit the values are iterated over a foreach to check for empty(). If
> the an emtyp $key is found then it passes an error string to my error
> function.
>
> I have 2 php files, one that is the Form called profile.php and one that
> processes the values from the form, called profileprocess.php. There are
> multiple functions in profileprocess.php. When the header function is
> called in the profileprocess.php it takes you back to the profile.php with
> empty values in the fields. I was wandering if their is a way, (which Im
> sure their is) to pass back all the data that was correctly entered back
to
> the form, and then a nice little message that displays the error of the
data
> that needs to be checked by the user. I could do this a number of ways,
but
> the key is not writing code that you dont have to. Its just smarter
> programming.
>
> Any ideas, or functions I could read on in the rtFM manual is greatly
> appreciated.
>
> I appreciate you looking at this problem...
> Thanks in advance,
> Daniel
>
>

attached mail follows:


Hello,

On Sun Solaris with Iplanet 4.1 et PHP 4.2.3, I have theses messages on
the error log
of the Web server :
[04/Jun/2003:16:04:54] info ( 7643): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:09:57] info ( 7679): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:11:12] info ( 7690): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:17:17] info ( 7742): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:17:25] info ( 7745): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:19:26] info ( 7761): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:37:52] info ( 7906): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:47:24] info ( 7985): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:48:40] info ( 7992): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:50:04] info ( 8002): php4_init reports: Initialized PHP
Module
[04/Jun/2003:16:54:13] info ( 8032): php4_init reports: Initialized PHP
Module

And at the same time, I have theses other messages on the console :
Jun 4 16:04:53 server1 uxwdog[23185]: server terminated (signal 10):
watchdog is restarting it
Jun 4 16:09:56 server1 uxwdog[23185]: server terminated (signal 11):
watchdog is restarting it
Jun 4 16:11:12 server1 uxwdog[23185]: server terminated (signal 10):
watchdog is restarting it
Jun 4 16:17:24 server1 last message repeated 2 times
Jun 4 16:19:25 server1 uxwdog[23185]: server terminated (signal 11):
watchdog is restarting it
Jun 4 16:37:51 server1 uxwdog[23185]: server terminated (signal 10):
watchdog is restarting it
Jun 4 16:47:23 server1 uxwdog[23185]: server terminated (signal 11):
watchdog is restarting it
Jun 4 16:48:40 server1 uxwdog[23185]: server terminated (signal 10):
watchdog is restarting it
Jun 4 16:50:03 server1 uxwdog[23185]: server terminated (signal 11):
watchdog is restarting it
Jun 4 16:54:12 server1 last message repeated 1 time

Why the process ns-httpd is restarting ? Is-it due to PHP ?
How can I debug this ?

AL

attached mail follows:


Does anyone know if there is any other way to have a php script run automatically (everyday, or week, or month, etc...) besides a cron job or scheduled task? Thanks.

Matt

attached mail follows:


[snip]
Does anyone know if there is any other way to have a php script run
automatically (everyday, or week, or month, etc...) besides a cron job
or scheduled task? Thanks.
[/snip]

I suppose that you could run a script with a sleep statement for x time,
the re-direct to itself restarting the sleep statement. Hmmm?

Jay

attached mail follows:


If the issue is running a cron job on the server, you could run the
cron job or scheduled task on a client with lynx. The client would
just need to be on and have access to the server at the time it fires
up the task.

--- Matt Palermo <mpalermovt.edu> wrote:
> Does anyone know if there is any other way to have a php script run
> automatically (everyday, or week, or month, etc...) besides a cron
> job or scheduled task? Thanks.
>
> Matt
>

=====
Mark Weinstock
mark_weinstockyahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

attached mail follows:


Im trying to pull the Mozilla version and *possibly* the MSIE x.xx
string out $_SERVER['HTTP_USER_AGENT']
If I did this correctly, (MSIE\s\d\.\d{1,2})? should mean that if its
there pull it out, else move on, since its not there.
When viewing this script via a windows browser, it doesn't match the
MSIE section. If I take out the trailing ?, it will match successfully.
But when viewing it with a mozilla browser, the regex fails as there is
not MSIE string in there.
Any help with this would be appreciated.
Thanks

<?php

var_dump($_SERVER['HTTP_USER_AGENT']);
echo '<p>';
preg_match('/^(Mozilla\/\d\.\d{1,2}|Opera\/\d\.\d{1,2})\s\(.*?(MSIE\s\d\.\d{1,2})?.*?\)(\sOpera)?/',
$_SERVER['HTTP_USER_AGENT'], $foo);

var_dump($foo);

?>

attached mail follows:


Maybe it might be easier to just use the get_browser() function:

http://www.php.net/manual/en/function.get-browser.php

Monty

> From: gsamtrini0.org (Gerard Samuel)
> Newsgroups: php.general
> Date: Thu, 05 Jun 2003 14:00:23 -0400
> To: php-generallists.php.net
> Subject: Regex for Browser Versions
>
> Im trying to pull the Mozilla version and *possibly* the MSIE x.xx
> string out $_SERVER['HTTP_USER_AGENT']
> If I did this correctly, (MSIE\s\d\.\d{1,2})? should mean that if its
> there pull it out, else move on, since its not there.
> When viewing this script via a windows browser, it doesn't match the
> MSIE section. If I take out the trailing ?, it will match successfully.
> But when viewing it with a mozilla browser, the regex fails as there is
> not MSIE string in there.
> Any help with this would be appreciated.
> Thanks
>
> <?php
>
> var_dump($_SERVER['HTTP_USER_AGENT']);
> echo '<p>';
> preg_match('/^(Mozilla\/\d\.\d{1,2}|Opera\/\d\.\d{1,2})\s\(.*?(MSIE\s\d\.\d{1,
> 2})?.*?\)(\sOpera)?/',
> $_SERVER['HTTP_USER_AGENT'], $foo);
>
> var_dump($foo);
>
> ?>
>

attached mail follows:


True, but since the code is being run by 3rd parties, I don't have a
guarantee that
the browsecap.ini file is available on the server.

Monty wrote:

>Maybe it might be easier to just use the get_browser() function:
>
>http://www.php.net/manual/en/function.get-browser.php
>
>Monty
>

attached mail follows:


Hello,

I'm trying to use a calendare script to select a date in another form. I got the calendar working and I've got it all working except one bit of error.

I'm repeating a table field to get all these items into a table. Each row of the table has it's own text field where the user can type in when they want the item to be delivered. That's where the calendar comes in. It opens a new window, displays the calendar, and that's that. The problem I'm having is when the user click the date, they get an error, one of those "Expected ] on line whatever."

I can see what the problem is. Since I repeat the form field, I made the field's name delivery[item_id] and item_id is replaced with the item's id currently being displayed. I need to keep this array so, how can I fix this error? I tried doing the \[ trick since that works with apostrpohes but it didn't seem to work. Any help would be great!

Here's my javascript link code for each day of the month in the calendar script:

        print "<a href=\"#\" onClick=\"window.opener.document.".$HTTP_GET_VARS['name'].".date.value='$y-$m-$d';\">$d</a>";

$HTTP_GET_VARS['name'] holds the text field name, ie delivery[3322ffds]. If I replace the name either order in the text field and as the variable I pass in the URL it works fine.

I'm not yours, so why should I be sincere about it,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.

attached mail follows:


Knowing any kind of programming language will help in learning PHP. If you
understand variables, arrays, if/else structures, etc., it allows you to
skim over some of the basics quickly.

I had very little programming experience, but, learned a lot from the book
"PHP and MySQL Web Development" by Luke Wellington and Laura Thomson. This
was a about 2 years ago, though, and if they haven't come out with an
update, then it's probably a little too outdated by now.

Also, I learned LOTS from a number of guys on this newsgroup who generously
offer their advice and wisdom. The sites that a few others mentioned are
also helpful. Once you start programming, ALWAYS check out the online PHP
help on php.net. It's really excellent and is chock full of input from users
who offer sample scripts and solutions for all kinds of things. It's the
best resource anywhere.

I also get PHP Architect (phparch.com), a PDF publication that has some good
and helpful stuff in it. As you can see, there are lots of online resources
for PHP and MySQL.

Monty

> From: simon.thurtlemainlink.co.uk (Simon Thurtle)
> Organization: Mainlink
> Reply-To: "Simon Thurtle" <simon.thurtlemainlink.co.uk>
> Newsgroups: php.general
> Date: Thu, 5 Jun 2003 13:36:14 +0100
> To: php-generallists.php.net
> Subject: Where to start?
>
> Hi all,
> I am looking into learning PHP, I have a good understanding of HTML, JS and
> I know a little Perl. Firstly I know PHP is all server side and so a damn
> sight different from the above, but will they help me at all?
> Secondly where do I start? Are there any good on-line resources and or books
> that anyone knows? I am plannig to develop an E-comm solution us Oscommerce,
> does anyone know if this is any good or is naff?
> Any hints, tips or pointers would be greatly appreciated.
>
> Thanks,
>
> Simon
>
>
>

attached mail follows:


Thanks very much!!! :-D I had no idea it was an old topic!!!

-----Original Message-----
From: Evan Nemerson [mailto:evancoeus-group.com]
Sent: June 4, 2003 1:25 PM
To: sevenfiftyflat; php-generallists.php.net
Subject: Re: [PHP] Needing Just a Little Advice!

Try not hijacking threads.

Other than that, this has been discussed several times in the past.
Methinks a
thorough scouring of the archives would be fruitful.

On Wednesday 04 June 2003 01:18 pm, sevenfiftyflat wrote:
> Hi!
>
> From any of you out there that managed to get a PHP script to
> automatically upload your Auction to Ebay, I need some general advice
> and help. I've hit a brick wall, and would gladly work with
something,
> letting you know what I know in exchange for what you know.
>
> I post and repost the EXACT same, and NEARLY the exact same item,
and
> I just want to make my life much easier!! I spend about 3 hours
posting,
> when I KNOW I can get PHP to do it for me with the push of a button.
>
> So... Anyone Have any help? Anyone intested? Thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


I want to add some directories to the "include path" entry in the
php.ini file. I have to do this via the .htaccess file because I do not
have access to the php.ini file on the server.

Will the additional directories in the .htaccess file replace the
directories in the php.ini file or will the ones in the .htaccess file
be added to the directories in the php.ini file?

--
Jan
saint.urhoxmtc.net

attached mail follows:


Torben,

Thanks for your help. I got it to work by creating a constructor that took
the content as an argument then set the property $this->content =
SetContent($content);

Then in my script I instantiated the object with the login form as the
content. I created a switch case for the result of the login routine and
within each case I re-invoked the constructor with a different argument to
change the content. Then when I called the Display() function again, it
changed the screen on the browser...

I really appreciate all your help!
/T

on 6/5/03 4:12, Lars Torben Wilson at torbenphp.net wrote:

> On Wed, 2003-06-04 at 17:18, InfoBest-IT wrote:
>> You have the problem right. What do you mean by a "server push"? Sounds
>> interesting...
>>
>> Anyway I have to display something. Since its a login, the user needs their
>> interface. I think I'll have to introduce another page... I'd love to
>> avoid that though...
>>
>> /T
>
> Search for "server push" (use quotes) on google...essentially, it means
> that the server can update information in the browser. Unfortunately, it
> is extremely limited and usually not worth the hassle.
>
> My suggestion would be to do something like this: have a page which
> shows a login form. The form posts back to itself (the same page). When
> there is no input, the script displays a blank login form. If there is
> input, the script attempts to validate the login data. If the data
> validates, the script somehow calls the next page (sends a redirect
> header, or include()s the code, or instantiates that page's class,
> etc...). If not, it redisplays the form, perhaps with some added
> information about what went wrong. It's important to note that nothing
> is ever sent to the browser until all needed information is
> known...that way, you always have the option to alter the output, or
> send a redirect header, or whatever.
>
>
> Torben

attached mail follows:


Please see the attached file.

attached mail follows:


No file attached..

<cadaverplanethalflife.com> escribió en el mensaje
news:php.general-150392news.php.net...
> Please see the attached file.

attached mail follows:


I'm glad that no file is attached ... this message is from mail-worm :o)

"Esteban Fernandez" <efernandeztecsol.cl> pí¹e v diskusním pøíspìvku
news:20030605203703.18019.qmailpb1.pair.com...
> No file attached..
>
> <cadaverplanethalflife.com> escribió en el mensaje
> news:php.general-150392news.php.net...
> > Please see the attached file.
>
>

attached mail follows:


Glory!
 
I'm working on a Counter thing. with a basic Hit Meter and a Users
Online Meter.
The problem I face is.. the index page of my site is HTML .. no
frameset.. and I need to display these vars on that page. The solution I
use is that I place a Flash Clip (.swf) and I'm calling the PHP
Variables in it, from a PHP page..
 
But now the issues comes in.. how does the Database increment the
counter? If I place the counter increment script on a PHP page.. it's
ok. But here I have a HTML page with Flash in it.. when this HTML page
loads.. the Counter needs to be incremented by one, and this adding to
the Hits. Same way the Users Online script needs to work.. but how do I
do this?
 
Does anybody have any other solution how to make this work?
 
PHPSpooky
 
______________________________________
"If God had wanted me otherwise, He would have created me otherwise."
 - Johann Wolfgang von Goethe
 

attached mail follows:


Make database increment on the flash movie
Look on flash documentation for the loadVars object

"Phpspooky" <phpspookymjimm.com> escribió en el mensaje
news:000001c32b98$b0b08e50$43b8c4cbSpooky...
> Glory!
>
> I'm working on a Counter thing. with a basic Hit Meter and a Users
> Online Meter.
> The problem I face is.. the index page of my site is HTML .. no
> frameset.. and I need to display these vars on that page. The solution I
> use is that I place a Flash Clip (.swf) and I'm calling the PHP
> Variables in it, from a PHP page..
>
> But now the issues comes in.. how does the Database increment the
> counter? If I place the counter increment script on a PHP page.. it's
> ok. But here I have a HTML page with Flash in it.. when this HTML page
> loads.. the Counter needs to be incremented by one, and this adding to
> the Hits. Same way the Users Online script needs to work.. but how do I
> do this?
>
> Does anybody have any other solution how to make this work?
>
> PHPSpooky
>
> ______________________________________
> "If God had wanted me otherwise, He would have created me otherwise."
> - Johann Wolfgang von Goethe
>
>

attached mail follows:


I found the following function to test a string for alphanumeric characters

function is_alphanumeric($string)
{
        return (preg_match("/^[a-z0-9]+$/i", $string));
}

How can I modify it so that it also allows punctuation marks?

thanks,

Luis R. Lebron

attached mail follows:


Hi,

> return (preg_match("/^[a-z0-9]+$/i", $string));

        That a-z0-9 is where you can do it. Just add ! or . or ? to the end:

        a-z0-9!?.

        Also, if you want upper case letters, make sure you add A-Z:

        A-Za-z0-9!?.

-Dan Joseph

attached mail follows:


I tried adding a period to the end but a string will a period still returns
false

function is_alphanumeric($string)
{
        return (preg_match("/^[A-Za-z0-9.]+$/i", $string));
}

-----Original Message-----
From: Dan Joseph [mailto:djosephduhq.us]
Sent: Thursday, June 05, 2003 2:42 PM
To: Php-General (E-mail)
Subject: RE: [PHP] Allowing punctuation marks in regular expressions

Hi,

> return (preg_match("/^[a-z0-9]+$/i", $string));

        That a-z0-9 is where you can do it. Just add ! or . or ? to the
end:

        a-z0-9!?.

        Also, if you want upper case letters, make sure you add A-Z:

        A-Za-z0-9!?.

-Dan Joseph

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


It's using the case-insensitive switch.

Dan Joseph wrote:

> Also, if you want upper case letters, make sure you add A-Z:

--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

attached mail follows:


> I tried adding a period to the end but a string will a period still
> returns
> false
>
> function is_alphanumeric($string)
> {
> return (preg_match("/^[A-Za-z0-9.]+$/i", $string));
> }

No it doesn't. It's not allowing spaces, though... Is that the problem?

---John W. Holmes...

Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


Hi,
 
We are attempting to install PHP 4.3.2 on to windows XP using Apache as
our web server. When we try to start apache, the Warning message
appears: "Unkown(): Unable to load dynamic library
'c:\PHP\extensions\php_gettext.dll' - The specified module could not be
found." We have not been able to locate the php_gettext.dll file, and it
was suggested to try the libintl.dll file, but we have not had any
success with it. Can you please help us?
 
Thanks,
Andrew
alinetwork2000-hi.com

attached mail follows:


Try this:

  if (is_numeric($txt1) && (float)$txt1<24 &&
(strlen($txt1)-strpos($txt1,"."))< {
    echo "True";
  }
  else {
    echo "False";
  };

Misha
PHP Genie

"Electroteque" <danielelectroteque.org> wrote in message
news:EJECKPELDLGDPHHJOEDLMEGOFCAA.danielelectroteque.org...
> is_numeric and strlen ?
>
> -----Original Message-----
> From: Shaun [mailto:shaunmania.plus.com]
> Sent: Tuesday, June 03, 2003 7:21 PM
> To: php-generallists.php.net
> Subject: [PHP] Validating user input
>
>
> Hi,
>
> I am creating a timesheet application, how can I make sure that a user has
> entered a number, and that the number is a whole number or a decimal up to
2
> places, and that the number is less than 24?
>
> Thanks for your help
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


I can't get ob_get_contents() to return false, or I don't know how to test
for it. Help appreciated. The following never echos STARTING!!!

ob_end_flush();
    if(ob_get_contents() === FALSE) {
        echo "STARTING!!!";
        ob_start();
    }

also tried: if(ob_get_contents() == FALSE)
and: if(!ob_get_contents())
and: if(ob_get_contents() == "")

But I do get the following notice at the ob_end_flush(); line which tells me
that output buffering is not on:

Notice: ob_end_flush() [ref.outcontrol]: failed to delete buffer default
output handler.

Thanks!
Shawn

attached mail follows:


On Thu, 2003-06-05 at 05:28, Jay Blanchard wrote:
> [snip]
> Another issue I haven't read so far is that making your script work when
> register_globals is off makes it to be more compatible since scripts
> using GET and POST array should still work on systems that have
> register_globals turned on.
> [/snip]
>
> So what you're asking for is a variable handler that will take care of
> things whether or not register_globals is turned on or off and you want
> the variables considered across a range of PHP versions? If so there
> have been many of those ideas posted, check the archives.
>
> HTH!
>
> Jay

I think he was just saying the using $_GET and $_POST is a better way
to make sure that your script is compatible across as many
installations and version than using register_globals = on, since it
will always work. :)

Torben

--
 Torben Wilson <torbenphp.net> +1.604.709.0506
 http://www.thebuttlesschaps.com http://www.inflatableeye.com
 http://www.hybrid17.com http://www.themainonmain.com
 -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----

attached mail follows:


Ok guys, I think I have a challenge for you (actually, I don't think
this can be done, but I've been proven wrong every time I've made that
assumption with php in the past, so I'll ask anyway). Here's the
question:

Is there a way to have php insert headers and/or footers into all of
the html files in a given directory on the fly (not actually modifying
the files)? And by this I mean take an existing valid HTML file and
add headers and footers and end up with a valid HTML file.

Now, before some of you get trigger happy and tell me to read the
manual and point me to things like .htaccess, auto_prepend_file, google
and the like, think about what I'm really asking.... It needs to
insert the header after the -body- tag and put the footer in before the
-/body- tag. It needs to do this without modifications to the HTML
file.

And yes, I understand that by default HTML files aren't going to be
effected by the auto_prepend_file (since they aren't php files) - so it
will require adding HTML to the list of php parsed file types.

For instance, the goal would be to take the following code:

-HTML-
-Head-
-Title-This is a test-Title-
-body-

Well, did it work?

-/body-
-/html-

and convert it to this:

-HTML-
-Head-
-Title-This is a test-Title-
-body-
-h1-This is a page header-/h1-

Well, did it work?

-h3-This is the footer-/h3-
-/body-
-/html-

Can it be done? I don't think so, but I leave it up to your wiles to
suggest a solution....

Thanks!!!

attached mail follows:


I would have to say yes it can be done. The way *I* would do it is like
this:

First, I would drop a .htaccess file that allows the HTML files to run
through the PHP parser. Like this AddType application/x-httpd-php .php .html

The in all of the HTML docs it would look like this:

-HTML-
-Head-
-Title-This is a test-Title-
-body-
-h1-<? include('header.inc'); ?>-/h1-

Well, did it work?

-h3-<? include('footer.inc'); ?>-/h3-
-/body-
-/html-

The next question that comes to mind is, are all the headers and footers
static? Or will they rotate?

You will have to have that php code in your HTML docs, otherwise they
won't know how to add the header and footer.

Wendell Brown wrote:

>Ok guys, I think I have a challenge for you (actually, I don't think
>this can be done, but I've been proven wrong every time I've made that
>assumption with php in the past, so I'll ask anyway). Here's the
>question:
>
>Is there a way to have php insert headers and/or footers into all of
>the html files in a given directory on the fly (not actually modifying
>the files)? And by this I mean take an existing valid HTML file and
>add headers and footers and end up with a valid HTML file.
>
>Now, before some of you get trigger happy and tell me to read the
>manual and point me to things like .htaccess, auto_prepend_file, google
>and the like, think about what I'm really asking.... It needs to
>insert the header after the -body- tag and put the footer in before the
>-/body- tag. It needs to do this without modifications to the HTML
>file.
>
>And yes, I understand that by default HTML files aren't going to be
>effected by the auto_prepend_file (since they aren't php files) - so it
>will require adding HTML to the list of php parsed file types.
>
>For instance, the goal would be to take the following code:
>
>-HTML-
>-Head-
>-Title-This is a test-Title-
>-body-
>
>Well, did it work?
>
>-/body-
>-/html-
>
>and convert it to this:
>
>-HTML-
>-Head-
>-Title-This is a test-Title-
>-body-
>-h1-This is a page header-/h1-
>
>Well, did it work?
>
>-h3-This is the footer-/h3-
>-/body-
>-/html-
>
>Can it be done? I don't think so, but I leave it up to your wiles to
>suggest a solution....
>
>Thanks!!!
>
>
>
>

attached mail follows:


Well, my understanding of mod_rewrite is nonexistent (heck, I'm not
even sure that's the correct name), but I believe you do the
following. Write a php script to parse the file and output it with
the added lines you want where you want them. Then setup apache/php
to accept something like

http://www.yourserver.com/directory/phpscript/yourfile.html

where <directory> is the path to where the files are located,
<phpscript> is the php script (located (in <directory>)that parses
the html files, and <yourfile.html> is... one of your HTML files.

It's not ideal, but it will let you wrap something around existing
HTML files without modifying them or their location.

--- Wendell Brown <wbrownarkie.net> wrote:
> Ok guys, I think I have a challenge for you (actually, I don't
> think
> this can be done, but I've been proven wrong every time I've made
> that
> assumption with php in the past, so I'll ask anyway). Here's the
> question:
>
> Is there a way to have php insert headers and/or footers into all