Re: [PHP] new break tags

2001-07-01 Thread Christian Reiniger

On Friday 29 June 2001 17:27, bill wrote:

 $breaks=preg_match_all(/br\s+br/i, $text, $parts)

 and this

 preg_replace(/br\s+br/i,/PP class=\doserif\,$text)


 Now that PHP 4.0.5 has changed the nl2br() function, it no longer
 replaces new lines with:

 br

 but instead with the new XHTML compliant break tags:

 br /

 I tried just substituting the new tag into the above regular
 expressions to no avail.  Any ideas?

Lemme guess, you tried

$breaks=preg_match_all(/br/\s+br//i, $text, $parts)

right? As / is the pattern delimiter this of course won't work. 
Solution: Escape it:
$breaks=preg_match_all(/br\/\s+br\//i, $text, $parts)
Improved Solution: Make it more flexible:
$breaks=preg_match_all(/br\s*\/?\s+br\s*\/?/i, $text, $parts)
That should do the job

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

void sleep(){for(long int sheep=0;!asleep();sheep++);}

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




Re: [PHP] Printing a string issue

2001-07-01 Thread Christian Reiniger

On Friday 29 June 2001 23:09, Craig Simon wrote:

 from html it would look like this

 pa href=wtai://wp/mc;1-555-555-1212Asst/a/p

 So I am trying to figure out how to write this.  I have a statement
 like this:

 print (pa
 href=\wtai://wp/mc;$row[officenum]\Office/a/p);

 Although I can't get this to parse!

Use the string concatenation operator '.' :
print (pa
 href=\wtai://wp/mc; . $row[officenum] . \Office/a/p);

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

void sleep(){for(long int sheep=0;!asleep();sheep++);}

--
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] shtml includes

2001-07-01 Thread Jamie Saunders

Hi,

In my site  I use shtml extensively.  Therefore I have quite a number of
text files that serve as shtml includes.  Often these text files contain
more shtml includes.  I'm creating PHP pages and wish to use these text
files within the pages, I know how to do this easily enough by using:
include(textfile.txt);  The problem is that because a lot of these text
files contain more includes the PHP pages are passing them over, as it
cannot deal with the shtml !-- include -- tag.  Here's a brief example:

script.php:
?
include(text1.txt);
?

text1.txt:
html
!-- include file=text2.txt --
/html

What I would like to happen is for the PHP script to be able to look for the
!-- include -- tags within the text files and parse them as PHP
include(); tags.  Is there any way of achieving this?

Thanks.

Jamie Saunders



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




Re: [PHP] Pricing Advice Needed

2001-07-01 Thread Brad Hubbard

On Sun,  1 Jul 2001 03:43, [EMAIL PROTECTED] wrote:

 to make you feel better, lemme tell you that after more than 3ys w/ PHP
 I earn somewhere arround 3 ( I mean 3!) $/h in Romania
 so let me tell you more about geographic disadvantages :)

Hi Teo,

Point taken. The grass is always greener though heh?

Cheers,
Brad

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




Re: [PHP] emalloc / erealloc problem (was: help with custom session handler)

2001-07-01 Thread Delbono



I had the same problem whenever retrieving data from MSSQL using ODBC from a
NULL field.


To solve the problem I had to add a character asd default to that field.

I added a dot.

descr nvarchar  default '.'  .

(the sql sintax here is not the correct one.)




- Original Message -
From: Aral Balkan [EMAIL PROTECTED]
To: Rasmus Lerdorf [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, July 01, 2001 1:52 AM
Subject: Re: [PHP] emalloc / erealloc problem (was: help with custom session
handler)


 Well finally I am 99.9% sure that the problem is with Metabase. I've
managed
 to bring the code down to the absolute minimum to simplify things and I
can
 now state the bug clearly:

 On Pentium III 500Mhz running WinMe, Apache 1.3.19 and PHP 4.0.5, use of
 Metabase calls in custom session handler to update a MySQL database
randomly
 crash Apache with (again, randomly) errors in either PHP4TS.DLL or
 MSVCRT.DLL.

 When Apache does not crash, the code does work (I tested this with a
simple
 variable increment).

 When the Metabase session handler is replaced with one using MySQL calls,
 the problem goes away.

 Entries noticed in Apache's error.log that may be related are:
 FATAL:  emalloc():  Unable to allocate 1701082243 bytes
 FATAL:  erealloc():  Unable to allocate 369098752 bytes

 I've already written to Manuel about this and I'm sure he'll have the
 problem figured out in no time but in the meanwhile, I'm posting my code
 here so that this post may benefit others trying to do this in the future
 (and with the hope that maybe someone can discover something that *I'm*
 doing wrong that could be causing all this!)

 ?php
 /*
  metabase sesssions library

  error: makes Apache crash randomly with errors in PHP4TS.DLL and
MSVCRT.DLL
  running on WinMe with Apache 1.3.19 and PHP 4.0.5

  based on the code of Sterling Hughes (PHP Developer's Cookbook,
  pgs. 222 - 224) and Ying Zhang (PHPBuilder, Custom Session
  Handlers in PHP4,
 http://www.phpbuilder.com/columns/ying2602.php3?page=1)

  metabase by Manuel Lemos ([EMAIL PROTECTED],
  http://www.phpclasses.upperdesign.com/)

  copyright (c) 2001, aral balkan ([EMAIL PROTECTED])
   http://www.aralbalkan.com
 */

 // metabase database abstraction layer
 require_once metabase/metabase_parser.php;
 require_once metabase/metabase_manager.php;
 require_once metabase/metabase_database.php;
 require_once metabase/metabase_interface.php;

 $SESS_LIFE = get_cfg_var('session.gc_maxlifetime');

 // default life of session to an hour
 if ($SESS_LIFE == '') { $SESS_LIFE = 3600; }

 function on_session_start ($save_path, $session_name)
 {
  global $database;

  /*  db_init.php holds the values for
   $db_type, $db_user, $db_pass, $db_host
  */
  require_once('db_init.php');

  $metabase_init = array(
  Type=$db_type,
  User=$db_user,
  Password=$db_pass,
  Host=$db_host,
  IncludePath=metabase/,
  Persistent=TRUE
  );

  $metabase_error = MetabaseSetupDatabase($metabase_init, $database);

  if ($metabase_error != '') {
   die('Database setup error: '.$metabase_error);
   return false; // failure
  }

  // select database
  $previous_database_name = MetabaseSetDatabase($database, $db_name);
  return true;
 }

 function on_session_end()
 {
  // Nothing needs to be done in this function
  // since we used a persistent connection
  return true;
 }

 function on_session_read ($key)
 {
  global $database;

  $key = MetabaseGetTextFieldValue($database, $key);

  $stmt = SELECT sessionData FROM sessions;
  $stmt .=  WHERE sessionID = $key;
  $stmt .=  AND sessionExpire  . time();

  if (!($result = MetabaseQuery($database, $stmt))) {
// query failed
echo ' Main query (sql) failed.'.$e;
echo ' Error: '.MetabaseError($database).$e;
die();
  }

  $stmt_rows = MetabaseNumberOfRows($database, $result);

  if ($stmt_rows) {
   $sessionData = MetabaseFetchResult($database, $result, 0,
'sessionData');;
   return($sessionData);
  } else {
   return false;
  }
 }

 function on_session_write ($key, $val)
 {
  global $session_db, $SESS_LIFE;
  global $database;

  // convert the text value to a format suitable for use in current
database
  $expiry = time() + $SESS_LIFE;
  $key = MetabaseGetTextFieldValue($database, $key);
  $val = MetabaseGetTextFieldValue($database, $val);

  $replace_stmt = REPLACE INTO sessions (sessionID, sessionData,
 sessionExpire)
  . values($key, $val, $expiry);

  $success = MetabaseQuery($database, $replace_stmt);

  return $success;
 }

 function on_session_destroy ($key)
 {
  global $database;

  $key = MetabaseGetTextFieldValue($database, $key);
  $stmt = DELETE FROM sessions WHERE sessionID = $key;
  $success = MetabaseQuery($database, $stmt);
  return $success;
 }

 function on_session_gc ($max_lifetime)
 {
  global $database;

  $stmt = delete from sessions where sessionExpire   . time();
  $success = MetabaseQuery($database, $stmt);
  return $success;
 }

 // Set the save handlers
 

Re: [PHP] shtml includes

2001-07-01 Thread Justin French

Jamie Saunders wrote:

 What I would like to happen is for the PHP script to be able to look for the
 !-- include -- tags within the text files and parse them as PHP
 include(); tags.  Is there any way of achieving this?

It can be done with regular expressions (but i'll leave that to someone
who is GOOD at them :)
The problem is that for a php program to parse a file (so stuff) it has
to be named with a .php extension (or whatever your server is set up to
do),  so nested includes will fall over.


I'd just like to point out however that if you do this, you'll put a
long term burden and performance issue into your site.

If you grab a decent text editor, and do a search and replace accross
the whole site (decent text editors can do search and replace on a whole
directory or disk), you'll have a once-off chore, rather than giving the
server a constant chore.


example

Search and Replace
  !-- include file=

with
  ?php include('

the search and replace
  .txt --

with
  .php'); ?


so !-- include file=stuff.txt --
becomes ?php include('stuff.php'); ?

easy.  the bad bit is that you've got to then go and rename each
extension .php instead of .txt, but you are going to have this problem
with either method, due to the nested natur of your inlcude files.


how many files in total are we talking about (the includes and nested
includes, not the parent pages)?


Justin French
Creative Director
Indent.com.au

-- 
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] Time Help

2001-07-01 Thread KPortsmout

Hi,

I`m trying to get the difference between two date/times and then state how 
many days, hours and minutes there are between them. 

So I take my date and convert it into unix time. Then get the current time, 
and then subtract the two to get the current difference in unix seconds. What 
I`m having trouble doing is working out how many days hours and minutes are 
left over.

For example if I have the date/time: 2001-07-01 01:10:00
And the current date/time was: 2001-07-02 00:00:00
Then I would like to display 1 Day 1 Hour 10 Minutes.

Any one have any suggestions, this is my code so far.

$date1_formated = $DateEnd $TimeEnd;
$date1 = strtotime($date1_formated); //converts to a UNIX timestamp
$date2 = time(); //returns current UNIX timestamp
$seconds_between = $date1 - $date2;

TIA
Ade

-- 
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 Digest 1 Jul 2001 15:11:50 -0000 Issue 729

2001-07-01 Thread php-general-digest-help


php-general Digest 1 Jul 2001 15:11:50 - Issue 729

Topics (messages 55704 through 55729):

GMT Time and Setting Cookies in PHP
55704 by: Gonyou, Austin

Re: (slightly OT) the bad and the good (hosting recommentations)
55705 by: Jack Sasportas
55710 by: Justin French

Cookie ?
55706 by: Jack Sasportas
55708 by: Jon Yaggie

Re: Capturing output of shell script.
55707 by: Brad Hubbard

Re: Time out Errors?
55709 by: Aral Balkan

Fatal Execution Error
55711 by: Chris Cameron
55717 by: Aral Balkan

Page not found for MSIE in SSL mode
55712 by: Fikko Adhipranta

Ò»¸öÓòÃû6¸öÍøÕ¾(ÓòÃû×¢²á´óÓÅ»Ý)
55713 by: ÍøÂçʱ´ú Today'Network

accessing files not in www root directory.
55714 by: Sterling Anderson
55715 by: Chris Anderson
55716 by: Sterling Anderson

Re: how to determine size of gz-handler output
55718 by: Christian Reiniger

Re: new break tags
55719 by: Christian Reiniger

Re: Stopping stolen / spoofed / linked sessions
55720 by: Christian Reiniger

Re: Printing a string issue
55721 by: Christian Reiniger

shtml includes
55722 by: Jamie Saunders
55726 by: Justin French
55728 by: Gyozo Papp

Re: Pricing Advice Needed
55723 by: Brad Hubbard

Re: emalloc / erealloc problem (was: help with custom session handler)
55724 by: Delbono

Re: Uploading files
55725 by: Gyozo Papp

safe_mode behavior modification request
55727 by: Olivier PRENANT

Time Help
55729 by: KPortsmout.aol.com

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]


--



What's a good method for setting time in GMT? as in the expiration date for
cookies? I saw two functions to do this with, but I haven't been able to get
them to output anything properly. 

-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-796-9023
email: [EMAIL PROTECTED] 




It sounds like price is more important to you then quality of service etc.


John Monfort wrote:

   www.pepiedesigns.com

   PHP 4
   Perl 5
   MySQL
   ASP
   Apache
   Web Access Panel
   SSH
   and a whole lot more...

 __John Monfort_
 _+---+_
  P E P I E  D E S I G N S
www.pepiedesigns.com
 The world is waiting, are you ready?
 -+___+-

 On Fri, 29 Jun 2001, Justin French wrote:

  hi all,
 
  i'm about to change ISPs, and i'll probably be moving to a US based
  server, on Unix, with Apache, PHP4, CGI, Perl 5, MySQL, etc etc.
 
  so far the best I can find (price/service level/features) is
  experthost.com.au.  Has anyone got a bad experience with these guys, or
  a good experience with annother ISP that they can recommend?
 
 
  for what it's worth they offer a reseller package with 2-4 domains for
  US$10/month each, all the way down to 25+ for US$4.99 each / month.
  this is with 50 meg space, MySQL DB, 20 POPs, and much more.
 
 
  i don't require dial up access, just hosting.
 
 
  i'd be interested to hear of competitors to this ISP, or of any good /
  bad experiences.  I'm ony interested in Australian, US, Canada or UK ISPs.
 
 
 
  many thanks
 
  jsutin french
 
  --
  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]

--
___
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net






Jack Sasportas wrote:
 
 It sounds like price is more important to you then quality of service etc.


Not at all.  That's why I asked if any one had experience with
experthost.com, bad or good.  I do want to know about the service before
signing up.

So far almost everyone that has responded has been promoting their own
hosting service though, so I still don't know for sure what sort of
service levels they have.


Sure, price is a key factor (why pay double or tripple for a simular
service?), but end of the day, if it doesn't work, it's a waste of money.


Justin French




I wanted to do something like set the cookie for 5 minutes, then as the
user uses the system each page would refresh so to speak the timeout
always setting it back to 5 minutes as long as he was using it.
I beleive this is not really working.
Any Ideas on how I can accomplish this ??

Thanks
Here is the function I 

[PHP] Why does it take so long?

2001-07-01 Thread mati

I use PHP 4 + Apache + Win95 + MS Access (ODBC), and my scripts generate 
very long (10-15s with 15 records from DB - on localhost).

Why is it so? I have slow computer (166MHz, 32MB RAM), is it the main 
problem? Or is there also a problem with ODBC (Access) or Win? Which is the 
main reason?
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]




