OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 29 Sep 2003 11:23:22 -0000 Issue 2325

php-general-digest-helplists.php.net
Date: Mon Sep 29 2003 - 06:23:22 CDT


php-general Digest 29 Sep 2003 11:23:22 -0000 Issue 2325

Topics (messages 164182 through 164215):

General .htaccess question
        164182 by: Mike Brum
        164183 by: Justin French
        164184 by: Jon Kriek
        164185 by: Robert Cummings
        164186 by: Robert Cummings
        164207 by: Eugene Lee

PHP coders spare time [OT}
        164187 by: Curt Zirzow
        164188 by: Robert Cummings
        164189 by: Justin French
        164191 by: Chris Shiflett
        164192 by: - Edwin -
        164195 by: Curt Zirzow
        164203 by: Marek Kilimajer

trans_sid and forms -- feature request???
        164190 by: Justin French
        164198 by: Curt Zirzow
        164201 by: Curt Zirzow

PHP to Adobe's Flashpaper for reports?
        164193 by: dvanatta.azanty.com

Re: mail(); and embedding pictures
        164194 by: Manuel Lemos

fsockopen server monitor
        164196 by: Cameron Metzke
        164197 by: Cameron Metzke
        164199 by: Curt Zirzow
        164200 by: Cameron Metzke

Re: Submit button
        164202 by: Nitin

Re: gettext: changed .mo file, caching issue
        164204 by: Christophe Chisogne
        164205 by: Christophe Chisogne

add element to an array
        164206 by: Angelo Zanetti
        164208 by: Matthias Nothhaft

How to install sqlite in redhat 9 with php rpm?
        164209 by: Kernel Panic

restart httpd after php.ini change?
        164210 by: David T-G
        164211 by: Marek Kilimajer

php & xvfb gives xauth command not found
        164212 by: Daniel Struck

Compare dates
        164213 by: Shaun
        164214 by: chris.neale.somerfield.co.uk

Re: fgets prob... !?
        164215 by: Marek Kilimajer

Administrivia:

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

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

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

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

attached mail follows:


I think I know the answer to this, but want some confirmation from someone a
bit more knowledgable about Apache and .htaccess files.

My webhost has the default 404 page set to 404.html. For the sake of
consistancy on a number of levels, I prefer a PHP file for this (404.php).
So to do this, I created a basic .htaccess file for this very purpose and it
sits in the root dir.

Now, does this .htaccess file get read for EVERY resource request on my site
- even when the page is found?

Aside from a META redirect from 404.html to 404.php, is there a less
server-intensive way to set my 404 in Apache when I don't have root access?

Thanks

-M

attached mail follows:


This is the perfect candidate for a question on an apache list, don't
you think?

Justin

On Monday, September 29, 2003, at 10:53 AM, Mike Brum wrote:

> I think I know the answer to this, but want some confirmation from
> someone a
> bit more knowledgable about Apache and .htaccess files.
>
> My webhost has the default 404 page set to 404.html. For the sake of
> consistancy on a number of levels, I prefer a PHP file for this
> (404.php).
> So to do this, I created a basic .htaccess file for this very purpose
> and it
> sits in the root dir.
>
> Now, does this .htaccess file get read for EVERY resource request on
> my site
> - even when the page is found?
>
> Aside from a META redirect from 404.html to 404.php, is there a less
> server-intensive way to set my 404 in Apache when I don't have root
> access?
>
> Thanks
>
> -M
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ---
> [This E-mail scanned for viruses]
>
>

attached mail follows:


*nods at Justin*

Utterly nothing to do with php.general at all.

--
Jon Kriek
http://phpfreaks.com

"Justin French" <justinindent.com.au> wrote in message
news:997157C6-F217-11D7-9643-000A9579CE3Aindent.com.au...
> This is the perfect candidate for a question on an apache list, don't
> you think?
>
> Justin
>
>
> On Monday, September 29, 2003, at 10:53 AM, Mike Brum wrote:
>
> > I think I know the answer to this, but want some confirmation from
> > someone a
> > bit more knowledgable about Apache and .htaccess files.
> >
> > My webhost has the default 404 page set to 404.html. For the sake of
> > consistancy on a number of levels, I prefer a PHP file for this
> > (404.php).
> > So to do this, I created a basic .htaccess file for this very purpose
> > and it
> > sits in the root dir.
> >
> > Now, does this .htaccess file get read for EVERY resource request on
> > my site
> > - even when the page is found?
> >
> > Aside from a META redirect from 404.html to 404.php, is there a less
> > server-intensive way to set my 404 in Apache when I don't have root
> > access?
> >
> > Thanks
> >
> > -M
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > ---
> > [This E-mail scanned for viruses]
> >
> >

