[PHP] passing values of checkboxes in PHP- solved

2004-05-16 Thread gowthaman ramasamy
I myself solved the problem.
sorry for the trouble ..

sincerely,
gowtham
On Mon, 2004-05-17 at 11:51, gowthaman ramasamy wrote:
> hi list,
> I have a problem with getting the values of check boxes ...
> 
> In the form i have many checkbox options created dynamically. All of
> them have same name but different values. But when user submits the form
> i am able to access only the value of last checkbox that user cliked.
> Values of rest of the selection is not displayed/passed.  How can i get
> all the values. 
> many thanks in advance ...
> followings are my scripts ...
> 
> form this prints lot of check boxes on the from as per the
> result or previous mysql query
> 
> while ($rows2 = mysql_fetch_array($result2))
> {
> echo  something
> ... 
> }
> 
> 
> 
> I am trying to access these checkbox values in follwing script 
> ---
> if(isset($_POST['submit']))  
>  
> 
> {
> echo "hello";
> echo $hell=$_POST['protid'];
> echo $counts = count($hell);
> }
> ?>
> counts says there is only one value (that is value of last checked
> box) I also tried putting $hell=$_POST['protid'] in a while loop 
> did not work.
> sincerely
> gowtham
> -- 
> Ra. Gowthaman,
> Graduate Student,
> Bioinformatics Lab,
> Malaria Research Group,
> ICGEB , New Delhi.
> INDIA
> 
> Phone: 91-9811261804
>91-11-26173184; 91-11-26189360 #extn 314
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
Ra. Gowthaman,
Graduate Student,
Bioinformatics Lab,
Malaria Research Group,
ICGEB , New Delhi.
INDIA

Phone: 91-9811261804
   91-11-26173184; 91-11-26189360 #extn 314

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



[PHP] Re: passing values of checkboxes in PHP

2004-05-16 Thread John Taylor-Johnston
Gowthaman,

Just at a glance, it seems that you Should Only receive One value.



'Name=protid' tells me that you have only created one value.

Because they ALL have the SAME name="protid" there will be only one value.

This would be more evident if they were type=radiobox. What you need is to generate:






to get separate values.

Sorry! That's html.

Gowthaman Ramasamy wrote:

> In the form i have many checkbox options created dynamically. All of
> them have same name but different values. But when user submits the form
> i am able to access only the value of last checkbox that user cliked.
> Values of rest of the selection is not displayed/passed.  How can i get
> all the values.
> many thanks in advance ...
> followings are my scripts ...
>
> form this prints lot of check boxes on the from as per the
> result or previous mysql query
> 
> while ($rows2 = mysql_fetch_array($result2))
> {
> echo  something
> ...
> }
>
> I am trying to access these checkbox values in follwing script 
> ---
> if(isset($_POST['submit']))
> {
> echo "hello";
> echo $hell=$_POST['protid'];
> echo $counts = count($hell);
> }
> ?>
> counts says there is only one value (that is value of last checked
> box) I also tried putting $hell=$_POST['protid'] in a while loop 
> did not work.
> sincerely
> gowtham
> --
> Ra. Gowthaman,
> Graduate Student,
> Bioinformatics Lab,
> Malaria Research Group,
> ICGEB , New Delhi.
> INDIA
>
> Phone: 91-9811261804
>91-11-26173184; 91-11-26189360 #extn 314

--
John Taylor-Johnston
-
"If it's not open-source, it's Murphy's Law."

  ' ' '   Collège de Sherbrooke:
 ô¿ô   http://www.collegesherbrooke.qc.ca/languesmodernes/
   - Université de Sherbrooke:
  http://compcanlit.ca/
  819-569-2064

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



Re: [PHP] create if table not exists

2004-05-16 Thread John Taylor-Johnston
>But wouldn't it be easier to create the tables in the first place?

Travis,
It surely would. But for one situation, I don't/can't have access to phpMyAdmin to 
install it.
At the same time, I wanted to learn how to do it.

--
John

I'm still learning. But isn't this much more fun than Perl!


> To paraphrase, just use mysql_list_tables() to get a table list in a result
> set, then go through the result set to see if the named table exists.
>
> But wouldn't it be easier to create the tables in the first place?

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



[PHP] Re: create if table not exists

2004-05-16 Thread John Taylor-Johnston
I used phpmyadmin to help generate some code. When I add:

IF NOT EXISTS `mhinse_counter` it mysql_errors that the error is around:

"IF  NOT  EXISTS  `mhinse_counter` CREATE  TABLE  `mhinse_counter` ( "

Can anyone see clear here?


$server = "localhost";
$user = "user1";
$pass = "**";
$db="jtjohnston";
$table="mhinse_counter";


$query = 'IF NOT EXISTS `mhinse_counter`
CREATE TABLE `mhinse_counter` ( `id` int( 10 ) NOT NULL AUTO_INCREMENT ,'
 . ' `IPAddress` varchar( 100 ) NOT NULL default \'\','
 . ' `RemoteHost` varchar( 100 ) NOT NULL default \'\','
 . ' `Language` text NOT NULL ,'
 . ' `StampDate` date NOT NULL default \'-00-00\','
 . ' `StampTime` time NOT NULL default \'00:00:00\','
 . ' `TimeStamp` timestamp( 14 ) NOT NULL ,'
 . ' PRIMARY KEY ( `id` ) ) TYPE = MYISAM AUTO_INCREMENT =1';

$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);
mysql_query($query) or die(print mysql_error());



> Tim Van Wassenhove wrote:
> > How can I check if a table exists in a mysql db.
> $query = 'IF NOT EXISTS table CREATE TABLE table (..)';
> mysql_query($query);

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



[PHP] passing values of checkboxes in PHP

2004-05-16 Thread gowthaman ramasamy
hi list,
I have a problem with getting the values of check boxes ...

In the form i have many checkbox options created dynamically. All of
them have same name but different values. But when user submits the form
i am able to access only the value of last checkbox that user cliked.
Values of rest of the selection is not displayed/passed.  How can i get
all the values. 
many thanks in advance ...
followings are my scripts ...

