php-general Digest 29 Oct 2002 05:55:20 -0000 Issue 1672

Topics (messages 121753 through 121818):

4.3.0pre2 Mcrypt Compile failure
        121753 by: Mitch Vincent

ereg_replace???
        121754 by: Shawn McKenzie
        121756 by: John W. Holmes
        121764 by: Shawn McKenzie

Re: Free compiler for Win
        121755 by: Shawn McKenzie

Re: Get HTML data from an URL
        121757 by: John W. Holmes

Re: for??????
        121758 by: SHEETS,JASON (HP-Boise,ex1)
        121759 by: Davy Obdam

How to get linefeed from textfields registered in mysql?
        121760 by: Raymond Lilleodegard
        121761 by: Tom Woody
        121762 by: Chris Shiflett
        121763 by: John W. Holmes
        121768 by: Raymond Lilleodegard

Mail() function
        121765 by: Rodrigo de Oliveira
        121766 by: Adam Voigt
        121767 by: Rick Emery

Re: How to pass data without headers
        121769 by: Drew Kime

newbie: apache prob...
        121770 by: Mr. BuNgL3
        121776 by: Jonathan Sharp
        121779 by: John Nichel
        121786 by: Peter Houchin

Apache authentication and adding a user.
        121771 by: John Meyer
        121772 by: Daniel Kushner

Webserver-Administration
        121773 by: Jochen Kächelin
        121775 by: Adam Williams
        121782 by: Paul Nicholson

Add picture in DB
        121774 by: Christian Ista
        121783 by: Raymond Lilleodegard
        121788 by: Stephen
        121795 by: Frank W.

forcing .html pages to go through the PHP parser
        121777 by: John Meyer
        121778 by: Daniel Kushner

fread & EOF
        121780 by: Martin Adler

Browscap.ini
        121781 by: Scott Fletcher

Array Question
        121784 by: PHP List
        121785 by: Rasmus Lerdorf
        121789 by: PHP List

Re: New Error?
        121787 by: Peter Houchin

Plus sign changing to space in html form
        121790 by: Stan
        121793 by: Tom Woody
        121797 by: John W. Holmes
        121802 by: Chris Shiflett

preg_replace (underscore)
        121791 by: Shawn McKenzie
        121792 by: John Meyer

Have part not be replaced in regex?
        121794 by: Leif K-Brooks
        121796 by: Leif K-Brooks
        121798 by: John W. Holmes

What causes this?
        121799 by: Jimmy Brake

looking for Powerfull Document Management Systems in PHP...
        121800 by: PHP Beginner
        121801 by: Peter Houchin

Making string upper/lowercase with regex?
        121803 by: Leif K-Brooks
        121805 by: Chris Shiflett
        121806 by: Leif K-Brooks

Recommend a merchant/store product
        121804 by: Support . Fourthrealm.com
        121807 by: Jason Reid

Re: One mail function, multiple recipients
        121808 by: dwalker

Re: Week numbers
        121809 by: Justin French

Regex question...
        121810 by: Leif K-Brooks
        121814 by: . Edwin
        121816 by: Leif K-Brooks

Passing the variables ...
        121811 by: Mukta Telang
        121813 by: . Edwin

standardization across apps?
        121812 by: taylor
        121815 by: eNetwizard Developers Team
        121817 by: Peter J. Schoenster

Please Help
        121818 by: Erich Kolb

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]


----------------------------------------------------------------------
--- Begin Message --- OS 10.2.1 - Latest libmcrypt.

Seems to have something to do with compatibility with older mcrypt libs, but even after some hacking I couldn't get it to work right...

gcc -Iext/mcrypt/ -I/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/ -DPHP_ATOM_INC -I/Users/mitch/desktop/php-4.3.0pre2/include -I/Users/mitch/desktop/php-4.3.0pre2/main -I/Users/mitch/desktop/php-4.3.0pre2 -I/Users/mitch/desktop/php-4.3.0pre2/Zend -I/usr/local/include -I/usr/local/pgsql/include -I/Users/mitch/desktop/php-4.3.0pre2/ext/xml/expat -no-cpp-precomp -no-cpp-precomp -I/Users/mitch/desktop/php-4.3.0pre2/TSRM -g -O2 -c /Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c -o ext/mcrypt/mcrypt.o && echo > ext/mcrypt/mcrypt.lo
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:222:1: warning: "MCRYPT_FAILED" redefined
In file included from /Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:34:
/usr/local/include/mcrypt.h:30:1: warning: this is the location of the previous definition
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c: In function `zm_startup_mcrypt':
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:272: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:273: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:274: `MCRYPT_BLOWFISH_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:274: (Each undeclared identifier is reported only once
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:274: for each function it appears in.)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:275: `MCRYPT_BLOWFISH_192' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:276: `MCRYPT_BLOWFISH_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:277: `MCRYPT_BLOWFISH_448' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:278: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:279: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:280: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:281: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:282: `MCRYPT_IDEA' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:283: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:284: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:285: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:286: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:287: `MCRYPT_RC2_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:288: `MCRYPT_RC2_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:289: `MCRYPT_RC2_1024' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:290: `MCRYPT_RC4' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:291: `MCRYPT_RC6_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:292: `MCRYPT_RC6_192' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:293: `MCRYPT_RC6_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:294: `MCRYPT_SAFER_64' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:295: `MCRYPT_SAFER_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:296: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:297: `MCRYPT_SERPENT_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:298: `MCRYPT_SERPENT_192' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:299: `MCRYPT_SERPENT_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:300: `MCRYPT_TWOFISH_128' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:301: `MCRYPT_TWOFISH_192' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:302: `MCRYPT_TWOFISH_256' undeclared (first use in this function)
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:303: warning: passing arg 3 of `zend_register_long_constant' makes integer from pointer without a cast
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c: In function `zif_mcrypt_get_cipher_name':
/Users/mitch/desktop/php-4.3.0pre2/ext/mcrypt/mcrypt.c:1495: warning: assignment makes pointer from integer without a cast
make: *** [ext/mcrypt/mcrypt.lo] Error 1


-Mitch

I can only please one person per day. Today is not your day. Tomorrow doesn't look good either.

--- End Message ---
--- Begin Message ---
I need to replace all NON alpha-numeric characters in a string.

Example:
   input:  "-What's Up Doc?"
   output: "WhatsUpDoc"

I received this in a previous post, but it doesn't work:
   $str = ereg_replace("/[^[:alnum:]]/i", '', $str);

Thanks!
Shawn


--- End Message ---
--- Begin Message ---
> I need to replace all NON alpha-numeric characters in a string.
> 
> Example:
>    input:  "-What's Up Doc?"
>    output: "WhatsUpDoc"
> 
> I received this in a previous post, but it doesn't work:
>    $str = ereg_replace("/[^[:alnum:]]/i", '', $str);

Use preg_replace() with that string, not ereg_replace().

---John Holmes...


--- End Message ---
--- Begin Message ---
Thanks!