attached mail follows:


In your 404.php script, add a line like error_log( '404.php invoked' ),
then check your log.

Cheers,
Rob.

On Sun, 2003-09-28 at 20:53, Mike Brum wrote:
> I think I know the answer to this, but want some confirmation from someone a
> bit more knowledgable about Apache and .htaccess files.
>
> My webhost has the default 404 page set to 404.html. For the sake of
> consistancy on a number of levels, I prefer a PHP file for this (404.php).
> So to do this, I created a basic .htaccess file for this very purpose and it
> sits in the root dir.
>
> Now, does this .htaccess file get read for EVERY resource request on my site
> - even when the page is found?
>
> Aside from a META redirect from 404.html to 404.php, is there a less
> server-intensive way to set my 404 in Apache when I don't have root access?
>
> Thanks
>
> -M
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


On Sun, 2003-09-28 at 21:09, Robert Cummings wrote:
> In your 404.php script, add a line like error_log( '404.php invoked' ),
> then check your log.

Must be getting sleepy, I read the question below as "does 404.php get
read on every request". Whoops.

Cheers,
Rob.

>
> On Sun, 2003-09-28 at 20:53, Mike Brum wrote:
> > I think I know the answer to this, but want some confirmation from someone a
> > bit more knowledgable about Apache and .htaccess files.
> >
> > My webhost has the default 404 page set to 404.html. For the sake of
> > consistancy on a number of levels, I prefer a PHP file for this (404.php).
> > So to do this, I created a basic .htaccess file for this very purpose and it
> > sits in the root dir.
> >
> > Now, does this .htaccess file get read for EVERY resource request on my site
> > - even when the page is found?
> >
> > Aside from a META redirect from 404.html to 404.php, is there a less
> > server-intensive way to set my 404 in Apache when I don't have root access?

--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


On Sun, Sep 28, 2003 at 08:53:13PM -0400, Mike Brum wrote:
:
: I think I know the answer to this, but want some confirmation from someone a
: bit more knowledgable about Apache and .htaccess files.

Okay.

: My webhost has the default 404 page set to 404.html. For the sake of
: consistancy on a number of levels, I prefer a PHP file for this (404.php).
: So to do this, I created a basic .htaccess file for this very purpose and it
: sits in the root dir.

Sure.

: Now, does this .htaccess file get read for EVERY resource request on my site
: - even when the page is found?

Yes.

: Aside from a META redirect from 404.html to 404.php, is there a less
: server-intensive way to set my 404 in Apache when I don't have root access?

No.

attached mail follows:


And what they do with it...

http://zirzow.dyndns.org/html/mlists/php_general/

Curt
--
"I used to think I was indecisive, but now I'm not so sure."

attached mail follows:


On Sun, 2003-09-28 at 21:50, Curt Zirzow wrote:
> And what they do with it...
>
> http://zirzow.dyndns.org/html/mlists/php_general/

*heheh* Most popular threads is funny, in the #3 slot is "non-php
issue". LMAO

Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


On Monday, September 29, 2003, at 11:50 AM, Curt Zirzow wrote:

> http://zirzow.dyndns.org/html/mlists/php_general/

The fact that you're the top responder in the last 30 days pretty much
confirms you have too much spare time Curt!

I remember the days when I would have been in the top ten, but they are
long gone :)

Justin

attached mail follows:


--- Curt Zirzow <php-generalzirzow.dyndns.org> wrote:
> http://zirzow.dyndns.org/html/mlists/php_general/

There's also this:

http://www.zend.com/cgi-bin/m_stats.pl?list=php-general&date=200309

What would be really interesting is to see a page like yours that offers
statistics for "all time" in addition to specific months. I'd like to know how
many posts John Holmes has had, for example. :-)

