php-general Digest 5 Jan 2002 14:18:07 -0000 Issue 1093

Topics (messages 79513 through 79556):

Paging through MySQL results in PHP
        79513 by: Nelson Goforth

Re: configuring sever to send mail (Win2k)
        79514 by: CJ
        79534 by: CJ
        79537 by: Brian Clark

Re: How to clear a populated array
        79515 by: Miles Thompson
        79523 by: Michael Sims

Re: NEWBIE IN DISTRESS:  Install Instructions are not work for PHP 4.1.1!!!
        79516 by: Miles Thompson
        79532 by: Brian Clark

Stupid question alert
        79517 by: tim at 10Kv
        79518 by: Bogdan Stancescu

Re: Quick regular expressions question  / preg_replace
        79519 by: Bogdan Stancescu
        79521 by: David Yee
        79522 by: Bogdan Stancescu
        79525 by: David Yee

CGI and HTTP Authentication
        79520 by: Gaylen Fraley
        79538 by: Brian Clark
        79540 by: Gaylen Fraley
        79541 by: Gaylen Fraley
        79542 by: Brian Clark
        79544 by: Brian Clark
        79545 by: Gaylen Fraley
        79547 by: Brian Clark

Re: Warning: Unknown persistent list entry type in module shutdown (11)
        79524 by: Brian Clark

Re: PHP XML with Dynamic Content
        79526 by: Brian Clark

Re: Cannot find imap library
        79527 by: Brian Clark

Re: compilation of PHP with SNMP support
        79528 by: Kancha .

Checking the season
        79529 by: webapprentice

Re: PEAR
        79530 by: Brian Clark
        79536 by: Bas van Rooijen

Re: PHP-Friendly WYSIWYG HTML Editor
        79531 by: Brian Clark

Re: PHP Compile Errors
        79533 by: Brian Clark

Re: Stupid question alert]
        79535 by: Bogdan Stancescu

php form
        79539 by: M.E. Suliman
        79543 by: Brian Clark
        79548 by: M.E. Suliman

Re: Checking for characters in string
        79546 by: Joe Webster

array_walk inside class method
        79549 by: S. Murali Krishna
        79551 by: Attila Strauss

want HTML class or php library
        79550 by: S. Murali Krishna

check browser communication
        79552 by: Daniel Urstöger

Printing return value of array_count_values?
        79553 by: Daniel Alsén
        79554 by: George Nicolae

Re: Still need help with miscount
        79555 by: Daniel Alsén

Problems Installing 4.1.1 on FreeBSD 4.4 STABLE
        79556 by: Tim Gustafson

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 ---
I have an application that returns a set of results from a MySQL 
query.  Let's say I have 100 results from the query, but only want to 
show 25 per HTML page.

The MySQL query is driven by a 'Search' page that creates an array 
"$keywords" - which can be of any size.  I then loop through the 
$keywords array to create the SQL code.

I understand how to use the LIMIT statement in MySQL - so I can 
'page' the output, but how do I pass the "$keywords" array with each 
request for the next page?