RE: [PHP] Time Help

2001-07-01 Thread Jeff Lewis

Here is the function I use when I am comparing differences ($now and $old
are Unix timestamps):

function datediff($now, $old)
{

  $DIS = $now - $old;   // Diff In Secs
  $secs = $DIS % 60; // modulo
  $DIS -= $secs;
  $days = floor($DIS / (24*60*60));
  $DIS -= $days * (24*60*60);
  $hours = floor($DIS / (60*60));
  $DIS -= $hours * (60*60);
  $mins = floor($DIS / 60);
  $DIS -= $mins * 60;
  $diffstr= $days Days, $hours Hours, $mins Minutes, $secs Seconds;
  return $diffstr;
}

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 11:11 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Time Help


 Hi,

 I`m trying to get the difference between two date/times and then
 state how
 many days, hours and minutes there are between them.

 So I take my date and convert it into unix time. Then get the
 current time,
 and then subtract the two to get the current difference in unix
 seconds. What
 I`m having trouble doing is working out how many days hours and
 minutes are
 left over.



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




Re: [PHP] php not run as cgi.

2001-07-01 Thread Steven Haryanto

On 01/07/2001 02:49, Jack wrote:
hi everyone,
  Does anyone know the best way to secure php source code so it is not
group/world readable?
I can read other users' php source code by writing a simple php script.
I do not prefer to run php as cgi because all user's php file need to
add the header
#/usr/bin/php again.

there are two patches that i know, one for suexec and one for cgiwrap,
that allows you to run php scripts as cgi without having to chmod 755
or add a shebang line. i have used them both (well, i wrote the first
one, but now i use the cgiwrap one) and it seems to be running okay.
no guarantees though.

for suexec:

http://groups.yahoo.com/group/diskusihosting/files/Steven/apache_1.3.19-phpcgi-noshebang-suexec_only.patch

for cgiwrap:

http://w3.man.torun.pl/~makler/patches/cgiwrap/

--
sh


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




Re: [PHP] Time Help

2001-07-01 Thread KPortsmout

Thanks Jeff,

Thats just the job.

Ade

 Here is the function I use when I am comparing differences ($now and $old
 are Unix timestamps):
 
 function datediff($now, $old)
 {
 
   $DIS = $now - $old;  // Diff In Secs
   $secs = $DIS % 60; // modulo
   $DIS -= $secs;
   $days = floor($DIS / (24*60*60));
   $DIS -= $days * (24*60*60);
   $hours = floor($DIS / (60*60));
   $DIS -= $hours * (60*60);
   $mins = floor($DIS / 60);
   $DIS -= $mins * 60;
   $diffstr= $days Days, $hours Hours, $mins Minutes, $secs Seconds;
   return $diffstr;
 } 

-- 
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] Class/Func Librarys

2001-07-01 Thread ReDucTor

Hey,
 Just Wondering if any one knows, any sites that havea a function and/or class 
library on there site, for any thing? Might save some time if i find some functions 
and/or classes :)
 Come on might just be a function you put in a script you made, send them!!!

  - James ReDucTor Mitchell



RE: [PHP] Class/Func Librarys

2001-07-01 Thread power jessie


try the PHP Classes Repository site on
http://phpclasses.upperdesign.com

hope that helps!
jessie

-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 01, 2001 8:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Class/Func Librarys


Hey,
 Just Wondering if any one knows, any sites that havea a function
and/or class library on there site, for any thing? Might save some time if i
find some functions and/or classes :)
 Come on might just be a function you put in a script you made, send
them!!!

  - James ReDucTor Mitchell


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




Re: [PHP] Class/Func Librarys

2001-07-01 Thread ReDucTor

They need to add the header
reply-to: [EMAIL PROTECTED]
here :)
- Original Message -
From: power jessie [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 4:40 PM
Subject: RE: [PHP] Class/Func Librarys



 try the PHP Classes Repository site on
 http://phpclasses.upperdesign.com

 hope that helps!
 jessie

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 8:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Class/Func Librarys


 Hey,
  Just Wondering if any one knows, any sites that havea a function
 and/or class library on there site, for any thing? Might save some time if
i
 find some functions and/or classes :)
  Come on might just be a function you put in a script you made, send
 them!!!

   - James ReDucTor Mitchell



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




Re: [PHP] Class/Func Librarys

2001-07-01 Thread ReDucTor