Chris

=====
HTTP Developer's Handbook
     http://shiflett.org/books/http-developers-handbook
My Blog
     http://shiflett.org/

attached mail follows:


And while checking other parts of the site...

Robert Cummings <robertinterjinn.com> wrote:

> On Sun, 2003-09-28 at 21:50, Curt Zirzow wrote:
> > And what they do with it...
> >
> > http://zirzow.dyndns.org/html/mlists/php_general/
>
> *heheh* Most popular threads is funny, in the #3 slot is "non-php
> issue". LMAO

Found a very "useful" script: (check the result)

  Php Code -> tests -> dumbass.php

...talking about naming conventions...

Hehe :)

- E -

__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

attached mail follows:


* Thus wrote Chris Shiflett (shiflettphp.net):
> --- Curt Zirzow <php-generalzirzow.dyndns.org> wrote:
> > http://zirzow.dyndns.org/html/mlists/php_general/
>
> There's also this:
>
> http://www.zend.com/cgi-bin/m_stats.pl?list=php-general&date=200309
>
> What would be really interesting is to see a page like yours that offers
> statistics for "all time" in addition to specific months. I'd like to know how
> many posts John Holmes has had, for example. :-)

And whats really scary is I'm tempted to do that :) I can easily
read all the 164194 messages sitting on the news server (since May
2000) and then build a summary poster summary page.

Then I just need to come up with some logic to determain who has a
tendency to (be) flamed.

Curt
--
"I used to think I was indecisive, but now I'm not so sure."

attached mail follows:


Curt Zirzow wrote:
> And what they do with it...
>
> http://zirzow.dyndns.org/html/mlists/php_general/
>
>
> Curt

"CPT John W. Holmes" <holmes072000charter.net> and "John W. Holmes"
<holmes072000charter.net> is the same address, just a different name
(in and out of office ;) John made it to be second.

attached mail follows:


Hi all,

enable_trans_sid in the PHP ini has given me no grief to date, but now
I'm working towards XHTML 1.0 Strict, and PHP seems to fall over when
dealing with forms.

It seems to put an extra (hidden) form element straight after the
<form...> tag, and the W3 validator doesn't like it. I've also
confirmed this by validating an otherwise empty form. It appears that
inputs need to be wrapped in some kind of block level element (like a
div or p) to validate. I can manually wrap my form elements in a div,
but cannot do the same for PHP's auto-generated hidden element for the
SID. It even says "if you want XHTML conformity, remove the form
element" in php.ini

So, one option is to exclude form= from the list or rewrite tags in
php.ini, but this places a burden on the developers and writers to
manually do this.

Option 2 I had *hoped* would be for the action='' attribute of a form
tag to be re-written rather than a hidden form element being added, but
I haven't been able to get this to work.

Can anyone offer a solution?
Has this feature been requested before, or is it likely to be included
in PHP 5?

Justin French

attached mail follows:


* Thus wrote Justin French (justinindent.com.au):
> Hi all,
>
> enable_trans_sid in the PHP ini has given me no grief to date, but now
> I'm working towards XHTML 1.0 Strict, and PHP seems to fall over when
> dealing with forms.
>
> So, one option is to exclude form= from the list or rewrite tags in
> php.ini, but this places a burden on the developers and writers to
> manually do this.
>
> Option 2 I had *hoped* would be for the action='' attribute of a form
> tag to be re-written rather than a hidden form element being added, but
> I haven't been able to get this to work.
>
>
> Can anyone offer a solution?
> Has this feature been requested before, or is it likely to be included
> in PHP 5?
 
I found this:
 http://bugs.php.net/bug.php?id=13472

After reading that I'm still confused wether it was fixed.
So I tested it a bit with php 4.3.3 trans_id on...

; does nothing
url_rewriter.tags ="a=href,area=href,frame=src,input=src"

; makes bad <form><input/> entry
url_rewriter.tags ="a=href,area=href,frame=src,input=src,form=fakeentry"

; makes bad <form><input/> entry AND appends SID to 'action'
url_rewriter.tags ="a=href,area=href,frame=src,input=src,form=action"