form this prints lot of check boxes on the from as per the
result or previous mysql query

while ($rows2 = mysql_fetch_array($result2))
{
echo  something
... 
}



I am trying to access these checkbox values in follwing script 
---
if(isset($_POST['submit']))
   
  
{
echo "hello";
echo $hell=$_POST['protid'];
echo $counts = count($hell);
}
?>
counts says there is only one value (that is value of last checked
box) I also tried putting $hell=$_POST['protid'] in a while loop 
did not work.
sincerely
gowtham
-- 
Ra. Gowthaman,
Graduate Student,
Bioinformatics Lab,
Malaria Research Group,
ICGEB , New Delhi.
INDIA

Phone: 91-9811261804
   91-11-26173184; 91-11-26189360 #extn 314

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



Re: [PHP] Re: weird problem with index page

2004-05-16 Thread Jason Wong
On Monday 17 May 2004 13:38, loll wrote:

> Thanks for th einfo, after beating myself all day over it, I have
> determined that it only seesm to be an issue when using Internet Explorer,
> using opera or mozilla it seems to work as it should, so I really dont
> understand now.

With Mozilla it automatically adds a trailing slash, maybe IE doesn't do this?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
No one can guarantee the actions of another.
-- Spock, "Day of the Dove", stardate unknown
*/

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



Re: [PHP] Re: weird problem with index page

2004-05-16 Thread loll
Hi,
Thanks for th einfo, after beating myself all day over it, I have 
determined that it only seesm to be an issue when using Internet Explorer, 
using opera or mozilla it seems to work as it should, so I really dont 
understand now.

Checked the apache setting you meantioned and it seems to already be set to 
OFF.

Anyway, with all these troubles I thought perhaps I would try upgrading php 
by creating a CGI version (the server has mod 4.2.2 installed). I managed 
to get the binary to create correctly, I can use it from the command line 
(tested it by using ./php.cgi phpinfo.php) but when I try to get it to work 
from the browser , I end up at best with a error 500. *sigh* Can't seem to 
find anythign that works can I?



At 12:12 AM 5/17/2004, you wrote:
Try adding a trailing slash to the URL, and seeing if it works. If so, 
then try adding the apache configuration directive:

UseCanonicalName off
In either httpd.conf or an .htaccess file, and try accessing without the 
trailing slash. I had a similar issue and adding that fixed it.

Andy
Loll wrote:
[snip]if I go to www.domain.com/subdir it sya s page not found even 
though there is a index.php file in that directory. I am at a loss as to 
what is wrong. index.php is listed inthe directoryindex for apache so I 
dont understand why it is doing all this.
If anyone can help me it would be appreciated.
Thanks
Loll
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

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


[PHP] Re: Forums

2004-05-16 Thread Steve Magruder - WebCommons.org
Ryan A wrote:
> Hey,
> Just spent 2 hours at hot scripts searching for a good forum
> software, after going through 15 pages I found:
{snip}
> The software HAS to be written in PHP coz its for a php discussion
> site.

phpBB (www.phpbb.com) is the best (IMHO), as it has an extensive modder
community and it's slap-easy to install and get running.
-- 

Steve Magruder
www.webcommons.org

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



Re: [PHP] File_exists result cached over a session?

2004-05-16 Thread Steve Magruder - WebCommons.org
Marek Kilimajer wrote:
> Steve Magruder - WebCommons.org wrote:
>> File_exists results (and the results from other file-related
>> functions) are cached (according to the php doc) during the run of a
>> script.  For instance, if file_exists returns True for a file once,
>> it won't actually test the file again if file_exists is run again
>> against the file.
>>
>> What I need to know is whether this caching works over a session
>> (not just during a single script run).
>>
>> Thanks.
>
> no

Thanks.  Does any documentation exist that covers this?
-- 

Steve Magruder
www.webcommons.org

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



[PHP] Re: create if table not exists

2004-05-16 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, John Taylor-Johnston wrote:
> How can I check if a table exists in a mysql db. 

$query = 'IF NOT EXISTS table CREATE TABLE table (..)';
mysql_query($query);

-- 
Tim Van Wassenhove 

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



Re: [PHP] create if table not exists

2004-05-16 Thread Travis Low
The manual says:
";
}
?>
To paraphrase, just use mysql_list_tables() to get a table list in a result 
set, then go through the result set to see if the named table exists.

But wouldn't it be easier to create the tables in the first place?
cheers,
Travis
John Taylor-Johnston wrote:
How can I check if a table exists in a mysql db. If it table does not exist, then,
$news = mysql_query($sql_create);
else
$news = mysql_query($sql);
Not sure I know where to start?
-snip
$server = "localhost";
$user = "user1";
$pass = "";
$db="user1table";
$table="comments";
$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);
$sql = 'SELECT * FROM '.$table.' WHERE MATCH (username) AGAINST 
(\''.stripslashes($searchenquiry).'\' IN BOOLEAN MODE) ORDER BY id asc;';
$sql_create = "CREATE TABLE ".$table." (
   id int(11) NOT NULL auto_increment,
   username varchar(100) NOT NULL,
   comment text,
   PRIMARY KEY (id)
);

Sorry, I'm not even sure if this is a php thing as much as it is also mysql.
-
John
--
Travis Low


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


[PHP] Re: weird problem with index page

2004-05-16 Thread Andy Ladouceur
Try adding a trailing slash to the URL, and seeing if it works. If so, 
then try adding the apache configuration directive:

UseCanonicalName off
In either httpd.conf or an .htaccess file, and try accessing without the 
trailing slash. I had a similar issue and adding that fixed it.

Andy
Loll wrote:
[snip]if I go to www.domain.com/subdir it sya s page not found even though 
there is a index.php file in that directory. I am at a loss as to what 
is wrong. index.php is listed inthe directoryindex for apache so I dont 
understand why it is doing all this.

If anyone can help me it would be appreciated.
Thanks
Loll
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] create if table not exists

