php-general Digest 20 Apr 2001 20:25:39 -0000 Issue 639

Topics (messages 49531 through 49595):

Re: Using mogrify ..
        49531 by: Mathur

Credit Card Class...how do u access?
        49532 by: Dhaval Desai
        49535 by: elias

Credit Card easy script ..how 2 get results?
        49533 by: Dhaval Desai

database server comparation
        49534 by: yanto

PHPSESSID in session
        49536 by: nicuc.ac.jp
        49537 by: nicuc.ac.jp

Re: FastCGI and PHP
        49538 by: Thies C. Arntzen
        49546 by: Alexander Skwar

Uninstalling PHP
        49539 by: Maron Kristófersson

Re: Which is better coding style...
        49540 by: Christian Reiniger
        49559 by: Geir Eivind Mork

Re: ENUM or SET and PHP
        49541 by: Christian Reiniger
        49586 by: Jason Caldwell

Re: `AM_PROG_LIBTOOL' not found in library
        49542 by: Christian Reiniger
        49582 by: Pablo Sabatino

Regular expressions
        49543 by: Matt Williams

Many email... and just one "mail" function
        49544 by: Marian Vasile
        49548 by: yanto
        49555 by: Steve Werby

Linux, Apache, PHP and Sendmail
        49545 by: Ben Cairns
        49554 by: Steve Werby

Re: PDFlib 4.0.0.... any experiences..
        49547 by: Grimes, Dean
        49549 by: Taylor, Stewart
        49553 by: Paul Gardiner

Site Sessions: Online/Offline - help?
        49550 by: Richard

Re: Site Sesions: Online/off...
        49551 by: Richard

Re: Advanced Help Needed
        49552 by: Matthew Luchak

Re: Add data to three tables at once from one form
        49556 by: Steve Werby

OFF THIS LIST, PLEASE
        49557 by: Jon Jacob
        49565 by: Jon Jacob

This should be simple...
        49558 by: Joseph Koenig
        49560 by: Alexander Wagner
        49561 by: Morgan Curley
        49562 by: Boget, Chris
        49563 by: Alexander Wagner
        49566 by: Joseph Koenig

Re: Regular Expressions?
        49564 by: Morgan Curley
        49580 by: Chris Cocuzzo
        49585 by: Jason Caldwell
        49593 by: CC Zona

how to modify xml files using php
        49567 by: Serge Vleugels
        49583 by: Sebastien Roy

Warnings w/ !$var!?
        49568 by: Nicholas Pappas
        49570 by: Johnson, Kirk
        49591 by: CC Zona

Re: Cache Control with forms
        49569 by: Diego Fulgueira

Re: PHP Sessions Problem
        49571 by: Larry Hotchkiss
        49573 by: Johnson, Kirk
        49576 by: Felix Kronlage
        49579 by: Johnson, Kirk
        49595 by: Scott

Headers sent by - need to clear screen - help me
        49572 by: Michael Champagne

session_register()
        49574 by: Wade
        49575 by: Johnson, Kirk

Session_register
        49577 by: Alok K. Dhir

persistient connections in FastCGI environment
        49578 by: Kevin Beckford

Re: Site Searchable function
        49581 by: ~~~LeoN~
        49584 by: Matthew Luchak

Help Needed in a short project with LDAP(NDS), Mirapoint and PHP as the main 
application server - OT (sorry)
        49587 by: Romulo Roberto Pereira

Re: Use of special characters in filenames results in IE problems
        49588 by: Diego Fulgueira

convert class
        49589 by: Joe Stump

Databases and HTML forms
        49590 by: Michael Champagne

Re: Handling Macintosh filenames in PHP
        49592 by: Brian S. Dunworth

fflush() function
        49594 by: Thomas Deliduka

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]


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


Hi !

actually, php is working as a shared object module in apache, which is
dynamically loaded thru a .so file. I will look into this and see if there
is away of initialising these env vars to a value at startup o webserver ..

U absolutely right when u say 1 can set these environment vars, using func
putenv() etc.as in PERL.  I have already tried setting te vars PATH and
LD_LIBRARY_PATH, to the correct value, but it doesn't seem to work at all
..
There seems to be something to do with conf of PHP, something in the
php.ini, or may be a FreeBSD specific problem ..


Mathur

Bob Friesenhahn wrote:

> --- Mathur <[EMAIL PROTECTED]> wrote:
> > Hi !
> >
> > I have a very basic question about how the environment
> > variables values are set
> > ..
> > When you telnet, the variables PATH, HOME etc are set in the
> > .profile (Or
> > .bash_profile) file for each user, that's how these
> > Environment variables are
> > initialised .. But where does PHP pick up the values for these
> > Environment
> > variables, Or are these dependent on who is the owner of the
>
> You can set these environment variables by setting them in the
> script that starts the web server's daemon.  Alternatively, it
> is likely that PHP has commands to set environment variables,
> which you could set prior to invoking an ImageMagick utility.
>
> Bob
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ***********************************************************************
> To remove yourself from this mailing list, send mail to:
>         [EMAIL PROTECTED]
>
> Include the following command in the body of your message:
>         unsubscribe magick-user
> ***********************************************************************




Hi!

I have the following class for checking a credit card
type.Can anybody tell me how do I access this class. I
mean how should I check a credit card type using this
class..?

Thank you
DHaval Desai

<?php 


class credit_card 
{ 
    function clean_no ($cc_no) 
    { 
        // Remove non-numeric characters from $cc_no  
        return ereg_replace ('[^0-9]+', '', $cc_no); 
    } 

    function identify ($cc_no) 
    { 
         $cc_no = credit_card::clean_no ($cc_no); 

        // Get card type based on prefix and length of
card number  
        if (ereg ('^4(.{12}|.{15})$', $cc_no)) 
            return 'Visa';  
        if (ereg ('^5[1-5].{14}$', $cc_no)) 
            return 'Mastercard'; 
        if (ereg ('^3[47].{13}$', $cc_no)) 
            return 'American Express'; 
        if (ereg ('^3(0[0-5].{11}|[68].{12})$',
$cc_no)) 
            return 'Diners Club/Carte Blanche'; 
        if (ereg ('^6011.{12}$', $cc_no)) 
            return 'Discover Card'; 
        if (ereg ('^(3.{15}|(2131|1800).{11})$',
$cc_no)) 
            return 'JCB'; 
        if (ereg ('^2(014|149).{11})$', $cc_no)) 
            return 'enRoute'; 

        return 'unknown'; 
    } 

    function validate ($cc_no) 
    { 
        // Reverse and clean the number 
        $cc_no = strrev (credit_card::clean_no
($cc_no)); 
         
        // VALIDATION ALGORITHM 
        // Loop through the number one digit at a time

        // Double the value of every second digit
(starting from the right) 
        // Concatenate the new values with the
unaffected digits 
        for ($ndx = 0; $ndx < strlen ($cc_no); ++$ndx)

            $digits .= ($ndx % 2) ? $cc_no[$ndx] * 2 :
$cc_no[$ndx]; 
         
        // Add all of the single digits together 
        for ($ndx = 0; $ndx < strlen ($digits);
++$ndx) 
            $sum += $digits[$ndx]; 

        // Valid card numbers will be transformed into
a multiple of 10 
        return ($sum % 10) ? FALSE : TRUE; 
    } 

    function check ($cc_no) 
    { 
        $valid = credit_card::validate ($cc_no); 
        $type  = credit_card::identify ($cc_no); 
        return array ($valid, $type, 'valid' =>
$valid, 'type' => $type); 
    } 
} 

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/




do like:

if (credit_card::validate("123412341234"))
{
  // yes correct...
} else
{
  // no not correct..
}

I believe this class is from WeberDev and I believe it comes with lots of
comments showing how it works...

-elias
http://www.kameelah.org/eassoft


"Dhaval Desai" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
>
> I have the following class for checking a credit card
> type.Can anybody tell me how do I access this class. I
> mean how should I check a credit card type using this
> class..?
>
> Thank you
> DHaval Desai
>
> <?php
>
>
> class credit_card
> {
>     function clean_no ($cc_no)
>     {
>         // Remove non-numeric characters from $cc_no
>         return ereg_replace ('[^0-9]+', '', $cc_no);
>     }
>
>     function identify ($cc_no)
>     {
>          $cc_no = credit_card::clean_no ($cc_no);
>
>         // Get card type based on prefix and length of
> card number
>         if (ereg ('^4(.{12}|.{15})$', $cc_no))
>             return 'Visa';
>         if (ereg ('^5[1-5].{14}$', $cc_no))
>             return 'Mastercard';
>         if (ereg ('^3[47].{13}$', $cc_no))
>             return 'American Express';
>         if (ereg ('^3(0[0-5].{11}|[68].{12})$',
> $cc_no))
>             return 'Diners Club/Carte Blanche';
>         if (ereg ('^6011.{12}$', $cc_no))
>             return 'Discover Card';
>         if (ereg ('^(3.{15}|(2131|1800).{11})$',
> $cc_no))
>             return 'JCB';
>         if (ereg ('^2(014|149).{11})$', $cc_no))
>             return 'enRoute';
>
>         return 'unknown';
>     }
>
>     function validate ($cc_no)
>     {
>         // Reverse and clean the number
>         $cc_no = strrev (credit_card::clean_no
> ($cc_no));
>
>         // VALIDATION ALGORITHM
>         // Loop through the number one digit at a time
>
>         // Double the value of every second digit
> (starting from the right)
>         // Concatenate the new values with the
> unaffected digits
>         for ($ndx = 0; $ndx < strlen ($cc_no); ++$ndx)
>
>             $digits .= ($ndx % 2) ? $cc_no[$ndx] * 2 :
> $cc_no[$ndx];
>
>         // Add all of the single digits together
>         for ($ndx = 0; $ndx < strlen ($digits);
> ++$ndx)
>             $sum += $digits[$ndx];
>
>         // Valid card numbers will be transformed into
> a multiple of 10
>         return ($sum % 10) ? FALSE : TRUE;
>     }
>
>     function check ($cc_no)
>     {
>         $valid = credit_card::validate ($cc_no);
>         $type  = credit_card::identify ($cc_no);
>         return array ($valid, $type, 'valid' =>
> $valid, 'type' => $type);
>     }
> }
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi!

Well the Class that I had sent earlier was really
complicated. SO I just found an easier script. Can
anybody tell me how this should work. If it returns 1,
0, -1 what should I do?. I am a begineer so please
bear with me.

THank You


<?php

function  validateCC($ccnum, $type){  


        //Clean  up  input  

        $type  =  strtolower($type);  
        $ccnum  =  ereg_replace( '[-[:space:]]', 
'',$ccnum);   


        //Do  type  specific  checks  

        if  ($type  ==  'unknown')  {  

                //Skip  type  specific  checks  

        }  
        elseif  ($type  ==  'mastercard'){  
                if  (strlen($ccnum)  !=  16  || 
!ereg( '^5[1-5]',  $ccnum))   
return  0;  
        }  
        elseif  ($type  ==  'visa'){  
                if  ((strlen($ccnum)  !=  13  && 
strlen($ccnum)  !=  16)  ||   
substr($ccnum,  0,  1)  !=  '4')  return  0;  
        }  
        elseif  ($type  ==  'amex'){  
                if  (strlen($ccnum)  !=  15  || 
!ereg( '^3[47]',  $ccnum))   
return  a;  
        }  
        elseif  ($type  ==  'discover'){  
                if  (strlen($ccnum)  !=  16  || 
substr($ccnum,  0,  4)  !=   
'6011')  return  0;  
        }  
        else  {  
                //invalid  type  entered  
                return  -1;  
        }  
                

        //  Start  MOD  10  checks  

        $dig  =  toCharArray($ccnum);  
        $numdig  =  sizeof  ($dig);  
        $j  =  0;  
        for  ($i=($numdig-2);  $i>=0;  $i-=2){  
                $dbl[$j]  =  $dig[$i]  *  2;  
                $j++;  
        }         
        $dblsz  =  sizeof($dbl);  
        $validate  =0;  
        for  ($i=0;$i<$dblsz;$i++){  
                $add  =  toCharArray($dbl[$i]);  
                for  ($j=0;$j<sizeof($add);$j++){  
                        $validate  +=  $add[$j];  
                }  
        $add  =  '';  
        }  
        for  ($i=($numdig-1);  $i>=0;  $i-=2){  
                $validate  +=  $dig[$i];   
        }  
        if  (substr($validate,  -1,  1)  ==  '0') 
return  1;  
        else  return  0;  
}  



?>

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/





Hi....
is there one one know about any site explain comparation among database
server software from various perspective.

thanx.

-toto-




I use session in my Shopping cart program.
start with

    session_start() ;

and register the value with

    session_register('uid') ;

when I want to pass the session value to another page I use

echo "<a href='somepage.php'>click</a>" ;


In 'somepage.php' I try to echo $uid  the output that correct
My question is why my url not contain like

http://aaa.com/somepage.php?PHPSESSID= blah... blah..

It's not show like above just show like below

http://aaa.com/somepage.php

and it's work... ?


Is this because session send  cookies to the browser ?
How could I do if I need to force session not sent the cookies to user ?


Any comment would be appriciated.


--
Yang






I use session in my Shopping cart program.
start with

    session_start() ;

and register the value with

    session_register('uid') ;

when I want to pass the session value to another page I use

echo "<a href='somepage.php'>click</a>" ;


In 'somepage.php' I try to echo $uid  the output that correct
My question is why my url not contain like

http://aaa.com/somepage.php?PHPSESSID= blah... blah..

It's not show like above just show like below

http://aaa.com/somepage.php

and it's work... ?


Is this because session send  cookies to the browser ?
How could I do if I need to force session not sent the cookies to user ?


Any comment would be appriciated.


--
Yang








On Wed, Apr 18, 2001 at 01:58:03PM +0200, Alexander Skwar wrote:
> (Learning from my last mistake, I'll now try to make clear right away what
> each sentence means *G*)
> 
> Introductory lines:
> I want to write a FastCGI compatible PHP script.  In order to do so, PHP
> obviously need to recompile PHP with '--with-fastcgi'.  However, looking at
> some PERL FastCGI scripts, I see that they mainly consist of a while loop
> like this:
> 
> while( FCGI::accept() >= 0 ) {
>       foo();
>       FCGI::flush();
> }
> 
> Questions:
> What are the PHP equivalents to FCGI::accept() and FCGI::flush()?  

    there is noe.

    in fast-cgi mode you scripts are executed the same way as if
    you were running as an apache module. there's no support to
    keep your script alive over request-boundaries (yet).

    tc




So sprach Thies C. Arntzen am Fri, Apr 20, 2001 at 01:03:50PM +0200:
>     there is noe.
> 
>     in fast-cgi mode you scripts are executed the same way as if
>     you were running as an apache module. there's no support to
>     keep your script alive over request-boundaries (yet).

Thanks, that's right.  Too bad.  So the major advantage of FastCGI for PHP
is, when your web server does not support mod_php, ie. when you're using
something else than Apache.  In Apache mod_php does about the same as
FastCGI PHP does.

Too bad...

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                Uptime: 1 day 21 hours 21 minutes




Hello!
 
I want to uninstall PHP and Apache but I installed them according to the
quick install instructions on the PHP site.  The reason I'm uninstalling
is because I want to reinstall both of them via RPM.
 
I've tried make uninstall (not sure if that's the right syntax) but it
doesn't work.  Anybody that can give me quick clear instructions?
 
My system is Redhat 7.1.

Regards,
 
Maron Kristófersson
Reykjavik
Iceland




On Thursday 19 April 2001 22:31, you wrote:
> Definitely the second style :)
>
> (If we were talking about C(++) then the first would have even been
> forbidden by my companies coding standard as well as several coding
> standards of other companies I worked for.)

<put_on item='asbestos battle armor'>
Urgh
That's a rule back from ye olde COBOL days

------------------
function blah() {
  switch( $bob ) {
    case 1:
       return "this";
------------------

This clearly says: "If $bob == 1,  we return "this" (no further 
processing needed)"

Your preferred style:
------------------
 function blah()
 {
        $retval = "";

        switch( $bob )
        {
         case 1:
                $retval = "this";
                break;
-------------------

... says "If $bob = 1 set $retval to "this" and continue processing"

That's misleading. And harder to understand, because it requires that you 
read through the *entire* function up to the "return" at the end, keeping 
track of which parts were processed in your case etc.

Taking this to a more complex example, what is more readable?

----- Ex 1 ---------
function WriteIt ($Basename, $Data)
{
  $retval = true;

  $FP = fopen ("$Basename", "w");
  if ($FP) {
    if (fwrite ($FP, $Data) == strlen ($Data)) {
      fclose ($FP);

      $FP2 = fopen ("$Basename.copy", "w");
      if ($FP2) {
        if (!(fwrite ($FP2, $Data) == strlen ($Data))) {
          $retval = false;
        }
        fclose ($FP2);
      }
      else {
        fclose ($FP);
        $retval = false;
      }
    }
    else {
      $retval = false;
    }
  }
  else {
    $retval = false;
  }

  return $retval;
}
-------------------

or this:

------- Ex 2 --------
function WriteIt ($Basename, $Data)
{
  $FP = fopen ("$Basename", "w");
  if (!$FP)
    return false;

  $Ret = fwrite ($FP, $Data);
  fclose ($FP);

  if ($Ret != strlen ($Data) {
    return false;
  }

  $FP2 = fopen ("$Basename", "w");
  if (!$FP2)
    return false;

  $Ret = fwrite ($FP2, $Data);
  fclose ($FP2);

  if ($Ret != strlen ($Data) {
    return false;
  }
  
  return true;
}
---------------------

</put_on>

> The reason is this - a function has one entrypoint (duh)

True (duh)

> and one exitpoint.

False.

> Jumping out of a function somewhere in the middle leads to
> unmaintainable code

See example above.

> But, as with the indenting and bracket placing,
> it is a matter of religion.

Now that's something we agree on :)

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

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e




On Thursday 19 April 2001 21:48, Steve Lawson wrote:
>  Personally, I hate trailing {'s

Personally, I hate having the {'s on the next line. I always trail them in 
others code when they have them on the next line :) 

and there are thousand of ways that the people here displays textblocks. some 
concats between text and vars like maniacs making it look nasty. I <<<'s out 
larger blocks. never need to switch between html and php mode in the code. I 
feel that makes it more clean. but this is as individual as preference for 
blondes, brunettes and redheads :)

-- 
 php developer / CoreTrek AS        | Peace cannot be kept by force; it can
 Sandnes / Rogaland / Norway        | only be achieved by understanding.   -- 
 web: http://www.moijk.net/         | Albert Einstein 




On Thursday 19 April 2001 21:56, you wrote:
> Does PHP sport an ENUM or SET statement?

Print out the PHP manual, place it on the altar of your local church, run 
around it 42 times dressed in ritual aborigine war fashion, sacrifice the 
caffeine-rich fruits of a south american plant by crushing them and 
pouring boiling water over the resulting dust.

And when you're done with that, take the manual and read it.

Thus you will find enlightenment.

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

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e




Actually did that... plus sacrificed several small rodents, rubbing their
internal organs all over the manual... in hopes that the PHP Gods would be
kind and giving.... went into a cave for 12 years, then came back out ...
having learned and understood much... but still no SET or ENUM.

I've since burned the manual, and tattooed PHP on my forehead.

Jason


"Christian Reiniger" <[EMAIL PROTECTED]> wrote in message
01042013284106.00621@chrisbig">news:01042013284106.00621@chrisbig...
On Thursday 19 April 2001 21:56, you wrote:
> Does PHP sport an ENUM or SET statement?

Print out the PHP manual, place it on the altar of your local church, run
around it 42 times dressed in ritual aborigine war fashion, sacrifice the
caffeine-rich fruits of a south american plant by crushing them and
pouring boiling water over the resulting dust.

And when you're done with that, take the manual and read it.

Thus you will find enlightenment.

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

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e

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







On Thursday 19 April 2001 23:24, you wrote:

> I changed the version to bison 1.28...here is the log:
> checking for working automake... found
> checking for working autoheader... found
> checking for working makeinfo... found
> checking whether to enable maintainer-specific portions of Makefiles...
> no checking host system type... i686-pc-linux-gnu
> checking for mawk... (cached) gawk
> checking for bison... (cached) bison -y
> checking bison version... 1.28 (ok)
> checking for gcc... (cached) gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking how to run the C preprocessor... (cached) gcc -E
> checking for AIX... no
> checking for gcc option to accept ANSI C... (cached) none needed
> checking for ranlib... (cached) ranlib
> checking whether gcc and cc understand -c and -o together... (cached)
> yes checking whether ln -s works... (cached) yes
>
> what do you think is going on???

Well, according to that log everything is perfectly fine.

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

Google results 1-10 of about 142,000,000 for e. Search took 0.18 seconds.

- http://www.google.com/search?q=e




I deleted php4 and downladed the software again from the cvs and compiled
it.
This is the error message when executed ./make

gmake: *** [zend_language_parser.c] Violación de segmento
pablo@pablito:~/php4/Zend > cd ..
pablo@pablito:~/php4 > gmake
Making all in Zend
gmake[1]: Entering directory `/home/pablo/php4/Zend'
bison -y -p zend -v -d ./zend_language_parser.y -o zend_language_parser.c
gmake[1]: *** [zend_language_parser.c] Violación de segmento
gmake[1]: Leaving directory `/home/pablo/php4/Zend'
gmake: *** [all-recursive] Error 1
pablo@pablito:~/php4 >


The version bison is:  1.28 and this messages is from ./configure [args]
The system operating is SUSE 6.4.

Configuring Zend
checking bison version... 1.28 (ok)
checking for limits.h... (cached) yes
checking for malloc.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdarg.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for signal.h... (cached) yes
checking for unix.h... (cached) no
checking for dlfcn.h... yes
checking for size_t... (cached) yes
checking return type of signal handlers... void
checking for dlopen in -ldl... (cached) yes
checking for dlopen... (cached) yes
checking for uint... yes
checking for ulong... yes
checking for vprintf... (cached) yes
checking for 8-bit clean memcmp... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for memcpy... (cached) yes
checking for strdup... (cached) yes
checking for getpid... yes
checking for kill... yes
checking for strtod... yes
checking for strtol... yes
checking for finite... yes
checking for fpclass... no
checking whether sprintf is broken... (cached) no
checking for finite... (cached) yes
checking for isfinite... no
checking for isinf... yes
checking for isnan... yes
checking whether fp_except is defined... no
checking whether to enable experimental ZTS... no
checking whether to enable inline optimization for GCC... no
checking whether to enable a memory limit... no
checking whether to enable Zend debugging... no
checking for inline... inline


what the matter???
Could resolve it?

Please, help me!

Thanks pablo!



----- Original Message -----
From: "Kelly Cochran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 6:41 PM
Subject: Re: [PHP] `AM_PROG_LIBTOOL' not found in library