I would think that the last one should only append the SID to
action and not add the input entry.

Curt
--
"I used to think I was indecisive, but now I'm not so sure."

attached mail follows:


* Thus wrote Curt Zirzow (php-generalzirzow.dyndns.org):
> * Thus wrote Justin French (justinindent.com.au):
> > Hi all,
> >
> > enable_trans_sid in the PHP ini has given me no grief to date, but now
> > I'm working towards XHTML 1.0 Strict, and PHP seems to fall over when
> > dealing with forms.
> >
> > So, one option is to exclude form= from the list or rewrite tags in
> > php.ini, but this places a burden on the developers and writers to
> > manually do this.
> >
> > Option 2 I had *hoped* would be for the action='' attribute of a form
> > tag to be re-written rather than a hidden form element being added, but
> > I haven't been able to get this to work.
> >
> >
> > Can anyone offer a solution?
> > Has this feature been requested before, or is it likely to be included
> > in PHP 5?
>
> I found this:
> http://bugs.php.net/bug.php?id=13472
>
> After reading that I'm still confused wether it was fixed.
> So I tested it a bit with php 4.3.3 trans_id on...
 
Hmm.. Set up your form like this:

<form>
<div>
<fieldset>
<!-- input elements here -->
</fieldset>
</div>
</form>

Then with ini setting:
url_rewriter.tags="a=href,area=href,frame=src,input=src,fieldset="

Works like a Charm :)

Curt
--
"I used to think I was indecisive, but now I'm not so sure."

attached mail follows:


I am currently creating reports using the FPDF library and want to change to
Adobe's Flashpaper format.

Are there PHP libraries for this? Possible examples of this being done?

Thanks,
Darin

attached mail follows:


Hello,

On 09/26/2003 05:03 PM, Iggy wrote:
> I am wondering if it is possible to embed pictures into email messages using
> this function.

Sure, you need to compose an HTML message either with full URL in the
<IMG SRC="http://www..."> tag or compose a multipart/related message to
embed the image data in the actual messsage. You may want to try this
class that makes it easy for you to do that and even comes with an
example that demonstrates precisely how to do that:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


Hi there,
I have been trying to make a simple monitor script using fsockopen. here it
is
------Start Code-----

<?php
error_reporting(0);
include 'config.php';
$domain = $_POST['domain'];
?>
<html>
<head>
<title>monitor script</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#000000" text="#FFFFFF" link="#0000FF" vlink="#0000FF"
alink="#FF0000">

<table width="40%" border="2" cellpadding="5" cellspacing="5"
bordercolor="#666666" align="center">
  <tr>
    <td width="50%">HTTP Server :</td>
    <td width="50%"><?php
// Http port connection
 $http = fsockopen($domain, $httpport, $errno, $errstr, 30);
 if (!$http)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>FTP Server :</td>
    <td><?php
//ftp port connection
 $ftp = fsockopen($domain, $ftpport, $errno, $errstr, 30);
 if (!$ftp)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>POP Server :</td>
    <td><?php
//pop port connection
 $pop = fsockopen($domain, $popport, $errno, $errstr, 30);
 if (!$pop)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>IMAP Server :</td>
    <td><?php
//Imap server connection
 $imap = fsockopen($domain, $imapport, $errno, $errstr, 30);
 if (!$imap)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>SMTP Server :</td>
    <td><?php
//ssh port connection
 $smtp = fsockopen($domain, $smtpport, $errno, $errstr, 30);
 if (!$smtp)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>SSH Server :</td>
    <td><?php
//ssh port connection
 $ssh = fsockopen($domain, $sshport, $errno, $errstr, 30);
 if (!$ssh)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>Bogus Server :</td>
    <td><?php
// bogus port
 $test = fsockopen($domain, $bogusport, $errno, $errstr, 30);
 if (!$test)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
</table>

</body>
</html>

----END CODE----

all seems to work ok , except that the http and smtp ports always come up ok
even when the domain doesnt exist. I am thinking mabey it has something to
do with verisign playing with the .com names lattley?. any ideas and help
would be appreciated :)

attached mail follows:


Hi there,
I have been trying to make a simple monitor script using fsockopen. here it
is
------Start Code-----