Why does preg_replace("^\W^","",$str); not remove undescores _ ?  Are they
alpha-numeric?

I had to do this preg_replace("^\W|_^","",$str);

TIA,
Shawn

"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:000201c27eab$f4ea0500$7c02a8c0@;coconut...
> > I need to replace all NON alpha-numeric characters in a string.
> >
> > Example:
> >    input:  "-What's Up Doc?"
> >    output: "WhatsUpDoc"
> >
> > I received this in a previous post, but it doesn't work:
> >    $str = ereg_replace("/[^[:alnum:]]/i", '', $str);
>
> Use preg_replace() with that string, not ereg_replace().
>
> ---John Holmes...
>
>


--- End Message ---
--- Begin Message ---
There is a GNU gcc compiler for windows.

-Shawn

"Marcello Lupo" <[EMAIL PROTECTED]> wrote in message
news:0210281543120J.00435@;hunters...
> Hi to all,
> anyone know a good free complier for win 2000/NT to compile PHP and so on?
> thanks,
> Bye
> MArselo


--- End Message ---
--- Begin Message ---
> fopen() works but I'm still having problems. I need to get the text
posted
> by a Dynamic Page. (ie. http://www.test.com/test.php?newsID=2 )

I'm no genius, but how about
fopen('http://www.test.com/test.php?newsID=2','r') ????

How about trying a few things before you post.

---John Holmes...


--- End Message ---
--- Begin Message ---
I believe there is some confusion between columns (fields) and rows.  LIMIT
is generally used to limit the returned rows, not fields.  If you want only
specific columns then select only the ones you want "SELECT
id,firstname,lastname,login FROM users ORDER BY lastname,firstname".

Jason

-----Original Message-----
From: Martin Hudec [mailto:corwin@;corwin.sk] 
Sent: Monday, October 28, 2002 10:38 AM
To: Bsantos PHP
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] for??????

Hello Bsantos,

BP> Now, I've created a funtion which controls how many fields (cols) may be
BP> seen by user. Some like this:

BP> function select_query ($fields, $table) {
BP> $result = ("SELECT $fileds FROM $table");
BP> }

maybe mistype in SELECT fileds should be fields....also try using
select_query() without that space between...i suppose you will
have something like select_query("email,name","userlist")

BP> Well, I hould like to control how many fields my query will use.

for example you will want first ten fields...then add
to query LIMIT 0,10 (it will start from first field, and it will
select ten fields)

BP> For example: if I call select_query('id,username,email', 'users');

BP> I want to know that there was selected 3 cols. so I can later do some
like
BP> this:

well three cols are not difficult...just from what position u want to
have them (see LIMIT above)...