If you view the source of this email, you will see headers.
If there is a header reply-to: it will send replys to the email address
there
so you don't need to add [EMAIL PROTECTED] to the to: or cc:
- Original Message -
From: power jessie [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 4:49 PM
Subject: RE: [PHP] Class/Func Librarys



 what do you mean?

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 8:40 AM
 To: power jessie
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Class/Func Librarys


 They need to add the header
 reply-to: [EMAIL PROTECTED]
 here :)
 - Original Message -
 From: power jessie [EMAIL PROTECTED]
 To: ReDucTor [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 4:40 PM
 Subject: RE: [PHP] Class/Func Librarys


 
  try the PHP Classes Repository site on
  http://phpclasses.upperdesign.com
 
  hope that helps!
  jessie
 
  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, July 01, 2001 8:29 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Class/Func Librarys
 
 
  Hey,
   Just Wondering if any one knows, any sites that havea a
function
  and/or class library on there site, for any thing? Might save some time
if
 i
  find some functions and/or classes :)
   Come on might just be a function you put in a script you made, send
  them!!!
 
- James ReDucTor Mitchell
 




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




Re: [PHP] Pricing Advice Needed

2001-07-01 Thread Brad Hubbard

On Fri, 29 Jun 2001 01:42, Thomas Deliduka wrote:
 You get paid more
 depending on your style:

 If ($foo == bar) {
 $dofoo = fobar($foo);
 } else {
 $dofoo = foobar($bar);
 }

 Or
 If ($foo == bar)
 {
 $dofoo = fobar($foo);
 }
 else
 {
 $dofoo = foobar($bar);
 }

if( $foo == bar ) $dofoo = fobar( $foo ) else $dofoo = foobar($bar);

I think I'm being exploited !   :-)

Cheers,
Brad

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




RE: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread Jeff Lewis

I have changed it to below but still get this error Warning: Supplied
argument is not a valid Image resource in /home/hyrum/public_html/test.php
on line 41 and that is the ImageCopy line:

$image = ImageCreate(500, 70);
$bg = ImageColorAllocate($image, 255, 255, 255);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;
ImageRectangle($image, 0, 0, 500, 70, $white);
ImageString($image, 4, 0, 0, $text, $blue);
ImageString($image, 3, 0, 20, $title1, $black);
ImageString($image, 3, 0, 35, $title2, $black);
ImageString($image, 3, 0, 50, $title3, $black);
ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

ImagePNG($image, signature.png);
ImageDestroy($image);

Jeff

 -Original Message-
 From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 30, 2001 6:31 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Website dealing with PHP image generation?


 Jeff,

 I am not extremely fimilar with this function.  However, I did
 notice you are copying your image at a width and height of 1x1.
 this is my guess as far as i know by default this pixels.  so the
 likehood you would see an image copied at 1x1 is rather low.

 but perhaps i am complete wrong . . .let us know.

 I am creating an image on the fly based on newest entries in one my mySQL
 tables.  In this created image I am trying to add a small one to
 it.  Now I
 am TRYING to use the below code:

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 //ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)

 Imagepng($image, signature.png);
 ImageDestroy($image);

 Am I using ImageCopy incorrectly?  It doesn't put anything in the
 new image.





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




Re: [PHP] Pricing Advice Needed

2001-07-01 Thread ReDucTor

I lost half this subject whilst i format'd
some one mind explaining what you are talking about with
your foos, bars, foobars, dofoos, etc :)
   - James ReDucTor Mitchell
- Original Message - 
From: Brad Hubbard [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Saturday, June 30, 2001 5:49 PM
Subject: Re: [PHP] Pricing Advice Needed


 On Fri, 29 Jun 2001 01:42, Thomas Deliduka wrote:
  You get paid more
  depending on your style:
 
  If ($foo == bar) {
  $dofoo = fobar($foo);
  } else {
  $dofoo = foobar($bar);
  }
 
  Or
  If ($foo == bar)
  {
  $dofoo = fobar($foo);
  }
  else
  {
  $dofoo = foobar($bar);
  }
 
 if( $foo == bar ) $dofoo = fobar( $foo ) else $dofoo = foobar($bar);
 
 I think I'm being exploited !   :-)
 
 Cheers,
 Brad
 
 -- 
 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]




Re: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread ReDucTor

shouldn't it be
$himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
not
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;

notice the first slash
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: Jon Yaggie [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 1:48 AM
Subject: RE: [PHP] Website dealing with PHP image generation?


 I have changed it to below but still get this error Warning: Supplied
 argument is not a valid Image resource in /home/hyrum/public_html/test.php
 on line 41 and that is the ImageCopy line:

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

 ImagePNG($image, signature.png);
 ImageDestroy($image);

 Jeff

  -Original Message-
  From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 30, 2001 6:31 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
  Jeff,
 
  I am not extremely fimilar with this function.  However, I did
  notice you are copying your image at a width and height of 1x1.
  this is my guess as far as i know by default this pixels.  so the
  likehood you would see an image copied at 1x1 is rather low.
 
  but perhaps i am complete wrong . . .let us know.
 
  I am creating an image on the fly based on newest entries in one my
mySQL
  tables.  In this created image I am trying to add a small one to
  it.  Now I
  am TRYING to use the below code:
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
 
  Imagepng($image, signature.png);
  ImageDestroy($image);
 
  Am I using ImageCopy incorrectly?  It doesn't put anything in the
  new image.
 
 
 


 --
 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] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

There is a bug in PHP 4.0.6 which affects PHP users who use the memory 
limit option. (i.e. developers who include --enable-memory-limit in their 
configure line).
The patch is posted at http://www.php.net/downloads.php. If you don't use 
this option there is no need for you to download and apply the patch.

Andi 


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




Re: [PHP] Why does it take so long?

2001-07-01 Thread rm

FWIW, i run  php.40, apache and mysql on both my
desktops and my laptop, the laptop has 32 megs and a
166 processor.  The arrangement runs fairly well on
the laptop. What you might want to do is to check and
see what other processes are running on your machine
that you may not know about or need. hit
control+alt+del and a pop up window will appear
listing the current processes...you can work back from
there.

kb

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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




[PHP] Error Handling

2001-07-01 Thread ReDucTor

Hey,
   A Site one of my sites is hosted on(H4P), with it's php, when there is an 
error, it just doesn't display the page, any one ever had this problem? I tried it on 
another server, removed the error works on both now, but i don't want to have to 
switch just to test it, so does any one know the problem? :)
   - James ReDucTor Mitchell

  P.S It's not my server, I didn't make it to it :) hehe



[PHP] Replacing colors in an image?

2001-07-01 Thread Tim Taubert

is it possible to create an image on a website and then to replace colors or
parts of this image with another color?

imagine we have a left and a right part. they're both white at the
beginning. now i randomly choose a color and now the right part becomes
green and the left part red...

is it possible?

please feel free of my mistakes - i'm German ;)


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




RE: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread Jeff Lewis

Tried with and without and no luck, it has me stumped :)

Jeff

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 11:53 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Website dealing with PHP image generation?


 shouldn't it be
 $himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
 not
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;

 notice the first slash
 - Original Message -
 From: Jeff Lewis [EMAIL PROTECTED]
 To: Jon Yaggie [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 1:48 AM
 Subject: RE: [PHP] Website dealing with PHP image generation?


  I have changed it to below but still get this error Warning: Supplied
  argument is not a valid Image resource in
 /home/hyrum/public_html/test.php
  on line 41 and that is the ImageCopy line:
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);
 
  ImagePNG($image, signature.png);
  ImageDestroy($image);
 
  Jeff
 
   -Original Message-
   From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, May 30, 2001 6:31 PM
   To: [EMAIL PROTECTED]
   Subject: RE: [PHP] Website dealing with PHP image generation?
  
  
   Jeff,
  
   I am not extremely fimilar with this function.  However, I did
   notice you are copying your image at a width and height of 1x1.
   this is my guess as far as i know by default this pixels.  so the
   likehood you would see an image copied at 1x1 is rather low.
  
   but perhaps i am complete wrong . . .let us know.
  
   I am creating an image on the fly based on newest entries in one my
 mySQL
   tables.  In this created image I am trying to add a small one to
   it.  Now I
   am TRYING to use the below code:
  
   $image = ImageCreate(500, 70);
   $bg = ImageColorAllocate($image, 255, 255, 255);
   $blue = ImageColorAllocate($image, 0, 0, 255);
   $black = ImageColorAllocate($image, 0, 0, 0);
   $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
   ImageRectangle($image, 0, 0, 500, 70, $white);
   ImageString($image, 4, 0, 0, $text, $blue);
   ImageString($image, 3, 0, 20, $title1, $black);
   ImageString($image, 3, 0, 35, $title2, $black);
   ImageString($image, 3, 0, 50, $title3, $black);
   file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
  
   Imagepng($image, signature.png);
   ImageDestroy($image);
  
   Am I using ImageCopy incorrectly?  It doesn't put anything in the
   new image.
  
  
  
 
 
  --
  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]




AW: [PHP] Replacing colors in an image?

2001-07-01 Thread Tim Taubert

Thanks i will test it.