2004-05-16 Thread John Taylor-Johnston
How can I check if a table exists in a mysql db. If it table does not exist, then,

$news = mysql_query($sql_create);

else

$news = mysql_query($sql);

Not sure I know where to start?


-snip
$server = "localhost";
$user = "user1";
$pass = "";
$db="user1table";
$table="comments";

$myconnection = mysql_connect($server,$user,$pass);
mysql_select_db($db,$myconnection);

$sql = 'SELECT * FROM '.$table.' WHERE MATCH (username) AGAINST 
(\''.stripslashes($searchenquiry).'\' IN BOOLEAN MODE) ORDER BY id asc;';

$sql_create = "CREATE TABLE ".$table." (
   id int(11) NOT NULL auto_increment,
   username varchar(100) NOT NULL,
   comment text,
   PRIMARY KEY (id)
);




Sorry, I'm not even sure if this is a php thing as much as it is also mysql.

-
John

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



[PHP] change database from mysql to mssql

2004-05-16 Thread David
Hi all

I have been using mysql as the database for my PHP application.
Now my manager ordered me to use Microsoft SQL Server as the database.
I have been using the mysql interface to access the database, so I have
to change my code.
Which database interface should I use, ODBC, ADO, mssql or PEAR?
Any brief suggestion or link to some good tutorial/paper would be very 
much appreciated.


David Oilfield
China Lottery Online Co. Ltd
Email:[EMAIL PROTECTED]
Mobile:13521805655
Phone:010-83557528-263


Re: [PHP] Forums

2004-05-16 Thread Justin French
Personally, I hate almost all forum software other than my own (still 
in Dev), but that's a different story.

I've been frequenting the Textpattern forums [1] lately, which use 
PubBB [2], which is pretty good, lightweight, PHP driven, with a 
reasonable grip on standards and CSS.

1 http://www.textpattern.com/
2 http://www.punbb.org/
On 17/05/2004, at 10:54 AM, Ryan A wrote:
Hey,
Just spent 2 hours at hot scripts searching for a good forum software, 
after
going through 15 pages I found:
"PBLang - International PHP-forum" which seems good.

If anybody has used it...I would appreciate you telling me how your
experience with it was...good, bad and anything in between.
I have not *totally* decided on it, so if you know of a good/great 
piece of
forum software (HAS to be written in PHP) please feel free to reply 
and tell
me...if you do...good things will happen to you :-) or consider it 
your good
deed for the day/week.

Two forums that I really like are:
1. the forum at DIVX.com  (very very cool)
2. awforum.net (unfortunatly written in ASP..pain in the butt but easy 
to
use as its really simple)

The software HAS to be written in PHP coz its for a php discussion 
site.

Thanks,
-Ryan
---
Justin French
http://indent.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Forums

2004-05-16 Thread John W. Holmes
Ryan A wrote:
Hey,
Just spent 2 hours at hot scripts searching for a good forum software, after
going through 15 pages I found:
"PBLang - International PHP-forum" which seems good.
Either get the free version of Invision Power Board or do yourself a 
favor and buy vBulletin.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Forums

2004-05-16 Thread Ryan A
Hey,
Just spent 2 hours at hot scripts searching for a good forum software, after
going through 15 pages I found:
"PBLang - International PHP-forum" which seems good.

If anybody has used it...I would appreciate you telling me how your
experience with it was...good, bad and anything in between.

I have not *totally* decided on it, so if you know of a good/great piece of
forum software (HAS to be written in PHP) please feel free to reply and tell
me...if you do...good things will happen to you :-) or consider it your good
deed for the day/week.

Two forums that I really like are:
1. the forum at DIVX.com  (very very cool)
2. awforum.net (unfortunatly written in ASP..pain in the butt but easy to
use as its really simple)

The software HAS to be written in PHP coz its for a php discussion site.

Thanks,
-Ryan

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



Re: [PHP] while inside a while or join or...

2004-05-16 Thread John W. Holmes
T. H. Grejc wrote:
Hallo,
I know of a few ways of doing this but I am not sure that any is right. 
I want to consult with you what is the best way of doing this:

Table 1:
++-+
| *a* | *b* |
++-+
|  2   |  1|
++-+
|  2   |  2|
++-+
Table 2:
++-+
| *b* | *d* |
++-+
|  1   |  asd |
++-+
|  2   |  fgh |
++-+
I would like to select all 'b' from Table_1 WHERE a = '2' and then to 
select all 'd' from table_2 with 'b' from previous result.

Table 2 is the Table with UserNames (d) and Table 1 is the table with 
'marked' UserID's (b).
What's this go to do with PHP? This should be on php-db at least...
SELECT t1.b, t2.d FROM table1 t1, table2, t2 WHERE t1.a = 2 AND t1.b = t2.b
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] while inside a while or join or...

2004-05-16 Thread Curt Zirzow
* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):
> Hallo,
> 
> I know of a few ways of doing this but I am not sure that any is right. 
> I want to consult with you what is the best way of doing this:
> 
> ...
> 
> I would like to select all 'b' from Table_1 WHERE a = '2' and then to 
> select all 'd' from table_2 with 'b' from previous result.
> 
> Table 2 is the Table with UserNames (d) and Table 1 is the table with 
> 'marked' UserID's (b).
> 
> What is the best way of doing this.

I'm having difficluties finding out how this is related to php, but
anyway... this is a  simple joining of two tables.

so you have

  select b from table_1 where a = 2

and
  select d from table_2 where b = results from table_1

Thus

  select table_1.b, table_2.d from table_1, table_2 
   where table_1.b = table_2.b 
and table_1.a = 2


come to think of it, thats very much like an algebra problem.


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

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



Re: [PHP] while inside a while or join or...

2004-05-16 Thread Rachel Rodriguez

> 
> I would like to select all 'b' from Table_1 WHERE a
> = '2' and then to 
> select all 'd' from table_2 with 'b' from previous
> result.
> 
> Table 2 is the Table with UserNames (d) and Table 1
> is the table with 
> 'marked' UserID's (b).
> 
If I understand you correctly, its sounds like you
want to do the following:

$sql = "
SELECT t1.b,
   t2.d
FROM Table_1 AS t1
LEFT JOIN Table_2 AS t2
ON (t1.b = t2.d)
WHERE t1.a = '2'";


=
~Rachel




__
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

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



php-general Digest 17 May 2004 00:28:06 -0000 Issue 2767

2004-05-16 Thread php-general-digest-help

php-general Digest 17 May 2004 00:28:06 - Issue 2767

Topics (messages 186347 through 186368):

Re: PEAR::DB is great but is so SLOW !
186347 by: Aidan Lister
186349 by: Martin Hjort Eriksen
186350 by: Tim Van Wassenhove
186355 by: Curt Zirzow

Re: Template Engine -> TinyButStrong
186348 by: Skrol 29

weird problem with index page
186351 by: loll
186352 by: BAO RuiXian
186356 by: loll

Need help integration whoiscart.net script with my hosting template!
186353 by: J.H.J. Saat
186354 by: AP&J-SAAT Internet Solutions

File_exists result cached over a session?
186357 by: Steve Magruder - WebCommons.org
186363 by: Marek Kilimajer

How to get class name in static function (PHP 4.2.3)
186358 by: Torsten Roehr
186360 by: Curt Zirzow

Re: PHP and qmail
186359 by: Justin Patrin

loosing memory
186361 by: Merlin
186364 by: Curt Zirzow
186365 by: Merlin

Re: Reposting elseif carry
186362 by: Curt Zirzow

session
186366 by: MrS

Local_value Extension_Dir
186367 by: Alexander Hachmann

while inside a while or join or...
186368 by: T. H. Grejc

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
There are many, many benchmarks done comparing PEAR::DB to PEAR::MDB to
AdoDB, PEAR::DB is much slower than the native API, AdoDB is the fastest but
least functional - I suggest you try PEAR::MDB2

http://pear.php.net/package/mdb2

once you get into it, you'll love it


"Rainer müller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greg wrote:
> > Hello,
> >
> > I've just performed a few tests when using PEAR::DB and
> > the results weren't good at all.
> >
> > If I compare a script using PEAR::DB with a script using
> > standard functions (and which supports mysql, pgsql and
> > sqlite databases), the script using PEAR::DB is 10 times
> > slower than the other.
> >
> > In one of my projects, it slows down execution time to
> > 0,7 sec per page !
> >
> > Conclusion : if you want to use PEAR::DB package, you'll
> > probably will have to use cache systems for scripts that
> > may be request often.
> >
> > Am I the only one annoying by this loss of performance ?
> > Because this is a huge loss in that case !
> >
> > Greg
>
> Remember, PEAR::DB also uses the standard functions, so I can't
> understand, why it should be much slower.
>
> Rainer
--- End Message ---
--- Begin Message ---

Remember, PEAR::DB also uses the standard functions, so I can't 
understand, why it should be much slower.

Rainer

You have to remeber that PEAR::DB is an object oriented abstraction over 
the standard functions, and within this abstraction, there is also built 
som error handling funtions, etc. in.

/Martin Eriksen
--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>, Greg wrote:
> If I compare a script using PEAR::DB with a script using
> standard functions (and which supports mysql, pgsql and
> sqlite databases), the script using PEAR::DB is 10 times
> slower than the other.
> 
> Conclusion : if you want to use PEAR::DB package, you'll
> probably will have to use cache systems for scripts that
> may be request often.

I don't understand your logic. 

Imho, you can only compare:
- A without caching VS B without caching
- A with caching VS B with caching

> Am I the only one annoying by this loss of performance ?
> Because this is a huge loss in that case !

I understand there might be a significant difference in performance, and
i understand nobody likes that.

But imho the real questions are these:
- What are the advantages of a Database Abstraction API?
- What are the disadvantages of a Database Abstraction API?
- Can we live with the lesser performance if we know we'll safe a lot of time
when we switch to another DBMS product? 
- How likely is it that we are going to switch to another DBMS? 

-- 
http://home.mysth.be/~timvw
--- End Message ---
--- Begin Message ---
* Thus wrote Tim Van Wassenhove ([EMAIL PROTECTED]):
> In article <[EMAIL PROTECTED]>, Greg wrote:
> 
> > Am I the only one annoying by this loss of performance ?
> > Because this is a huge loss in that case !
> 
> I understand there might be a significant difference in performance, and
> i understand nobody likes that.
> 
> But imho the real questions are these:
> - What are the advantages of a Database Abstraction API?
> - What are the disadvantages of a Database Abstraction API?
> - Can we live with the lesser performance if we know we'll safe a lot of time
> when we switch to another DBMS product? 
> - How likely is it that we are going to switch to another DBMS? 

And one that many people over look...

How portable are your S

[PHP] while inside a while or join or...

2004-05-16 Thread T. H. Grejc
Hallo,
I know of a few ways of doing this but I am not sure that any is right. 
I want to consult with you what is the best way of doing this:

Table 1:
++-+
| *a* | *b* |
++-+
|  2   |  1|
++-+
|  2   |  2|
++-+
Table 2:
++-+
| *b* | *d* |
++-+
|  1   |  asd |
++-+
|  2   |  fgh |
++-+
I would like to select all 'b' from Table_1 WHERE a = '2' and then to 
select all 'd' from table_2 with 'b' from previous result.

Table 2 is the Table with UserNames (d) and Table 1 is the table with 
'marked' UserID's (b).

What is the best way of doing this.
TNX
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Local_value Extension_Dir

2004-05-16 Thread Alexander Hachmann
Hello,
I have the problem, that Modules located in the directory which ist set as
the local_value, do not work.
The normal Directory for Example is /usr/share/extension.
Now I set in the Virtualhost settings the Directory to
/usr/share/extension/user.
You can see in the php_info(); that the new Directory has been taken, but
the Modules located in this directory do not work.
What do I make wrong. When the Module is in the System-ExtensionDir
/usr/share/extension it works.
Can somebody help me??
Thx,
A.Hachmann

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