>
>
>
> (Another try as your mail server rejected the last one with an unknown
> user error)
>
> > Subject: Re: [PHP] `AM_PROG_LIBTOOL' not found in library
> > Date: Thu, 19 Apr 2001 14:33:58 -0700
> > From: Kelly Cochran <[EMAIL PROTECTED]>
> > To: Pablo Sabatino <[EMAIL PROTECTED]>
> >
> >         You'll likely have to do a make distclean in the root PHP dir as
well.
> > Without that, make is probably finding the zend_ini_parser.c that your
> > old bison created from zend_ini_parser.y, and therefore doesn't
> > regenerate it.  Or you could probably also simply 'touch
> > Zend/zend_ini_parser.y' and that should also cause make to regen the .c
> > file.  Either that, or you could simply nuke the whole dir, and checkout
> > from CVS again doing the './buildconf; ./configure <args>; make' cycle
> > again.
> >
> > Pablo Sabatino wrote:
> > >
> > > Hello!!!
> > >
> > > I changed the version to bison 1.28...here is the log:
> > > checking for working automake... found
> > > checking for working autoheader... found
> > > checking for working makeinfo... found
> > > checking whether to enable maintainer-specific portions of
Makefiles... no
> > > checking host system type... i686-pc-linux-gnu
> > > checking for mawk... (cached) gawk
> > > checking for bison... (cached) bison -y
> > > checking bison version... 1.28 (ok)
> > > checking for gcc... (cached) gcc
> > > checking whether the C compiler (gcc  ) works... yes
> > > checking whether the C compiler (gcc  ) is a cross-compiler... no
> > > checking whether we are using GNU C... (cached) yes
> > > checking whether gcc accepts -g... (cached) yes
> > > checking how to run the C preprocessor... (cached) gcc -E
> > > checking for AIX... no
> > > checking for gcc option to accept ANSI C... (cached) none needed
> > > checking for ranlib... (cached) ranlib
> > > checking whether gcc and cc understand -c and -o together... (cached)
yes
> > > checking whether ln -s works... (cached) yes
> > >
> > > what do you think is going on???
> > >
> > > Pablo Sabatino.
> > >
> > > ----- Original Message -----
> > > From: "Kelly Cochran" <[EMAIL PROTECTED]>
> > > To: "Pablo Sabatino" <[EMAIL PROTECTED]>
> > > Sent: Thursday, April 19, 2001 5:37 PM
> > > Subject: Re: [PHP] `AM_PROG_LIBTOOL' not found in library
> > >
> > > >
> > > > Did it warn you during configure about your bison version?  I think
> > > > 1.28 is required, and that error will pop up if you have an earlier
> > > > version.
> > > >
> > > > Pablo Sabatino wrote:
> > > > >
> > > > > Thank you, Kelly!!!!
> > > > > I tried compiling again and seems like was good!
> > > > >
> > > > > The ./configure that ok.
> > > > > Now, when I execute $./gmake come to error...
> > > > >
> > > > > pablo@pablito:~/php4 > gmake
> > > > > Making all in Zend
> > > > > gmake[1]: Entering directory `/home/pablo/php4/Zend'
> > > > > /bin/sh ../libtool --silent --mode=compile
> > > > >
> > >
gcc -DHAVE_CONFIG_H -I. -I. -I../main   -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT
> > > > > -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12  -g -O2 -c zend_ini_parser.c
> > > > > /usr/share/bison.simple:157: conflicting types for `ini_parse'
> > > > > ./zend_ini_parser.y:51: previous declaration of `ini_parse'
> > > > > /usr/share/bison.simple: In function `ini_parse':
> > > > > /usr/share/bison.simple:219: number of arguments doesn't match
prototype
> > > > > /usr/share/bison.simple:157: prototype declaration
> > > > > gmake[1]: *** [zend_ini_parser.lo] Error 1
> > > > > gmake[1]: Leaving directory `/home/pablo/php4/Zend'
> > > > > gmake: *** [all-recursive] Error 1
> > > > >
> > > > > Please, help me!!!!!!!
> > > > > Pablo Sabatino.
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Kelly Cochran" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Wednesday, April 18, 2001 8:30 PM
> > > > > Subject: Re: [PHP] `AM_PROG_LIBTOOL' not found in library
> > > > >
> > > > > >
> > > > > > Do a 'which libtool' and I'd hazard a guess that it'll find the
one in
> > > > > > /usr/local/bin first.  As it's using that libtool (dir:
> > > /usr/local/bin)
> > > > > > and your normal automake (dir: /usr/bin), the dirs don't match
and
> > > > > > aclocal fails, as the warning mentions.  Either switch your path
> > > around
> > > > > > to move /usr/local/bin after /usr/bin (and end up using the
libtool
> > > your
> > > > > > system came with), or reconfigure and reinstall libtool 1.3.5
starting
> > > > > > with "./configure --prefix=/usr" which will cause it to install
into
> > > > > > /usr/bin, /usr/share, etc.  (otherwise it defaults to /usr/local
which
> > > > > > is likely the problem you have right now).
> > > > > >
> > > > > > Pablo Sabatino wrote:
> > > > > > >
> > > > > > >   Hello!!
> > > > > > >   I am using php4-cvs on Linux Suse 6.4.
> > > > > > >   I issued the command ./buildconf and got a message:
> > > > > > >
> > > > > > >   pablo@pablito:~/php4 > ./buildconf
> > > > > > >   buildconf: checking installation...
> > > > > > >   buildconf: autoconf version 2.13 (ok)
> > > > > > >   buildconf: automake version 1.4 (ok)
> > > > > > >   buildconf: libtool version 1.3.5 (ok)
> > > > > > >
> > > > > > >
> > > > > > >   WARNING: automake and libtool are installed in different
> > > > > > >            directories.  This may cause aclocal to fail.
> > > > > > >            continuing anyway
> > > > > > >   aclocal: configure.in: 810: macro `AM_PROG_LIBTOOL' not
found in
> > > > > library
> > > > > > >   make[1]: *** [aclocal.m4] Error 1
> > > > > > >   make: *** [all] Error 2
> > > > > > >   pablo@pablito:~/php4 >
> > > > > > >
> > > > > > >   pablo@pablito:~/php4 > whereis libtool
> > > > > > >   libtool: /usr/bin/libtool /usr/local/bin/libtool
> > > /usr/share/libtool
> > > > > > >   pablo@pablito:~/php4 > whereis automake
> > > > > > >   automake: /usr/bin/automake /usr/share/automake
> > > > > > >   pablo@pablito:~/php4 > whereis automake
> > > > > > >   automake: /usr/bin/automake /usr/share/automake
> > > > > > >   pablo@pablito:~/php4 >
> > > > > > >
> > > > > > >   I installed libtool-1.3.5.
> > > > > > >   Help me, please!!
> > > > > > >   Pablo Sabatino..
> > > > > >
> > > > > > -- -
> > > > > > Kelly Cochran  <[EMAIL PROTECTED]>
> > > > > > Technical Staff - funschool.com Corporation
>
> -- -
> Kelly Cochran  <[EMAIL PROTECTED]>
> Technical Staff - funschool.com Corporation
> Phone: 408-453-7280x113  FAX: 408-453-7285
> Cell:  408-772-0657





Hi

I have the script below which encases every occurance of span in a <span>
tag

The problem is I don't want it to replace any occurance of span that is
inside a tag.
how could I acheive this?
I'm using perl regular expressions to keep the original case of the string.
So, how could I replace occurances of span that aren't in a tag?

Many thanks

M@ ' my regular expressions book is in the post
#################################################################
<style type="text/css">
<!--
.message {color: #FF0000;}
-->
</style>
<?php

$string = "<span class=message>span, span the span</span>";
echo $string.NL;
$search = array("span");
echo "Count = ".count($search).NL;
for($i=0;$i < count($search); $i++)
{
        $result =$string;
        if(next($search) == false)
        {
                reset($search);
        }
                $bgstring = current($search);
                        $result = preg_replace("/($bgstring+)/ie", "'<b>\\1</b>'", 
$result);

}
        echo $result;
?>
################################################################





Guyz I have a huge database wih emails.
Now I want to send them news weekly and I can't.... how I can send many
emails using mail() function ???
but in a faster manner that ussualy ?... is that possible ?

I'm not talking about SPAM here... I have registered users... :)

How I can send all these 30.000 email addresses ?


Marian Vasile
IT Manager
Schnecker van Wyk & Pearson
www.investments.ro
+40 (0) 1 2309000






all you need is to write cron file (with your preferable script) running
every week. Than read customer list information (connect to pop server, or
customer database, or if every customer has an email, just read from
customer table), then use your preferable smtp mail to send an email to
that customer.

maybe it's not as fast as you want, but it won't take your web server to
handle the job.

-toto-

Marian Vasile writes:

> Guyz I have a huge database wih emails.
> Now I want to send them news weekly and I can't.... how I can send many
> emails using mail() function ???
> but in a faster manner that ussualy ?... is that possible ?
> 
> I'm not talking about SPAM here... I have registered users... :)
> 
> How I can send all these 30.000 email addresses ?




"Marian Vasile" <[EMAIL PROTECTED]> wrote:
> Guyz I have a huge database wih emails.
> Now I want to send them news weekly and I can't.... how I can send many
> emails using mail() function ???
> but in a faster manner that ussualy ?... is that possible ?
>
> I'm not talking about SPAM here... I have registered users... :)
>
> How I can send all these 30.000 email addresses ?

With 30,000 users I recommend using a mailing list so your mail server can
do the heavy crunching.  Since you probably run PHP as an Apache module and
I suspect your user database changes here are a couple of options to
consider.

1. Create a cron job to periodically pull the email addresses from the DB
and dump them into a text file that the MLM (mailing list manager) expects
(may require an additional step depending on your MLM).

2. Install PHP as a CGI and have it do the same as in option 1, but do
directly from your PHP script that sends the email.  I say CGI so you can
make the script owned by any user you prefer and don't have to make the
directory containing the file world writable/readable.

If you choose not to go one of these routes you can try grouping email
addresses together (perhaps 50 at a time) and batch listing them in the bcc
header.  You'll likely have to increase PHP's timeout setting in php.ini or
within the script itself.  I don't recommend this method b/c it will be
*much* slower and you will not be able to take advantage of some of the nice
features of your MLM that you should really use for a list this large.  FYI,
there are also methods for accessing SMTP directly (which avoids the mail()
function completely).  I know there's a class at
http://phpclasses.upperdesign.com/ and there are others elsewhere.

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





I am having a problem getting Sendmail to work on RH Linux 6.0

I am trying to get it to relay messages through our mail server. But it is not 
even attempting to connect to the mail server.

The Mail functions worked when the scripts were on a Winnt box.


-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com

"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK......"





"Ben Cairns" <[EMAIL PROTECTED]> wrote:
> I am having a problem getting Sendmail to work on RH Linux 6.0
>
> I am trying to get it to relay messages through our mail server. But it is
not
> even attempting to connect to the mail server.

Is the relaying being done via a PHP script?  If not, I'm confused why you
put PHP and Apache in your subject and why you posted this to a PHP list.
There are Redhat and mail server mailing lists that would be more
appropriate in that case.  In any case, you'll get better help if you check
your log files and post relevant messages found there, post lines from
config files, etc.  If Sendmail previously worked on the box, let us know
what has changed recently about the setup.

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





I just sent a post yesterday on how to get this to work. I does work well.
Here is the post I sent yesterday:


Try using the new pdflib-4.0.0 .... It works great.
Here is what you have to do:

Goto: http://www.pdflib.com/pdflib/download/index.html

and download the source for unix.

Unzip and untar.

cd to pdflib-4.0.0/bind/php/ext/pdf

copy * php-4.0.4pl1/ext/pdf --- You may want to remove the current contents
of this directory first...

cd pdflib-4.0.0
configure --enable-php
make - you will get an error indicating that a makefile was not found ...
just ignore it.
make install

Link the newly created libraries to the /usr/lib directory:
ln -s /usr/local/lib/libpdf* /usr/lib

Next just rebuild PHP as normal only add --with-pdflib.

Have fun...


Dean



-----Original Message-----
From: David Bouw [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 6:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PDFlib 4.0.0.... any experiences..


Hi there,

Months ago I had a bad time getting PDFlib 3.0.0 to compile with PHP.. After
I succeeded I was so glad I promised myself to never touch it again.. :-)

Well, I now have a barcode font which I need to embed into a PDF document..
I did this a long time ago, but have forgotten what the exact settings were
that I used to accomplish this...

With some searching I suddenly saw that PDFlib 4.0.0 was available.. !! When
I looked at the documentation I got a tinteling feeling in my stomach..
Finally the package comes with all the Tif/Png etc libraries which you first
had to download seperately and try to compile with PDFlib.. Further this
package has also been adapted to PHP (they even talk about it in the
manual!!!) and it seems that you can also load the pdf as some kind of
library when starting the script via the 'dl' function.. ( which I don't yet
have any experience with..)

My question: Who has got some experience with this..? I grabbed a tarball of
php-4.0.4pl1 and pdflib4.0.0..
Compiled both and tried to load the library via de dl option.. PHP can't
seem to find this..

I am now busy to try and do it the old way and compile PHP with the PDFlib
option enabled..
(did copy the /ext/pdf directory from pdflib to my php!)
But if possible I would rather use the option in which the library is loaded
into PHP as an library.. Speed isues aren't important, I want an easy and
flexible way the change PDFlib versions without needing to recompile
anything..
I also read that this was possible with the GD library..

I will be glad if I can hear anyone with some experiences with this new
PDFlib.. I look forward getting this to work!

Thanks in advance..
With kind regards
David Bouw


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




Dean,

I too want to instal pdflib4, however I can't see a reference to pdflib4 on
the web page you've given (unless my visions not working correctly of
course).  All the links are for pdflib3.3

Are they on this actual page or are they hidden somewhere.


-Stewart

-----Original Message-----
From: Grimes, Dean [mailto:[EMAIL PROTECTED]]
Sent: 20 April 2001 13:23
To: 'David Bouw'; [EMAIL PROTECTED]
Subject: RE: [PHP] PDFlib 4.0.0.... any experiences..


I just sent a post yesterday on how to get this to work. I does work well.
Here is the post I sent yesterday:


Try using the new pdflib-4.0.0 .... It works great.
Here is what you have to do:

Goto: http://www.pdflib.com/pdflib/download/index.html

and download the source for unix.

Unzip and untar.

cd to pdflib-4.0.0/bind/php/ext/pdf

copy * php-4.0.4pl1/ext/pdf --- You may want to remove the current contents
of this directory first...

cd pdflib-4.0.0
configure --enable-php
make - you will get an error indicating that a makefile was not found ...
just ignore it.
make install

Link the newly created libraries to the /usr/lib directory:
ln -s /usr/local/lib/libpdf* /usr/lib

Next just rebuild PHP as normal only add --with-pdflib.

Have fun...


Dean



-----Original Message-----
From: David Bouw [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 6:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PDFlib 4.0.0.... any experiences..


Hi there,

Months ago I had a bad time getting PDFlib 3.0.0 to compile with PHP.. After
I succeeded I was so glad I promised myself to never touch it again.. :-)

Well, I now have a barcode font which I need to embed into a PDF document..
I did this a long time ago, but have forgotten what the exact settings were
that I used to accomplish this...

With some searching I suddenly saw that PDFlib 4.0.0 was available.. !! When
I looked at the documentation I got a tinteling feeling in my stomach..
Finally the package comes with all the Tif/Png etc libraries which you first
had to download seperately and try to compile with PDFlib.. Further this
package has also been adapted to PHP (they even talk about it in the
manual!!!) and it seems that you can also load the pdf as some kind of
library when starting the script via the 'dl' function.. ( which I don't yet
have any experience with..)

My question: Who has got some experience with this..? I grabbed a tarball of
php-4.0.4pl1 and pdflib4.0.0..
Compiled both and tried to load the library via de dl option.. PHP can't
seem to find this..

I am now busy to try and do it the old way and compile PHP with the PDFlib
option enabled..
(did copy the /ext/pdf directory from pdflib to my php!)
But if possible I would rather use the option in which the library is loaded
into PHP as an library.. Speed isues aren't important, I want an easy and
flexible way the change PDFlib versions without needing to recompile
anything..
I also read that this was possible with the GD library..

I will be glad if I can hear anyone with some experiences with this new
PDFlib.. I look forward getting this to work!

Thanks in advance..
With kind regards
David Bouw


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

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




Hi Stewart,

Try again my friend. I've just been there and version 4 is definately
available. I won't ask why your vision is blury - you know what they say,
hairy palms and all that! ;o)

Thanks Dean for the info, I'll give it a whirl when I've got some free time.

Best regards,
- Paul -

----- Original Message -----
From: "Taylor, Stewart" <[EMAIL PROTECTED]>
To: "'Grimes, Dean'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 1:39 PM
Subject: RE: [PHP] PDFlib 4.0.0.... any experiences..


> Dean,
>
> I too want to instal pdflib4, however I can't see a reference to pdflib4
on
> the web page you've given (unless my visions not working correctly of
> course).  All the links are for pdflib3.3
>
> Are they on this actual page or are they hidden somewhere.
>
>
> -Stewart
>
> -----Original Message-----
> From: Grimes, Dean [mailto:[EMAIL PROTECTED]]
> Sent: 20 April 2001 13:23
> To: 'David Bouw'; [EMAIL PROTECTED]
> Subject: RE: [PHP] PDFlib 4.0.0.... any experiences..
>
>
> I just sent a post yesterday on how to get this to work. I does work well.
> Here is the post I sent yesterday:
>
>
> Try using the new pdflib-4.0.0 .... It works great.
> Here is what you have to do:
>
> Goto: http://www.pdflib.com/pdflib/download/index.html
>
> and download the source for unix.
>
> Unzip and untar.
>
> cd to pdflib-4.0.0/bind/php/ext/pdf
>
> copy * php-4.0.4pl1/ext/pdf --- You may want to remove the current
contents
> of this directory first...
>
> cd pdflib-4.0.0
> configure --enable-php
> make - you will get an error indicating that a makefile was not found ...
> just ignore it.
> make install
>
> Link the newly created libraries to the /usr/lib directory:
> ln -s /usr/local/lib/libpdf* /usr/lib
>
> Next just rebuild PHP as normal only add --with-pdflib.
>
> Have fun...
>
>
> Dean
>
>
>
> -----Original Message-----
> From: David Bouw [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 19, 2001 6:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PDFlib 4.0.0.... any experiences..
>
>
> Hi there,
>
> Months ago I had a bad time getting PDFlib 3.0.0 to compile with PHP..
After
> I succeeded I was so glad I promised myself to never touch it again.. :-)
>
> Well, I now have a barcode font which I need to embed into a PDF
document..
> I did this a long time ago, but have forgotten what the exact settings
were
> that I used to accomplish this...
>
> With some searching I suddenly saw that PDFlib 4.0.0 was available.. !!
When
> I looked at the documentation I got a tinteling feeling in my stomach..
> Finally the package comes with all the Tif/Png etc libraries which you
first
> had to download seperately and try to compile with PDFlib.. Further this
> package has also been adapted to PHP (they even talk about it in the
> manual!!!) and it seems that you can also load the pdf as some kind of
> library when starting the script via the 'dl' function.. ( which I don't
yet
> have any experience with..)
>
> My question: Who has got some experience with this..? I grabbed a tarball
of
> php-4.0.4pl1 and pdflib4.0.0..
> Compiled both and tried to load the library via de dl option.. PHP can't
> seem to find this..
>
> I am now busy to try and do it the old way and compile PHP with the PDFlib
> option enabled..
> (did copy the /ext/pdf directory from pdflib to my php!)
> But if possible I would rather use the option in which the library is
loaded
> into PHP as an library.. Speed isues aren't important, I want an easy and
> flexible way the change PDFlib versions without needing to recompile
> anything..
> I also read that this was possible with the GD library..
>
> I will be glad if I can hear anyone with some experiences with this new
> PDFlib.. I look forward getting this to work!
>
> Thanks in advance..
> With kind regards
> David Bouw
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Greetings. (the thread was too far down to be read by anyone)

    I am having some problems with the code itself! I have done like so,
that whenever peopel wishes to see the "onliners", I start a function called
DelOld(). This will not decrease server speed, nor create conflicts when
writing to temporary files and so forth.
    Now, I tried to gather the following into an exploded array:

    // the date output
    $date_output = date("Y-m-d-H-i-A");

    As you see, I've seperated all with a "-" so I can simply call [0], [1],
[2],... if I want something. Now, How can I compare if a user is away for
like 10 minutes, or 30 minutes? I have a function called
GetLoggDateofUser($Username) which will retreive the  $date_output, but with
colons and spaces, like so:
    date("Y-m-d H:i A").

    Do you or anyone else have any suggestions?

- Richard








Greetings. (the thread was too far down to be read by anyone)

    I am having some problems with the code itself! I have done like so,
that whenever peopel wishes to see the "onliners", I start a function called
DelOld(). This will not decrease server speed, nor create conflicts when
writing to temporary files and so forth.
    Now, I tried to gather the following into an exploded array:

    // the date output
    $date_output = date("Y-m-d-H-i-A");

    As you see, I've seperated all with a "-" so I can simply call [0], [1],
[2],... if I want something. Now, How can I compare if a user is away for
like 10 minutes, or 30 minutes? I have a function called
GetLoggDateofUser($Username) which will retreive the  $date_output, but with
colons and spaces, like so:
    date("Y-m-d H:i A").

    Do you or anyone else have any suggestions?

- Richard










check the enctype of your form has not changed  I had some
inconsistencies using multipart...




>when I post a file in the form I recieve an "Cannot Find Server".  When
>there isnt a file posted then the form works fine.  




"Julian Wood" <[EMAIL PROTECTED]> wrote:
> > That's it.  There's nothing special to do.
>
> Except if one insert fails and the others succeed, you run into a bit of
> sync trouble. This is what transactions are for. You might want to
consider
> a BDB table type, which supports transactions, then you have the option to
> rollback the other inserts if one of them fails.

Good point.  I assumed that if the original poster didn't know how to
accomplish 3 DB inserts within a PHP script then transactions and rollbacks
were a little too advanced to get into (and the DB being used was never
stated).

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





I have tried to unsubscribe, but can't seem to get the message through. 
Please help.

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





Matthew Luchak wrote:
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]

Hey, great idea.  Wish I had thought of it : )

Actually, I did.  And I sent the mail for both this list and the Dev
list but the admin server does not seem to be doing its job.

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





I have a client who insists on being able to put quotes into one of the
fields of the database. That's fine with me, however, when editing
records, anything in the quotes won't show up on the admin page.
Essentially what happens is this:
<INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes"">
Well, obviously there's a problem with that. The form field will show
"Here's the text " and then thinks it ends. Is there any way to get
around this, other than stripping out her quotes? Thanks,

Joe




Joseph Koenig wrote:
> <INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes"">
> Well, obviously there's a problem with that. The form field will show
> "Here's the text " and then thinks it ends. Is there any way to get
> around this, other than stripping out her quotes? Thanks,

http://php.net/htmlentities

regards
Wagner

-- 
"A conference is a gathering of important people who singly can do 
nothing, but together can decide that nothing can be done."
Fred Allen (1894-1956)




replace " with &quot; before using it as an initial form value.

works in IE I am not sure if netscape interprets these codes in form fields 
though

morgan

At 09:57 AM 4/20/2001, Joseph Koenig wrote:
>I have a client who insists on being able to put quotes into one of the
>fields of the database. That's fine with me, however, when editing
>records, anything in the quotes won't show up on the admin page.
>Essentially what happens is this:
><INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes"">
>Well, obviously there's a problem with that. The form field will show
>"Here's the text " and then thinks it ends. Is there any way to get
>around this, other than stripping out her quotes? Thanks,
>
>Joe
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]




> > <INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes"">
> > Well, obviously there's a problem with that. The form field will show
> > "Here's the text " and then thinks it ends. Is there any way to get
> > around this, other than stripping out her quotes? Thanks,
> http://php.net/htmlentities

Or, even better, just use addslashes();

$query = "INSERT INTO table VALUES = ( " . addslashes( $formField ) . " )";

That way the quotes will remain in the value to display.

Chris




Boget, Chris wrote:
> > http://php.net/htmlentities
>
> Or, even better, just use addslashes();
>
> $query = "INSERT INTO table VALUES = ( " . addslashes( $formField ) .
> " )";
>
> That way the quotes will remain in the value to display.

This isn't the Problem. The string was cut in the input field, not in 
database.
Addslashes should be used before saving to database, though.

regards
Wagner

-- 
"A conference is a gathering of important people who singly can do 
nothing, but together can decide that nothing can be done."
Fred Allen (1894-1956)




Right on. That did it. I probably should have been RTFM'ed for that one
:) I knew there was a simple solution.

Joe

Alexander Wagner wrote:
> 
> Joseph Koenig wrote:
> > <INPUT TYPE ="text" blab blab VALUE = "Here's the text "in quotes"">
> > Well, obviously there's a problem with that. The form field will show
> > "Here's the text " and then thinks it ends. Is there any way to get
> > around this, other than stripping out her quotes? Thanks,
> 
> http://php.net/htmlentities
> 
> regards
> Wagner
> 
> --
> "A conference is a gathering of important people who singly can do
> nothing, but together can decide that nothing can be done."
> Fred Allen (1894-1956)




I don't use ereg(i)? much myself but for a perl compat regex I would:
/^(([0-9a-z](\2*))\.([0-9a-z](\2*)))/i
the \# refer to parenthized matches starting at 1 and counting left parens. 
The match array index you will want is $myArray[1].
if you don't mind matching
1a2.1a2 you can use
/^(([0-9a-z]+)\.\1+)/i

or
123.456
/^([0-9a-z]+\.[0-9a-z]+)/i

morgan



>""Jason Caldwell"" <[EMAIL PROTECTED]> wrote in message
>9boi65$ipb$[EMAIL PROTECTED]">news:9boi65$ipb$[EMAIL PROTECTED]...
> > I'm looking to compare if my array values match any digits or alpha
> > characters with a dot between them... so, if I think I understand Regular
> > Expressions (from what I could gather from PHP.net and Core PHP
>Programming
> > by Leon Atkinson.)
> >
> > I want to match any of the following:
> >
> > 1.1 or a.a
> >
> > or 1111.1111 or aaaa.aaaa    <-- any number of digits (0-9) or alpha (a-z)
> > on either side of the dot.
> >
> > if(eregi("^([0-9][a-z]\.[0-9][a-z]", $myArray[x]))
> >
> > Is this correct?  I think I'm missing something.
> >
> > Thanks.
> > Jason




Maybe I'm wrong on this, but could this regex also be used like this?

        if(eregi("^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$", $myArray[x]))


--Chris

-----Original Message-----
From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 1:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Regular Expressions?


I'm looking to compare if my array values match any digits or alpha
characters with a dot between them... so, if I think I understand Regular
Expressions (from what I could gather from PHP.net and Core PHP Programming
by Leon Atkinson.)

I want to match any of the following:

1.1 or a.a

or 1111.1111 or aaaa.aaaa    <-- any number of digits (0-9) or alpha (a-z)
on either side of the dot.

if(eregi("^([0-9][a-z]\.[0-9][a-z]", $myArray[x]))

Is this correct?  I think I'm missing something.

Thanks.
Jason




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





Ahh.... It makes more sense now.

Thanks.
Jason


"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Jason,
>
> @ 3:08:06 AM on 4/20/2001, Jason Caldwell wrote:
>
> > Sorry if I seem dense.  Your answer (although probably right on target)
> > leaves me still confused :-)
>
> No problem at all.
>
> > The example you gave me:
>
> > $string = 'aaaa.aaaa';
> > print(eregi("^([[:alnum:]]+\.[[:alnum:]]+)", $string) ? 'matched' : 'no
> > match');
>
> > Now with your example (above) the following MATCHED (when, I think it
> > shouldn't have:)
>
> > (example 1)
> > aaaa.a!
>
> Matches because there is *at least* one alnum after the \.
> It doesn't care about the ! as long as it found the a.
>
> > aaaa.a#$%
>
> Ditto here.
>
> > aaaa.a23!%
>
> Ditto here.
>
> > The following did NOT match.
>
> > (example 2)
> > a!.aaaa
>
> This didnt' match because of ^[[:alnum:]]+\.
>
> There's a [:punct:] between the [:alnum:] and the \.
>
> > a%!.aaaa
>
> Ditto here.
>
> > aaaa.!a34
>
> No [:alnum:] after the \.
>
> Your expression asks for *at least one* [:alnum:]
>
> Changing + to * would make that match.
>
> > Now when I took your example and added the $ at the end, like so:
>
> > print(eregi("^([[:alnum:]]+\.[[:alnum:]]+)$", $string) ? 'matched' : 'no
> > match');
>
> > Everything that MATCHED in example 1 no longer matched,
>
> Right, because it had a [:punct:] before the end of the string and you
> forced it to only pick up [:alnum:]'s
>
> -Brian
> --
>  PGP is spoken here: 0xE4D0C7C8
>  Please, DO NOT carbon copy me on list replies.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






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

> (eregi("([0-9][a-z][A-Z]\.[0-9][a-z][A-Z]", $myArray[x]))
> 
> and don't use character '^' in front of the pattern.

(Note that since the parentheses are unbalanced, the above will thorw a 
parse error.)

Since it's eregi, you don't need both [a-z] and [A-Z].  And by putting the 
digits and letters in separate character classes, the pattern can only 
match strings with one digit followed by two letters, a dot, another digit, 
and more more letters.  IOW:

1ab.2Cd
3zY.9MX

(etc.)

Since the goal is to match like this...

> I want to match any of the following:
> 
> 1.1 or a.a
> 
> or 1111.1111 or aaaa.aaaa    <-- any number of digits (0-9) or alpha (a-z)
> on either side of the dot.

...try something more like this..

eregi("[0-9a-z]+\.[0-9a-z]+", $myArray[x])

...which would match as shown in the samples, where a single matched 
character on either side of the decimal is repeating. (change the plus 
signs to asterisks if "any" number of letters/digits can include no 
letters/digits.)

-- 
CC





hi,

I've got to change a XML document,
so read the file, display it, provide a way to modify it and then write
the modifications.
has anyone done this allready or has any experiance ?

thx

Serge "Zeddicus Zu'l Zorandre" Vleugels

-- freedom is the wizard's only choice --






Hi,

Use the dom xml function privided with the --with-dom=/usr/local/libxml
(witch is the path to the libxml library). There is a good tutorial about
DOM at www.phpbuilder.com.

Enjoy!

Sebastien Roy
[EMAIL PROTECTED]


Serge Vleugels wrote:

> hi,
>
> I've got to change a XML document,
> so read the file, display it, provide a way to modify it and then write
> the modifications.
> has anyone done this allready or has any experiance ?
>
> thx
>
> Serge "Zeddicus Zu'l Zorandre" Vleugels
>
> -- freedom is the wizard's only choice --
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





        I just installed PHP4 on a Windows 2000 box (tried it both as CGI and 
ISAPI) and am getting a very annoying behavior from it, that I do not 
see on my installation in Linux.
        When I check a variable (say, in a if() statement) via !$var, I get a 
Warning message printed saying that it is not initialized (if that is 
the case)... well, that's part of the reason why I bloody doing the test!
        In my Linux installs this doesn't happen and in every program language I 
know this is a valid check without warning... why do I get on in Windows 
PHP!?
        Is there a config variable I can set somewhere that will prevent these 
Warnings from printing?

        I am aware of the isset($var) function, but this does work for my purposes.

        Nick





>       I just installed PHP4 on a Windows 2000 box (tried it 
> both as CGI and 
> ISAPI) and am getting a very annoying behavior from it, that I do not 
> see on my installation in Linux.
>       When I check a variable (say, in a if() statement) via 
> !$var, I get a 
> Warning message printed saying that it is not initialized (if that is 
> the case)... well, that's part of the reason why I bloody 
> doing the test!

Check the error reporting level
http://www.php.net/manual/en/function.error-reporting.php.
See the reader comment regarding E_NOTICE. It may be only that the error
reporting level is set differently than your previous machines.

Kirk 




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Nicholas Pappas) wrote:

>       When I check a variable (say, in a if() statement) via !$var, I get a 
> Warning message printed saying that it is not initialized (if that is 
> the case)... well, that's part of the reason why I bloody doing the test!

<snip>

>    I am aware of the isset($var) function, but this does work for my purposes.

It sure sounds like the right function for your purposes.  Or are you 
really trying to do an..

if(!isset($var) or empty($var))

...?  Because if you do it like that (isset check first), the warning won't 
come up, even on E_ALL.

-- 
CC




Rasmus, thanks a lot!! Your information has been very helpful because now I
know more ways to play with the headers!.
Still, I am almost sure that it's possible to do what I want to do because I
think I've seen such behaviour in other websites, for example Yahoo! Mail
(note that the site does not have to be programmed in PHP because we are
talking about then client behaviour, not the server's).

Thanks a lot again, I am sure with your information I'll be able to work it
out... and then I'll post the solution here!

Cheers, Diego.

-----Original Message-----
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 April, 2001 8:34 PM
To: Diego Fulgueira
Cc: Php-General
Subject: Re: [PHP] Cache Control with forms


> Hi everyone! I have the following problem:
> I don't want any of my site's pages to be saved on any  browser's cache.
> Yet, I want all HTML forms to keep their data when the user changes to
> another page without submiting and then comes back using the back button.
>
> I have seen changing the session.cache_limiter configuration option to
> 'private' instead of 'nocache' works to make all forms keep their data,
but
> then all pages are diplayed from the browser's cache even after refreshing
> several times!. I want a point in between, but I don't know how to get
> there.
>
> By the way, do you know what do the values that session.cache_limiter  can
> take mean? (nocache, private and public)

When you set it to 'nocache' you get a set of HTTP headers that look like
this:

Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache

That forces things to not be cached anywhere.

The 'private' setting sends these headers:

Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: private, max-age=10800, pre-check=10800

The expires header is set to a time in the past to force non-HTTP 1.1
compliant caches not to cache the page.  For HTTP-1.1 caches that
understand the cache-control header the page will be cached only in
private caches (ie. the end-user http-1.1 compliant browser) for the time
specified by the session.cache_expire setting.


The 'public' setting sends headers like this:

Expires: Thu, 19 Apr 2001 20:57:16 GMT
Cache-Control: public, max-age=10800

Basically this means that the page is allowed to be cached in both public
(like AOL's proxy-cache) and private caches for the time specified by
session.cache_expire

And no, I don't know of a way to do what you want.  I don't think you can
have the back button working and at the same time not allow private
caching.

-Rasmus


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






        Thats very interesting. I normally use Netscape 4.7 myself, I find 6 to
be a resource hog and just plain slow. I tried your site and as you
pointed out, with 4.7 the registered var does not show. Yet, when I fire
up IE all works fine. I guess what I find strange is that I am using
sessions on a site I am working on right now. I have cookies off since I
was getting strange behavior depending on OS and browser so I opted just
to pass SID with URL as well. I register a handfull of session vars and
on my site everything works fine with all the browsers (4.7 included).

Luke Muszkiewicz wrote:
> 
> Hey Folks:
> 
> I am using PHP sessions in IE 5.5 and NN 6 successfully, but I am not able
> to retrieve the data from my registered variables in Communicator 4.7. I am
> passing the session ID via SID and have turned off cookies in each browser
> to simplify testing, although Communicator 4.7 doesn't work with cookies
> enabled either.
> 
> Research shows that with Communicator 4.7 the session ID is being carried
> from one page to the next successfully; however, the registered variables
> are not. Outside of the page where they are set and registered, they are
> not registered nor set even though the session ID is carried successfully.
> 
> session.save_path is set to /tmp. When I start a session in Communicator
> 4.7, the session file is created in /tmp but it contains no data. When
> using IE 5.5 or NN 6, the session file does contain the serialized data for
> the registered variables, and everything works as it should.
> 
> So, it looks like the problem is that in Communicator 4.7, the serialized
> data is not being successfully written to the session file in /tmp. Has
> anyone dealt with this problem?




I have also seen this problem with one of my sites, but only *occasionally*.
I have no clue as to what the problem is. Anyone else have any ideas?

Kirk

> -----Original Message-----
> From: Luke Muszkiewicz [mailto:[EMAIL PROTECTED]]
> 
> Hey Folks:
> 
> I am using PHP sessions in IE 5.5 and NN 6 successfully, but 
> I am not able
> to retrieve the data from my registered variables in 
> Communicator 4.7. I am
> passing the session ID via SID and have turned off cookies in 
> each browser
> to simplify testing, although Communicator 4.7 doesn't work 
> with cookies
> enabled either.
> 
> Research shows that with Communicator 4.7 the session ID is 
> being carried
> from one page to the next successfully; however, the 
> registered variables
> are not. Outside of the page where they are set and 
> registered, they are
> not registered nor set even though the session ID is carried 
> successfully.
> 
> session.save_path is set to /tmp. When I start a session in 
> Communicator
> 4.7, the session file is created in /tmp but it contains no data. When
> using IE 5.5 or NN 6, the session file does contain the 
> serialized data for
> the registered variables, and everything works as it should.
> 
> So, it looks like the problem is that in Communicator 4.7, 
> the serialized
> data is not being successfully written to the session file in 
> /tmp. Has
> anyone dealt with this problem?
 




On Fri, Apr 20, 2001 at 08:58:24AM -0600, Johnson, Kirk wrote:

> I have also seen this problem with one of my sites, but only *occasionally*.
> I have no clue as to what the problem is. Anyone else have any ideas?

Maybe someone remembers my post about my session-problem. Pretty much the same
type. session gets registered just fine, but the var's are not being serialized()
and put into the session-file. I never really relized that this only happens if I
work at home, which is with a netscape 4.75 (running on OpenBSD). It just happens
about 20% of the time. But *if* it happens, it will happen until I closed the browser
and reopened it...

strange.

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





> Maybe someone remembers my post about my session-problem. 
> Pretty much the same
> type. session gets registered just fine, but the var's are 
> not being serialized()
> and put into the session-file. I never really relized that 
> this only happens if I
> work at home, which is with a netscape 4.75 (running on 
> OpenBSD). It just happens
> about 20% of the time. But *if* it happens, it will happen 
> until I closed the browser
> and reopened it...

I have seen this running netscape 4.72, so all the reports seem related to
netscape 4.7x. Last time I tried to work on this problem, I saw the error 10
times in a row (close the browser, reopen, login, repeat). Then I started
putting debug statements in the code, and the problem went away, couldn't
reproduce it. Sigh.

Kirk




I posted about this same problem over a year ago. I finally gave up and
reverted back to PHP 3 techniques of 1)generating a sessid, 2)registering
the session by storing the sessid and the variables in a mysql database and
3)passing the sessid in the url. This works like a charm.
I'd be curious if anyone has any comments on this.

JS PLauche

in article [EMAIL PROTECTED], "Luke
Muszkiewicz" at [EMAIL PROTECTED] wrote on 4/19/01 11:34 AM:

> Hey Folks:
> 
> I am using PHP sessions in IE 5.5 and NN 6 successfully, but I am not able
> to retrieve the data from my registered variables in Communicator 4.7. I am
> passing the session ID via SID and have turned off cookies in each browser
> to simplify testing, although Communicator 4.7 doesn't work with cookies
> enabled either.
> 
> Research shows that with Communicator 4.7 the session ID is being carried
> from one page to the next successfully; however, the registered variables
> are not. Outside of the page where they are set and registered, they are
> not registered nor set even though the session ID is carried successfully.
> 
> session.save_path is set to /tmp. When I start a session in Communicator
> 4.7, the session file is created in /tmp but it contains no data. When
> using IE 5.5 or NN 6, the session file does contain the serialized data for
> the registered variables, and everything works as it should.
> 
> So, it looks like the problem is that in Communicator 4.7, the serialized
> data is not being successfully written to the session file in /tmp. Has
> anyone dealt with this problem?
> 
> If you're still with me, THANK YOU! I created a simplified test app at the
> following URL:
> 
> http://puredev.com/session/test1.php
> 
> If you would be so kind, open this URL and click on the test2.php link and
> you should see the following if the data was retrieved:
> 
> Test Results: The session data was transferred.
> 
> The code for these two test pages is as follows:
> 
> TEST1.PHP
> 
> <?php
> 
> session_start();
> session_register("test");
> $test = "The session data was transferred.";
> echo "Click this link: <a href=\"test2.php?".SID."\">test2.php</a>";
> 
> ?>
> 
> TEST2.PHP
> 
> <?php
> 
> session_start();
> echo "Test Results: ".$test;
> 
> ?>
> 
> You can also view the results of phpinfo() for me server at
> http://puredev.com/session/phpinfo.php.
> 
> Thank you in advance!
> 
> -luke
> 
> Luke Muszkiewicz
> Pure Development, LLC
> http://puredev.com
> 
> 





I don't know if I'm wording this right.

I have a display_error function in PHP that I want to generate a screen with
some information about the error, send us email, etc.  The problem is that
sometimes it's called after the headers have been sent and in the middle of a
page.  Is there a way to 'clear' the screen and putup the error stuff?

Thanks!

Mike



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




I am registering a number of variables. Can I combine them into one
session_register, such as session_register("one", "two" ... "n")?

Thanks
Wade






I do.

Kirk

> -----Original Message-----
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 20, 2001 9:16 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] session_register()
> 
> 
> I am registering a number of variables. Can I combine them into one
> session_register, such as session_register("one", "two" ... "n")?
> 
> Thanks
> Wade





Is there a down side to registering a var with the session more than
once?  I.e. which would be preferred and why in a frequently accessed
page in a web application:

        session_register('var');

        or

        If (!session_is_registered('var') session_register('var');

FWIW - either way seems to work without any apparent issues.  Seems the
first way avoids a seemingly unnecessary conditional operation.

Thanks...

Al






When using php as a FastCGI, do the database persistent connections work 
in the same way that they would under mod_php? Do they work at all? or 
are persistent connections only a feature under mod_php?





On 19 Apr 2001 13:25:09 -0700 impersonator of [EMAIL PROTECTED] ("Steve
Lawson") planted &I saw in php.general:

>fopen("http://localhost/name-of-file") will return the rendered page instead

Sounds good (theoretically:). Hovever, in practical attempt on my remote
server it gave:

 Warning:  fopen("http://my.domain/file_name.htm","r") - A socket must be
already connected. in ...etc.... on line 304 

where it worked ok with 'filesystem open' (On my home window localhost, it
worked though).  Suggestions, how to go around this problem?

Leon.





check php.ini file for "allow fopen" I think.....
____________________________ 
Matthew Luchak 
Webmaster
Kaydara Inc. 
[EMAIL PROTECTED]


-----Original Message-----
From: ~~~LeoN~ [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 10:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Site Searchable function


On 19 Apr 2001 13:25:09 -0700 impersonator of [EMAIL PROTECTED] ("Steve
Lawson") planted &I saw in php.general:

>fopen("http://localhost/name-of-file") will return the rendered page
instead

Sounds good (theoretically:). Hovever, in practical attempt on my remote
server it gave:

 Warning:  fopen("http://my.domain/file_name.htm","r") - A socket must
be
already connected. in ...etc.... on line 304 

where it worked ok with 'filesystem open' (On my home window localhost,
it
worked though).  Suggestions, how to go around this problem?

Leon.

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





Hello,

Vox2Vox needs 2 developers for a short project. They don't need to work on
site. The company is in Miami/FL and the developers can be anywhere. Please
send Curriculum Vitae with your answer... Contact me directly.




Pre-requisites:

- Availability: NOW!!!!
- 3 years experience minimum programming PHP (I mean needs to know very well
PHP 4 - no bull please)
- LDAP experience or equal DB experience (LDAP is a specialized DB...)
- Some knowledge in Perl (needed for Mirapoint interaction - I explain more
about that later - not a big deal though)
- Good Javascript experience (The project works over frames and popup
windows - so the developer should handle easily the interaction between
them)
- Good knowledge of browser capabilities for IE and NN (the project should
be IE 3 and NN 3 compatible since some users of the project will be on Latin
America/Europe/Asia)




Quick Description of the project:

Unified Communication (UC) is a reality today. Vox2Vox is a
telecommunication company that work with Voice over IP (VoIP) communication
between countries, linking a uOne Platform from Cisco (Vox2Vox is a platinum
member) with a Public Switched Telephony Network (PSTN) around the world.
This short project targets the launch of the alpha version for the UC online
(internet) client (since we have phone and fax interfaces also). Basically
the interface for the web is a e-mail client with some extra capabilities,
and all those are already supported by the MiraPoint 2000 server. Our job
would be to create a new interface, that would integrate this with our look
and feel and with uOne. The uOne interaction is by LDAP. No concern with
security is needed at this first phase, what make the project not so
complex. More info after the approval of the candidate.




Time Frame:

Explanation of the project: 3 days - april, 25th to april, 27th)
Development: 2 weeks (april,28th to may, 13th)




Payment:

Depends on developer experience. Per project type of payment (not per hour).




Project Leader:

Romulo Roberto Pereira
Senior Internet Specialist
Phone: 305.444.7433
E-mail: [EMAIL PROTECTED]

Thank you!!

Rom

P.S.: Depending on the results of the work of each developer, it would
requested the help of the developer again on the Beta-1, Beta-2 and Final
Beta developements also. Those will have better time frames.





The is no function that i know specific to do that. But you can work it out
with a RegExp. Try:

$fileName=ereg_replace("_", "[^A-Za-z0-9_%]", $fileName);

Cheers!!

-----Original Message-----
From: Floyd Piedad [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 19 April, 2001 11:24 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] Use of special characters in filenames results in IE
problems


Hi,

I discovered a bug in my program for uploading files, which stores the
filename in the database in order to create a link for it on the web page in
the future.  The bug is when the filename makes use of special characters
(e.g. Oplæg).  When I create a link to the file, the link works with
Netscape.  With IE however, it says that file is not found.  I discovered
that
if I use the "encoded" version of the file name ("Opl%e6g") it works on both
IE and Netscape.  What function or code is used to convert to this format?

Thanks!
Floyd





I've heard a lot of people asking for info on imagemagick & php. I've created
a small class that resizes images, gets info, and stamps images. It's nothing
to call home to mom about, but it works.

http://www.miester.org/software/convert.php.asc

--Joe

/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */





I'm needing to have a form that pulls a bunch of database fields into it and
then allows you to modify the fields and does the subsequent update in the
database.  This seems like something that has to be done all the time.  Is
there a right way to go about doing this?  Some kind of class library or
anything?  Or do I just kind of code it up?  Thanks for any responses.

Mike



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





At 09:52 PM 4/19/01 -0400, Shawn Reed <[EMAIL PROTECTED]> wrote:

>However, it occurred to me that there isn't really a way (that I know of) 
>to directly address a specific filename on a Macintosh as there is in 
>other operating systems.  For example, in Windows I could type 
>C:\WINDOWS\SYSTEM\BLAH.EXE or in Unix I could type 
>/var/spool/mail/whatever ... but is there a way to do such a thing on a Mac?

   Not recommended (you *should* use the ToolBox routines and create an 
'alias' resource for the file), but yes, you can do what you're trying to do.

   "Macintosh HD:Desktop Folder:My Interesting File.txt"
    ------------ -------------- -----------------------
     Drive Name    Folder(s)     Filename

>Can you directly address a file several levels deep in the filesystem 
>without using the MacOS interface itself to do so?  The project I'm doing 
>relies on the ability to do just that, and it would appear that I've hit a 
>bit of a snag.

   You'll hit other snags doing it the way you want to, because the MacOS 
is not like DOS or Windows or Unix. (well, okay, OS X is like Unix, but 
that's not the point here...).  If you're writing an application on the 
Mac, you should use the routines in the Mac Toolbox to do things... that 
way, your code will work on *any* Mac, not just the one(s) that are 
configured exactly like your test machine, with exactly the same hard drive 
name(s), exactly the same foldername(s), etc.  Regardless, we are straying 
far from the topic of this list, since it has absolutely nothing to do with 
PHP.  :)

>If anyone can offer any suggestions or advice, I'd really appreciate 
>it.  Thanks in advance.

   INSIDE MACINTOSH: Files
   by Apple Computer, Inc.
   ISBN: 0-201-63244-6
   $29.95 USA
   $38.95 CANADA


- Brian

  -------------------------------------
    Brian S. Dunworth
    Sr. Software Development Engineer
    Oracle Database Administrator
    The Printing House, Ltd.

    (850) 875-1500  x225
    <[EMAIL PROTECTED]>
  -------------------------------------





This function:

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

Has no example on how you would code with it. Does anyone know?

It mentions "buffered output" how do you buffer output?
-- 

Thomas Deliduka
IT Manager
     -------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/




Reply via email to