-Ursprüngliche Nachricht-
Von: Gyozo Papp [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 1. Juli 2001 18:26
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Replacing colors in an image?


Hello,

If you 'd like to change/replace only one colour / image, you might use
transparent GIFs or PNG, as far as i remember PNG pictures have this
transparency feature. So, you create a transparent image and put it into an
arbitrary HTML tag specified with desired background colour.
or you can change the palette of the pictures, but don't ask how to do it!
I'm not familiar with the internals of any image format.

hope this helps,


Papp Gyozo
- [EMAIL PROTECTED]

- Original Message -
From: Tim Taubert [EMAIL PROTECTED]
To: PHP Mailingliste [EMAIL PROTECTED]
Sent: 2001. július 1. 18:11
Subject: [PHP] Replacing colors in an image?


 is it possible to create an image on a website and then to replace colors
or
 parts of this image with another color?

 imagine we have a left and a right part. they're both white at the
 beginning. now i randomly choose a color and now the right part becomes
 green and the left part red...

 is it possible?

 please feel free of my mistakes - i'm German ;)


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




Re: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread ReDucTor

Try

$image = ImageCreate(500, 70);
$bg = ImageColorAllocate($image, 255, 255, 255);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$himage=
ImageCreateFromGIF(/usr/hyrum/public_html/images/topics/hyrum.gif);
ImageRectangle($image, 0, 0, 500, 70, $white);
ImageString($image, 4, 0, 0, $text, $blue);
ImageString($image, 3, 0, 20, $title1, $black);
ImageString($image, 3, 0, 35, $title2, $black);
ImageString($image, 3, 0, 50, $title3, $black);
ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

ImagePNG($image, signature.png);
ImageDestroy($image);

- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:17 AM
Subject: RE: [PHP] Website dealing with PHP image generation?


 Tried with and without and no luck, it has me stumped :)

 Jeff

  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, July 01, 2001 11:53 AM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Website dealing with PHP image generation?
 
 
  shouldn't it be
  $himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
  not
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 
  notice the first slash
  - Original Message -
  From: Jeff Lewis [EMAIL PROTECTED]
  To: Jon Yaggie [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Monday, July 02, 2001 1:48 AM
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
   I have changed it to below but still get this error Warning: Supplied
   argument is not a valid Image resource in
  /home/hyrum/public_html/test.php
   on line 41 and that is the ImageCopy line:
  
   $image = ImageCreate(500, 70);
   $bg = ImageColorAllocate($image, 255, 255, 255);
   $blue = ImageColorAllocate($image, 0, 0, 255);
   $black = ImageColorAllocate($image, 0, 0, 0);
   $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
   ImageRectangle($image, 0, 0, 500, 70, $white);
   ImageString($image, 4, 0, 0, $text, $blue);
   ImageString($image, 3, 0, 20, $title1, $black);
   ImageString($image, 3, 0, 35, $title2, $black);
   ImageString($image, 3, 0, 50, $title3, $black);
   ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);
  
   ImagePNG($image, signature.png);
   ImageDestroy($image);
  
   Jeff
  
-Original Message-
From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 6:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Website dealing with PHP image generation?
   
   
Jeff,
   
I am not extremely fimilar with this function.  However, I did
notice you are copying your image at a width and height of 1x1.
this is my guess as far as i know by default this pixels.  so the
likehood you would see an image copied at 1x1 is rather low.
   
but perhaps i am complete wrong . . .let us know.
   
I am creating an image on the fly based on newest entries in one my
  mySQL
tables.  In this created image I am trying to add a small one to
it.  Now I
am TRYING to use the below code:
   
$image = ImageCreate(500, 70);
$bg = ImageColorAllocate($image, 255, 255, 255);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;
ImageRectangle($image, 0, 0, 500, 70, $white);
ImageString($image, 4, 0, 0, $text, $blue);
ImageString($image, 3, 0, 20, $title1, $black);
ImageString($image, 3, 0, 35, $title2, $black);
ImageString($image, 3, 0, 50, $title3, $black);
file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
   
Imagepng($image, signature.png);
ImageDestroy($image);
   
Am I using ImageCopy incorrectly?  It doesn't put anything in the
new image.
   
   
   
  
  
   --
   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]




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Rouvas Stathis

Patch cannot be successfully applied. Any suggestions ?

Output from patch application:

start
rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend patch -i
patch.zend_alloc.c 
patching file zend_alloc.c
Hunk #1 FAILED at 446.
1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej
rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend cat
zend_alloc.c.rej 
***
*** 446,451 
 for (i=1; iMAX_CACHED_MEMORY; i++) {
 for (j=0; jAG(cache_count)[i]; j++) {
 ptr = (zend_mem_header *)
AG(cache)[i][j];
 REMOVE_POINTER_FROM_LIST(ptr);
 free(ptr);
 }
--- 446,454 
 for (i=1; iMAX_CACHED_MEMORY; i++) {
 for (j=0; jAG(cache_count)[i]; j++) {
 ptr = (zend_mem_header *)
AG(cache)[i][j];
+ #if MEMORY_LIMIT
+AG(allocated_memory) -=
REAL_SIZE(ptr-size);
+ #endif
 REMOVE_POINTER_FROM_LIST(ptr);
 free(ptr);
 }

/start

-Stathis.

Andi Gutmans wrote:
 
 There is a bug in PHP 4.0.6 which affects PHP users who use the memory
 limit option. (i.e. developers who include --enable-memory-limit in their
 configure line).
 The patch is posted at http://www.php.net/downloads.php. If you don't use
 this option there is no need for you to download and apply the patch.
 
 Andi
 
 --
 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]




RE: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread Jeff Lewis

I used ImageCreateFromPNG and it worked great!  Thanks a lot!  GIF wasn't
supported (due to GD 1.6+).

Jeff

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 12:38 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Website dealing with PHP image generation?


 Try

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage=
 ImageCreateFromGIF(/usr/hyrum/public_html/images/topics/hyrum.gif);
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

 ImagePNG($image, signature.png);
 ImageDestroy($image);

 - Original Message -
 From: Jeff Lewis [EMAIL PROTECTED]
 To: ReDucTor [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 2:17 AM
 Subject: RE: [PHP] Website dealing with PHP image generation?


  Tried with and without and no luck, it has me stumped :)
 
  Jeff
 
   -Original Message-
   From: ReDucTor [mailto:[EMAIL PROTECTED]]
   Sent: Sunday, July 01, 2001 11:53 AM
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] Website dealing with PHP image generation?
  
  
   shouldn't it be
   $himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
   not
   $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
  
   notice the first slash
   - Original Message -
   From: Jeff Lewis [EMAIL PROTECTED]
   To: Jon Yaggie [EMAIL PROTECTED];
 [EMAIL PROTECTED]
   Sent: Monday, July 02, 2001 1:48 AM
   Subject: RE: [PHP] Website dealing with PHP image generation?
  
  
I have changed it to below but still get this error
 Warning: Supplied
argument is not a valid Image resource in
   /home/hyrum/public_html/test.php
on line 41 and that is the ImageCopy line:
   
$image = ImageCreate(500, 70);
$bg = ImageColorAllocate($image, 255, 255, 255);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;
ImageRectangle($image, 0, 0, 500, 70, $white);
ImageString($image, 4, 0, 0, $text, $blue);
ImageString($image, 3, 0, 20, $title1, $black);
ImageString($image, 3, 0, 35, $title2, $black);
ImageString($image, 3, 0, 50, $title3, $black);
ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);
   
ImagePNG($image, signature.png);
ImageDestroy($image);
   
Jeff
   
 -Original Message-
 From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 30, 2001 6:31 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Website dealing with PHP image generation?


 Jeff,

 I am not extremely fimilar with this function.  However, I did
 notice you are copying your image at a width and height of 1x1.
 this is my guess as far as i know by default this pixels.  so the
 likehood you would see an image copied at 1x1 is rather low.

 but perhaps i am complete wrong . . .let us know.

 I am creating an image on the fly based on newest entries
 in one my
   mySQL
 tables.  In this created image I am trying to add a small one to
 it.  Now I
 am TRYING to use the below code:

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)

 Imagepng($image, signature.png);
 ImageDestroy($image);

 Am I using ImageCopy incorrectly?  It doesn't put anything in the
 new image.



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





-- 
PHP General Mailing List 

Re: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread ReDucTor

No Problem
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:48 AM
Subject: RE: [PHP] Website dealing with PHP image generation?


 I used ImageCreateFromPNG and it worked great!  Thanks a lot!  GIF wasn't
 supported (due to GD 1.6+).

 Jeff

  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, July 01, 2001 12:38 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Website dealing with PHP image generation?
 
 
  Try
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage=
  ImageCreateFromGIF(/usr/hyrum/public_html/images/topics/hyrum.gif);
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);
 
  ImagePNG($image, signature.png);
  ImageDestroy($image);
 
  - Original Message -
  From: Jeff Lewis [EMAIL PROTECTED]
  To: ReDucTor [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Monday, July 02, 2001 2:17 AM
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
   Tried with and without and no luck, it has me stumped :)
  
   Jeff
  
-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 01, 2001 11:53 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Website dealing with PHP image generation?
   
   
shouldn't it be
$himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
not
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;
   