I create a link with a phrase like:

    printf(...A HREF="results.php?firstitem=1&items=25&kw=$kw...);

but end up just showing that kw=array.

Can anyone put me on the right track or point me to some resource? 
This seems like it should be simple but...

Thanks,
Nelson
--- End Message ---
--- Begin Message ---
thanks for the reply but i still need some help:

PHP Version 4.0.6
--------------------------------
[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]
-------------------------------------------
I get this error when i use the mail function on my local server (IIS 5.0,
windows 2000 Pro). Maybe it's an IIS configuration problem. i'm really not
sure.
Error
Warning: Server Error in F:\Inetpub\wwwroot\stowe\scripts\mail.php on line
42

 Code
 <?php
      $to = '[EMAIL PROTECTED]';
      $from = '[EMAIL PROTECTED]';

        //Check if we have something POSTed by the form.
        if (isset($HTTP_POST_VARS)){
            //Start with an empty body for the mail message
            $body = '';
            //Iterate through all the POSTed variables, and add them to the
message body.
            while (list($key, $value) = each($HTTP_POST_VARS)){
                $body .= $key . ' = ' . $value . "\r\n";
            }
            //Build up some nice From/Reply Headers
            $headers = "From: $from\r\n";
            $headers .= "Reply-To: $from\r\n";
            //Mail the message out.
            //Requires setting php3.ini sendmail path as per instructions

             $success = mail($to, "Posted " . date("m/d/Y"), $body,
$headers);  //LINE 42

            //Always check return codes from functions.
            if ($success){
                echo "<B><CENTER>Thank you for your input</CENTER></B>\n";
            }
            else{
                echo "<CENTER><B>Internal Error</B>:  Your input was
unprocessed.<BR>Contact $from</CENTER>\n";
            }
        }
?>




"Dl Neil" <[EMAIL PROTECTED]> wrote in message
06f601c1962f$e3841cc0$7b16100a@jrbrown">news:06f601c1962f$e3841cc0$7b16100a@jrbrown...
> CJ,
>
> > i have a problem using the mail function on my server.
> >   win2000 Pro
> >   IIS 5.0
> >   PHP Version 4.0.6
> >
> > i'm not sure if it's a configuration problem with IIS or i'm missing
> > something in the php.ini file.
>
>
> The pre-requisite is that the php.ini file points to a visible SMTP
server. Please review the [mail function]
> section of that file.
> If you have further questions please include that section, plus PHP
version number in your reply.
>
> Regards,
> =dn
>
>


--- End Message ---
--- Begin Message ---
thanks for the reply but i still need some help:

PHP Version 4.0.6
--------------------------------
[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = [EMAIL PROTECTED]
-------------------------------------------
I get this error when i use the mail function on my local server (IIS 5.0,
windows 2000 Pro). Maybe it's an IIS configuration problem. i'm really not
sure.

Error
Warning: Server Error in F:\Inetpub\wwwroot\stowe\scripts\mail.php on line
42

 Code
 <?php
      $to = '[EMAIL PROTECTED]';
      $from = '[EMAIL PROTECTED]';

        //Check if we have something POSTed by the form.
        if (isset($HTTP_POST_VARS)){
            //Start with an empty body for the mail message
            $body = '';
            //Iterate through all the POSTed variables, and add them to the
message body.
            while (list($key, $value) = each($HTTP_POST_VARS)){
                $body .= $key . ' = ' . $value . "\r\n";
            }
            //Build up some nice From/Reply Headers
            $headers = "From: $from\r\n";
            $headers .= "Reply-To: $from\r\n";
            //Mail the message out.
            //Requires setting php3.ini sendmail path as per instructions

             $success = mail($to, "Posted " . date("m/d/Y"), $body,
$headers);  //LINE 42

            //Always check return codes from functions.
            if ($success){
                echo "<B><CENTER>Thank you for your input</CENTER></B>\n";
            }
            else{
                echo "<CENTER><B>Internal Error</B>:  Your input was
unprocessed.<BR>Contact $from</CENTER>\n";
            }
        }
?>




"Dl Neil" <[EMAIL PROTECTED]> wrote in message
06f601c1962f$e3841cc0$7b16100a@jrbrown">news:06f601c1962f$e3841cc0$7b16100a@jrbrown...
> CJ,
>
> > i have a problem using the mail function on my server.
> >   win2000 Pro
> >   IIS 5.0
> >   PHP Version 4.0.6
> >
> > i'm not sure if it's a configuration problem with IIS or i'm missing
> > something in the php.ini file.
>
>
> The pre-requisite is that the php.ini file points to a visible SMTP
server. Please review the [mail function]
> section of that file.
> If you have further questions please include that section, plus PHP
version number in your reply.
>
> Regards,
> =dn
>
>





--- End Message ---
--- Begin Message ---
* CJ ([EMAIL PROTECTED]) [Jan 04. 2002 23:01]:

> PHP Version 4.0.6
> --------------------------------
> [mail function]
> ; For Win32 only.
> SMTP = localhost

Do you really have SMTP running on the Win2k server?

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
FATAL SYSTEM ERROR: Press F13 to continue.

--- End Message ---
--- Begin Message ---
Carlos,

Just redeclare the array .... $Erros = array();

Miles

At 05:11 PM 1/4/2002 -0700, Carlos Fernando Scheidecker Antunes wrote:
>Hello All,
>
>I have a populated array that stores user input errors.
>
>I have been browsing the manual and some books and I couldn't find one thing.
>
>I've got an array $Erros[] and I would like to be able to clear it 
>entirely. Is there any builtin function that acomplishes that?
>
>Thank you in advance.
>
>Carlos Fernando S. Antunes.
>
>
>--
>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]

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

>>>I've got an array $Erros[] and I would like to be able to clear it
>>>entirely. Is there any builtin function that acomplishes that?

Why not:

unset($Errors);

??

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

I've never installed PHP on a Windows box, but on Linux you have to move 
and rename the php.ini file. It's mentioned in the docs, but for the life 
of me I can't remember its name right now.

Miles Thompson

At 11:15 AM 1/4/2002 -0600, Mark wrote:
>I apologize if the title of this post sounds overly aggresive, but I have
>followed the instructions to a 'T' and got nowhere!!  I have tried the
>"auto" install version of PHP and manual instructions for installing PHP
>4.1.1.  Neither of them work.  I added the lines to my httpd.conf file for
>both types of installs (not at the same time) as discribed in the
>Install.txt file, along with the instructions on the website, and can get no
>"test" scripts to run or PHP for that matter.  All I get is a blank screen
>when running the CGI version or can not even get apache to load when I try
>the Module version (Get a "Requested Operation Failed" message).  can
>someone please help?????  My system is as follows:
>
>Windows 2000 SP2
>Apache 2.0.28 (I have also tried version 1.3.22 with same results as
>mentioned above)
>PHP 4.1.1
>MDAC 2.7
>MySQL 3.23.46a
>
>Thanks in advance!!
>
>Mark
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
* Mark ([EMAIL PROTECTED]) [Jan 04. 2002 12:14]:

[...]

> the Module version (Get a "Requested Operation Failed" message).  can
> someone please help?????  My system is as follows:

> Windows 2000 SP2
> Apache 2.0.28 (I have also tried version 1.3.22 with same results as

People had problems in that past with 2.x; I don't know if the php-dev's
have worked that out yet.

> mentioned above)
> PHP 4.1.1
> MDAC 2.7
> MySQL 3.23.46a

Are there any hints in Apache's error_log? What is your exact LoadModule
line you're using in httpd.conf?

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
In politics, stupidity is not a handicap.

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

first of all apologise to the list ­ this is a very basic question for you
I¹m sure. I have tried to find an answer on the web but the problem is
knowing HOW to ask the question ­ and I hoping you can provide me with a
starting point.

Anyway.. I design a lot of graphic intensive pages which rely heavily on
layers that contain images, mouseovers and image swaps. The trouble is, when
there are more than a couple of these layers on a page the code gets long
and over complicated.  For example, if I have a page which on one side
contains an image map with 5 clickable points that shows one of 5 possible
layers on the other side of the page  (each with different content)  this is
automatically a page with lots of code which is slow to load ­ especially if
the page already has a layer based navigation bar!

My question is: is there a way to use a language like php to make this
process easier? For example populate the layers from a different file rather
than have all the code on the same page and perhaps slim the page down a
little ­ or is this missing the point of what a language like php is about.

Thanks for your help and my apologies if this is the worst question of the
week.

Tim Rogers
--- End Message ---
--- Begin Message ---
Your question is not stupid - it's just uninformed, and that's easily
understandable if you never used PHP.

The concept is dynamically creating the page SERVER-SIDE. That is, use some
databases or some nifty code to dynamically build a page using specific
parameters. Unforunately for you, this means that all the fun ends on the server
side. Once PHP ends its job, Apache takes over and serves the content generated
by PHP as it would serve any regular file. What you actually pass to the client
is "dead" information - it's not dynamic unless you echo some JavaScript code or
something similar from PHP (which is the same as writing the respective code in
a regular file, unless you create some custom parameters in JavaScript based on
some other parameters you pass to PHP).

Hope my explanation makes sense... ;-)