BP> for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) {
BP>     echo"<td>$list[$j]</td>";

BP> ... and that's it. By the way!! Is this late statement correct?!?!

to this for statement...why are you doing minus one?...for example if
you have 10 selected cols...it will do that echo ten times for each
$j....not nine as in your original statement...you will have one $j
extra...

okay hope it helps for now

-- 
Best regards,
 Martin                            mailto:corwin@;corwin.sk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Bsantos,

Why not use the following code:

for ($i="0";$i<mysql_num_rows($result);$i++) {
        echo "<td>".result['$i']."</td>";
        }

I hope this helps. Should be easier then using
$number_of_selected_cols_minus_one because how do u get this one?
Probably like this, right? $number_of_selected_cols_minus_one =
mysql_num_rows($result)-1; This is shorter, and its not necessary to do
- 1 i think

Best regards,
 
Davy Obdam
mailto:info@;davyobdam.com


> -----Oorspronkelijk bericht-----
> Van: Bsantos PHP [mailto:bruno.santos@;mf.pt] 
> Verzonden: maandag 28 oktober 2002 18:23
> Aan: [EMAIL PROTECTED]
> Onderwerp: [PHP] for??????
> 
> 
> Hi people:
> 
> Can anybody help me with this? :
> 
> I've got a query in a table:
> 
> $result = mysql_query("SELECT username, email FROM users");
> 
> which should bring about 300 lines (each for an user).
> 
> Now, I've created a funtion which controls how many fields 
> (cols) may be seen by user. Some like this:
> 
> 
> function select_query ($fields, $table) {
> $result = ("SELECT $fileds FROM $table");
> }
> 
> Well, I hould like to control how many fields my query will use.
> 
> For example: if I call select_query('id,username,email', 'users');
> 
> I want to know that there was selected 3 cols. so I can later 
> do some like
> this:
> 
> for ($j=0;$j<$number_of_selected_cols_minus_one;$j++) {
>     echo"<td>$list[$j]</td>";
> 
> ... and that's it. By the way!! Is this late statement correct?!?!
> 
> 
> Thanks a lot to anyone that can help me, cheers,
> 
> 
> 
> bsantos
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> ================================================================
> Deze e-mail is door E-mail VirusScanner van Planet Internet 
> gecontroleerd op virussen. Op http://www.planet.nl/evs staat 
> een verwijzing naar de actuele lijst waar op wordt gecontroleerd.
> 
> 


--- End Message ---
--- Begin Message ---
Hi!

I have made a guestbook to my website driven by php and mysql.

But I don't know how to get the text as it is written in the textfield
before it is sent to mysql. So is it possible to save the "hits on enter" in
the database?

Best regards Raymond


--- End Message ---
--- Begin Message ---
While I am not exactly sure of everything you are asking I think I had
a similar problem...

You need to convert the \r to \n before you put it into the DB.


On Mon, 28 Oct 2002 19:30:15 +0100
"Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote:

> Hi!
> 
> I have made a guestbook to my website driven by php and mysql.
> 
> But I don't know how to get the text as it is written in the textfield
> before it is sent to mysql. So is it possible to save the "hits on
> enter" in the database?
> 
> Best regards Raymond
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Tom Woody
Systems Administrator
NationWide Flood Research, Inc.
phone: 214-631-0400 x209
  fax: 214-631-0800

Don't throw your computer out the window, 
throw the Windows out of your computer! 

--- End Message ---
--- Begin Message ---
Or maybe you are looking for the nl2br() function ...

Tom Woody wrote:

While I am not exactly sure of everything you are asking I think I had
a similar problem...

You need to convert the \r to \n before you put it into the DB.


On Mon, 28 Oct 2002 19:30:15 +0100
"Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote:

I have made a guestbook to my website driven by php and mysql.

But I don't know how to get the text as it is written in the textfield
before it is sent to mysql. So is it possible to save the "hits on
enter" in the database?


--- End Message ---
--- Begin Message ---
www.php.net/nl2br

---John Holmes...

----- Original Message ----- 
From: "Tom Woody" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 1:26 PM
Subject: Re: [PHP] How to get linefeed from textfields registered in mysql?


> While I am not exactly sure of everything you are asking I think I had
> a similar problem...
> 
> You need to convert the \r to \n before you put it into the DB.
> 
> 
> On Mon, 28 Oct 2002 19:30:15 +0100
> "Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote:
> 
> > Hi!
> > 
> > I have made a guestbook to my website driven by php and mysql.
> > 
> > But I don't know how to get the text as it is written in the textfield
> > before it is sent to mysql. So is it possible to save the "hits on
> > enter" in the database?
> > 
> > Best regards Raymond
> > 
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> -- 
> Tom Woody
> Systems Administrator
> NationWide Flood Research, Inc.
> phone: 214-631-0400 x209
>   fax: 214-631-0800
> 
> Don't throw your computer out the window, 
> throw the Windows out of your computer! 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Ok, thanks a lot! Thats what I thougt.

Regards Raymond

"Tom Woody" <[EMAIL PROTECTED]> wrote in message
news:20021028122633.34f2979e.woody@;nfri.com...
> While I am not exactly sure of everything you are asking I think I had
> a similar problem...
>
> You need to convert the \r to \n before you put it into the DB.
>
>
> On Mon, 28 Oct 2002 19:30:15 +0100
> "Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote:
>
> > Hi!
> >
> > I have made a guestbook to my website driven by php and mysql.
> >
> > But I don't know how to get the text as it is written in the textfield
> > before it is sent to mysql. So is it possible to save the "hits on
> > enter" in the database?
> >
> > Best regards Raymond
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> Tom Woody
> Systems Administrator
> NationWide Flood Research, Inc.
> phone: 214-631-0400 x209
>   fax: 214-631-0800
>
> Don't throw your computer out the window,
> throw the Windows out of your computer!
>


--- End Message ---
--- Begin Message ---
Hi guys I'm having the following problem:

I have a mail() function that works by itself, coming from a html form, but when i 
tryied to put it inside a more complex script it doesn't work.

The script is at the end of the message and it is suposed to receive data from a html 
form and use it to insert data into a mySql database, wich it does without problems, 
and it is suposed to send an e-mail to certain email with the info that was received 
from the form. The data is inserted without problem into the MySql database, but the 
e-mail is not sent to the email informed in the mail() script.

Rodrigo



SCRIPT:

<?

include "db_dados.php";

?>
<?

$sql="INSERT INTO tb_tao(nome, prof, area, tel, email, celular, registro, status) 
VALUES ('$nome','$prof','$area','$tel','$email','$celular','$registro','$status')";
$res=@mysql_query($sql,$id);

?>

<?


     $Destino = "[EMAIL PROTECTED]";
     $Remetente = "Formulário de Cadastro";
     $Assunto = "Profissional Adicionado";
     $Mensagem = "teste";
     mail($Destino,"$Assunto",$Mensagem,"$Remetente");
?>



   <meta http-equiv="refresh" content="1; URL=cadastrando.htm">
--- End Message ---
--- Begin Message ---
Try: mail($Destino,"$Assunto",$Mensagem);

Adam Voigt
[EMAIL PROTECTED]

On Mon, 2002-10-28 at 13:39, Rodrigo de Oliveira wrote:
> Hi guys I'm having the following problem:
> 
> I have a mail() function that works by itself, coming from a html form, but when i 
>tryied to put it inside a more complex script it doesn't work.
> 
> The script is at the end of the message and it is suposed to receive data from a 
>html form and use it to insert data into a mySql database, wich it does without 
>problems, and it is suposed to send an e-mail to certain email with the info that was 
>received from the form. The data is inserted without problem into the MySql database, 
>but the e-mail is not sent to the email informed in the mail() script.
> 
> Rodrigo
> 
> 
> 
> SCRIPT:
> 
> <?
> 
> include "db_dados.php";
> 
> ?>
> <?
> 
> $sql="INSERT INTO tb_tao(nome, prof, area, tel, email, celular, registro, status) 
>VALUES ('$nome','$prof','$area','$tel','$email','$celular','$registro','$status')";
> $res=@mysql_query($sql,$id);
> 
> ?>
> 
> <?
> 
> 
>      $Destino = "[EMAIL PROTECTED]";
>      $Remetente = "Formulário de Cadastro";
>      $Assunto = "Profissional Adicionado";
>      $Mensagem = "teste";
>      mail($Destino,"$Assunto",$Mensagem,"$Remetente");
> ?>
> 
> 
> 
>    <meta http-equiv="refresh" content="1; URL=cadastrando.htm">


--- End Message ---
--- Begin Message ---
I don't know what  "Formulário de Cadastro" is, but it doesn't belong as fourth 
parameter.
That parameter is for From, CC, BCC headers

----- Original Message -----
From: "Rodrigo de Oliveira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 12:39 PM
Subject: [PHP] Mail() function


Hi guys I'm having the following problem:

I have a mail() function that works by itself, coming from a html form, but when i 
tryied
to put it inside a more complex script it doesn't work.

The script is at the end of the message and it is suposed to receive data from a html 
form
and use it to insert data into a mySql database, wich it does without problems, and it 
is
suposed to send an e-mail to certain email with the info that was received from the 
form.
The data is inserted without problem into the MySql database, but the e-mail is not 
sent
to the email informed in the mail() script.

Rodrigo



SCRIPT:

<?

include "db_dados.php";

?>
<?

$sql="INSERT INTO tb_tao(nome, prof, area, tel, email, celular, registro, status) 
VALUES
('$nome','$prof','$area','$tel','$email','$celular','$registro','$status')";
$res=@mysql_query($sql,$id);

?>

<?


     $Destino = "[EMAIL PROTECTED]";
     $Remetente = "Formulário de Cadastro";
     $Assunto = "Profissional Adicionado";
     $Mensagem = "teste";
     mail($Destino,"$Assunto",$Mensagem,"$Remetente");
?>



   <meta http-equiv="refresh" content="1; URL=cadastrando.htm">


--- End Message ---
--- Begin Message ---
Chris Shiflett wrote:
You can use the explode() function to separate the content part of the response, which is what you're interested in.

Here's a similar example that only returns the content:

http://shiflett.org/tutorials/php_post.txt
Thanks, that's nearly what I need. But it seems there are some server-config-specific issues. In your example, the server sets a "base href" tag before the doctype tag. In my case, there is a special character before the doctype tag, and another after the end of the page data.

Thanks for the tip.

Drew

--- End Message ---
--- Begin Message ---
Hi...
I have a little problem... when i do //localhost/ on the browser i don't get
nothing it gives me "Forbidden - u don't have permission to access"... but i
was the one that installed the apache server!! do u know what's the problem?
Thanks


--- End Message ---
--- Begin Message --- Check what user apache is running under (usually nobody) in which case you have to give it world read access (chmod 0755) or make apache run under that user. (second method is perferred). I'm assuming you're running linux.

-js


Mr. BuNgL3 wrote:
Hi...
I have a little problem... when i do //localhost/ on the browser i don't get
nothing it gives me "Forbidden - u don't have permission to access"... but i
was the one that installed the apache server!! do u know what's the problem?
Thanks





--- End Message ---
--- Begin Message --- Even though this should go to an apache list....

Do you have an "index.html" (or .php or whatever you have it set to reconize in the httpd.conf) file in the document root directory?

Mr. BuNgL3 wrote:
Hi...
I have a little problem... when i do //localhost/ on the browser i don't get
nothing it gives me "Forbidden - u don't have permission to access"... but i
was the one that installed the apache server!! do u know what's the problem?
Thanks




--- End Message ---
--- Begin Message ---
check your permissions on htdocs etc and also that u haven't blocked ya self
outta there in the httpd.conf

> -----Original Message-----
> From: John Nichel [mailto:jnichel@;by-tor.com]
> Sent: Tuesday, 29 October 2002 8:09 AM
> To: Mr. BuNgL3
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] newbie: apache prob...
>
>
> Even though this should go to an apache list....
>
> Do you have an "index.html" (or .php or whatever you have it set to
> reconize in the httpd.conf) file in the document root directory?
>
> Mr. BuNgL3 wrote:
> > Hi...
> > I have a little problem... when i do //localhost/ on the
> browser i don't get
> > nothing it gives me "Forbidden - u don't have permission to
> access"... but i
> > was the one that installed the apache server!! do u know what's
> the problem?
> > Thanks
> >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi,  is there any way to use PHP to programmatically add a user in terms of
Apache user authentication?

--- End Message ---
--- Begin Message ---
Try this:
http://phpclasses.websapp.com/browse.html/package/387.html



Regards,
Daniel Kushner
_________________________________________
Need hosting? http://thehostingcompany.us


> -----Original Message-----
> From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> Sent: Monday, October 28, 2002 3:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Apache authentication and adding a user.
> 
> 
> Hi,  is there any way to use PHP to programmatically add a user 
> in terms of
> Apache user authentication?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How can I use PHP to admin my Apache over the browser?

How do big providers allow their customers to admin their
subdomains, forwarders, ftp-accounts .... over the webbrowser?

Apache should not run under the root account, or?!


-- 
Jochen Kaechelin

--- End Message ---
--- Begin Message ---
look up webmin on your favorite search engine.

                        Adam

On Mon, 28 Oct 2002, [ISO-8859-1] Jochen Kächelin wrote:

> How can I use PHP to admin my Apache over the browser?
>
> How do big providers allow their customers to admin their
> subdomains, forwarders, ftp-accounts .... over the webbrowser?
>
> Apache should not run under the root account, or?!
>
>
>

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here is one I just came across....its even in php.
http://webcp.can-host.com/
~Pauly

On Monday 28 October 2002 03:45 pm, Adam Williams wrote:
> look up webmin on your favorite search engine.
>
>                       Adam
>
> On Mon, 28 Oct 2002, [ISO-8859-1] Jochen Kächelin wrote:
> > How can I use PHP to admin my Apache over the browser?
> >
> > How do big providers allow their customers to admin their
> > subdomains, forwarders, ftp-accounts .... over the webbrowser?
> >
> > Apache should not run under the root account, or?!

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The web....the way you want it!"
[EMAIL PROTECTED]

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9va36DyXNIUN3+UQRAkDqAKCB+XUAGj+KCsbwh+1Vkbt/+51ZqwCfSagi
boG7NIcaO/MnDI7LPxBCwFs=
=tmeH
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
Hello,

I have a form, with 2 inputs ( a type "file" and a type "text") and a
submit.

When I submit I receive an error, like this :
':\\Inetpub\\wwwroot\\test\\small2158.jpg)' at line 3

Could you tell me what can I do ?

The better solution is save the picture in the database or save the link
to this picture un the database ?

Christian,


--- End Message ---
--- Begin Message ---
Hi!

I'm not sure about your error, but I have heard that it's best to store the
filepaths in the database.

Best regards Raymond

"Christian Ista" <[EMAIL PROTECTED]> wrote in message
news:000001c27ec2$ad371a60$0200a8c0@;p3portable...
> Hello,
>
> I have a form, with 2 inputs ( a type "file" and a type "text") and a
> submit.
>
> When I submit I receive an error, like this :
> ':\\Inetpub\\wwwroot\\test\\small2158.jpg)' at line 3
>
> Could you tell me what can I do ?
>
> The better solution is save the picture in the database or save the link
> to this picture un the database ?
>
> Christian,
>
>


--- End Message ---
--- Begin Message ---
Since PWS uses Inetpub, I'm guessing you're using PWS and I would recomend
against using it. I use PHPdev 5 which works like a charm. I'd recomend
switching.

http://www.firepages.com.au/devindex.htm

Thanks,
Stephen
http://www.melchior.us


----- Original Message -----
From: "Raymond Lilleodegard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 5:53 PM
Subject: [PHP] Re: Add picture in DB


> Hi!
>
> I'm not sure about your error, but I have heard that it's best to store
the
> filepaths in the database.
>
> Best regards Raymond
>
> "Christian Ista" <[EMAIL PROTECTED]> wrote in message
> news:000001c27ec2$ad371a60$0200a8c0@;p3portable...
> > Hello,
> >
> > I have a form, with 2 inputs ( a type "file" and a type "text") and a
> > submit.
> >
> > When I submit I receive an error, like this :
> > ':\\Inetpub\\wwwroot\\test\\small2158.jpg)' at line 3
> >
> > Could you tell me what can I do ?
> >
> > The better solution is save the picture in the database or save the link
> > to this picture un the database ?
> >
> > Christian,
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Have you used a SQL-Statement like:

INSERT INTO `tablename` VALUES ('',LOAD_FILE('$file')

to insert it with load_file? I used it without problems that way.


Christian Ista wrote:

Hello,

I have a form, with 2 inputs ( a type "file" and a type "text") and a
submit.

When I submit I receive an error, like this :
':\\Inetpub\\wwwroot\\test\\small2158.jpg)' at line 3

Could you tell me what can I do ?

The better solution is save the picture in the database or save the link
to this picture un the database ?

Christian,




--- End Message ---
--- Begin Message ---
how do you configure apache to force all .html pages to go through the php
parser?

--- End Message ---
--- Begin Message ---
AddType application/x-httpd-php .php .html
(in the httpd.conf file)



Regards,
Daniel Kushner
_________________________________________
Need hosting? http://thehostingcompany.us



> -----Original Message-----
> From: John Meyer [mailto:johnmeyer_1978@;yahoo.com]
> Sent: Monday, October 28, 2002 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] forcing .html pages to go through the PHP parser
>
>
> how do you configure apache to force all .html pages to go through the php
> parser?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi,

this php-script should read from a server (that i've written in perl) until
it receives the EOF signal.
My server sends the EOF-signal by
print $client "\n\004";       # \004 = EOF
to my script but fread wouldn't stop reading
and i don't have any ideas why.
Is php using an other sign for EOF?


------ php script  -  client

<?
$server = 'myserver';
$command = "some commands";
?>

<html>
  <head>
    <title></title>
  </head>
<body marginwidth="30" marginheight="30">

<table width="40%" cellpadding="4" cellspacing="2">
<tr>
  <td bgcolor="#c0c0ff" valign="top">Sende Kommando:</td>
  <td bgcolor="#99ff99" valign="top"><? $fd = fsockopen($server, 2202,
&$errno,
&$errstr, 30); echo $command;?></td>
</tr>
<tr>
  <td bgcolor="#c0c0ff" valign="top">Erhaltene Daten:</td>
  <td bgcolor="#99ff99" valign="top">
<?
echo nl2br(fread($fd, 2048));
fputs($fd, "$command\n\004");
fclose($fd);
?>
</td>
</tr>
</table>

</body>
</html>


------ perl script  -  server

#!/usr/bin/perl -w

use IO::Socket;
# set record seperator to EOF
$/ = "\004";
$sock_port = 2202;

$sock = IO::Socket::INET->new(LocalPort => $sock_port,
                              Type      => SOCK_STREAM,
                              Reuse     => 1,
                              Listen    => 10)       # oder SOMAXCONN
    or die "can't create local socket: $@\n";

while($client = $sock->accept()) {
  print $client "some output \n";
  # terminate client-reading by sending EOF
  print $client "\n\004";

  chomp($rec = <$client>);
  # do something with $rec
  $client->close();
}

$sock->close();



--- End Message ---
--- Begin Message ---
Any anyone tell me about this?  I know it is about browser detection
software or something.

What I want to know is is it good for general use?  Can it be used on UNIX
server for PHP to interface with?  Does it require a lot of update or
something?  I saw on that website that describe about BrowseHawk utility,
so.  blah blah.   Feel free to fill me in on this since people who use it
know better than I do.  :-)

I found this weblink, http://www.cyscape.com/browscap/.


--- End Message ---
--- Begin Message ---
Hi,
Lets say I have a simple array like this:
$myarray = array("a"=>"b","d"=>"c");

echo $myarray[0] will return 'b';

How can I get the name of the index? so:

echo $myarray[something] would return 'a';

I know I can do a list($key,$value) but I don't need to loop through the array, I just 
need to be able to retrieve the key name from any point in the array.


Thanks for any help.
--- End Message ---
--- Begin Message ---
I think you are looking for array_search()

On Mon, 28 Oct 2002, PHP List wrote:

> Hi,
> Lets say I have a simple array like this:
> $myarray = array("a"=>"b","d"=>"c");
>
> echo $myarray[0] will return 'b';
>
> How can I get the name of the index? so:
>
> echo $myarray[something] would return 'a';
>
> I know I can do a list($key,$value) but I don't need to loop through the array, I 
>just need to be able to retrieve the key name from any point in the array.
>
>
> Thanks for any help.

--- End Message ---
--- Begin Message ---
This doesn't seem to work for anything past the first key:
echo array_search(0,$myarray);
will print 'a';

None of these give me anything:
echo array_search(1,$myarray);
echo array_search("1",$myarray);
echo array_search(1,$myarray,true);
echo array_search("1",$myarray,true);
so how do I get 'd'?



> I think you are looking for array_search()
>
> On Mon, 28 Oct 2002, PHP List wrote:
>
> > Hi,
> > Lets say I have a simple array like this:
> > $myarray = array("a"=>"b","d"=>"c");
> >
> > echo $myarray[0] will return 'b';
> >
> > How can I get the name of the index? so:
> >
> > echo $myarray[something] would return 'a';
> >
> > I know I can do a list($key,$value) but I don't need to loop through the
array, I just need to be able to retrieve the key name from any point in the
array.
> >
> >
> > Thanks for any help.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
instead of using break use exit() where u have ur breaks and will work fine

> -----Original Message-----
> From: Marek Kilimajer [mailto:kilimajer@;webglobe.sk]
> Sent: Tuesday, 29 October 2002 1:30 AM
> To: PHP
> Subject: Re: [PHP] New Error?
> 
> 
> Break an continue are for loops (while,for ...), if you want to get out 
> of a function, use return
> 
> Steve Jackson wrote:
> 
> >I get this error from my code.
> >Fatal error: Cannot break/continue 1 levels in
> >/www/u1255/shop/purchase.php on line 22
> >
> >I think I need to end the functions if a condition is met so is there a
> >way to do it without breaking?
> >Where do I go from here?
> > 
> ><?
> > 
> >  include ('products_sc_fns.php');
> >  // The shopping cart needs sessions, so start one
> >  session_start();
> > 
> >  do_html_header("Checkout");
> >  // if filled out
> >  //echo "testing";
> >  if($cart&&$name&&$address&&$city&&$zip&&$country)
> >  
> >  {
> >    // able to insert into database
> >    if( insert_order($HTTP_POST_VARS)!=false )
> >    {
> >      //display cart, not allowing changes and without pictures 
> >      display_cart($cart, false, 0);
> >   calculate_weight($cart);
> >   //determine what shipping we are using
> >   if ($country!="Finland"){
> >       display_shipping(calculate_nonfinland_cost($country));
> >       break;
> >    }
> >    elseif ($country=="Finland" && $express=="no"){
> >       display_shipping(calculate_shipping_cost($weight));
> >       break;
> >    }
> >       elseif ($country=="Finland" && $express=="yes"){
> >       display_shipping(calculate_express_cost($express));
> >       break;
> >       }
> >   
> >   //de-bug
> >   echo "test & $country & $express";
> >   //if($country!="Finland")
> >   //display_shipping(calculate_shipping_cost($weight));
> >   //{
> >   //display_shipping(calculate_nonfinland_cost($country));
> >   //}
> >   //display_shipping(calculate_express_cost($express));
> >   //display_shipping(calculate_temp_shipping_cost($weight)); 
> >      //get credit card details
> >   calculate_final_cost($total_price, $shipping);
> >   get_order_id();
> >   display_card_form($name, $final_cost);
> >    echo "<table width='760' cellpadding='0'
> >background='images/shopbg.gif'><tr><td width='200'>&nbsp;</td>";
> >       echo "<td align='right'>";
> >      display_button("show_cart.php", "continue-shopping", "Continue
> >Shopping");  
> >    echo "</td></tr></table>";
> >    }
> >    else
> >    {
> >   echo mysql_error();
> >    echo "<table width='760' cellpadding='0'
> >background='images/shopbg.gif'><tr><td width='200'>&nbsp;</td><td>Could
> >not store data, please try again.</td>";
> >       echo "<tr><td width='200'>&nbsp;</td><td>";
> >       display_button("checkout.php", "back", "Back");
> >    echo "</td></tr></table>";
> >    }
> >  }
> >  else
> >  {
> >    echo "<table width='760' cellpadding='0'
> >background='images/shopbg.gif'><tr><td width='200'>&nbsp;</td><td>You
> >did not fill in all the fields, please try again.</td>";
> >    echo "<tr><td width='200'>&nbsp;</td><td>";
> > display_button("checkout.php", "back", "Back");
> > echo "</td></tr></table>";
> >  } 
> > 
> >  do_html_footer();
> >?>
> >
> > 
> >
> >Steve Jackson
> >Web Developer
> >Viola Systems Ltd.
> >http://www.violasystems.com <http://www.violasystems.com/> 
> >[EMAIL PROTECTED]
> >Mobile +358 50 343 5159
> >
> >
> >
> > 
> >
> >  
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
When i post a string containing plus sign with htmp form to a php scritp,
the '+' is changed to space.
e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df' instead.
It must be in php or apache configuration bcause i have this problem only on
sytem with FreeBSD. On windows it works as expected.

Know someone how could i make the '+' left intact? Please help.


<?
echo $_POST['test'];
?>
<form actiom='test.php' method=POST>
<input type=text value='' name=test>
<input type=submit value='submit'>
</form>


--- End Message ---
--- Begin Message ---
I did your little test and couldn't reproduce the problems you are
having. as+df gets returned correctly.

Test server: Apache 1.3.23-11 w/ PHP 4.1.2-7 (RH7.3 rpms)

On Tue, 29 Oct 2002 00:26:39 +0100
"Stan" <[EMAIL PROTECTED]> wrote:

> When i post a string containing plus sign with htmp form to a php
> scritp, the '+' is changed to space.
> e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df'
> instead. It must be in php or apache configuration bcause i have this
> problem only on sytem with FreeBSD. On windows it works as expected.
> 
> Know someone how could i make the '+' left intact? Please help.
> 
> 
> <?
> echo $_POST['test'];
> ?>
> <form actiom='test.php' method=POST>
> <input type=text value='' name=test>
> <input type=submit value='submit'>
> </form>
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Tom Woody
Systems Administrator
NationWide Flood Research, Inc.
phone: 214-631-0400 x209
  fax: 214-631-0800

Don't throw your computer out the window, 
throw the Windows out of your computer! 

--- End Message ---
--- Begin Message ---
The plus sign is used to signify a space in some URL encoding. PHP is
probably thinking the text is encoded and it's removing the plus sign.
Not sure on a solution. 

---John Holmes...

> -----Original Message-----
> From: Stan [mailto:stann@;pobox.sk]
> Sent: Monday, October 28, 2002 6:27 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Plus sign changing to space in html form
> 
> When i post a string containing plus sign with htmp form to a php
scritp,
> the '+' is changed to space.
> e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df'
instead.
> It must be in php or apache configuration bcause i have this problem
only
> on
> sytem with FreeBSD. On windows it works as expected.
> 
> Know someone how could i make the '+' left intact? Please help.
> 
> 
> <?
> echo $_POST['test'];
> ?>
> <form actiom='test.php' method=POST>
> <input type=text value='' name=test>
> <input type=submit value='submit'>
> </form>
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message --- This is true, but the + itself should also be encoded.

I did a quick test, and when I post a form variable called test with a value of 1+1=2, the HTTP request looks like this:

POST /test.php HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: en
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 14

test=1%2B1%3D2

So, that %2B would have to get decoded twice to result in a space.

Stan, do you have a way to see what the HTTP request is? You mention being on a BSD box, so I assume you have tcpdump? Also, is this behavior consistent with different browsers?

Chris

John W. Holmes wrote:

The plus sign is used to signify a space in some URL encoding. PHP is
probably thinking the text is encoded and it's removing the plus sign.
Not sure on a solution.
---John Holmes...

-----Original Message-----
From: Stan [mailto:stann@;pobox.sk]
Sent: Monday, October 28, 2002 6:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Plus sign changing to space in html form

When i post a string containing plus sign with htmp form to a php scritp,

the '+' is changed to space. e.g: i enter 'as+df' to a text input but $_POST[] returns 'as df' instead.

It must be in php or apache configuration bcause i have this problem only

on sytem with FreeBSD. On windows it works as expected.

Know someone how could i make the '+' left intact? Please help.


<?
echo $_POST['test'];
?>
<form actiom='test.php' method=POST>
<input type=text value='' name=test>
<input type=submit value='submit'>
</form>


--- End Message ---
--- Begin Message ---
Why does preg_replace("^\W^","",$str); not remove undescores _ ?  Are they
alpha-numeric?

I had to do this preg_replace("^\W|_^","",$str);

TIA,
Shawn


--- End Message ---
--- Begin Message ---
i've just used str_replace for underscores and it's worked wonderfully.

-----Original Message-----
From: Shawn McKenzie [mailto:nospam@;mckenzies.net]
Sent: Monday, October 28, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_replace (underscore)


Why does preg_replace("^\W^","",$str); not remove undescores _ ?  Are they
alpha-numeric?

I had to do this preg_replace("^\W|_^","",$str);

TIA,
Shawn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message --- I'm using some regexes for swear filtering, but I have a problem. I need to look for ab[ct] and have it replaced by xyz but not replace the [ct]. I.e. it would be replaced by xyzc or xyzt. Any ideas?

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


--- End Message ---
--- Begin Message ---
I guess it wouldn't be too hard for me to switch to perl reg...

Timothy Hitchens wrote:

Can you use or know perl reg??


HiTCHO has Spoken! Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]


-----Original Message-----
From: Leif K-Brooks [mailto:eurleif@;buyer-brokerage.com] Sent: Tuesday, 29 October 2002 10:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Have part not be replaced in regex?


I'm using some regexes for swear filtering, but I have a problem. I need to look for ab[ct] and have it replaced by xyz but not replace the [ct]. I.e. it would be replaced by xyzc or xyzt. Any ideas?

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



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




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


--- End Message ---
--- Begin Message ---
> I'm using some regexes for swear filtering, but I have a problem.  I
> need to look for ab[ct] and have it replaced by xyz but not replace
the
> [ct].  I.e. it would be replaced by xyzc or xyzt.  Any ideas?

$new_string = preg_replace("/ab([ct])/","xyz\\0",$old_string);

or

$new_string = ereg_replace("ab([ct])","xyz\\1",$old_string);

preg_replace is generally faster.

---John Holmes...


--- End Message ---
--- Begin Message ---
Hi,

I am getting this error randomly, just stops and starts.



Error: Unable to select database: crm :Commands out of sync; You can't
run this command now

 './configure' '--with-oracle=/opt/oracle/product/8.1.6/'
'--with-oci8=/opt/oracle/product/8.1.6/' '--enable-sigchild'
'--enable-track-vars' '--enable-wddx' '--with-mysql'
'--with-jpeg-dir=../jpeg-6b/' '--with-t1lib=../t1lib-1.3.1'
'--enable-wddx' '--with-apache=../apache_1.3.27'
'--with-mysql=/usr/local/mysql/'

The site ran fine till the upgrade .... any ideas how I can get rid of
this or should I just rollback the update?

Jimmy

--- End Message ---
--- Begin Message ---
Hi guys,

I wonder if anyone of you know about any PHP system (free or Open Source, etc.) that 
can offer the features (or similar ones) one can enjoy from Microsoft SharePoint 
Technologies.

tanks in advance, 
Rub.
--- End Message ---
--- Begin Message ---
yeah 

phpnuke, phpnuke.org
postnuke, postnuke.com
phpwebsite, phpwebsite.appstate.edu

there's probably a few more out there too

> -----Original Message-----
> From: PHP Beginner [mailto:bphpdev@;icem.cu]
> Sent: Tuesday, 29 October 2002 11:14 AM
> To: php - List
> Subject: [PHP] looking for Powerfull Document Management Systems in
> PHP...
> 
> 
> Hi guys,
> 
> I wonder if anyone of you know about any PHP system (free or Open 
> Source, etc.) that can offer the features (or similar ones) one 
> can enjoy from Microsoft SharePoint Technologies.
> 
> tanks in advance, 
> Rub.
> 
--- End Message ---
--- Begin Message --- I need a way to make a string be replaced with its uppercase version using ereg_replace. Any ideas?

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


--- End Message ---
--- Begin Message --- Why must you use ereg_replace?

Does your question mean that you, for whatever reason, cannot use strtoupper() instead?

Leif K-Brooks wrote:

I need a way to make a string be replaced with its uppercase version using ereg_replace. Any ideas?

--- End Message ---
--- Begin Message --- I don't want the entire string upercase, just part of it as defined by a regex.

Chris Shiflett wrote:

Why must you use ereg_replace?

Does your question mean that you, for whatever reason, cannot use strtoupper() instead?

Leif K-Brooks wrote:

I need a way to make a string be replaced with its uppercase version using ereg_replace. Any ideas?



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



--- End Message ---
--- Begin Message --- Hey everyone,
For years I have used a fantastic merchant ( http://www.ihtmlmerchant.com ), which is feature packed and easy to setup and use. It's written in a competing language called iHTML ( http://www.ihtml.com ).

As I am getting considerably proficient at coding PHP, I find that I require a similar type merchant/store package that I can base future PHP e-commerce sites on. I have mySQL and MS SQL Server available to me.

So... my questions to the list are:

1) What store product/package do you use? Why? URL?
2) What is purchase cost? Is it one-time or per store?
3) What databases does it support?