[PHP] session

2004-05-16 Thread MrS
Hi

How can I check if speciffic session is alive having session id?
Or how can I delete data from MySQL belong to dead session?

(I hope somebody understend what I wrote)

MrS

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



Re: [PHP] loosing memory

2004-05-16 Thread Merlin
thank you. I will try that.
Merlin
Curt Zirzow wrote:
* Thus wrote Merlin ([EMAIL PROTECTED]):
Hi there,
I am running the newest php 4.x branch on a suse 9.0 apache 1.3x system
Hardware: 1G ram
It apears to me that the system anyhow has a memory leak. While running 
"top" on linux it shows the free memory declining steadily. After about 48h 
the system starts to swap. Restarting apache gracefully brings it back to 
about 140 MB free ram, thats all.

While your tracking this down you can change your
'MaxRequestsPerChild' setting in apache.

Is there a way to show all memory in use and therefore make it easy to 
identify the problem? I realised that some scripts have missed the 
imagedestroy function, but after I added this, the system still eats the 
memory.

php should release any memory allocated in the scripts, except for
a some 3rd party extension's or if you're using shared memory with
in your scripts.
You can ./configure --enable-debug with php and it will detect
memory leaks, php will issue an E_WARNING if a memory detection
occurs. if this is a production server, make sure that php is
loggin to syslog and display_errors = off.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] loosing memory

2004-05-16 Thread Curt Zirzow
* Thus wrote Merlin ([EMAIL PROTECTED]):
> Hi there,
> 
> I am running the newest php 4.x branch on a suse 9.0 apache 1.3x system
> Hardware: 1G ram
> 
> It apears to me that the system anyhow has a memory leak. While running 
> "top" on linux it shows the free memory declining steadily. After about 48h 
> the system starts to swap. Restarting apache gracefully brings it back to 
> about 140 MB free ram, thats all.

While your tracking this down you can change your
'MaxRequestsPerChild' setting in apache.


> 
> Is there a way to show all memory in use and therefore make it easy to 
> identify the problem? I realised that some scripts have missed the 
> imagedestroy function, but after I added this, the system still eats the 
> memory.

php should release any memory allocated in the scripts, except for
a some 3rd party extension's or if you're using shared memory with
in your scripts.

You can ./configure --enable-debug with php and it will detect
memory leaks, php will issue an E_WARNING if a memory detection
occurs. if this is a production server, make sure that php is
loggin to syslog and display_errors = off.


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

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



Re: [PHP] File_exists result cached over a session?

2004-05-16 Thread Marek Kilimajer
Steve Magruder - WebCommons.org wrote:
File_exists results (and the results from other file-related functions) are
cached (according to the php doc) during the run of a script.  For instance,
if file_exists returns True for a file once, it won't actually test the file
again if file_exists is run again against the file.
What I need to know is whether this caching works over a session (not just
during a single script run).
Thanks.
no
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Reposting elseif carry

2004-05-16 Thread Curt Zirzow
* Thus wrote Ronald The Newbie Allen ([EMAIL PROTECTED]):
> While I am sure that you are right.  I went to the webpages that you
> identified and did not see anything on' and ".  I tried the code that typed
> up and it said that Date_and_Time wher and undefinded index and also that
> the headers could not be modified.

http://www.php.net/manual/en/language.types.string.php

As noted in that document:

$var = 'a value';
$array['key'] = 'has this value';

echo "var is $var, and array {$array['key']}";

output:
  var is a value, and array has this value


echo 'var is $var, and array {$array[\'key\']}';

output:
  var is $var, and array {$array['key']}


The undefined index is because $_POST['Date_and_Time'] is not set,
you're probably using the form method GET so it will be defined in
$_GET instead, for more info on this see:

 http://www.php.net/manual/en/language.variables.external.php


The headers couldn't be modified becase php sent the notice of
undefined index to the browser, stop that notice and the header()
redirect will work properly.

> 
> the base_url is this suppose to be an I or and L
> $base_url .= dirname($_SERVER['REQUEST_URI   ']);

it is 'I' as in Identifier.

URL: http://servername/path/to/file
URI: /path/to/file


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

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



[PHP] loosing memory

2004-05-16 Thread Merlin
Hi there,
I am running the newest php 4.x branch on a suse 9.0 apache 1.3x system
Hardware: 1G ram
It apears to me that the system anyhow has a memory leak. While running "top" on 
linux it shows the free memory declining steadily. After about 48h the system 
starts to swap. Restarting apache gracefully brings it back to about 140 MB free 
ram, thats all.

Is there a way to show all memory in use and therefore make it easy to identify 
the problem? I realised that some scripts have missed the imagedestroy function, 
but after I added this, the system still eats the memory.

Thank you for any hint on that.
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to get class name in static function (PHP 4.2.3)

2004-05-16 Thread Curt Zirzow
* Thus wrote Torsten Roehr ([EMAIL PROTECTED]):
> Hi,
> 
> does anyone know a way of how to get the name of the class within a static
> function? I can't use __CLASS__ as my PHP version is 4.2.3 and I can't
> upgrade.
> 
> My code (simplified):
> 
> class Base {
> function Factory() {
> $classname = ???;
> return new $classname;
> }
> }
> 
> class Event extends Base {
> }
> 
> // This should make $event an object of class Event
> $event = Event::Factory();
> 
> Of course I could pass the classname as a parameter to the factory method
> like:
> $event = Event::Factory('Event');
> 
> But I would like to have a more generic solution. Any hints would be greatly
> appreciated. Thanks in advance!

The only Solution I can come up with:

class Event extends Base {
  function Factory() {
return parent::Factory('Event');
  }
}

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

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



[PHP] Re: PHP and qmail

2004-05-16 Thread Justin Patrin
Manuel Lemos wrote:
Hello,
On 05/15/2004 04:14 PM, Stephen Lake wrote:
Can someone tell me how I can send HTML using qmail from a Script? The 
MTA I
was using was changed from Sendmail to qmail and now my HTML mails 
actually
show the html tags in the mail body.