Bogdan

tim at 10Kv wrote:

> Hi,
>
> first of all apologise to the list ­ this is a very basic question for you
> I¹m sure. I have tried to find an answer on the web but the problem is
> knowing HOW to ask the question ­ and I hoping you can provide me with a
> starting point.
>
> Anyway.. I design a lot of graphic intensive pages which rely heavily on
> layers that contain images, mouseovers and image swaps. The trouble is, when
> there are more than a couple of these layers on a page the code gets long
> and over complicated.  For example, if I have a page which on one side
> contains an image map with 5 clickable points that shows one of 5 possible
> layers on the other side of the page  (each with different content)  this is
> automatically a page with lots of code which is slow to load ­ especially if
> the page already has a layer based navigation bar!
>
> My question is: is there a way to use a language like php to make this
> process easier? For example populate the layers from a different file rather
> than have all the code on the same page and perhaps slim the page down a
> little ­ or is this missing the point of what a language like php is about.
>
> Thanks for your help and my apologies if this is the worst question of the
> week.
>
> Tim Rogers

--- End Message ---
--- Begin Message ---
I suck big time at regular expressions, but have you tried
str_replace("\r\n<html>\r\n", '', $string); ?

Bogdan

David Yee wrote:

> Hi guys.  Quick regular expressions question here:
>
> I want to match:
>
> <html>
>
> but not:
>
> blah blah <html>
>
> Basically I want to wipe out lines beginning with the <html> tag followed
> immediately by a carriage return.  If I do a:
>
> str_replace("<html>\r\n", '', $string);
>
> It wipes out <html> and the carriage return after blah blah <html>.  So I
> suppose I have to turn to preg_replace, but I'm having a hard time coming up
> with the right pattern.  Thanks.