Many thanks in advance.

Peter

- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
[EMAIL PROTECTED]
http://www.fourthrealm.com
Tel: 519-739-1652
- - - - - - - - - - - - - - - - - - - - -

--- End Message ---
--- Begin Message ---
oscommerce http://oscommerce.com/
supports mysql as the database. i've set it up a few times, never
implemented it into production, but its fairly easy to use, and from what
i've seen extremly customizable.

Jason Reid
[EMAIL PROTECTED]
--
AC Host Canada
www.achost.ca

----- Original Message -----
From: "Support @ Fourthrealm.com" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 7:09 PM
Subject: [PHP] Recommend a merchant/store product


> Hey everyone,
> For years I have used a fantastic merchant ( http://www.ihtmlmerchant.com
> ), which is feature packed and easy to setup and use.  It's written in a
> competing language called iHTML ( http://www.ihtml.com ).
>
> As I am getting considerably proficient at coding PHP, I find that I
> require a similar type merchant/store package that I can base future PHP
> e-commerce sites on.  I have mySQL and MS SQL Server available to me.
>
> So... my questions to the list are:
>
> 1) What store product/package do you use?  Why?  URL?
> 2) What is purchase cost?  Is it one-time or per store?
> 3) What databases does it support?
>
>
> Many thanks in advance.
>
> Peter
>
> - - - - - - - - - - - - - - - - - - - - -
> Fourth Realm Solutions
> [EMAIL PROTECTED]
> http://www.fourthrealm.com
> Tel: 519-739-1652
> - - - - - - - - - - - - - - - - - - - - -
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
Agreed.  Case in point, when I attach more 9 email addresses to one email
message via Netzero's servers (1 of 7 different email accounts I have), the
delivery fails with a message that reads something like:   ' Blah Blah Blah.
Too many recipients.  Blah Blah Blah.'

