Re: [PHP] Free Database Design Program

2001-05-10 Thread Anuradha Ratnaweera


On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:

 Anyone know a Free database Design program? I'm needing to organize my
 MySQL databases and design new databases.

In what sence do you mean Free? Just curious;

Anuradha


--
a href=http://www.bee.lk/people/anuradha/;home page/a


-- 
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] Sorry, what is PWS

2001-05-10 Thread Anuradha Ratnaweera


On Wed, 9 May 2001, hassan el forkani wrote:

 i have tried both PWS and Apache on a windows98 machine, and franckly
 Apache is much much better just grab a binary distribution install it
 and go through the httpd.conf to configure it (that's the trikiest
 part but the file is very well commented ) voila! best combination:
 php, apache, Mysql

Even the defaults are okey without ever touching the httpd.conf. I mean if
one doesn't like editing configuration files. Just copying files to the
DocumentRoot (/var/www/ on Debian, /home/httpd/html/ on RedHat etc) should
work.

Anuradha


--
a href=http://www.bee.lk/people/anuradha/;home page/a


-- 
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] Need to know this

2001-05-10 Thread Anuradha Ratnaweera


On Fri, 4 May 2001, S.J. Black wrote:

  People Hate Perl ;)
 
 That's gorgeous! g

I like that too:)

Anuradha


--
a href=http://www.bee.lk/people/anuradha/;home page/a


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

2001-05-10 Thread Anuradha Ratnaweera


On Fri, 4 May 2001, Thimo von Rauchhaupt wrote:

  Hi there assume that I had a password field in md5 format like this
  $1$uJ8d$jJKOHnfh^79824/.
  how do i compare an input password to the password that I sore in database
 
  so it can return right or wrong password
 
 Just compare the md5 hashed password with the md5 hashed string from the
 database. If the password is like the string, the hashes must equal, too.

Do _not_ store the password in the database as it is. Instead, store the
md5 hash of the password and compare the md5 hash of user input with
_that_.

Anuradha


--
a href=http://www.bee.lk/people/anuradha/;home page/a


-- 
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] Sorry, what is PWS

2001-05-09 Thread Anuradha Ratnaweera


On Sat, 5 May 2001, Thomas Edison Jr. wrote:

 Latest version of PWS is 4.0! If u're looking for something esy  fast
 to get running, PWS is it.

It is not something as easy as apache to install. If you install any Linux
or BSD distribution, you get can apache to run out of the box without any
effort! No reason to go to network neighbourhood properties and
whatsoever...

Anuradha


-- 
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] Starting PHP script with crontab

2001-05-09 Thread Anuradha Ratnaweera


What about

wget foo.bar.com/script.php

Anuradha

On Thu, 3 May 2001, Noah Spitzer-Williams wrote:

 is there a service on the web that can do this for you? i once found a site
 that would accept a url and an interval and would retrieve that url
 (therefore running any code you had in there) on your interval
 
 - Noah
 
 Anuradha Ratnaweera [EMAIL PROTECTED] wrote in message
 Pine.LNX.4.21.0105021110320.342-10@presario">news:Pine.LNX.4.21.0105021110320.342-10@presario...
 
  If you are not careful, anyone will be able to run the script!
 
  Anuradha
 
  On Thu, 19 Apr 2001, Bertjan Schrader wrote:
 
   I need tot start a PHP script at night with the crontab. I tried to do
 it
   with lynx (lynx http://www.domain.nl/test.php) as a commandline within
 the
   crontab. Lynx is starting but the PHP script is not working. Anyone an
 idea
   how to do it?
  
   OS:  Redhat Linux 5.2
   Apache
   PHP as a apache module
  
   thanks!
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




RE: [PHP] SQL Query time?

2001-05-02 Thread Anuradha Ratnaweera


I wonder if using microtime() gives _actual_ time spent for the query
while explain gives _processor_ time.

Anuradha

On Thu, 26 Apr 2001, Maxim Maletsky wrote:

 what about microtime() ?
 
 you can do it your self:
 
 $start = microtime();
 mysql_query()...
 $stop = microtime();
 
 $token = round($stop-$start, 3);
 echo Query took $token seconds;
 
 I mean this is not as precise as SQL would do itself, but will work
 approximately.
 
 
 Sincerely, 
 
  Maxim Maletsky
  Founder, Chief Developer
  PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED]
  www.phpbeginner.com
 
 
 
 
 -Original Message-
 From: James, Yz [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 26, 2001 5:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] SQL Query time?
 
 
 Hi all,
 
 I have seen a few pages that echo the time it's taken to execute an SQL
 query, like The results in the database were returned in 0.3 seconds.
 Anyone know if there's a built in function to display this, and if there is,
 what it is?  My more-than-useless-ISP seems to have taken an aversion to
 allowing me to surf tonight without disconnecting me.
 
 Thanks.
 James.
 
 
 
 -- 
 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] SQL Select Unique() ?

2001-05-02 Thread Anuradha Ratnaweera


On Thu, 19 Apr 2001, James, Yz wrote:

 Is there a method of extracting rows from a MySQL table Uniquely (as in only
 once) ?. For example, when a user performs a search, using two words,
 it may return the same row twice if the search is spread over two or more
 SQL selections.  An example:

I am not sure whether you can do it on mysql. On postgresql you can do a

select distinct ...

Anuradha


-- 
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] Starting PHP script with crontab

2001-05-02 Thread Anuradha Ratnaweera


If you are not careful, anyone will be able to run the script!

Anuradha

On Thu, 19 Apr 2001, Bertjan Schrader wrote:

 I need tot start a PHP script at night with the crontab. I tried to do it
 with lynx (lynx http://www.domain.nl/test.php) as a commandline within the
 crontab. Lynx is starting but the PHP script is not working. Anyone an idea
 how to do it?
 
 OS:  Redhat Linux 5.2
 Apache
 PHP as a apache module
 
 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] template solutions?

2001-05-02 Thread Anuradha Ratnaweera


WML is an easier solution (search freshmeat for wml - website meta
language).

Anuradha

On Sun, 29 Apr 2001, Steven Haryanto wrote:

 Does anyone know a rather advanced template solution in PHP?
 At least one that supports loop and if (like HTML::Template),
 and directives/commands would be nice (like Perl's Template
 Toolkit).
 
 I am currently rolling my own, but still not happy with the
 result of the design. I'd be happy to use one that is already
 out there.
 
 Steve
 
 
 -- 
 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] String Type Unknown

2001-05-02 Thread Anuradha Ratnaweera


Since it contains only digits 0-9 and letters a-f, it looks like
hexadecimal. Why don't you try to read two characters at a time and either
convert them to binary or check their ascii values. There seem to be many
ascii values however.

Where did you get this from?

Anuradha

On Mon, 30 Apr 2001, Nathan Cook wrote:

 I have this string:
 
 0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f
 fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f5072
 6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0f252
 14a0ffe40ffb803000246000a6c6f6164466163746f724900097
 
 And I don't know what type it is.  It is it a binary string?  Can I convert it
 to text and if so, how?
 
 Thank You,
 Nathan Cook
 [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] Please review our coding standards

2001-05-02 Thread Anuradha Ratnaweera


Most of your guidelines match with our practices. Here are some comments.

On Sat, 28 Apr 2001, Steven Haryanto wrote:

 0.1 We are writing PHP4 application here, not PHP3, nor Perl, Python, etc.
  So use PHP idioms.

Same here.

 0.3 Consistency matters.
 
 0.4 Standards is important.
 
 0.5 Readability matters. Especially since the code will be touched by
  several developers.

Agreed.

 1.0 Enclosing PHP code
 
  Always use ?php ?.

We use ? ? here. But sticking to a single method is fine.

 1.4 Whitespaces
 
  - No whitespace after function or method name. Example:
 
  exit()

We also use this. But I have seen others using spaces. Even there are some
examples in php-manual with spaces (e.g. array_shift).

  - Whitespace in expressions are usually not necessary. But use them when
they enhance readability.
 
  $a = $b + $c*(5*time());

We prefer

   $a = $b + $c * (5 * time());

 1.5 Function names
 
  Function names are not case sensitive in PHP. Use the all-lowercase
  notation.

Since most of us come from good old C regime, this should be the most
readable form.

 1.6 Quotes
 
  Use whichever ones you like. But if you can use '' for simple strings,
  and  only if you need interpolation.

This should _very_slightly_ improve performance too.

 2.2 Debugging comments.
 
  # is used to comment out certain parts of a code during debugging.

We always use /* */ because we filter php files through a stripper which
also removes newlines before sent to the real server.

 2.3 Documentation comments.

We use the style used in the linux kernel.

 3. Naming

We use all lowercase for variables like variable, my_name. Also, in
html forms, analogous variables take the form variable, myName.

 4. File organization

We use WML (website meta language - www.engelschall.com/sw/wml/) with make
to produce single php files and do _not_ use the include feature of php.

Also, we have written scripts that creates diff files between releases.

 5. Testing

We have few files that are included (WML include and not PHP include) from
every file. The production version and testing versions have different
sets of them, and make rebuilds the site selectively.

 6. Creating documentation

We use tex, and we are planning to go for texinfo.

 7. Database programming

We use _only_ postgresql, because of its feature richness and performance.
So no problem of abstraction.

 8. Error handling

 ...

 8.2 Reporting error

We use the guidelines given in GNU Coding Standards by Richard Stallman.
 
 9. Portability

We are expecting portability over POSIX like systems.

Anuradha


-- 
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] database server comparation

2001-04-26 Thread Anuradha Ratnaweera


Slightly off topic...

If you need features, postgresql is way ahead. It supports many advanced
features that are not available under other systems such sub-selects,
triggers, views, foreign key referential integrity, transactions and
sophisticated locking (7.1 supports outer joins).

It was believed that mysql was faster for lightweight work, but recent
tests has shown that this is no longer correct.

Even some large sites have been converted from mysql to postgresql (e.g.
sourceforge).

If you are looking for a high end commertial system, oracle has many
features.

Regards,

Anuradha

On Fri, 20 Apr 2001, yanto wrote:

 
 Hi
 is there one one know about any site explain comparation among database
 server software from various perspective.
 
 thanx.
 
 -toto-
 
 -- 
 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]