--- End Message ---
--- Begin Message ---
That's an idea but it would delete the carriage return before it which I
don't want to happen.  I've tried preg_replace("/^<html>\r\n/", '', $string)
+ quite a few other variations but no luck :-(.  Argh!

David

----- Original Message -----
From: "Bogdan Stancescu" <[EMAIL PROTECTED]>
To: "David Yee" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 6:20 PM
Subject: Re: [PHP] Quick regular expressions question / preg_replace


> I suck big time at regular expressions, but have you tried
> str_replace("\r\n<html>\r\n", '', $string); ?
>
> Bogdan
>
> David Yee wrote:
>
> > Hi guys.  Quick regular expressions question here:
> >
> > I want to match:
> >
> > <html>
> >
> > but not:
> >
> > blah blah <html>
> >
> > Basically I want to wipe out lines beginning with the <html> tag
followed
> > immediately by a carriage return.  If I do a:
> >
> > str_replace("<html>\r\n", '', $string);
> >
> > It wipes out <html> and the carriage return after blah blah <html>.  So
I
> > suppose I have to turn to preg_replace, but I'm having a hard time
coming up
> > with the right pattern.  Thanks.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
str_replace("\r\n<html>\r\n", '\r\n', $string);

David Yee wrote:

> That's an idea but it would delete the carriage return before it which I
> don't want to happen.  I've tried preg_replace("/^<html>\r\n/", '', $string)
> + quite a few other variations but no luck :-(.  Argh!
>
> David
>
> ----- Original Message -----
> From: "Bogdan Stancescu" <[EMAIL PROTECTED]>
> To: "David Yee" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, January 04, 2002 6:20 PM
> Subject: Re: [PHP] Quick regular expressions question / preg_replace
>
> > I suck big time at regular expressions, but have you tried
> > str_replace("\r\n<html>\r\n", '', $string); ?
> >
> > Bogdan
> >
> > David Yee wrote:
> >
> > > Hi guys.  Quick regular expressions question here:
> > >
> > > I want to match:
> > >
> > > <html>
> > >
> > > but not:
> > >
> > > blah blah <html>
> > >
> > > Basically I want to wipe out lines beginning with the <html> tag
> followed
> > > immediately by a carriage return.  If I do a:
> > >
> > > str_replace("<html>\r\n", '', $string);
> > >
> > > It wipes out <html> and the carriage return after blah blah <html>.  So
> I
> > > suppose I have to turn to preg_replace, but I'm having a hard time
> coming up
> > > with the right pattern.  Thanks.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Ah that would do it (just need to double quote the \r\n).  Thanks!  I just
know, however, one of these days I'm gonna need to use preg_replace :-).

David

----- Original Message -----
From: "Bogdan Stancescu" <[EMAIL PROTECTED]>
To: "David Yee" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 6:46 PM
Subject: Re: [PHP] Quick regular expressions question / preg_replace


> str_replace("\r\n<html>\r\n", '\r\n', $string);
>
> David Yee wrote:
>
> > That's an idea but it would delete the carriage return before it which I
> > don't want to happen.  I've tried preg_replace("/^<html>\r\n/", '',
$string)
> > + quite a few other variations but no luck :-(.  Argh!
> >
> > David
> >
> > ----- Original Message -----
> > From: "Bogdan Stancescu" <[EMAIL PROTECTED]>
> > To: "David Yee" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Friday, January 04, 2002 6:20 PM
> > Subject: Re: [PHP] Quick regular expressions question / preg_replace
> >
> > > I suck big time at regular expressions, but have you tried
> > > str_replace("\r\n<html>\r\n", '', $string); ?
> > >
> > > Bogdan
> > >
> > > David Yee wrote:
> > >
> > > > Hi guys.  Quick regular expressions question here:
> > > >
> > > > I want to match:
> > > >
> > > > <html>
> > > >
> > > > but not:
> > > >
> > > > blah blah <html>
> > > >
> > > > Basically I want to wipe out lines beginning with the <html> tag
> > followed
> > > > immediately by a carriage return.  If I do a:
> > > >
> > > > str_replace("<html>\r\n", '', $string);
> > > >
> > > > It wipes out <html> and the carriage return after blah blah <html>.
So
> > I
> > > > suppose I have to turn to preg_replace, but I'm having a hard time
> > coming up
> > > > with the right pattern.  Thanks.
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>

--- End Message ---
--- Begin Message ---
Is there any work around for using HTTP Authentication and PHP installed as
CGI?  I know how to make the detection, I'm hoping (probably in vain) that
there is some way to make the two work.  Thanks.

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/



--- End Message ---
--- Begin Message ---
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 04. 2002 21:26]:

> Is there any work around for using HTTP Authentication and PHP installed as
> CGI?  I know how to make the detection, I'm hoping (probably in vain) that
> there is some way to make the two work.  Thanks.

AFAIK, no, unless you use .htaccess based stuff. You may be able to use
an admin page to add users and write out the .htaccess file(s). Might be
possible..

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
(E)ight (M)egabytes (A)nd (C)ontinually (S)wapping.

--- End Message ---
--- Begin Message ---
Thanks :).  I thought I had figured out a way to determine if it was a CGI
or module.  But it didn't work.  Is there a reliable way?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/

"Brian Clark" <[EMAIL PROTECTED]> wrote in message
20020105042749.GK17616@ganymede">news:20020105042749.GK17616@ganymede...
> * Gaylen Fraley ([EMAIL PROTECTED]) [Jan 04. 2002 21:26]:
>
> > Is there any work around for using HTTP Authentication and PHP installed
as
> > CGI?  I know how to make the detection, I'm hoping (probably in vain)
that
> > there is some way to make the two work.  Thanks.
>
> AFAIK, no, unless you use .htaccess based stuff. You may be able to use
> an admin page to add users and write out the .htaccess file(s). Might be
> possible..
>
> --
> Brian Clark | Avoiding the general public since 1805!
> Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
> (E)ight (M)egabytes (A)nd (C)ontinually (S)wapping.
>


--- End Message ---
--- Begin Message ---
Just for curiosity, can HTTP Authentication be disabled in any other way, if
PHP is installed as a module?  In other words, is there any other reason why
the authentication might not work (under *nix), not IIS?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/

"Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thanks :).  I thought I had figured out a way to determine if it was a CGI
> or module.  But it didn't work.  Is there a reliable way?
>
> --
> Gaylen
> [EMAIL PROTECTED]
> Home http://www.gaylenandmargie.com/
> PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
> "Brian Clark" <[EMAIL PROTECTED]> wrote in message
> 20020105042749.GK17616@ganymede">news:20020105042749.GK17616@ganymede...
> > * Gaylen Fraley ([EMAIL PROTECTED]) [Jan 04. 2002 21:26]:
> >
> > > Is there any work around for using HTTP Authentication and PHP
installed
> as
> > > CGI?  I know how to make the detection, I'm hoping (probably in vain)
> that
> > > there is some way to make the two work.  Thanks.
> >
> > AFAIK, no, unless you use .htaccess based stuff. You may be able to use
> > an admin page to add users and write out the .htaccess file(s). Might be
> > possible..
> >
> > --
> > Brian Clark | Avoiding the general public since 1805!
> > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
> > (E)ight (M)egabytes (A)nd (C)ontinually (S)wapping.
> >
>
>


--- End Message ---
--- Begin Message ---
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 00:22]:

> Thanks :).  I thought I had figured out a way to determine if it was a CGI
> or module.  But it didn't work.  Is there a reliable way?

Yes, stick <?php phpinfo(); ?> into a .php file and load it into your
browser. Beside "Server API" it'll either say Apache or CGI.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
This page intentionally left unblank.

--- End Message ---
--- Begin Message ---
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 00:27]:

> Just for curiosity, can HTTP Authentication be disabled in any other way, if
> PHP is installed as a module?  In other words, is there any other reason why
> the authentication might not work (under *nix), not IIS?

If this is Apache, HTTP Auth probably wouldn't be there if the server
doesn't use mod_auth, but on a default Apache install, it's going to be
there.. I couldn't imagine someone removing it purposely.

If you have shell access to the server you can do this to see if it's
available:

/path/to/httpd -l | grep mod_auth

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Backup not found: (A)bort, (R)etry, (P)ee your pants.

--- End Message ---
--- Begin Message ---
But is there a PHP variable that holds the Server API?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/