I could be mistaken about service providers name because I change and
redirect my mail on the fly to avoid lengthy email distrubances.

-----Original Message-----
From: Manuel Lemos <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Sunday, October 27, 2002 5:10 PM
Subject: Re: [PHP] One mail function, multiple recipients


>Hello,
>
>On 10/27/2002 06:23 PM, Dwalker wrote:
>> You'll need to be careful with this method.  In an effort to keep spam to
a
>> minimum, some ISP's may refuse messages with more than X number of email
>> address attached.  Then the question becomes:  did everyone on the list
>> actually receive the message?
>
>The ISP that refuse messages to many recipients in BCC, certainly will
>not allow you to send separate messages to the as many recipients
>because that overloads even more their servers. That has nothing to do
>with whether you are sending spam or solicited bulk mail like
>newsletters. Thas has to do with abusing the mail server resources
>compromising the quality of service to other customers .
>
>Whether you send separate messages or a single message with all
>recipients in Bcc, you need to ask your ISP if you are not infringing
>the acceptable use policy. In shared servers you are most likely abusing.
>
>Regards,
>Manuel Lemos
>
>
>> -----Original Message-----
>> From: Justin French <[EMAIL PROTECTED]>
>> To: Stephen <[EMAIL PROTECTED]>; PHP List <[EMAIL PROTECTED]>
>> Date: Friday, October 25, 2002 7:53 PM
>> Subject: Re: [PHP] One mail function, multiple recipients
>>
>>
>>
>>>instead of your while() loop calling mail() each time, use it to build a
>>>comma separated list of recipients, then pipe them into a Bcc (so as to
not
>>>publicise everyone's email address), and send one email with all people
in
>>>the Bcc list.
>>>
>>>UNTESTED code:
>>><?
>>>$bcc = '';
>>>
>>>$sql = "SELECT email FROM mailingListTable";
>>>$result = mysql_query($sql);
>>>
>>>while($myrow = mysql_fetch_array($result))
>>>   {
>>>   $bcc .= $myrow['email'].',';
>>>   }
>>>
>>>// $bcc will now look like:
>>>// [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],
>>>
>>>// trim off the trailing comma
>>>$bcc = substr($bcc, 0, -1);
>>>
>>>// prepare to send
>>>$to = '[EMAIL PROTECTED]';
>>>$subject = 'My Mailing List';
>>>$message = 'This is my email message';
>>>$headers = 'From: [EMAIL PROTECTED]\r\n';
>>>$headers .= "Bcc: {$bcc}\r\n";
>>>
>>>// send
>>>mail($to, $subject, $message, $headers);
>>>?>
>>>
>>>
>>>Good luck -- like I said, untested code, so it may need some tweaking.
>>>
>>>
>>>Justin
>>>
>>>
>>>
>>>on 26/10/02 10:41 AM, Stephen ([EMAIL PROTECTED]) wrote:
>>>
>>>
>>>>I'm pulling email addresses from a database, then emailing them a
>>>
>> newsletter
>>
>>>>email. Right now, I'm calling the mail() function each time to send an
>>>
>> email
>>
>>>>and that's slooow. How could I make it so all the emails are put into a
>>>
>> BCC
>>
>>>>field then emailed all at once instead of multiple times?
>>>>
>>>>Thanks,
>>>>Stephen Craton
>>>>http://www.melchior.us
>>>>http://php.melchior.us
>>>
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>
>
>--
>
>Regards,
>Manuel Lemos
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
The optional second parameter for date() is a timestamp.

So, you convert whatever date you have (eg 29.10.2002) into a unix timestamp
(probably using strtotime() or maybe you'll have to rearrange the string
first), then supply it to the date() function.


Justin


on 29/10/02 1:57 AM, Davíđ Örn Jóhannsson ([EMAIL PROTECTED]) wrote:

> Lets say I have a date: 29.10.2002 and I want to be able to find out
> what week number it is, I know
> how to find out what the current week number is: date(“W”) to day it
> would result 44, but i need to be
> able to  do this dynamically ofcourse, any Ideas?
> 
> thanks, David
> 
> 

--- End Message ---
--- Begin Message --- In my never-ending battle against swearing on my site, I'm trying to use a regex that changes any word that ends with abc to xyz. I'm using:

$tofilter = "This is a string containing the word 123abc.";
$tofilter= eregi_replace("[^ ]abc","xyz",$tofilter);

But it returns "12xyz". It clearly picks up "3abc" before "123abc". I've also tried two regexes that check for it as a seperate word and at the begining of the string using

$tofilter = "This is a string containing the word 123abc.";
$tofilter= eregi_replace(" [^ ]abc","xyz",$tofilter);
$tofilter= eregi_replace("^[^ ]abc","xyz",$tofilter);

But that doesn't work at all. Any ideas on how to do this?

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


--- End Message ---
--- Begin Message ---
Hello,

"Leif K-Brooks" <[EMAIL PROTECTED]> wrote:
[snip] 
> But that doesn't work at all.  Any ideas on how to do this?
[/snip]

Would't it be easier (and faster) to use

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

- E

--- End Message ---
--- Begin Message --- I need to do a few other things that require regex though, like making either an a or an @ match (people love to get around filters by using symbols instead of letters...).

@ Edwin wrote:

Hello,

"Leif K-Brooks" <[EMAIL PROTECTED]> wrote:
[snip]
But that doesn't work at all. Any ideas on how to do this?

[/snip]

Would't it be easier (and faster) to use

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

- E



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


--- End Message ---
--- Begin Message ---
I have written followong code in hello.html:

<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM ACTION=hello.php METHOD=POST>
<B>enter your name:</B>
<INPUT TYPE=TEXTAREA NAME=textbox>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

and following in hello.php:

<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
printf("<BR>hello %s!",$textbox);
?>
</BODY>
</HTML>


This script works fine with php in redhat 7.2 system 
but does not work in solaris 7 !

I have done the php installation...

apache version: 2.0.40
php version: 4.2.2

What are the chances that the problem is with the php-installation?
( I had to copy code from apache2filter directory of pre 4.3 version of
php to remove errors during make )

I tried using echo($_GET['$textbox']) instead of printf statement in
hello.php.. 
   
 
What could be the problem??
Please help!!
        mukta



--- End Message ---
--- Begin Message ---
Hello,

"Mukta Telang" <[EMAIL PROTECTED]> wrote:
[snip]
> I tried using echo($_GET['$textbox']) instead of printf statement in
> hello.php.. 
[/snip]

Try $_POST['textbox'] instead. (You were using "method=post".)

- E

--- End Message ---
--- Begin Message ---
i might be crazy, but why don't the many CMS, forum, link directory, etc packages integrate with a unified user manager?
is this possible? is there perhaps an xml standard for contact datatypes that could be used?

--- End Message ---
--- Begin Message ---
XML, by definition is an eXtensible Markup Language.  That means the
markup associated with a document can be whatever that person wants it
to be.  I think a better question to ask is if there are any projects
out there who are working toward a standard XML document type for
contact information, and there probably is.  However, I don't believe
that the many CMS' (including my own), forums, link directories, etc.,
would ever be able to use a unified package (and especially not a
unified user manager).  Each CMS has its own way of dealing with content
and how that content is managed; it is all proprietary to that
particular system.  I do think, however, it should be possible to
convert from one CMS to another, and in fact, there are some members of
my team who want to create a phpnuke-to-enetwizard and vice versa
utility for doing things like that.  And I think that with time one will
exist.  But getting others to adopt such an idea would probably be
difficult, since they want you to use their software.  :)