notice the first slash
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: Jon Yaggie [EMAIL PROTECTED];
  [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 1:48 AM
Subject: RE: [PHP] Website dealing with PHP image generation?
   
   
 I have changed it to below but still get this error
  Warning: Supplied
 argument is not a valid Image resource in
/home/hyrum/public_html/test.php
 on line 41 and that is the ImageCopy line:

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

 ImagePNG($image, signature.png);
 ImageDestroy($image);

 Jeff

  -Original Message-
  From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 30, 2001 6:31 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
  Jeff,
 
  I am not extremely fimilar with this function.  However, I did
  notice you are copying your image at a width and height of 1x1.
  this is my guess as far as i know by default this pixels.  so
the
  likehood you would see an image copied at 1x1 is rather low.
 
  but perhaps i am complete wrong . . .let us know.
 
  I am creating an image on the fly based on newest entries
  in one my
mySQL
  tables.  In this created image I am trying to add a small one to
  it.  Now I
  am TRYING to use the below code:
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
 
  Imagepng($image, signature.png);
  ImageDestroy($image);
 
  Am I using ImageCopy incorrectly?  It doesn't put anything in
the
  new image.
 
 
 


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

Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

Very strange. I just checked it and it worked for me with GNU patch 2.5.
Do you know how to apply it yourself? You just need to add those three 
lines (without the leading +).

Andi

At 07:48 PM 7/1/2001 +0300, Rouvas Stathis wrote:
Patch cannot be successfully applied. Any suggestions ?

Output from patch application:

start
rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend patch -i
patch.zend_alloc.c
patching file zend_alloc.c
Hunk #1 FAILED at 446.
1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej
rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend cat
zend_alloc.c.rej
***
*** 446,451 
  for (i=1; iMAX_CACHED_MEMORY; i++) {
  for (j=0; jAG(cache_count)[i]; j++) {
  ptr = (zend_mem_header *)
AG(cache)[i][j];
  REMOVE_POINTER_FROM_LIST(ptr);
  free(ptr);
  }
--- 446,454 
  for (i=1; iMAX_CACHED_MEMORY; i++) {
  for (j=0; jAG(cache_count)[i]; j++) {
  ptr = (zend_mem_header *)
AG(cache)[i][j];
+ #if MEMORY_LIMIT
+AG(allocated_memory) -=
REAL_SIZE(ptr-size);
+ #endif
  REMOVE_POINTER_FROM_LIST(ptr);
  free(ptr);
  }

/start

-Stathis.

Andi Gutmans wrote:
 
  There is a bug in PHP 4.0.6 which affects PHP users who use the memory
  limit option. (i.e. developers who include --enable-memory-limit in their
  configure line).
  The patch is posted at http://www.php.net/downloads.php. If you don't use
  this option there is no need for you to download and apply the patch.
 
  Andi
 
  --
  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]




Re: [PHP] Fatal Execution Error

2001-07-01 Thread Chris Cameron

I've spent a bit of time on it, and it looks to me that I've gotten an
infinite loop going in a database query. I'm not certain, as something
else has come up, and it's something I'll have to get back to (hopefully
today). This may or may not have been the case with yours. I'll let you
know what I find.

Chris


On Sun, 1 Jul 2001, Aral Balkan wrote:

 Are you doing a database query by chance or anything with sessions? I'm
 getting the same errors logged in the Apache logs for something I'm working
 on (see my previous posts for details.)

 Aral :)
 __
 ([EMAIL PROTECTED])
 New Media Producer, Kismia, Inc.
 ([EMAIL PROTECTED])
 Adj. Prof., American University
 ¯¯





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




RE: [PHP] Telnet and PHP

2001-07-01 Thread Warren Vail

Jon,

Looked like a nice solution, but couldn't get the code to work.  Kept going
into an endless loop or wait state somewhere.

still forced to use rexec.

Warren Vail

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 30, 2001 11:06 AM
To: Warren Vail
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Telnet and PHP


Instead of performing a send for each stroke, the user code type in a whole
string in a text box, and then submit that string. I have found this code at
http://www.phpbuilder.com/mail/php-general/2001051/1479.php:

?
error_reporting(-1);


class Telnet {
/* (c) [EMAIL PROTECTED] */


var $sock = NULL;


function telnet($host,$port) {
$this-sock = fsockopen($host,$port);
socket_set_timeout($this-sock,2,0);
}


function close() {
if ($this-sock)
fclose($this-sock);
$this-sock = NULL;
}


function write($buffer) {
$buffer = str_replace(chr(255),chr(255).chr(255),$buffer);
fwrite($this-sock,$buffer);
}


function getc() {
return fgetc($this-sock);
}


function read_till($what) {
$buf = '';
while (1) {
$IAC = chr(255);


$DONT = chr(254);
$DO = chr(253);


$WONT = chr(252);
$WILL = chr(251);


$theNULL = chr(0);


$c = $this-getc();


if ($c === false)
  return $buf;


if ($c == $theNULL) {
continue;
}


if ($c == \021) {
continue;
}


if ($c != $IAC) {
$buf .= $c;


if ($what ==
(substr($buf,strlen($buf)-strlen($what {
return $buf;
} else {
continue;
}
}


$c = $this-getc();


if ($c == $IAC) {
$buf .= $c;
} else if (($c == $DO) || ($c == $DONT)) {
$opt = $this-getc();
// echo we wont .ord($opt).\n;
fwrite($this-sock,$IAC.$WONT.$opt);
} elseif (($c == $WILL) || ($c == $WONT)) {
$opt = $this-getc();
// echo we dont .ord($opt).\n;
fwrite($this-sock,$IAC.$DONT.$opt);
} else {
// echo where are we? c=.ord($c).\n;
}
}


}
}


$tn = new telnet(192.168.255.100,23);
echo $tn-read_till(ogin: );
$tn-write(admin\r\n);
echo $tn-read_till(word: );
$tn-write(thieso\r\n);
echo $tn-read_till(: );
$tn-write(ps\r\n);
echo $tn-read_till(: );
echo $tn-close();
?





- Original Message -
From: Warren Vail [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, June 30, 2001 2:01 PM
Subject: RE: [PHP] Telnet and PHP


 By active user input, I would assume that you mean every time the user
 makes a keystroke, the keystroke is sent to the host machine.  This is not
a
 characteristic of html which only sends information to the host machine
when
 some form of submit is clicked.  The advantage of the applet for this sort
 of thing is it runs on the browser client, and has the capability of
sending
 every keystroke directly to the host, bypassing the server side.

 On the server side, once the (PHP) application is done sending the
requested
 files to the web browser for one user, it moves on to handling the
requests
 for other users.  Can you imagine the load on a server if it had to reload
 your application every time, your user pressed a key.

 You never really made it clear where you expected this client to run,
 although PHP, at this point, can only run on the server.  Now if you are
 looking for something that your PHP code could use to 1. signon to a host
 somewhere, 2. execute some commands, 3. capture and process the results
and
 4. disconnect before completing a single page to a web browser client (it
 will probably never do active user input, because of the nature of PHP
and
 the web server), then I would suggest you consider rexec, rcp, rsh
or
 if what you want is in a file on the host machine, you could use the ftp
 functions.  These are not telnet, and do require special deamons running
on
 the host machine, but may do the trick.

 I have been looking for your telnet client for a long time as well, and if
 you find one, please remember 

Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Rouvas Stathis

It is indeed strange, since in the sources I have (downloaded about a
week ago), I already have the exact source that the patch presents
(without the lines prefixed with +).
I'm looking at $PHPHOME/Zend/zend_alloc.c file.

Am I to suppose that there is no need to patch anything?

-Stathis.

Andi Gutmans wrote:
 
 Very strange. I just checked it and it worked for me with GNU patch 2.5.
 Do you know how to apply it yourself? You just need to add those three
 lines (without the leading +).
 
 Andi
 
 At 07:48 PM 7/1/2001 +0300, Rouvas Stathis wrote:
 Patch cannot be successfully applied. Any suggestions ?
 
 Output from patch application:
 
 start
 rouvas@aspasia(12) /opt/ide2/rouvas/tmp/php-4.0.6/Zend patch -i
 patch.zend_alloc.c
 patching file zend_alloc.c
 Hunk #1 FAILED at 446.
 1 out of 1 hunk FAILED -- saving rejects to file zend_alloc.c.rej
 rouvas@aspasia(13) /opt/ide2/rouvas/tmp/php-4.0.6/Zend cat
 zend_alloc.c.rej
 ***
 *** 446,451 
   for (i=1; iMAX_CACHED_MEMORY; i++) {
   for (j=0; jAG(cache_count)[i]; j++) {
   ptr = (zend_mem_header *)
 AG(cache)[i][j];
   REMOVE_POINTER_FROM_LIST(ptr);
   free(ptr);
   }
 --- 446,454 
   for (i=1; iMAX_CACHED_MEMORY; i++) {
   for (j=0; jAG(cache_count)[i]; j++) {
   ptr = (zend_mem_header *)
 AG(cache)[i][j];
 + #if MEMORY_LIMIT
 +AG(allocated_memory) -=
 REAL_SIZE(ptr-size);
 + #endif
   REMOVE_POINTER_FROM_LIST(ptr);
   free(ptr);
   }
 
 /start
 
 -Stathis.
 
 Andi Gutmans wrote:
  
   There is a bug in PHP 4.0.6 which affects PHP users who use the memory
   limit option. (i.e. developers who include --enable-memory-limit in their
   configure line).
   The patch is posted at http://www.php.net/downloads.php. If you don't use
   this option there is no need for you to download and apply the patch.
  
   Andi

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




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote:
It is indeed strange, since in the sources I have (downloaded about a
week ago), I already have the exact source that the patch presents
(without the lines prefixed with +).
I'm looking at $PHPHOME/Zend/zend_alloc.c file.

Am I to suppose that there is no need to patch anything?

The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does 
not have this patch. Are you sure you are looking at the release version? 
Maybe you are using a snapshot or CVS version?

Andi


-- 
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] question about forms.

2001-07-01 Thread Jason brashear

I have a question. I am using  PHP MySQL.
I am able to quary to DB and edit post delete through forms.
Problem.  I need to be able to also send out emails when something is posted
to the databas as well as send the information that was submitted like a
recipt.

Any ideas?
Please help.
-Jason



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




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Rouvas Stathis

Andi Gutmans wrote:
 
 At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote:
 It is indeed strange, since in the sources I have (downloaded about a
 week ago), I already have the exact source that the patch presents
 (without the lines prefixed with +).
 I'm looking at $PHPHOME/Zend/zend_alloc.c file.
 
 Am I to suppose that there is no need to patch anything?
 
 The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does
 not have this patch. Are you sure you are looking at the release version?
 Maybe you are using a snapshot or CVS version?

I do not use the CVS version, mainly because I do not know how to handle
CVS :-)
These are the lines from $PHPHOME/Zend/zend_alloc.c that I have.

lines-from-443-to-454
443 if (1 || clean_cache) {
444 zend_mem_header *ptr;
445 
446 for (i=1; iMAX_CACHED_MEMORY; i++) {
447 for (j=0; jAG(cache_count)[i]; j++) {
448 ptr = (zend_mem_header *)
AG(cache)[i][j];
449 REMOVE_POINTER_FROM_LIST(ptr);
450 free(ptr);
451 }
452 AG(cache_count)[i] = 0;
453 }
454 }
/lines-from-443-to-454

What do you think?

-Stathis.
PS: Thank you for your time. I know how precious it is.

 
 Andi

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




RE: [PHP] Why does it take so long?

2001-07-01 Thread Matthew Loff


I do the majority of my site development on a combination of Athlon 800
w/Win2k for graphics, and a P-133 w/16 megs of RAM running Slackware
Linux (gulp!)...

The Linux box performance with PHP is actually decent-- EXCEPT when
doing database queries locally.  I tried running queries on Mysql
locally (on the P-133 linux box) and it was SLOW as heck.  So, I simply
installed Mysql for Win32 on my Win2k machine, and now pages (even with
database queries) run at a tolerable speed.

So, based on my experience, the database (isn't ODBC much slower than
using the mysql lib on top of that?) is the biggest bottleneck for an
underpowered machine.

Hope this helps.


-Original Message-
From: mati [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 01, 2001 10:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Why does it take so long?


I use PHP 4 + Apache + Win95 + MS Access (ODBC), and my scripts generate

very long (10-15s with 15 records from DB - on localhost).

Why is it so? I have slow computer (166MHz, 32MB RAM), is it the main 
problem? Or is there also a problem with ODBC (Access) or Win? Which is
the 
main reason?
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]




RE: [PHP] Class/Func Librarys

2001-07-01 Thread Matthew Loff


Take a look at: http://phpclasses.upperdesign.com/browse.html


-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 01, 2001 11:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Class/Func Librarys


Hey,
 Just Wondering if any one knows, any sites that havea a
function and/or class library on there site, for any thing? Might save
some time if i find some functions and/or classes :)
 Come on might just be a function you put in a script you made, send
them!!!

  - James ReDucTor Mitchell


-- 
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] pkcs7_sign problem

2001-07-01 Thread Franco Galian

Hi, I am already using some of the openssl functions and are working ok. Up
to now, I am using openssl_seal and openssl_open to pass encripted data
through forms (if anoybody needs help with that pls tell me, I had to use
base64_encode/decode functions to convert non printable characters generated
with openssl functions).
Now I need to send signed messages, I wanted to use pkcs7 functions but when
I try to sign the message I find this error
openssl_pkcs7_sign(): error getting private key
I am using the same public/private keys that I used for openssl_seal/open.
I think there's the problem, but I don't know what to do in order to get a
valid certificate...
Thanks in advance,

Franco Galian
[EMAIL PROTECTED]
PD: I'm using apache 1.3.19, php 4.0.6 on OpenBSD 2.8


-- 
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] apache+php chroot

2001-07-01 Thread Ryan

I have chrooted apache+php but am having simple problems like not being able to exec 
uptime.
uptime has been moved to /usr/serv/apache/usr/bin/uptime..
Well anyways heres my lil php line im tring to get running
?php passthru ( uptime ); ?

I get no errors from php, just doesnt show anything..  I realize it needs a shell to 
execute so /usr/serv/apache/bin/bash
and /usr/serv/apache/usr/etc/shells is setup correctly.  Would there be something that 
im missing? Im frustruated right now..
Its something to do with the chroot env.  What am i missing??
Everything else seems to work fine if theres any more info you need me to give let me 
know.


thanks
Ryan
[EMAIL PROTECTED]




Re: [PHP] apache+php chroot

2001-07-01 Thread teo

Hi Ryan!
On Sun, 01 Jul 2001, Ryan wrote:

 I have chrooted apache+php but am having simple problems like not being
 able to exec uptime.
 uptime has been moved to /usr/serv/apache/usr/bin/uptime..
 Well anyways heres my lil php line im tring to get running
 ?php passthru ( uptime ); ?
 
 I get no errors from php, just doesnt show anything..  I realize it
 needs a shell to execute so /usr/serv/apache/bin/bash
I think the passthru uses popen() which in turn spawns a shell,
and this is /bin/sh and not /bin/bash
you need either to make a symlink to bash or to rename bash to sh.

 and /usr/serv/apache/usr/etc/shells is setup correctly.  Would there be
AFAIK shells is checked by programs dealing with pw records, I don't think
it has anything to do w/ that. Better SHELL environment variable.

 something that im missing? Im frustruated right now..
 Its something to do with the chroot env.  What am i missing??
try  :
cd /usr/serv/apache/bin
ln -s bash sh
   (or)
   cp bash sh

 and tell us if it works.

 Everything else seems to work fine if theres any more info you need me
 to give let me know.
 
 
 thanks
 Ryan
 [EMAIL PROTECTED]
 
-- teodor

-- 
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] sending 5000+ emails - use PHP?

2001-07-01 Thread Matthew Delmarter

I at looking at using PHP to send a monthly newsletter to 5000+ users who
have subscribed via our site. The newsletter will be in HTML format for
those who have selected this option - otherwise plain text.

Can PHP handle something like this?

Regards,

Matthew Delmarter


-- 
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] PHAkt for Macromedia Ultradev

2001-07-01 Thread Matthew Delmarter

I have just found PHAkt for Macromedia UltraDev.
http://www.interakt.ro/products/PHAkt/

Has anyone out there used it?

I am interested in your opinion of the code it writes. Does it speed up
development? Is it easy to jump in and edit the code without breaking
something?

Any feedback appreciated...

Regards,

Matthew Delmarter


-- 
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] Page Cannot Be Displayed