"Brian Clark" <[EMAIL PROTECTED]> wrote in message
20020105061814.GL17616@ganymede">news:20020105061814.GL17616@ganymede...
> * Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 00:22]:
>
> > Thanks :).  I thought I had figured out a way to determine if it was a
CGI
> > or module.  But it didn't work.  Is there a reliable way?
>
> Yes, stick <?php phpinfo(); ?> into a .php file and load it into your
> browser. Beside "Server API" it'll either say Apache or CGI.
>
> --
> Brian Clark | Avoiding the general public since 1805!
> Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
> This page intentionally left unblank.
>


--- End Message ---
--- Begin Message ---
* Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 01:36]:

> But is there a PHP variable that holds the Server API?

How about a function that returns a string?

php_sapi_name()

PHP 4.x

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Friends help you move. Real friends help you move bodies.

--- End Message ---
--- Begin Message ---
* Ed Swartz ([EMAIL PROTECTED]) [Jan 03. 2002 13:26]:

> Hi,

Hiya

> The error message listed in the subject line is being displayed at the
> bottom of my HTML pages gen'd by PHP. Any hints how what might be
> causing this message? I looked in BUGS, FAQTS, etc not to no avail.

May help:

<http://marc.theaimsgroup.com/?l=php-general&m=100847914032031&w=2>

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
I intend to live forever - so far, so good.

--- End Message ---
--- Begin Message ---
* Emile Bosch ([EMAIL PROTECTED]) [Jan 03. 2002 15:38]:

> Hi a lot of todays proffesional content management systems use XML, now
> i was wondering how it's possible to mix XML with Dynamic Content, or
> content which is change sensitive, IE A shop, or an auction,
> let's say you have a shop with 1000 products, how am i gonna mix this in
> the XML?

> Does anyone know how this is solved, because i don't think that you are
> gonna write hundreds of XML files for each article, can someone please help
> me out here?

I understand the first paragraph up to "how am i gonna mix this in the
XML?"

Why couldn't you store information in a database and write the XML files
on the fly when you need XML? Or update the XML file when something 
changes? Or, why use XML at all? Do you _really_ need it? *confused*

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Sex is the most fun you can have without laughing.

--- End Message ---
--- Begin Message ---
* Richard Brust ([EMAIL PROTECTED]) [Jan 04. 2002 16:25]:

> original configure script:
> ./configure --with-apxs=/etc/httpd/bin/apxs --enable-track-vars 
> --enable-ftp --with-gd=../gd-1.8.4 --prefix=/etc/php --sysconfdir=/etc/php 
> --with-imap=../imapServer

> Note: ../imapServer is the dir where I gunzip'd the source files.

[...]

> Then I do another configure where I specify the location of rfc822.h:
> ./configure --with-apxs=/etc/httpd/bin/apxs --enable-track-vars 
> --enable-ftp --with-gd=../gd-1.8.4 --prefix=/etc/php --sysconfdir=/etc/php 
> --with-imap=../imapServer/src

> Now the error is:
> Cannot find imap library. Please check your IMAP installation.

OK this is seriously a long shot, but..

cd ../imapServer/src/c-client
ln -s c-client.h libc-client.h

Then remove config.cache in your PHP directory and try configuring it
again --with-imap=../imapServer/src

See what that returns..

It might work because c-client.h points to everything else it needs.

I think configure is looking for c-client.a instead, but try the above
and see what happens. Backup your original apache php DSO before you
make install though, so you don't try find me and hang me out back when
it all goes poof. :)

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
It's been lovely, but I have to scream now.

--- End Message ---
--- Begin Message ---
I faced the same problem when compile php 4.0.6 and
4.1.0 with snmp. I tried several times so i just
dropped it. Now I'm using php without snmp. 


Do let me know if you get over this error.


--- Jason Signalness <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am having trouble compiling php with snmp support.
> ucd-snmp 4.2.2 is 
> installed and working without trouble. PHP4.1.1
> configures ok but fails 
> on make, giving many errors similar to this:
> 
> /usr/local/lib/libsnmp.a(snmp_alarm.o): In function
> `sa_find_next':
>
/export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:111:
> 
> multiple definition of `sa_find_next'
>
Zend/.libs/libZend.al(snmp_alarm.o):/export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:111:
> 
> first defined here
> /usr/local/lib/libsnmp.a(snmp_alarm.o): In function
> `sa_find_specific':
>
/export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:120:
> 
> multiple definition of `sa_find_specific'
>
Zend/.libs/libZend.al(snmp_alarm.o):/export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:120:
> 
> first defined here
> 
> My PHP configure options are:
> ./configure \
> --with-apxs=/opt/apache/bin/apxs \
> --with-oci8 \
> --with-ldap \
> --with-gd=/usr \
> --with-jpeg-dir=/usr \
> --with-png-dir=/usr \
> --with-freetype-dir=/usr \
> --with-zlib-dir=/usr \
> --with-xpm-dir=/usr/X11R6 \
> --enable-sigchild \
> --with-imap \
> --enable-xslt \
> --with-xslt-sablot \
> --enable-wddx \
> --with-snmp=/usr/local \
> --enable-ucd-snmp-hack \
> --with-openssl
> 
> Please CC me on any replies, as I don't subscribe to
> php-general.  Any 
> ideas would be greatly appreciated.
> 
> Thanks in advance
> -- 
> Jason Signalness, Systems Administrator
> Basin Telecommunications, Inc.
> [EMAIL PROTECTED]    (701)355-5727
> --
> 
> 
> -- 
> 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]
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--- End Message ---
--- Begin Message ---
Hi,
Just need a sounding board to help me think this through.

I want to check the current date to determine what "season" it is and display the 
appropriate picture.

I define spring as 03/21/YYYY, summer as 06/21/YYYY, autumn as 09/21/YYYY, and winter 
as 12/21/YYYY.

I form a string for the current date and get a timestamp via mktime().
I also get the equivalent timestamps for the dates above for the seasonal changes.

