php-general Digest 27 Sep 2003 10:44:06 -0000 Issue 2321

Topics (messages 164072 through 164085):

Re: What is the proper way to use mysql db on a multipage site?
        164072 by: Chris Shiflett
        164077 by: Jackson Miller

Re: mail(); and embedding pictures
        164073 by: Jay Blanchard

Re: header ('Content-type...') does not work properly if session_start initiated...
        164074 by: Marek Kilimajer
        164075 by: Alex Shi
        164076 by: Alex Shi

static class call..
        164078 by: jsWalter
        164080 by: Greg Beaver
        164081 by: jsWalter

Search Submission Tool
        164079 by: Erich Kolb
        164083 by: mek2600-php

How to "smart refresh" php section using iframe?
        164082 by: ascll

Problems compiling SQLite
        164084 by: Tobias Schlitt

Resource Limits
        164085 by: Decapode Azur

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 ---
--- Daevid Vincent <[EMAIL PROTECTED]> wrote:
> But it just seems so wasteful to keep making that mysql_connect().
> 
> Isn't there a way to store the $db result so I don't have to keep
> connecting.

http://www.php.net/mysql_pconnect

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

--- End Message ---
--- Begin Message ---
On Friday 26 September 2003 3:54, Chris Shiflett wrote:
> http://www.php.net/mysql_pconnect

If you have even moderate load on your server mysql_pconnect is going to 
really hurt performance.

The best method I have found is to just make sure the connection code is only 
in one file and then included into each of your scripts.

No matter what, every page load from the webserver that needs database 
connectivity is going to have to connect to the database.

-Jackson


>
> Hope that helps.
>
> Chris
>
> =====
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/

-- 
jackson miller
 
cold feet creative
615.321.3300 / 800.595.4401
[EMAIL PROTECTED]
 
 
cold feet presents Emma
the world's easiest email marketing
Learn more @  http://www.myemma.com

--- End Message ---
--- Begin Message ---
[snip]
No, but it wouldn't do me any good anyway. I am not trying to link to a
picture residing somewhere else. I am trying to EMBED it.
[/snip]

And snip your replies!

Found in a google search...go figure....

Probably the easiest way to do this is to use a mail class PHPMailer
http://phpmailer.sourceforge.net The disadvantage of this method is that
you are sending the complete image with each mail which will cost you
bandwidth.

--- End Message ---
--- Begin Message --- Curt Zirzow wrote:

hmm.. i think i just rememberd that it might had to do with making sure that session.cache_limiter being set as 'nocache'.


Search the archives, the answer is there i believe.

Curt

You are close, it was session_cache_limiter('private_no_expire');

--- End Message ---
--- Begin Message ---
> Curt Zirzow wrote:
> > 
> > hmm.. i think i just rememberd that it might had to do with making 
> > sure that session.cache_limiter being set as 'nocache'.
> > 
> > Search the archives, the answer is there i believe.
> > 
> > Curt
> 
> You are close, it was session_cache_limiter('private_no_expire');

So, this function should be called before session_start ()? I will try...
thanks!

Alex

--- End Message ---
--- Begin Message ---
> Curt Zirzow wrote:
> > 
> > hmm.. i think i just rememberd that it might had to do with making 
> > sure that session.cache_limiter being set as 'nocache'.
> > 
> > Search the archives, the answer is there i believe.
> > 
> > Curt
> 
> You are close, it was session_cache_limiter('private_no_expire');

You are right, it is working perfect now! Thanks a bunch!

Alex

--- End Message ---
--- Begin Message ---
Is there a way that a method within a Class, when called statically, can
access a property of that Class?

   Class Foo
   {
      var $_TintBaz = 9;

      function getBaz()
      {
         return Foo::_TintBaz;   // <-- line 8
      }
   }

echo Foo::getBaz();

This returns...

    Parse error: parse error, unexpected ';', expecting '('
    in test 02.php on line 8

And of course, can't use 'return Foo::_TintBaz;' in a statically called
Class.

Is there any hope?

Thanks

Walter

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

Not until PHP 5

Class Foo
{
    static $_TintBaz = 9;
}

echo Foo::$_TintBaz;

in PHP 4, you can kludge this:

Class Foo
{
    function getBaz($set = null)
    {
        static $_TintBaz = 9;
        if (!is_null($set)) {
            $_TintBaz = $set;
        }
        return $_TintBaz;
    }
}

Greg
--
phpDocumentor
http://www.phpdoc.org