-Samuel | http://enetwizard.net

-----Original Message-----
From: taylor [mailto:taylor@;justaddfire.com] 
Sent: Tuesday, October 29, 2002 12:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] standardization across apps?


i might be crazy, but why don't the many CMS, forum, link directory, 
etc packages integrate with a unified user manager?
is this possible?  is there perhaps an xml standard for contact 
datatypes that could be used?


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





--- End Message ---
--- Begin Message ---

On 29 Oct 2002 at 0:14, taylor wrote:

> i might be crazy, but why don't the many CMS, forum, link directory, etc
> packages integrate with a unified user manager? is this possible?  is
> there perhaps an xml standard for contact datatypes that could be used?

I'm not sure I understand you but I think you might be talking about 
what I'm thinking about and reading about in compent software 
architecture (book I'm reading).

Actually, if most of these CMS just used Classes (properly) and used a 
template system then you'd have half of the ball game. I've worked on 
some CMS in PHP and they drive me nuts. I think you'll find that most 
PHP stuff is just slung together.

CORBA

> CORBA is the acronym for Common Object Request Broker Architecture,
> OMG's open, vendor-independent architecture and infrastructure that
> computer applications use to work together over networks.

http://www.omg.org/gettingstarted/corbafaq.htm

Been reading more about it but have not absorbed near enough to 
consider using. 

SOAP, eh

But hey, just good Class design would be a great place to start. Not 
that I'm that great myself, but I see that as a quick, early win in the 
ballgame to really re-use stuff. 


http://www.smartarchitectures.com/


I've only got one framework in PHP on that site so far. Most are Perl 
systems. But of course the site itself uses GeekLog which is certainly 
easy to setup but I just haven't had much time to see how easy it is to 
extend. It doesn't use Smarty or any better template system and for 
that reason I'm leery. But I like it better than Nuke which a customer 
is using and I've had to work with. 


Peter





--- End Message ---
--- Begin Message ---
I would like to offer a free webhosting account to the first 25 people who
apply.  We are in the process of starting an internet services company and
would like to offer these accounts provided that the applicants are willing
to provide some feedback on our service.



All free accounts include:



25mb disk space

250mb transfer

1 MySQL Database

PHP 4.2.2

Perl 5.6.1

Full CGI-BIN support

5 Email Accounts

Unlimited sub-domains

Cpanel access

Web mail

Multiple statistics

Auto installer for many popular scripts



More information, as well as an application is available at:
www.kolbsoft.com.



Thanks,

Erich Kolb

President - KolbSoft Technologies

http://www.kolbsoft.com

[EMAIL PROTECTED]


--- End Message ---

Reply via email to