[PHP] Date class

2005-04-19 Thread Devraj Mukherjee
Everyone,
Do you know of any decent Date/Time handling classes? We require the 
following functionality

1. Date's prior to 1970 handled (not reliant on the PHP date)
2. add/subtract days to/from a date
3. subtract two dates returning number of days
Any pointers are welcome. Thanks for your time in advance.
Devraj
--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Counting numbers on while..

2005-03-28 Thread Devraj Mukherjee
You basically dont need the for loop all you have to do is increment the 
value of the variable by one each time in the while loop

Devraj
Louie Miranda wrote:
Hi, im trying to create a number loop on a table where the data came
in a database.
I have tried the for loop and counted $countCards_result from the
table where im going to get all the data.
## code ##
while ($profile-fetchInto($row)) {
for ($i = 1; $i = $countCards_result; $i++) {
$num = $i;
print(
tr
td$num/td
td .$row[2]. /td
/tr
);
} // end of for loop
} // end of while
## code ##
Well, it did loop the numbers from what did came out of
$countCards_result but, the results are wrong because it loops each
row from 1 to 10.
Here's the example:
1   louie   edit | delete
2   louie   edit | delete
3   louie   edit | delete
4   louie   edit | delete
5   louie   edit | delete
6   louie   edit | delete
7   louie   edit | delete
8   louie   edit | delete
9   louie   edit | delete
10  louie   edit | delete
1   miranda edit | delete
2   miranda edit | delete
3   miranda edit | delete
4   miranda edit | delete
5   miranda edit | delete
6   miranda edit | delete
7   miranda edit | delete
8   miranda edit | delete
9   miranda edit | delete
10  miranda edit | delete
And so on..
What i wanted it to do was..
1   louie   edit | delete
2   miranda edit | delete
And so on..
I was wondering how can i get it to count only the rows, and dont
repeat from 1 to 10 on all rows.
Please help!
--
Louie Miranda
http://www.axishift.com

--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] XSLT solution

2005-03-18 Thread Devraj Mukherjee
Hi everyone,
I have been very intrigued by the way Gentoo.org offers its 
documentation. The documents are stored using a series of XML files and 
are delivered via XSLT via some ruby scripts.

Are there any similar frameworks, solutions availble for the PHP world?
Devraj
--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] TPC-W Implementation for PHP

2005-03-15 Thread Devraj Mukherjee
Hi everyone,
We are implementing the Transaction Process Council (Web) standard in 
PHP and are going to make it available under a LGPL license. Is there 
anyone there who would be interested in making use of this to benchmark 
the performance of their web setup?

We would appreciate the response, so that we can evaluate the demand and 
make it available for public access.

Devraj
--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php DBMS

2005-03-03 Thread Devraj Mukherjee
We have been looking at implmenting Prevalyer for PHP but it to us seems 
impossible to do as the PHP engine is not designed like an application 
server.

To add to this we are now in the process of writing an entpire PHP app 
server and will then be writing the Prevalyer layer as well as DB 
abstraction layers for PHP5.

Devraj
Richard Lynch wrote:
Chris W. Parker wrote:
Gerben mailto:[EMAIL PROTECTED]
   on Wednesday, March 02, 2005 10:22 AM said:

Thanks for all your responses, but I think I wasn't clear enough of my
intentions.
Actually, that what I'm looking for; A database engine written in PHP.
Even if something like this did exist why would you want it over MySQL?

They have licensing issues with MySQL, I guess.
I'd go with http://postgresql.org in that case, rather than roll my own,
but that's just me :-)

--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] DB INSERT CRON

2005-03-03 Thread Devraj Mukherjee
Hi Shaun,
Depending on the urgency of the data being transported into the database 
from the XML file, you could even run a server process that will wait 
for a new file to be added to a nominated directory and add the data to 
the database.

As far as I know you could possibly use the PHP engine to that from the 
command line, command line invocation will not timeout as web scripts. 
Cron is a good idea if you dont mind the delay.

If you had a server process you could have the data insertion completed 
quite instantly, relatively anyway.

You could also write the server side stuff in say Python or a language 
of the like.

Let us know if you need any further specific help.
Devraj
Shaun wrote:
Hi,
I have a web based system that allows users to upload XML files and insert 
them into the database, however some of these files are large and are 
causing the webserver to timeout.

Is it possible to create a cron job that can insert the xml files say every 
hour, then the users of the site would only have to upload the files and not 
wait for the insert?

Any advice / examples here would be great as I am not a UNIX expert!
Thanks 


--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] auto refresh once

2005-03-02 Thread Devraj Mukherjee
Hi Will,
Automatic refresh can be achieved by the use of a META tag. The meta tag 
 looks like the following, where the 5 is the number of seconds, the 
URL is obviously the page.

meta http-equiv=REFRESH CONTENT=5; URL=http://www.url.com/;
To refresh all you do is send the META tag out as part of the output the 
first time and dont do it the second time. So the first time you call 
the page use a variable in request such as ?refresh=true and only output 
the META tag if refresh in the $_REQUEST array is set to true.

Hope this helps
Devraj
William Stokes wrote:
Hello,
Is it possible to force one automatic refresh browser when user enters to a 
webpage? If so, how?

Thanks
-Will 


--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] SourceForge project adroption