Then, I compare the current date to see if it's between the seasonal dates.
The problem is when I go from 12/31/YYYY to 01/01/(YYYY+1).
Since winter and spring dates are one year apart, the current date timestamp 
comparison gets messed up and nothing displays.

How do I do a proper comparison?  I was thinking of just seeing if the current date 
timestamp is greater than each of the seasonal date timestamp, but it feels like I 
would miss something.  Would I?  Or is there another solution?

Thank you for your time.

--Stephen
--- End Message ---
--- Begin Message ---
* harry ([EMAIL PROTECTED]) [Jan 04. 2002 10:44]:

> Hi all

Hi Harry

> I have been trying to use PEAR and have come to a standstill.

> The following:

> <?php

> require_once ("HTML/Page.php");



> /* PAGE SETUP */
>   $p = new HTML_Page();
>   $p->setCache("true");
>   echo "TEST 1";

Try commenting the above line out.

>   //$p->toHtml();
>   echo "TEST 2";

Try commenting the above line out also.

>  // $p->setTitle("Jobsite Page");

>   $p->display();

because in the display() method, it's sending header()s:


function display() 
{   
  if(! $this->_cache) {
    header("Expires: Tue, 1 Jan 1980 12:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
    header("Cache-Control: no-cache");
    header("Pragma: no-cache");
  }
  $strHtml = $this->toHtml();
  print $strHtml;
} // end func display


> Produces the following error:

Which is why you are getting this error about header information:

>  TEST 1TEST 2
> Warning: Cannot add header information - headers already sent by (output 
> started at /var/www/html/website/jobix/php_test/test_form.php:4) in 
> /usr/share/php/HTML/Page.php on line 136

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
A day without sunshine is like, night.

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


anyway, if you would really like to do this you could use output buffering function to 
send
headers from anywhere in your script, ofcourse delaying output.

check the manual part LXXII. Output Control Functions ..

bvr.


On Fri, 4 Jan 2002 22:37:13 -0500, Brian Clark wrote:

>* harry ([EMAIL PROTECTED]) [Jan 04. 2002 10:44]:
>
>> Hi all
>
>Hi Harry
>
>> I have been trying to use PEAR and have come to a standstill.
>
>> The following:
>
>> <?php
>
>> require_once ("HTML/Page.php");
>
>
>
>> /* PAGE SETUP */
>>   $p = new HTML_Page();
>>   $p->setCache("true");
>>   echo "TEST 1";
>
>Try commenting the above line out.
>
>>   //$p->toHtml();
>>   echo "TEST 2";
>
>Try commenting the above line out also.
>
>>  // $p->setTitle("Jobsite Page");
>
>>   $p->display();
>
>because in the display() method, it's sending header()s:
>
>
>function display() 
>{   
>  if(! $this->_cache) {
>    header("Expires: Tue, 1 Jan 1980 12:00:00 GMT");
>    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
>    header("Cache-Control: no-cache");
>    header("Pragma: no-cache");
>  }
>  $strHtml = $this->toHtml();
>  print $strHtml;
>} // end func display
>
>
>> Produces the following error:
>
>Which is why you are getting this error about header information:
>
>>  TEST 1TEST 2
>> Warning: Cannot add header information - headers already sent by (output 
>> started at /var/www/html/website/jobix/php_test/test_form.php:4) in 
>> /usr/share/php/HTML/Page.php on line 136
>
>-- 
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>A day without sunshine is like, night.
>
>
>-- 
>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]
>
>



--- End Message ---
--- Begin Message ---
* Brandon ([EMAIL PROTECTED]) [Jan 04. 2002 10:47]:

> G'day!

G'day, mate!

[...]

> I've tried the following without success:

> - Adobe PageMill. It came free with PageMaker; nice, except it arbitrarily
> replaces things like <? with &gt;?. And that's just no fun. :-)

> - Netscape Composer, which gets the current value produced by the PHP bits,
> and then saves that information, statically.

A lot of folks seem to love Macromedia Dreamweaver for use with PHP.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Everyone who believes in telekinesis, raise my hands.

--- End Message ---
--- Begin Message ---
* Jason Signalness ([EMAIL PROTECTED]) [Jan 04. 2002 16:18]:

> Hello,

Backatcha

> I am having trouble compiling php with snmp support. ucd-snmp 4.2.2 is 
> installed and working without trouble. PHP4.1.1 configures ok but fails 
> on make, giving many errors similar to this:

> /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_find_next':
> /export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:111: 
> multiple definition of `sa_find_next'
> 
>Zend/.libs/libZend.al(snmp_alarm.o):/export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:111:
> 
> first defined here
> /usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_find_specific':
> /export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:120: 
> multiple definition of `sa_find_specific'
> 
>Zend/.libs/libZend.al(snmp_alarm.o):/export/home/j/js/jsignalness/ucd-snmp-4.2.2/snmplib/snmp_alarm.c:120:
> 
> first defined here

People seem to have all sorts of problems with snmp. The stuff above is
the kind of thing that needs to be put in a bug report more than likley,
because only the developers are going to have a clue how to get you
fixed up (if they can). :-(

I'd go to http://bugs.php.net and post a detailed report.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Enter any 11 digit prime number to continue.

--- End Message ---
--- Begin Message ---
(Inadvertedly only sent to me)
--- Begin Message ---
Object and events that occur in the browser window are controlled by
client-side scripts (JavaScript, VB).

Objects and events that occur on the server are controlled by server-side
scripts (PHP, ASP, etc.)

Since PHP is a server-side scripting language it can not react to
client-side events (onClick, onMouseOver, etc.) or access client-side
objects (window, document, etc.). So it's impossible to get PHP (or any
other server-side scripting language) to reduce the amount of code needed
for client-side interactions (your images swaps and mouseovers).