That looks like a bug in the mail() function because qmail comes with 
sendmail compatible wrapper.

Anyway, you may want to try this class for composing and sending 
messages including HTML formatted. It comes with a sub-class specialized 
in qmail but I suspected that you do not need to use it as the base 
class that uses mail() already comes with workarounds to use the mail()
function without the problems you are facing:

http://www.phpclasses.org/mimemessage

.Why do you always say that this is a bug? I've sent many a HTML 
e-mail using PHP's mail() function just fine with multiple MTAs. It just 
requires careful setting up of the message.

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


[PHP] How to get class name in static function (PHP 4.2.3)

2004-05-16 Thread Torsten Roehr
Hi,

does anyone know a way of how to get the name of the class within a static
function? I can't use __CLASS__ as my PHP version is 4.2.3 and I can't
upgrade.

My code (simplified):

class Base {
function Factory() {
$classname = ???;
return new $classname;
}
}

class Event extends Base {
}

// This should make $event an object of class Event
$event = Event::Factory();

Of course I could pass the classname as a parameter to the factory method
like:
$event = Event::Factory('Event');

But I would like to have a more generic solution. Any hints would be greatly
appreciated. Thanks in advance!

Regards, Torsten Roehr

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



[PHP] File_exists result cached over a session?

2004-05-16 Thread Steve Magruder - WebCommons.org
File_exists results (and the results from other file-related functions) are
cached (according to the php doc) during the run of a script.  For instance,
if file_exists returns True for a file once, it won't actually test the file
again if file_exists is run again against the file.

What I need to know is whether this caching works over a session (not just
during a single script run).

Thanks.
-- 

Steve Magruder
www.webcommons.org

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



Re: [PHP] weird problem with index page

2004-05-16 Thread loll
Well,
I managed to part fix the problem, now I have a problem where there is a 
page that all it does is redirect to another page, it wont redirect unless 
I hit the refresh button.