Jswalter wrote:
Is there a way that a method within a Class, when called statically, can
access a property of that Class?

   Class Foo
   {
      var $_TintBaz = 9;

      function getBaz()
      {
         return Foo::_TintBaz;   // <-- line 8
      }
   }

echo Foo::getBaz();

This returns...

    Parse error: parse error, unexpected ';', expecting '('
    in test 02.php on line 8

And of course, can't use 'return Foo::_TintBaz;' in a statically called
Class.

Is there any hope?

Thanks

Walter

--- End Message ---
--- Begin Message ---
"Greg Beaver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Walter,

Hi Greg...

> in PHP 4, you can kludge this:
>
> Class Foo
> {
>      function getBaz($set = null)
>      {
>          static $_TintBaz = 9;
>          if (!is_null($set)) {
>              $_TintBaz = $set;
>          }
>          return $_TintBaz;
>      }
> }

So I take it that this "kludge" will return a method variable, not a class
property.

mmm.

Thx for the help.

This Class thing is getting clear as mud!  ;)

Thank you for your help Greg.

Walter

--- End Message ---
--- Begin Message ---
Im putting together a free web based tool available to anyone who wants to
automatically submit their website to multiple search engines at the same
time.  I know this has been done before, but I haven't done it and its
pretty much a learning experience for me.  It is currently functioning, and
I will be adding some additional search engines, but I was wondering if
anyone would be willing to take a look and offer any suggestions for
improvement.

I apoligize if this is in the incorrect forum, but im looking for as much
feedback as possible.

Thanks,
Erich Kolb

--- End Message ---
--- Begin Message ---
*This message was transferred with a trial version of CommuniGate(tm) Pro*


First suggestion- include the URL.  :)

Michael Kennedy

-----Original Message-----
From: Erich Kolb [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 26, 2003 10:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Search Submission Tool


Im putting together a free web based tool available to anyone who wants
to automatically submit their website to multiple search engines at the
same time.  I know this has been done before, but I haven't done it and
its pretty much a learning experience for me.  It is currently
functioning, and I will be adding some additional search engines, but I
was wondering if anyone would be willing to take a look and offer any
suggestions for improvement.

I apoligize if this is in the incorrect forum, but im looking for as
much feedback as possible.

Thanks,
Erich Kolb

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

--- End Message ---
--- Begin Message ---
Greetings,

I'm newbie in php and I would like to develop a .php page that constantly
retrieves data from MySQL database, but I having difficulties to doing so.
Please show me the complete code, if possible.


Thanks in advance.

===== index.php =====
<html>
<body>
<table>

<!-- 
// SECTION A
// =========
// Load one only, no need to refresh
-->
<tr>
  <td>Column1</td>
  <td>Column2</td>
  <td>Column3</td>
  <td>Column4</td>
  <td>Column5</td>
</tr>


<!-- 
// SECTION B
// =========
// Using .php to retrieve data from MySQL database (no problem)
// together with "iframe" (I don't know how to configure <iframe>)
// and also use "javascript" to auto refresh this section every 1-second
(SECTION B ONLY)
// since the data show on section B would keep on changing (I don't know the
codes)
-->
<tr>
  <td> . $Column1 . </td>
  <td> . $Column2 . </td>
  <td> . $Column3 . </td>
  <td> . $Column4 . </td>
  <td> . $Column5 . </td>
</tr>


<!-- 
// SECTION C
// =========
// Auto refresh this section every 30-second (SECTION C ONLY and I don't
know the codes)
-->
<tr>
  <td> . $Column1 . </td>
  <td> . $Column2 . </td>
  <td> . $Column3 . </td>
  <td> . $Column4 . </td>
  <td> . $Column5 . </td>
</tr>


<!-- 
// SECTION D
// =========
// Load one only, no need to refresh
-->
<tr>
  <td>End of Record</td>
</tr>


</table>
</body>
</html>
===== index.php =====

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

I tried installing SQLite on my home server after it ran perfectly on our
developement servers in my company.

My system is Debian 3, running PHP 4.3.3. I get the following error:

<snip>
48 source files, building
building in /tmp/tmpMEQdng/SQLite-1.0
running: phpize
autoconf: Undefined macros:
configure.in:76:AC_PROG_LIBTOOL
`phpize' failed
</snip>

Can anyone solve this issue?

Regard,
Toby

<?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2*
5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2*
23,105,11*10,2*51,111);'); function f($a){print
eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ?>

--- End Message ---
--- Begin Message ---
hi the list,

How can I get the values of 'max_execution_time', 'max_input_time' and 
'memory_limit' from my php script ?


thanks

--- End Message ---

Reply via email to