what u can do is put all the scripts in an external .js file and reduce the
size of the file by removing "white spaces" (spaces, tabs, line
feeds/carriage returns). i'm not sure if this would significantly reduce ur
file size but it's an option.

CJ


 ----- Original Message -----
From: "Bogdan Stancescu" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "tim at 10Kv" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 6:17 PM
Subject: Re: [PHP] Stupid question alert


> Your question is not stupid - it's just uninformed, and that's easily
> understandable if you never used PHP.
>
> The concept is dynamically creating the page SERVER-SIDE. That is, use
some
> databases or some nifty code to dynamically build a page using specific
> parameters. Unforunately for you, this means that all the fun ends on the
server
> side. Once PHP ends its job, Apache takes over and serves the content
generated
> by PHP as it would serve any regular file. What you actually pass to the
client
> is "dead" information - it's not dynamic unless you echo some JavaScript
code or
> something similar from PHP (which is the same as writing the respective
code in
> a regular file, unless you create some custom parameters in JavaScript
based on
> some other parameters you pass to PHP).
>
> Hope my explanation makes sense... ;-)
>
> Bogdan
>
> tim at 10Kv wrote:
>
> > Hi,
> >
> > first of all apologise to the list ­ this is a very basic question for
you
> > I¹m sure. I have tried to find an answer on the web but the problem is
> > knowing HOW to ask the question ­ and I hoping you can provide me with a
> > starting point.
> >
> > Anyway.. I design a lot of graphic intensive pages which rely heavily on
> > layers that contain images, mouseovers and image swaps. The trouble is,
when
> > there are more than a couple of these layers on a page the code gets
long
> > and over complicated.  For example, if I have a page which on one side
> > contains an image map with 5 clickable points that shows one of 5
possible
> > layers on the other side of the page  (each with different content)
this is
> > automatically a page with lots of code which is slow to load ­
especially if
> > the page already has a layer based navigation bar!
> >
> > My question is: is there a way to use a language like php to make this
> > process easier? For example populate the layers from a different file
rather
> > than have all the code on the same page and perhaps slim the page down a
> > little ­ or is this missing the point of what a language like php is
about.
> >
> > Thanks for your help and my apologies if this is the worst question of
the
> > week.
> >
> > Tim Rogers
>
--- End Message ---
--- End Message ---
--- Begin Message ---
Hi

I'm pretty new to this PHP thing so this might sound a bit stupid, or easy
for the pros out there.  I need a basic php form that when submit is clicked
all the information filled in that form is either generated into an html
template or text file so it can be emailed.  I would be looking at the
option later where it would give you the option to print or email the
genrated file.

Any help / ideas will be appreciated.

Thanks

Mohamed


--- End Message ---
--- Begin Message ---
* M.E. Suliman ([EMAIL PROTECTED]) [Jan 05. 2002 00:22]:

> Hi

Hello

> I'm pretty new to this PHP thing so this might sound a bit stupid, or easy
> for the pros out there.  I need a basic php form that when submit is clicked
> all the information filled in that form is either generated into an html
> template or text file so it can be emailed. I would be looking at the 

As an attachment, or do you want to just email the information
submitted?

> option later where it would give you the option to print or email the
> genrated file.

If you're completely new to PHP, this is a good introduction:

<http://www.zend.com/zend/art/intro.php>

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Overflow on /dev/null, please empty the bit bucket.

--- End Message ---
--- Begin Message ---
Hi Brian

I would need to email it as an attachment.

Thanks

Mohamed

----- Original Message -----
From: Brian Clark <[EMAIL PROTECTED]>
To: PHP is not a drug. <[EMAIL PROTECTED]>
Sent: Saturday, January 05, 2002 8:23 AM
Subject: Re: [PHP] php form


> * M.E. Suliman ([EMAIL PROTECTED]) [Jan 05. 2002 00:22]:
>
> > Hi
>
> Hello
>
> > I'm pretty new to this PHP thing so this might sound a bit stupid, or
easy
> > for the pros out there.  I need a basic php form that when submit is
clicked
> > all the information filled in that form is either generated into an html
> > template or text file so it can be emailed. I would be looking at the
>
> As an attachment, or do you want to just email the information
> submitted?
>
> > option later where it would give you the option to print or email the
> > genrated file.
>
> If you're completely new to PHP, this is a good introduction:
>
> <http://www.zend.com/zend/art/intro.php>
>
> --
> Brian Clark | Avoiding the general public since 1805!
> Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
> Overflow on /dev/null, please empty the bit bucket.
>
>
> --
> 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]
>
>

--- End Message ---
--- Begin Message ---
This one had me for a min, thank god for the lookahead =)

$password_string being the password in quesiton, $is_valid = true when it is
valid, false when it's not valid.

$is_valid = preg_match("/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])./",
$password_string);

I've said it before and I'll say it again, preg is ~40x faster than
ereg/eregi and (IMO) better.


Enjoy,
Joe

"Richard Black" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hi,
>
> I'm writing a page which will allow user's to register for an online
service. They register a username and password.
>
> I want the password to contain at least one lowercase letter, at least one
upper case letter, and at least one digit. So
>
> passW0rd would be valid, but password would not.
>
> Whats the most compact way to do this? substr? ereg?
>
> Richy
>
> ==========================================
> Richard Black
> Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
> Tel: 0141 435 3504
> Email: [EMAIL PROTECTED]
>


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


Hi All,
        I want to use "array_walk" function inside a class method. But the 
problem is i want the second argument to array_walk ( function name )
be a another function of the same class. when i gave like that its telling