2001-07-01 Thread Dave Stewart

Hi,

I have PHP 4 installed on Win98 with PWS 4.

I am getting 'Page cannot be displayed' on pages with .php extentions. If I
change the extensions to .php3 everything is fine.

I used the installer to set PHP up and I have checked my registry to ensure
that .php .php3 and .phtml pages are set and they are.

I've been trying to sus this out all morning and haven't cracked what I've
missed so I'm going for a walk to get some freash air.

Any help would be appreciated, as usual.

Dave


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




Re: [PHP] apache+php chroot

2001-07-01 Thread billt

On Sun, Jul 01, 2001 at 07:44:19PM -0500, Ryan wrote:
 I have chrooted apache+php but am having simple problems
 like not being able to exec uptime.
 uptime has been moved to /usr/serv/apache/usr/bin/uptime..
 Well anyways heres my lil php line im tring to get running
 ?php passthru ( uptime ); ?
 
 I get no errors from php, just doesnt show anything..
 I realize it needs a shell to execute so /usr/serv/apache/bin/bash
 and /usr/serv/apache/usr/etc/shells is setup correctly.  Would
 there be something that im missing? Im frustruated right now..

 Its something to do with the chroot env.  What am i missing??

is there a proc filesystem somewhere in your chroot? i have never
tried chrooting apache+php, but I know that uptime, at least on
linux, reads from proc/uptime and proc/loadavg. If you haven't
already, try mounting proc in wherever your chrooted '/' is.

good luck... 


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




Re: [PHP] Pricing Advice Needed

2001-07-01 Thread Brad Hubbard

On Mon,  2 Jul 2001 01:51, ReDucTor wrote:
 I lost half this subject whilst i format'd
 some one mind explaining what you are talking about with
 your foos, bars, foobars, dofoos, etc :)

One of the original posters suggested charging by line for programming work.
We were pointing out how this was completely inconsistent based on 
programming style.

Cheers,
Brad

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




RE: [PHP] PHAkt for Macromedia Ultradev

2001-07-01 Thread Peter Houchin - SunRentals Australia

Using DW  UD 4 I've found no problems with it.. how ever I will suggest that you use 
something else to do the bulk of your php coding, although the new layout in UD  DW 4 
does make it easier than in prevous versions to edit code directly

Peter