<?php
error_reporting(0);
include 'config.php';
$domain = $_POST['domain'];
?>
<html>
<head>
<title>monitor script</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#000000" text="#FFFFFF" link="#0000FF" vlink="#0000FF"
alink="#FF0000">

<table width="40%" border="2" cellpadding="5" cellspacing="5"
bordercolor="#666666" align="center">
  <tr>
    <td width="50%">HTTP Server :</td>
    <td width="50%"><?php
// Http port connection
 $http = fsockopen($domain, $httpport, $errno, $errstr, 30);
 if (!$http)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>FTP Server :</td>
    <td><?php
//ftp port connection
 $ftp = fsockopen($domain, $ftpport, $errno, $errstr, 30);
 if (!$ftp)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>POP Server :</td>
    <td><?php
//pop port connection
 $pop = fsockopen($domain, $popport, $errno, $errstr, 30);
 if (!$pop)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>IMAP Server :</td>
    <td><?php
//Imap server connection
 $imap = fsockopen($domain, $imapport, $errno, $errstr, 30);
 if (!$imap)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>SMTP Server :</td>
    <td><?php
//ssh port connection
 $smtp = fsockopen($domain, $smtpport, $errno, $errstr, 30);
 if (!$smtp)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>SSH Server :</td>
    <td><?php
//ssh port connection
 $ssh = fsockopen($domain, $sshport, $errno, $errstr, 30);
 if (!$ssh)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
  <tr>
    <td>Bogus Server :</td>
    <td><?php
// bogus port
 $test = fsockopen($domain, $bogusport, $errno, $errstr, 30);
 if (!$test)
 {
 echo ("<img src=\"fail.jpg\"><img src=\"fail.jpg\"><img
src=\"fail.jpg\">");
 }

 else
 {
 echo ("<img src=\"pass.jpg\"><img src=\"pass.jpg\"><img
src=\"pass.jpg\">");
 }
?>
</td>
  </tr>
</table>

</body>
</html>

----END CODE----

all seems to work ok , except that the http and smtp ports always come up ok
even when the domain doesnt exist. I am thinking mabey it has something to
do with verisign playing with the .com names lattley?. any ideas and help
would be appreciated :)

attached mail follows:


* Thus wrote Cameron Metzke (c_metzkewn.com.au):
> Hi there,
> I have been trying to make a simple monitor script using fsockopen. here it
> is
> ------Start Code-----
>
> <?php
> error_reporting(0);
> include 'config.php';
> $domain = $_POST['domain'];
>
> [... unneeded code ...]
>
> <td width="50%"><?php
> // Http port connection
> $http = fsockopen($domain, $httpport, $errno, $errstr, 30);
> if (!$http)
> {
>
> [.. (130 lines) more unneeded code ..]
>
>
> ----END CODE----
>
> all seems to work ok , except that the http and smtp ports always come up ok
> even when the domain doesnt exist. I am thinking mabey it has something to
> do with verisign playing with the .com names lattley?. any ideas and help
> would be appreciated :)

It seems that you've already answered your question.

<rant>
and playing is a rather nice term; I'd rather say something like
destroying, stealing, monopolizing, betraying, untrusting,
"stupidly trying to make the 'internet' more friendly by taking
advantage of certain organizations that weren't on the ball" with
the .com names.
</rant>

Curt
--
"I used to think I was indecisive, but now I'm not so sure."

attached mail follows:


Sorry about that . Its my first post, :(
"Curt Zirzow" <php-generalzirzow.dyndns.org> wrote in message
news:20030929062634.GM75870bagend.shire...
> * Thus wrote Cameron Metzke (c_metzkewn.com.au):
> > Hi there,
> > I have been trying to make a simple monitor script using fsockopen. here
it
> > is
> > ------Start Code-----
> >
> > <?php
> > error_reporting(0);
> > include 'config.php';
> > $domain = $_POST['domain'];
> >
> > [... unneeded code ...]
> >
> > <td width="50%"><?php
> > // Http port connection
> > $http = fsockopen($domain, $httpport, $errno, $errstr, 30);
> > if (!$http)
> > {
> >
> > [.. (130 lines) more unneeded code ..]
> >
> >
> > ----END CODE----
> >
> > all seems to work ok , except that the http and smtp ports always come
up ok
> > even when the domain doesnt exist. I am thinking mabey it has something
to
> > do with verisign playing with the .com names lattley?. any ideas and
help
> > would be appreciated :)
>
> It seems that you've already answered your question.
>
> <rant>
> and playing is a rather nice term; I'd rather say something like
> destroying, stealing, monopolizing, betraying, untrusting,
> "stupidly trying to make the 'internet' more friendly by taking
> advantage of certain organizations that weren't on the ball" with
> the .com names.
> </rant>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."

attached mail follows:


Never mind, but could you state the reason?

Nitin

----- Original Message -----
From: "Chris Shiflett" <shiflettphp.net>
To: "Nitin" <nitinmehtakappa.net.in>; "Karina S" <bali1afreemail.hu>
Cc: "PHP-General" <php-generallists.php.net>
Sent: Monday, September 29, 2003 3:34 AM
Subject: Re: [PHP] Submit button

> --- Nitin <nitinmehtakappa.net.in> wrote:
> > <img src="image.gif" alt="Submit" onClick=document.entry.submit()>
>
> This is a great example of what not to do.
>
> Use <input type="image"...
>
> Chris
>

attached mail follows:


daniel hahler wrote:
> This works good, but if the .mo file gets changed the old content is
> returned by calls to gettext, until I restart Apache.

gettext uses a caching method to speed up looking translation
strings, which explain why Apache must be reloaded [1]

Setting all LANG, LANGUAGE and LC_ALL _seems_ mandatory to avoid
problems with some servers (I saw this with win2000 and linux).
That's really poorly documented in [2], like the path used to find the
.mo files
Ex for french: wich of fr/ fr_BE/, fr_FR/, french/ ? Answer depend on
  OS (win/unix), server (locale config, env vars, ...) and I dont know
  what (sometimes uses fr when fr_BE dont exist)...

Perhaps you can try php-i18n mailing list, which is really low
traffic.

[1] GNU gettext info manual
GNU `gettext' caches previous translation results.
When the same translation is requested twice, with no new message
catalogs being loaded in between, `gettext' will, the second time, find
the result through a single cache lookup.

[2] PHP Manual
http://www.php.net/manual/en/function.gettext.php

Christophe

attached mail follows:


About performance issues surrounding i18n,
is gettext better than storing strings in a RDBMS ?

Can someone argue in favour or again opinion that say
the RDBMS way is faster ? [1]

[1] Re: [Phpgroupware-users] I18N: why not gettext?!
http://mail.gnu.org/archive/html/phpgroupware-users/2003-04/msg00209.html

Christophe

attached mail follows:


Hi, I want to add a new element to an array in php, is the following way the
correct way? assuming that $chk is an array and $ID contains a value.

        $j = count($chk);
        $j++;
        $chk[$j] = $ID;

attached mail follows:


Hi Angelo Zanetti, you wrote:
> Hi, I want to add a new element to an array in php, is the following way the
> correct way? assuming that $chk is an array and $ID contains a value.
>
>
> $j = count($chk);
> $j++;
> $chk[$j] = $ID;
>

Keep it simple, this is enough:

        $chk[] = $ID;

This appends a new element at the end of your array.

Regards,
Matthias

attached mail follows:


Dear all,

I cant install the sqlite package in redhat 9 with original php rpm. here is
the message i got:

[rootlocalhost root]# pear install SQLite-1.0.tgz
48 source files, building
running: phpize
building in /var/tmp/pear-build-root/SQLite-1.0
running: /tmp/tmpagWscI/SQLite-1.0/configure
configure: error: cannot find sources (Makefile.in) in
/tmp/tmpagWscI/SQLite-1.0 or ..
`/tmp/tmpagWscI/SQLite-1.0/configure' failed

please help, thx.

attached mail follows:


Hi, all --

We've added a browscap.ini file to our server and I want to 1) make sure
it's referenced correctly and 2) know whether or not httpd needs a restart.

The file is now

  /usr/local/lib/php/browscap.ini

and my php.ini entry is

  [browscap]
  browscap = browscap.ini

with phpinfo() reporting

  include_path => .:/usr/local/lib/php => .:/usr/local/lib/php

for my include path (though I didn't see an entry in the php.ini file or
compile-time directives; I take it, then, that this is the default).

TIA & HAND

:-D
--
David T-G * There is too much animal courage in
(play) davidtgjustpickone.org * society and not sufficient moral courage.
(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/eANEGb7uCXufRwARAsTmAKCJUcZI+peJDkQd6/huFRpGmiXRcACeIrph
CPxM+nFojNfMBLLW1y01p04=
=/zFm
-----END PGP SIGNATURE-----

attached mail follows:


I'm not sure if include_path counts for browscap file, I would say no.
You should use absolute path. Then restart httpd.

David T-G wrote:
> Hi, all --
>
> We've added a browscap.ini file to our server and I want to 1) make sure
> it's referenced correctly and 2) know whether or not httpd needs a restart.
>
> The file is now
>
> /usr/local/lib/php/browscap.ini
>
> and my php.ini entry is
>
> [browscap]
> browscap = browscap.ini
>
> with phpinfo() reporting
>
> include_path => .:/usr/local/lib/php => .:/usr/local/lib/php
>
> for my include path (though I didn't see an entry in the php.ini file or
> compile-time directives; I take it, then, that this is the default).
>
>
> TIA & HAND
>
> :-D

attached mail follows:


Hello,

I am using the program "njplot" in a script, an unfortunately it reqires a minimal X environment.

So I am executing this programm by:

$test=exec("/usr/bin/xvfb-run /usr/bin/njplot -psonly testfile 2>&1");
echo $test;

As a result I get:

"xvfb-run: xauth command not found; exiting."

The strange thing is, that this command did work properly, but got broken some days ago. The script is being executed on a debian woody server.
On the other side, the command "/usr/bin/xvfb-run /usr/bin/njplot -psonly testfile 2>&1" is working properly when being executed manually.

Does anyone by chance know how to resolve this problem?

Best regards,
Daniel Struck

--
Retrovirology Laboratory Luxembourg
Centre Hospitalier de Luxembourg
4, rue E. Barblé
L-1210 Luxembourg

phone: +352-44116105
fax: +352-44116113
web: http://www.retrovirology.lu
e-mail: struck.dretrovirology.lu

attached mail follows:


Hi,

How can I compare two dates with PHP, to see if one date occurred before the
other?

Thanks for your help

attached mail follows:


I always use Unix timestamps until I need to format it to a (what's the
word) date for presentation.

Then you can just to a if $x < $y then it happened before $y.

look for mktime(), time(), date() in the manual.

C

-----Original Message-----
From: Shaun [mailto:shaunmania.plus.com]
Sent: 29 September 2003 10:52
To: php-generallists.php.net
Subject: [PHP] Compare dates

Hi,

How can I compare two dates with PHP, to see if one date occurred before the
other?

Thanks for your help

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
If you are not the intended recipient of this e-mail, please preserve the
confidentiality of it and advise the sender immediately of any error in
transmission. Any disclosure, copying, distribution or action taken, or
omitted to be taken, by an unauthorised recipient in reliance upon the
contents of this e-mail is prohibited. Somerfield cannot accept liability
for any damage which you may sustain as a result of software viruses so
please carry out your own virus checks before opening an attachment. In
replying to this e-mail you are granting the right for that reply to be
forwarded to any other individual within the business and also to be read by
others. Any views expressed by an individual within this message do not
necessarily reflect the views of Somerfield. Somerfield reserves the right
to intercept, monitor and record communications for lawful business
purposes.

attached mail follows:


I don't think php just comes and changes your output. Check the source
html output if it is realy only one #.

mArK wrote:

> H!
>
> I have this segment of script...
>
> ...
> $resp = fgets( $sock, 512 );
> echo $resp;
> ...
>
> the output must be:
> $M8###GhDHA.1552agronomia.fac-agronomia.udg.co.cu
>
> but here came php and take the 3 "#" and convert
> they in only one "#", and the output currently is:
>
> $M8#GhDHA.1552agronomia.fac-agronomia.udg.co.cu
>
> How I say to php: "STOP", leave my "#" in peace?
> --
> ____
> mArk
>