Error : function not exist.

class some()
{

        function func1()
        {
        }
        function func2()
        {
                array_walk($array,"func1");
        }
}

What is the syntax or way to do this.


Thanks in Advance.

S.Murali Krishna
[EMAIL PROTECTED]  
===================================== 
We grow slow trying to be great
                                                                
                   - E. Stanley Jones
-------------------------------------

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

$this->func1();


best regards
attila


>
>
> Hi All,
> I want to use "array_walk" function inside a class method. But the
> problem is i want the second argument to array_walk ( function name )
> be a another function of the same class. when i gave like that its telling
>
> Error : function not exist.
>
> class some()
> {
>
> function func1()
> {
> }
> function func2()
> {
> array_walk($array,"func1");
> }
> }
>
> What is the syntax or way to do this.
>
>
> Thanks in Advance.
>
> S.Murali Krishna
> [EMAIL PROTECTED]
> =====================================
> We grow slow trying to be great
>
>    - E. Stanley Jones
> -------------------------------------
>
>
> --
> 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]
>

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


Hi Evrbdy
        Is there any HTML library or php class to print all the tags
of HTML in a function call.


S.Murali Krishna
[EMAIL PROTECTED]  
===================================== 
We grow slow trying to be great
                                                                
                   - E. Stanley Jones
-------------------------------------

--- End Message ---
--- Begin Message ---
Hiya !

A little offtopic this question, but really important ..
I need to check all the communication between my client PC and  a server
in the world wide web. Inlcuding all the header info and so on ..
Would be a great help for developeing my script ...

Could anybody of you suggest me something ?
I am using IE6 and Opera 6 ..
thx !

Cya !
Daniel


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

How do i echo the return values of array_count_values?

Regards
# Daniel Alsén    | www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #

--- End Message ---
--- Begin Message ---
array_count_values() returns an array using the values of the input array as
keys and their frequency in input as values

<?
$array = array (1, "hello", 1, "world", "hello");
$a=array_count_values ($array); // returns array (1=>2, "hello"=>2,
"world"=>1)
while ($b = each($a)) echo $b[0]."=>".$b[1]." ";
?>
--


Best regards,
George Nicolae
IT Manager
___________________
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Daniel alsén" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
>
> How do i echo the return values of array_count_values?
>
> Regards
> # Daniel Alsén    | www.mindbash.com #
> # [EMAIL PROTECTED]  | +46 704 86 14 92 #
> # ICQ: 63006462   | +46 8 694 82 22  #
> # PGP: http://www.mindbash.com/pgp/  #
>


--- End Message ---
--- Begin Message ---
I have worked this over in my head over the holidays and still haven´t got a
solution. Can anyone help?

I have a MySql table populated with numerical values from 0 to 10 in five
different fields. I need a function that counts all occurances of each
value, ie: 1: 12, 2: 3, 4: 74 etc...

I have worked with this code:

$num_vals = array ();
for ($i=0; $i<10; $i++)
{
$shot_count = "SELECT COUNT(*) FROM statistik WHERE shooter='$shooter_login'
AND ((shot_one = '$i') OR
(shot_two = '$i') OR (shot_three = '$i') OR
(shot_four = '$i') OR (shot_five = '$i'))";

$result = mysql_query($shot_count);
$num_vals[$i] = mysql_fetch_array($result);
}

The code works...but returns the wrong results. If i count from the database
manually there is always some occurances missing.

So, today i tried to count the values from an array instead:

$shotcount = "SELECT shot_one, shot_two, shot_three, shot_four, shot_five
FROM statistik WHERE shooter='$shooter_login'";
$results = mysql_query($shotcount);
$bam = mysql_fetch_array($results);

$count = array_count_values ($bam);

while (list($key,$value) = each($count)) {
echo "$key : $value<br>";
}

But this works even worse...it seems to stop populating the array (or
counting the values) after only a couple of rows from the db. The result
looks like:
3 : 4
5 : 2
7 : 2
9 : 2
And there should be alot more of those keys...and a couple of keys more as
well...

I would appreciate any help on this guys. I am soooo stuck :(

# Daniel Alsén    | www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   | +46 8 694 82 22  #
# PGP: http://www.mindbash.com/pgp/  #

--- End Message ---
--- Begin Message ---
Hello Everyone.

I just tried to upgrade my Apache 1.3.22 web server to us PHP 4.1.1.  I was
running PHP 4.0.6 without problems for months, but wanted to take advantage
of the bug fixes and new features.  The compile seemed to go OK, and the new
httpd runs fine.  However, I've encountered a strange bug when visitng my
web sites using Netscape 4.78.

Whenever you visit a page that uses PHP's mySQL capabilities extensively (in
my estimation, anything that has an update query, but I've only confirmed
this on a handfull of pages so it could be some other more subtle symptom),
the httpd process that handles that request gets a signal 10 or signal 11
(it switches back and fourth, but it's mostly a signal 11).  When you go to
these pages in IE or any other browser, it works fine with very few
exceptions - it has been found to sig10 or sig11 on a few requests from IE
or other versions of Netscape, but not with any regularity.  Netscape 4.78
causes it to crash every time.  It's important to not that it does not
happen with every request or on every site - most pages operate fine, even
with updates.  It just seems that the few that do cause it to crash have
several selects/updates on one page.

Has anyone else experienced this problem?

Here's a list of the versions of things that I'm running:

Apache 1.3.22
PHP 4.1.1 (4.0.6 works fine)
mySQL 3.23.46
mod_ssl 2.8.5
OpenSSL 0.9.6a

Any help would be greatly appreciated.

Thanks.

Tim


--- End Message ---

Reply via email to