When I go to index.php it redirects to login.php, this is an old page that 
I just added a header("Location: blah); to so it would go to the new page. 
now it seems to jsut show a blank page instead of doing the second 
redirect, if I hit refresh on the blank page it will redirect correctly.

I wondered if there was some restriction somewhere on only allowing 1 
redirect where this page needs to be able to do more than one? is htis 
something that would be in the httpd.conf or php.ini file?

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


Re: [PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread Curt Zirzow
* Thus wrote Tim Van Wassenhove ([EMAIL PROTECTED]):
> In article <[EMAIL PROTECTED]>, Greg wrote:
> 
> > Am I the only one annoying by this loss of performance ?
> > Because this is a huge loss in that case !
> 
> I understand there might be a significant difference in performance, and
> i understand nobody likes that.
> 
> But imho the real questions are these:
> - What are the advantages of a Database Abstraction API?
> - What are the disadvantages of a Database Abstraction API?
> - Can we live with the lesser performance if we know we'll safe a lot of time
> when we switch to another DBMS product? 
> - How likely is it that we are going to switch to another DBMS? 

And one that many people over look...

How portable are your SQL statments?


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

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



[PHP] Need help integration whoiscart.net script with my hosting template!

2004-05-16 Thread AP&J-SAAT Internet Solutions
Hi ya, 

I really need some help I did buy the whoiscart.net billing 
management system and already got a site design and I am trying 
to integrate the script with my Design for almost 2 weeks now.
And somehow its not working! I hope someone here can help me out, 
My site is a low budget hosting you can view it
 here: http://www.roda2020.com (its not working still) PLS help! 

I am willing to pay (I not got much money) for anyone that can 
help me out here. 

Greetings |Dexter| AKA Jack


[PHP] Need help integration whoiscart.net script with my hosting template!

2004-05-16 Thread J.H.J. Saat
Hi all, 

I really need some help I did buy the whoiscart.net billing 
management system and already got a site design and I am trying 
to integrate the script with my Design for almost 2 weeks now.
And somehow its not working! I hope someone here can help me out, 
My site is a low budget hosting you can view it
 here: http://www.roda2020.com (its not working still) PLS help! 

I am willing to pay (I not got much money) for anyone that can 
help me out here. 

Greetings |Dexter| AKA Jack

Re: [PHP] weird problem with index page

2004-05-16 Thread BAO RuiXian

loll wrote:
Hi,
I am not sure if this is a PHP or Apache problem, but I am hoping 
someone can tellme what is wrong.

When I go to www.domain.com on my server it shows the page as text 
instead of parsing the php code.

If I go to www.domain.com/index.php (same page) it runs as it should.
if I go to www.domain.com/subdir it sya s page not found even though 
there is a index.php file in that directory. I am at a loss as to what 
is wrong. index.php is listed inthe directoryindex for apache so I 
dont understand why it is doing all this.

Interesting. Do you use virtual hosts? How many DirectoryIndex 
directives in your configuration file? What are their contexts? Got any 
error in your log file?

Best
Bao
If anyone can help me it would be appreciated.
Thanks
Loll
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] weird problem with index page

2004-05-16 Thread loll
Hi,
I am not sure if this is a PHP or Apache problem, but I am hoping someone 
can tellme what is wrong.

When I go to www.domain.com on my server it shows the page as text instead 
of parsing the php code.

If I go to www.domain.com/index.php (same page) it runs as it should.
if I go to www.domain.com/subdir it sya s page not found even though there 
is a index.php file in that directory. I am at a loss as to what is wrong. 
index.php is listed inthe directoryindex for apache so I dont understand 
why it is doing all this.

If anyone can help me it would be appreciated.
Thanks
Loll
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, Greg wrote:
> If I compare a script using PEAR::DB with a script using
> standard functions (and which supports mysql, pgsql and
> sqlite databases), the script using PEAR::DB is 10 times
> slower than the other.
> 
> Conclusion : if you want to use PEAR::DB package, you'll
> probably will have to use cache systems for scripts that
> may be request often.

I don't understand your logic. 

Imho, you can only compare:
- A without caching VS B without caching
- A with caching VS B with caching

> Am I the only one annoying by this loss of performance ?
> Because this is a huge loss in that case !

I understand there might be a significant difference in performance, and
i understand nobody likes that.

But imho the real questions are these:
- What are the advantages of a Database Abstraction API?
- What are the disadvantages of a Database Abstraction API?
- Can we live with the lesser performance if we know we'll safe a lot of time
when we switch to another DBMS product? 
- How likely is it that we are going to switch to another DBMS? 

-- 
http://home.mysth.be/~timvw

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



Re: [PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread Martin Hjort Eriksen

Remember, PEAR::DB also uses the standard functions, so I can't 
understand, why it should be much slower.

Rainer

You have to remeber that PEAR::DB is an object oriented abstraction over 
the standard functions, and within this abstraction, there is also built 
som error handling funtions, etc. in.

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


[PHP] Re: Template Engine -> TinyButStrong

2004-05-16 Thread Skrol 29
Hi,

Sorry if my reply looks like an advertisement, but TinyButStrong is a mature
PHP Template Engine simple and which offers lot of features. It's
only 1 file (= easy to install), 1 class with 8 methods and 2 properties.

TinyButStrong's tags can be 100% designed into the template using WYSIWYG
editors. That's the only Template Engine doing that that I know.

Download, manual, examples, forum :
  http://www.tinybutstrong.com

---
Skrol 29
www.skrol29.com
www.tinybutstrong.com
---

"George Lantz" <[EMAIL PROTECTED]> a écrit dans le message de
news:[EMAIL PROTECTED]
> I was just wondering if anyone had any good advice or tutorials on
> building a simple template engine system. I am woking on a small project
> that I would like to distribute, and I would of course like to separate
> logic from html. I really just want to know the basics without caching.
> I am familiar with Smarty and PHPLib and FastTemplate and some others.
> But since I am going to be distributing the app, I would like it as
> portable and small/simple as possible. Those template systems are
> overkill for what I need. Really it does not even have to be a "Template
> system", I would just like to here your thoughts on how you may have
> accomplished separation of logic from output in a simple way.
>
> Thanks,
> George
>

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



[PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread Aidan Lister
There are many, many benchmarks done comparing PEAR::DB to PEAR::MDB to
AdoDB, PEAR::DB is much slower than the native API, AdoDB is the fastest but
least functional - I suggest you try PEAR::MDB2

http://pear.php.net/package/mdb2

once you get into it, you'll love it


"Rainer müller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greg wrote:
> > Hello,
> >
> > I've just performed a few tests when using PEAR::DB and
> > the results weren't good at all.
> >
> > If I compare a script using PEAR::DB with a script using
> > standard functions (and which supports mysql, pgsql and
> > sqlite databases), the script using PEAR::DB is 10 times
> > slower than the other.
> >
> > In one of my projects, it slows down execution time to
> > 0,7 sec per page !
> >
> > Conclusion : if you want to use PEAR::DB package, you'll
> > probably will have to use cache systems for scripts that
> > may be request often.
> >
> > Am I the only one annoying by this loss of performance ?
> > Because this is a huge loss in that case !
> >
> > Greg
>
> Remember, PEAR::DB also uses the standard functions, so I can't
> understand, why it should be much slower.
>
> Rainer

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



php-general Digest 16 May 2004 11:09:12 -0000 Issue 2766

2004-05-16 Thread php-general-digest-help

php-general Digest 16 May 2004 11:09:12 - Issue 2766

Topics (messages 186336 through 186346):

Re: PHP and qmail
186336 by: Manuel Lemos
186339 by: electroteque

Release Announcement: Hardened-PHP 0.1.1
186337 by: Stefan Esser
186338 by: electroteque

Re: Reposting elseif carry
186340 by: Curt Zirzow
186341 by: Daniel Clark
186342 by: Ronald \"The Newbie\" Allen

PEAR::DB is great but is so SLOW !
186343 by: greg
186344 by: greg
186345 by: greg
186346 by: Rainer Müller

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Hello,
On 05/15/2004 04:14 PM, Stephen Lake wrote:
Can someone tell me how I can send HTML using qmail from a Script? The MTA I
was using was changed from Sendmail to qmail and now my HTML mails actually
show the html tags in the mail body.
That looks like a bug in the mail() function because qmail comes with 
sendmail compatible wrapper.

Anyway, you may want to try this class for composing and sending 
messages including HTML formatted. It comes with a sub-class specialized 
in qmail but I suspected that you do not need to use it as the base 
class that uses mail() already comes with workarounds to use the mail()
function without the problems you are facing:

http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Could it not be you have to send the  html document type in the header of
the mail ?

> -Original Message-
> From: Manuel Lemos [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 16, 2004 8:55 AM
> To: Stephen Lake
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP and qmail
>
>
> Hello,
>
> On 05/15/2004 04:14 PM, Stephen Lake wrote:
> > Can someone tell me how I can send HTML using qmail from a
> Script? The MTA I
> > was using was changed from Sendmail to qmail and now my HTML
> mails actually
> > show the html tags in the mail body.
>
> That looks like a bug in the mail() function because qmail comes with
> sendmail compatible wrapper.
>
> Anyway, you may want to try this class for composing and sending
> messages including HTML formatted. It comes with a sub-class specialized
> in qmail but I suspected that you do not need to use it as the base
> class that uses mail() already comes with workarounds to use the mail()
> function without the problems you are facing:
>
> http://www.phpclasses.org/mimemessage
>
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---


_  __ _   ___  _  _  ___ 
   | || | __ _  _ _  __| | ___  _ _   ___  __| | ___ | _ \| || || _ \
   | __ |/ _` || '_|/ _` |/ -_)| ' \ / -_)/ _` ||___||  _/| __ ||  _/
   |_||_|\__,_||_|  \__,_|\___||_||_|\___|\__,_| |_|  |_||_||_|  
 



The Hardened-PHP project team is pleased to announce the release of 
version 0.1.1 of our PHP security hardening patch. This new Hardened-PHP
release is the first one that is publicly announced and is considered
stable on atleast linux systems.

Hardened-PHP is a patch against the PHP codebase which adds security 
hardening features to it to protect servers on the one hand against a 
number of well known problems in hastily written PHP scripts and on 
the other hand against potential unknown vulnerabilities within the 
engine itself.

Hardened-PHP provides:

+ Protection of the Zend Memory Manager with canaries
+ Protection of Zend Linked Lists with canaries
+ Protection against internal format string exploits
+ Protection against arbitrary code inclusion
+ Syslog logging of attackers IP

We consider Hardened-PHP 0.1.1 to be the best version of Hardened-PHP
available and we strongly recommend that users of older versions upgrade
as soon as possible.

Hardened-PHP is available for download via HTTP from 

http:///www.hardened-php.net/downloa

[PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread Rainer Müller
Greg wrote:
Hello,
I've just performed a few tests when using PEAR::DB and
the results weren't good at all.
If I compare a script using PEAR::DB with a script using
standard functions (and which supports mysql, pgsql and
sqlite databases), the script using PEAR::DB is 10 times
slower than the other.
In one of my projects, it slows down execution time to
0,7 sec per page !
Conclusion : if you want to use PEAR::DB package, you'll
probably will have to use cache systems for scripts that
may be request often.
Am I the only one annoying by this loss of performance ?
Because this is a huge loss in that case !
Greg
Remember, PEAR::DB also uses the standard functions, so I can't 
understand, why it should be much slower.

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


[PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread greg
Grrr, i'm posting too fast !
Sorry for mistakes :)
Hello,
I've just performed a few tests when using PEAR::DB and
the results weren't good at all.
If I compare a script using PEAR::DB with a script using
standard functions (and which supports mysql, pgsql and
sqlite databases), the script using PEAR::DB is 10 times
slower than the other.
In one of my projects, it slows down execution time to
0.07 sec per page ! (original exec time was 0.006 sec)
Conclusion : if you want to use PEAR::DB package, you'll
probably will have to use cache systems for scripts that
may be request often.
Am I the only one annoyed by this loss of performance ?
Because this is a huge loss in that case !
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread greg
Greg wrote:
Hello,
I've just performed a few tests when using PEAR::DB and
the results weren't good at all.
If I compare a script using PEAR::DB with a script using
standard functions (and which supports mysql, pgsql and
sqlite databases), the script using PEAR::DB is 10 times
slower than the other.
In one of my projects, it slows down execution time to
0,7 sec per page !
 (original exec time was 0.06 sec)
Conclusion : if you want to use PEAR::DB package, you'll
probably will have to use cache systems for scripts that
may be request often.
Am I the only one annoying by this loss of performance ?
annoyed
Because this is a huge loss in that case !
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PEAR::DB is great but is sooooo SLOW !

2004-05-16 Thread greg
Hello,
I've just performed a few tests when using PEAR::DB and
the results weren't good at all.
If I compare a script using PEAR::DB with a script using
standard functions (and which supports mysql, pgsql and
sqlite databases), the script using PEAR::DB is 10 times
slower than the other.
In one of my projects, it slows down execution time to
0,7 sec per page !
Conclusion : if you want to use PEAR::DB package, you'll
probably will have to use cache systems for scripts that
may be request often.
Am I the only one annoying by this loss of performance ?
Because this is a huge loss in that case !
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Reposting elseif carry

2004-05-16 Thread Ronald \"The Newbie\" Allen
While I am sure that you are right.  I went to the webpages that you
identified and did not see anything on' and ".  I tried the code that typed
up and it said that Date_and_Time wher and undefinded index and also that
the headers could not be modified.

Advanced stuff for me, while I do see the logic in the operation

What is the difference in a single quote and a double quote?

the base_url is this suppose to be an I or and L
$base_url .= dirname($_SERVER['REQUEST_URI   ']);





"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Ronald The Newbie Allen ([EMAIL PROTECTED]):
> >
> > what I currently have is
> >
> >  echo " > URL=./Conference_Calls.php?Date_and_Time=".$_POST["$Date_and_Time"].">";
>
> Have you looked at what this is actually outputing?
>
> >
> > Tried several things from the string and either they return a parsing
error
> > or they return ".$_POST
> >
> > kind of clueless nowhelp please
>
> You might want to read:
> http://www.php.net/manual/en/langref.php
>
> It'll give you a better grasp on what  you're trying to do.
>
>
> >
> > The code:
> >
> >  > $event =  $_GET['Event_Type'];
> > $Date_and_Time = $_GET['Date_and_Time'];
>
> You're using $_GET here but $_POST in the output of your meta tag,
> which one is it?
>
> > //echo "$event";
> > //echo "$time";
> > if ($event == "Trouble_Tickets") {
> >  echo '';
> > } elseif ($event == "Conference_Calls") {
> >  print '';
> > } elseif ($event == "Outage_Reports") {
> >  echo '';
> > } else {
> >  echo '';
> > }
> >
>
> A few points:
>  - You're if/elseif would better be written with a switch()
>statment.
>  - You shouldn't really use a meta-refresh, but redirect the user
>using header().
>  - Learn the difference between how php treats the single quote (')
>vs the double quote (")
>
>
> 
> // Grab the event from the Query String
> $event = $_GET['Event_Type'];
>
>
> // Make the base url for redirection.
> $base_url  = 'http://' . $_SERVER['HTTP_HOST'];
> $base_url .= dirname($_SERVER['REQUEST_URI']);
>
> switch ($event) {
>
>   case 'Trouble_Tickets':
> $redirect = $base_url . $event . '.php';
> break;
>
>   case 'Conference_Calls':
> $redirect = $base_url . $event . '.php?Date_and_Time='.
$_POST['Date_and_Time'];
> break;
>
>   case 'Outage_Reports':
> $redirect = $base_url . $event . '.php';
> break;
>
>   default:
> $redirect = $base_url . 'log.php';
> break;
> }
>
> // Now redirect the user
> header('Location: ' . $redirect);
> exit();
> ?>
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."

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