-Original Message-
From: Matthew Delmarter [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 11:13 AM
To: PHP Mailing List
Subject: [PHP] PHAkt for Macromedia Ultradev


I have just found PHAkt for Macromedia UltraDev.
http://www.interakt.ro/products/PHAkt/

Has anyone out there used it?

I am interested in your opinion of the code it writes. Does it speed up
development? Is it easy to jump in and edit the code without breaking
something?

Any feedback appreciated...

Regards,

Matthew Delmarter


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




Re: [PHP] PHAkt for Macromedia Ultradev

2001-07-01 Thread John Monfort



   I used it.
   It's a great tool.

   Did you have any specific question?


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Mon, 2 Jul 2001, Matthew Delmarter wrote:

 I have just found PHAkt for Macromedia UltraDev.
 http://www.interakt.ro/products/PHAkt/

 Has anyone out there used it?

 I am interested in your opinion of the code it writes. Does it speed up
 development? Is it easy to jump in and edit the code without breaking
 something?

 Any feedback appreciated...

 Regards,

 Matthew Delmarter


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




Re: [PHP] question about forms.

2001-07-01 Thread Chris Anderson

Don't post the question in a reply and someone will see your question
- Original Message -
From: Jason brashear [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Sunday, July 01, 2001 5:34 PM
Subject: [PHP] question about forms.


 I have a question. I am using  PHP MySQL.
 I am able to quary to DB and edit post delete through forms.
 Problem.  I need to be able to also send out emails when something is
posted
 to the databas as well as send the information that was submitted like a
 recipt.

 Any ideas?
 Please help.
 -Jason



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




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




Re: [PHP] sending 5000+ emails - use PHP?

2001-07-01 Thread Michael Stearne

PHP can handle this (although you will definitely have to disable 
script timeout) in one run. But a smarter thing to do would be to not 
send all the 5000 emails at one time rather come up with a method 
that runs the PHP script every 5 minutes (a cron job)  and send the 
newsletter out in 200+ email batches.  This will reduce the load one 
the web server and also the mail server.

Michael



On Sunday, July 1, 2001, at 09:13 PM, Matthew Delmarter wrote:

 I at looking at using PHP to send a monthly newsletter to 5000+ 
 users who
 have subscribed via our site. The newsletter will be in HTML format for
 those who have selected this option - otherwise plain text.

 Can PHP handle something like this?

 Regards,

 Matthew Delmarter


 --
 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: php-list-
 [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]




Re: [PHP] PHAkt for Macromedia Ultradev

2001-07-01 Thread andrew

Yes, but data access from Ultradev on Macintosh is a currently a 
dealbreaker.
No adodb, so you cannot work with database enabled sites.

regards,
andrew

On Sunday, July 1, 2001, at 09:50 PM, John Monfort wrote:



I used it.
It's a great tool.

Did you have any specific question?


 __John Monfort_
 _+---+_
  P E P I E  D E S I G N S
www.pepiedesigns.com
 The world is waiting, are you ready?
 -+___+-

 On Mon, 2 Jul 2001, Matthew Delmarter wrote:

 I have just found PHAkt for Macromedia UltraDev.
 http://www.interakt.ro/products/PHAkt/

 Has anyone out there used it?

 I am interested in your opinion of the code it writes. Does it speed up
 development? Is it easy to jump in and edit the code without breaking
 something?

 Any feedback appreciated...

 Regards,

 Matthew Delmarter


 --
 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: php-list-
 [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]




[PHP] Getting Information from a CGI POST

2001-07-01 Thread Clayton Dukes

Hi everyone,

Is it possible to get information from a POST to a cgi and return the value?
I want to try to get a script that will check on an airline's flight status,
and if it returns cancelled, then send me an e-mail (to my cell or pager).

I wanna do this because I get tired of driving an hour to the airport only
to find that it's been cancelled, so I got to thinking, wouldn't it be cool
if you could have a script that would track this information for you?

Let's take for example, usairways.com
here's a copy of the form on thier page:

form name=flightStatusForm method=post
action=http://dps2.usairways.com/cgi-bin/fi;
   input type=text name=FltNum size=6 maxlength=4/td
  input type=hidden name=page value=fi
select class=bodytext name=selectDay size=1
  script
todayMonth = monthNames[today.getMonth() + 1];
document.write( 'option value=\' + todayMonth + '
' + today.getDate() + '\today/option');
tomorrowMonth = monthNames[tomorrow.getMonth() + 1];
document.write( 'option value=\' + tomorrowMonth +
' ' + tomorrow.getDate() + '\tomorrow/option');
yesterdayMonth = monthNames[yesterday.getMonth() +
1];
document.write( 'option value=\' + yesterdayMonth
+ ' ' + yesterday.getDate() + '\yesterday/option');
  /script
   /select
  /form


Isn't there a way to have PHP go and check this onec every x minutes and
return the status?
I think it would be cool to have a dropdown of each of the major airlines,
then you just put your flight number, and time of departure (and stores it
into a database). Then on the day you leave, it checks every thirty minutes
or so starting a few hours before, and if there's any delay or cancellation,
it sends an email.


Can this be done?
If so, can someone point me in the right direction? Specifically, how to get
the CGI Post data returned from thier server?


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net




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




RE: [PHP] Getting Information from a CGI POST

2001-07-01 Thread Jason Murray

 Can this be done? If so, can someone point me in the right direction? 
 Specifically, how to get the CGI Post data returned from thier server?

As a starting point, grab their form, including all the javascript
associated with it, and put it onto your own page.

Change the FORM tag to submit to a PHP script, and in that PHP
script put ? phpInfo(); ? ... look at the data you get in, 
in either $HTTP_POST_VARS or $HTTP_GET_VARS and write a PHP 
script to replicate that data. Then, use PHP's curl functions 
to post or get that data to the remote CGI script.

This would be hard to do for every airline though, since they all 
have different online forms.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

-- 
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] PHPLib conversion?

2001-07-01 Thread Bob Horton

Has anyone ever done or attempted a conversion of PHPLib from PHP3 to PHP4?

There are a number of things that are not making sense in terms of why they
don't work and I was wondering if anyone had done a conversion (and yes I
know that much of the functionality is already in 4)

Thanks.

Bob.


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




Re: [PHP] Patch for PHP 4.0.6 memory limit problem posted

2001-07-01 Thread Andi Gutmans

At 10:49 PM 7/1/2001 +0300, Rouvas Stathis wrote:
Andi Gutmans wrote:
 
  At 10:17 PM 7/1/2001 +0300, Rouvas Stathis wrote:
  It is indeed strange, since in the sources I have (downloaded about a
  week ago), I already have the exact source that the patch presents
  (without the lines prefixed with +).
  I'm looking at $PHPHOME/Zend/zend_alloc.c file.
  
  Am I to suppose that there is no need to patch anything?
 
  The official package of PHP 4.0.6 (http://www.php.net/downloads.php) does
  not have this patch. Are you sure you are looking at the release version?
  Maybe you are using a snapshot or CVS version?

I do not use the CVS version, mainly because I do not know how to handle
CVS :-)
These are the lines from $PHPHOME/Zend/zend_alloc.c that I have.

lines-from-443-to-454
443 if (1 || clean_cache) {
444 zend_mem_header *ptr;
445
446 for (i=1; iMAX_CACHED_MEMORY; i++) {
447 for (j=0; jAG(cache_count)[i]; j++) {
448 ptr = (zend_mem_header *)
AG(cache)[i][j];
449 REMOVE_POINTER_FROM_LIST(ptr);
450 free(ptr);
451 }
452 AG(cache_count)[i] = 0;
453 }
454 }
/lines-from-443-to-454

What do you think?

This is the official PHP 4.0.6 version. After line 448 insert:

#if MEMORY_LIMIT
AG(allocated_memory) -= REAL_SIZE(ptr-size);
#endif

If you'll take a good look at the diff file the first half is what you're 
supposed to have and the second half is what it's supposed to change to. 
You probably missed the second half.

Andi


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




RE: [PHP] Getting Information from a CGI POST

2001-07-01 Thread Don Read


On 02-Jul-01 Clayton Dukes wrote:
 Hi everyone,
 
 Is it possible to get information from a POST to a cgi and return the value?

Yes.

function openpost($host, $path, $poststr) {
$errno=0;
$errstr='';

$hdr=sprintf(POST /%s HTTP/1.0\r\nContent-Length: %d\r\n,
  $path, strlen($poststr));
$hdr .=Content-type: application/x-www-form-urlencoded\r\n;
$hdr .=Accept: text/html\r\nAccept: text/plain\r\n;
$hdr .=User-Agent: Mozilla/1.0\r\n\r\n;
  
$fp = fsockopen($host , 80, $errno, $errstr, 45);
if (!$fp) {
echo $host open error: $errstr $errno .\n;
return(0);
} else {
fputs($fp,$hdr.$poststr);
return($fp);
}
}

while (!feof($fp)) {
$buff=fgets($fp, 1024);
dofoo($buff);
}
fclose($fp);

 Isn't there a way to have PHP go and check this onec every x minutes and
 return the status?

Yep, there is.

 
 Can this be done?

Yes.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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




Re: [PHP] Zend core object creation

2001-07-01 Thread Andi Gutmans

At 06:27 PM 6/29/2001 -0500, Dean Hall wrote:
Okay, perhaps I need to spend some more time studying language
compilers/interpreters, but I've got a question regarding object creation in
the PHP core.

Basically, what, internally, is part of a PHP object (class instantiation)?
I know Zend started using reference counting a while back, so I guess all
objects are basically references, but I need to know how much of the class
information is contained in the objects themselves.

So if I have a class like so:

class foo {
 var $var1;
 var $var2;
 var $var3;

 function func1() { ... }
 function func2() { ... }
 function func3() { ... }
}

and instantiate it like so:

$foo1 = new foo;

will the internal representation of the $foo object contain definitions for
all the variables and functions? So that when I make a second object:

$foo2 = new foo;

will its internal representation duplicate all those method definitions?

My guess is that the most efficient implementation would be to have some
sort of class template that holds, at the least, definitions for the
methods, so that every instantiation refers to those method definitions in
the static template instead of storing their own method definitions.
Variables, since they can't be referenced statically in PHP, would have to
be stored in the object itself; methods, however, could simply be
implemented analogously to functions that take an object as their first
method (i.e., like functions that operate on structs in C).

This is exactly how it works. The member variables are duplicated from a 
template and the method's are saved in the same template but are pointed to 
(i.e. not copied for each object).

Andi


Any ideas? If you prefer, could you direct me to where in the source to look
for an answer?

The reason I'm worried about all this is that I'm writing a very large
application, and I have to worry about object creation time and memory
resources because I may have many distinct objects of the same type
instantiated at the same time.

Thanks.
Dean.



--
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] question about forms

2001-07-01 Thread Jason Brashear

I have a question. I am using  PHP MySQL.
 I am able to quary to DB and edit post delete through forms.
 Problem.  I need to be able to also send out emails when something is
posted
 to the databas as well as send the information that was submitted like a
 recipt.

 Any ideas?
 Please help.
 -Jason




RE: [PHP] question about forms

2001-07-01 Thread Tyler Longren

check out the mail() function.