2005-01-27 Thread Devraj Mukherjee
I have run a SourceForge project for the past two years, its a document 
management product with the unique feature of not using a backend. It 
uses text files to keep the all its META information.

A very well accepted product that has been downloaded over nine thousand 
times and has a very strong foundation of design and implementation.

I don't have a lot of time these days since I am mentoring a company 
called Eternity Technologies heading development of products. I am thus 
interested in someone who has a bit of spare time and interest to take 
this project over and keep it running.

I am happy to share ideas, support the development of the product and 
hopefully in the near future even generate some funds to keep the 
development going.

Eternity Technologies has even done a few commercial customisation jobs 
for the project. This could be great experience for someone or just 
prove highly useful for your work.

If there are any willing adopters of a PHP based open source project 
please check out http://sourceforge.net/projects/terracotta/ Download 
the Alpha release of 0.7.1 to get a feel for where I managed to get it upto.

If you are interested please email me at 
[EMAIL PROTECTED], thank you for your time and consideration.

Kind regards,
Devraj
--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Application server / Expression of Interest

2005-01-25 Thread Devraj Mukherjee
I recently passed around an email enquiring about the existance of an 
application server solution for PHP. Thanks to some of the responses, 
that lead my research further.

We are still adament about what a couple of us want to do. An open 
source PHP application server that will aim to streamline PHP development.

Can I please gain an expression of interest (yes or no is fine), if 
people out here on the list serve will be willing to test such a 
product, if it were made available.

Devraj
--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Log-in script help

2005-01-25 Thread Devraj Mukherjee
Some quick answers for you are, no it does not have to be a database 
that holds the authentication information. For one of my projects its 
just a global array that holds the information.

You also don't have to use sessions to do anything. Cookies are fine as 
you have been told before.

Every script must verify that a certain condition is true, such as the 
session or a cookie has been set to verify that the current session is 
authorised for access.

I recommend you looking a simple project that deals with somehting like 
this. I run a small open source project which provides a very simple 
document management solution.

You can try this out at http://anastacia.networketernity.com and the 
source is available at http://sourceforge.net/projects/terracotta

The source is very well documented and can give you many ideas for PHP 
programming. The project uses an array called $configuration for its 
configuration which includes authentication details.

Simple plugin style code, also allows the replacement of that to work 
with a MySQL table for authentication.

Hope this helps you in some way
[EMAIL PROTECTED] wrote:
These ideas are great and all, but I'm a real PHP newb so I have some 
questions.

It was that I should look for the user in the database that stores the 
access info Could I just use an array for that? Or does it have to be MySQL or 
something.

$_Session['user_id']= (who) - Does that just add the user to the session?
And I have some more questions. For instance, once the person has logged in, 
how do I forward them to the page they now have access to? How do I set the 
permissions the users have? How do I make it so that a user will not be allowed 
to a page if they haven't logged in?

I guess these are all pretty newb questions..but I appreciate your time and 
patience.


--
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Application server

2005-01-23 Thread Devraj Mukherjee
We are evaulating the idea of writing a PHP application server. Its aimed
to be a stateful environment for writing PHP applications and we believe
it will be quite advantegous to the entire community.

Any ideas if there are a similar solutions that already exists out there,
and what is the general feel of a solution like this.

Thanks for your time and feedback.

Devraj

---
Devraj Mukherjee ([EMAIL PROTECTED])
Eternity Technologies Pty. Ltd. ACN 107 600 975
P O Box 5949 Wagga Wagga NSW 2650 Australia
Voice: +61-2-69717131 / Fax: +61-2-69251039
http://www.eternitytechnologies.com/

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



[PHP] Sessions and threading

2004-11-04 Thread Devraj Mukherjee
Hi everyone,
I am attempting to write an implementation of Prevayler 
(http://sourceforge,net/projects/prevayler), which has originally been 
written for Java and provides a prevalance layer for storing objects 
using incremental log files and taking snapshots of in fixed time intervals.

It seems the Java guys are widely using the implementation even for web 
applications. There are many advantages to using the system, backups and 
restores are very easy and reliable and it is very efficient for small 
sized projects, as the Prevayler guys claim about 9000 times faster than 
Oracle ;-)

I have near worked out everything that has to be done, I think I am 
going to try and write it as a PEAR module for it to be available to 
everyone. I am stuck with a few concepts and I thought I might float the 
ideas here to get some feedback before I start scripting.

The first part of the problem is that I need to be able to at all times 
maintain a readable set of objects in memory, I am planning to achieve 
that using session variables, but I hear that session variables can 
become very inefficient, how true is that?

The other issue is running a thread that enable in some time interval to 
write snapshots from the log files that are being generated. Is it 
possible to have part of the script alive in some sort of a thread even 
after the script is dead. For example with the use of the sesssion variable.

Any feedback is very welcome.
Kind regards,
Devraj
--
--
Devraj Mukherjee, Eternity Technologies Pty. Ltd. Australia
Host: Debian (Sarge) 3.1 Kernel 2.4.27-1-686 / GCC version 3.3.5
Target: LPD7A400 (ARM9) LogicPD eval. board / ARM GCC 3.3 GlibC 2.3.2
LAMP environment specs. Apache: 2.0.52 PHP: 5 MySQL: 4.0.21
--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php