Tyler


 -Original Message-
 From: Jason Brashear [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 11:08 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] question about forms


 I have a question. I am using  PHP MySQL.
  I am able to quary to DB and edit post delete through forms.
  Problem.  I need to be able to also send out emails when something is
 posted
  to the databas as well as send the information that was submitted like a
  recipt.
 
  Any ideas?
  Please help.
  -Jason




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




[PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread ReDucTor

Hey, I Forgot the Variable that has the current Document/script or Folder of the 
Docment/script



RE: [PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread Jason Murray

 Hey, I Forgot the Variable that has the current 
 Document/script or Folder of the Docment/script

Look at the output from phpInfo(), then - you'll find it there.

I didn't answer you because I can't figure out precisely which
variable you want based on your question.

Jason

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




Re: [PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread ReDucTor

$HTTP_SERVER_VARS[PATH_TRANSLATED]
I got it :)
- Original Message - 
From: Jason Murray [EMAIL PROTECTED]
To: 'ReDucTor' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:37 PM
Subject: RE: [PHP] Quicky, I forgot a Varible ):


  Hey, I Forgot the Variable that has the current 
  Document/script or Folder of the Docment/script
 
 Look at the output from phpInfo(), then - you'll find it there.
 
 I didn't answer you because I can't figure out precisely which
 variable you want based on your question.
 
 Jason
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




Re: [PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread Chris Anderson

Maybe he means $PHP_SELF?
Then again he just kindof rambled
- Original Message - 
From: Jason Murray [EMAIL PROTECTED]
To: 'ReDucTor' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 12:37 AM
Subject: RE: [PHP] Quicky, I forgot a Varible ):


  Hey, I Forgot the Variable that has the current 
  Document/script or Folder of the Docment/script
 
 Look at the output from phpInfo(), then - you'll find it there.
 
 I didn't answer you because I can't figure out precisely which
 variable you want based on your question.
 
 Jason
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] Pricing Advice Needed

2001-07-01 Thread Jesse S. Williams

There's several ways to look at this too.  Currently I'm doing some work for
a small/home business owner.  She needed some work done with some shopping
cart stuff, a little MySQL DB and some smart forms.  Not a lot of work, but
then some of the stuff I've not worked with before.  We ended up agreeing on
US$1000/flat.  I was willing to go this route because being such a small
business, I knew that money WOULD be an issue.

Also, from my POV, you also benefit intangibly from every job you do...
Keep a private portfolio of work you've done and hour many hours you've put
into it.  Seperate hours designing the code and hours making the code more
efficient, et cetera.  Now if a client wants something similar to what
you've already done, you simply bill out for:

(Development Hours of Code + (Code Modification Hours / 10) + (Code
Customization Hours /2)) * Hourly Rate

This is a good way to build work for yourself too, as once you have a good
compiled library of code, you can take on several jobs at once based on
pre-written code, and bill out cross hours as you customize a few pieces of
code and get your months salary in a couple of hours  ;-)

Of course, that IS wishful thinking but still!!!




Jesse Williams
System Administrator
DowNET VoIP Team
Electronic Data Systems


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




Re: [PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread ReDucTor

I Just needed it to make Auto Install Script. :)

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: Jason Murray [EMAIL PROTECTED]; 'ReDucTor'
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:51 PM
Subject: Re: [PHP] Quicky, I forgot a Varible ):


 Maybe he means $PHP_SELF?
 Then again he just kindof rambled
 - Original Message -
 From: Jason Murray [EMAIL PROTECTED]
 To: 'ReDucTor' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 12:37 AM
 Subject: RE: [PHP] Quicky, I forgot a Varible ):


   Hey, I Forgot the Variable that has the current
   Document/script or Folder of the Docment/script
 
  Look at the output from phpInfo(), then - you'll find it there.
 
  I didn't answer you because I can't figure out precisely which
  variable you want based on your question.
 
  Jason
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 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] php, mod_ssl, apache

2001-07-01 Thread Tyler Longren

Hello everyone,

I'm wondering if there is anyway to compile php, apache, and mod_ssl together.  I know 
there is, and I have done it many times.  However, I always have to compile php as a 
static apache module.  How can php be installed --with-apxs=/path/to/apxs with 
mod_ssl?  Has anyone done this?

Also, I've been working on a freebsd box.  When compiling php --with-apxs apache has 
some weird problems.  For example:
When I run: /usr/local/apache/bin/apachectl start
apache starts fine.

Then, when I run: /usr/local/apache/bin/apachectl restart
apache says that there is no current apache process (it's not running).  But it infact 
IS running.  When I do a 'ps -ax' there are a few -httpd processes (which is normal).  

Thanks everyone,
Tyler Longren

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




RE: [PHP] newbie has include path error new problem

2001-07-01 Thread Daniel Goldin \(E-mail\)

Thanks for your help. The server document root is: /etc/httpd/htdocs.
Perhaps I need to point to this document in root in php.ini file?

Anyway, I cannot try that now as I have finally achieved networking linux
box to windows host that acts as our internet server. Now when I try to
connect to: http://localhost I get this error

425 HTTP ERROR

Unable to connect to remote host

I tried stopping the network, but that only caused Netscape to choke. Hmm.
(help?)

Best,

Daniel

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 30, 2001 12:36 AM
To: [EMAIL PROTECTED]
Cc: php
Subject: Re: [PHP] newbie has include path error


Hi,

If you can surf local host for standard HTML pages and other php pages
(without includes in them) eg:

http://localhost/file.html

Then the problem isn't the server really, it seems to me that the server
document root for your files should be something like:

/usr/local/apache/ not /etc/httpd/php/prepend.php

Can you ftp into your server?  What's the path to your document root for
all your html / php files?  I doubt it's /etc/httpd/php/file.html, if it
isn't this, then the problem is somewhere in your php cnfig to indicate
where the document root is.

Eh, it's kidna hard to explain...  maybe someone else can explain it
better :)


Justin French
Creative Director
Indent.com.au



Daniel Goldin wrote:

 I had php/apache/mysql working perfectly for awhile on my redaht 7.1 box.
 Compiled them all from source and was very proud, as I am at best an
amateur
 programmer. In other words, I love this stuff, but it doen't come
naturally.

 Recently I've been fiddling with networking (to little avail), installed a
 new ethernet card and did some other stuff... Anyway, now when I go into
 http://localhost (apache is running), I get this error:

 Warning: Failed opening '/etc/httpd/php/prepend.php' for
 inclusion (include_path=) in unknown in line 0.

 I've tried putting in this include path in my php.ini file to no effect.
 Please help. I have several projects I'm working on that require php and I
 have no way of working on them on my development box.

 Any help gratefully appreciated. Also, I apologize for being too chatty.

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




Re: [PHP] newbie has include path error new problem

2001-07-01 Thread mike cullerton

i'm guessing your problems are unrelated.

for your network problem, it seems that you didn't really achieve
'networking linux box to windows host' correctly. can you currently ping
localhost? what does your route table look like?

as for the php problem. it's definitely a problem with your path. in your
error message
 Warning: Failed opening '/etc/httpd/php/prepend.php' for
 inclusion (include_path=) in unknown in line 0.
php thinks your include_path is ''. that means you have no include path, not
even '.'

mine is something like
.:/var/www/php:/var/www/docs/include:/usr/local/lib/php

this is defined in php.ini

what's really interesting, is that you call prepend.php with an absolute
path. you shouldn't even need the include path.

i'd look in php.ini. where do you actually store prepend.php?

mike

on 7/1/01 11:00 PM, Daniel Goldin (E-mail) at [EMAIL PROTECTED] wrote:

 Thanks for your help. The server document root is: /etc/httpd/htdocs.
 Perhaps I need to point to this document in root in php.ini file?
 
 Anyway, I cannot try that now as I have finally achieved networking linux
 box to windows host that acts as our internet server. Now when I try to
 connect to: http://localhost I get this error
 
 425 HTTP ERROR
 
 Unable to connect to remote host
 
 I tried stopping the network, but that only caused Netscape to choke. Hmm.
 (help?)
 
 Best,
 
 Daniel
 
 -Original Message-
 From: Justin French [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, June 30, 2001 12:36 AM
 To: [EMAIL PROTECTED]
 Cc: php
 Subject: Re: [PHP] newbie has include path error
 
 
 Hi,
 
 If you can surf local host for standard HTML pages and other php pages
 (without includes in them) eg:
 
 http://localhost/file.html
 
 Then the problem isn't the server really, it seems to me that the server
 document root for your files should be something like:
 
 /usr/local/apache/ not /etc/httpd/php/prepend.php
 
 Can you ftp into your server?  What's the path to your document root for
 all your html / php files?  I doubt it's /etc/httpd/php/file.html, if it
 isn't this, then the problem is somewhere in your php cnfig to indicate
 where the document root is.
 
 Eh, it's kidna hard to explain...  maybe someone else can explain it
 better :)
 
 
 Justin French
 Creative Director
 Indent.com.au
 
 
 
 Daniel Goldin wrote:
 
 I had php/apache/mysql working perfectly for awhile on my redaht 7.1 box.
 Compiled them all from source and was very proud, as I am at best an
 amateur
 programmer. In other words, I love this stuff, but it doen't come
 naturally.
 
 Recently I've been fiddling with networking (to little avail), installed a
 new ethernet card and did some other stuff... Anyway, now when I go into
 http://localhost (apache is running), I get this error:
 
 Warning: Failed opening '/etc/httpd/php/prepend.php' for
 inclusion (include_path=) in unknown in line 0.
 
 I've tried putting in this include path in my php.ini file to no effect.
 Please help. I have several projects I'm working on that require php and I
 have no way of working on them on my development box.
 
 Any help gratefully appreciated. Also, I apologize for being too chatty.
 
 --
 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]
 


 -- mike cullerton



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