[PHP] using declare .. ticks functionality

2002-11-26 Thread Simon Taylor
Hi All,
Quick question, has anyone had any luck using the 

register_tick_function 

and 

declare (ticks=32){ ...} 

construct?

I have a need to try this out to measure the times taken in various
functions etc using this sort of method, I want to know is there any way of
extracting the function name or some sort of useful information and passing
it to the registered tick function.
Thanks for any help
Cheers
_
Simon Taylor
AfriTol (Pty) Ltd.
[EMAIL PROTECTED]
 

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




[PHP] php development environment

2002-10-31 Thread Simon Taylor
Hi All,
Does anyone know if there is a good php development environment around, you
know something that will hold a list of functions/classes so you don't have
to scroll through thousands of line of code looking for a few lines of
spurious code...and all the other goodies that come with that sort of
thing.. At the moment I use homesite which is pretty cool and makes all me
lines come out in pretty colours, but I am getting frustrated as things are
growing..
Thanks..
_
Simon Taylor
AfriTol (Pty) Ltd.

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




[PHP] problem loading extension

2002-10-29 Thread Simon Taylor
Hi All,
I have just been trying to add some more extensions to my site, I have
copied the dll's for the extensions I wish to add to my extensions dir and
uncommented them in my php.ini.
This worked fine for all of them which include ctype, gd etc. , except for
the xslt extension which will just not work for me... I am getting this
message.
PHP Warning: Unable to load dynamic library 'C:\PHP\dll\./php_xslt.dll' -
The specified module could not be found. in Unknown on line 0 
The file is most definitely there and if I move one of the other extension
files I get the same message for them, not sure what I am doing wrong.
Any ideas appreciated.
Thanks
_________
Simon Taylor
AfriTol (Pty) Ltd.

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




RE: [PHP] sessions

2002-10-24 Thread Simon Taylor
While were on the subject, Is it possible/wise t register a person's session
id in you useraccess db when they log in then always assign them the same
id, then if the session has not expired the user will pick up vars stored
there..
Cheers

-Original Message-
From: Adam Voigt [mailto:adam@;cryptocomm.com] 
Sent: 24 October 2002 15:01
To: Shaun
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] sessions


You could, on the page where it initially creates there session, get there
IP address and make that a session variable, then in one of your include
files which is called on every page, check to see if the current users's IP
match's the one of the $_SESSION[ip] variable, if it doesn't, just stop them
dead with an exit; statement.

Course this won't help for people behind the same public IP, but it's a
start. You could also verify against what the browser identify's itself as,
etc.

Adam Voigt
[EMAIL PROTECTED]

On Thu, 2002-10-24 at 08:32, Shaun wrote:
> Hi,
> 
> If i use sid in the url , is it dangerous - can hackers gain info on 
> important variables storing username and passwords or is it save to 
> use , if not what should i do.
> 
> shaun
> 
> 
> 
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to convert the text file into pdf file in php

2002-10-16 Thread Simon Taylor

Jack,
This is in the manual under pdf functions and you will need this library.
http://www.pdflib.com/pdflib/index.html
Cheers
Simon

-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:56
To: [EMAIL PROTECTED]
Subject: [PHP] How to convert the text file into pdf file in php


Dear all
I want to make a script which will ask php to convert the source file into
pdf file format n then save it to somewhere else, but i don't know if php
can do such thing, so could you pls help me on this? Thx a lot Jack



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




RE: [PHP] Script optimisation

2002-10-16 Thread Simon Taylor

Tony,
I am not sre which is faster, but I am pretty sure you wouldn't be able to
measure it in milliseconds..
Cheers
Simon

-Original Message-
From: Tony Crockford [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:48
To: Php-General@Lists. Php. Net
Subject: [PHP] Script optimisation


Hi,

I'm sure this is an RTFM, but I'm not sure where I should be looking.

is it quicker for PHP to execute  in blocks of html or to
echo all of the html and only have one 

I'm using a PHP script to write a lot of html files to hard disk and the
script execution time is climbing beyond the maximum set in PHP.ini (I've
changed the setting, but...)

I'm looking to shave milliseconds of each execution, any ideas, pointers or
tutorials you could point me to.

Thanks


Tony


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




RE: [PHP] Re: PHP & XML

2002-10-16 Thread Simon Taylor

Sure in this context I agree with you, but how often do you have a website
which needs to publish in many different formats? I have designed and built
websites for a while and have never come across such an application.
But if I were ever I would definitely invest the effort that is required,
but until then I will save myself from the extra work.
Cheers
Simon

-Original Message-
From: José León Serna [mailto:[EMAIL PROTECTED]] 
Sent: 16 October 2002 10:40
To: Joshua Alexander
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: PHP & XML


El mié, 16-10-2002 a las 10:22, Joshua Alexander escribió:
> I have to agree with Simon. I am at a loss when it comes to seeing
> any benefit to XML that doesn't involve data exchange between at 
> least two parties.
> 
> I've spent the last two years building database-backed websites, so
> I'm constantly trying to improve how I build them in order to make 
> design and maintenance easier... I used to rely heavily on SSI for 
> this, and now I rely more on PHP... if XML would make things easier, 
> believe me, I would LOVE to know how... but I just don't see it.
Let's imagine you create a website of an online magazine, this magazine
publishes in HTML, PDF, TXT, PS, etc, etc, etc. How would you do it?

I would use XML to write the articles and then stylesheets to transform the
articles to the formats I want. Write once, publish anywhare ;-)

Regards
-- 
XPde :: XP-like desktop environment (developed with Kylix ;-)
http://www.xpde.com



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




RE: [PHP] Re: PHP & XML

2002-10-15 Thread Simon Taylor

To me this is a lot of work and processing for limited benefits, a simple db
abstraction layer provides you with a divide between you db queries and the
presentation of your site, what benefits do you see in doing this?
Cheers
Simon

-Original Message-
From: Alexandru COSTIN [mailto:[EMAIL PROTECTED]] 
Sent: 15 October 2002 18:50
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP & XML


Hello,

Most of what you are looking for is already implemented and fully working in

our Krysalis Professional platform.

We help you create dynamic XML files, we provide you reusable taglibs  to 
avoid rewriting similar code multiple times, wr provide various levels of 
caching and many more.

Please se more details at : http://www.interakt.ro/products/

Alexandru

> Let me preface this by saying that I know the benefits of using XML 
> with regards to portability and extensibility. Here is the issue I 
> face.  I have all of my data stored in a MySQL database.  I'm 
> considering reworking my website so that it uses XML (after being 
> converted from resultant records in my DB) to transmit & XSLT to 
> transform and display the data to my end user. There are a few 
> benifits I can see in sending XML messages as part of the back end 
> processing.  However, that seems to be out- weighed by the amount of 
> processing that's going to need to take place in actually serving the 
> data to the user. First I have to query and pull the records from the 
> database.  Then, I need to send those records to a function (or 
> functions) to convert it to XML.  Then, I need to take that XML data 
> and have PHP use an XSL stylesheet to transform it to HTML before it, 
> finally, gets sent on to the browser.  So that's basically 2 
> conversions that take place on the back end.
> How much experience have any of you had with doing that?  Does
> it take significantly longer to serve the pages; is there a noticible
> performance hit?  Do you realize more benifit for the back end
> processes when using XML that makes any additional time it takes
> to display a page to the user worth it?
> I'd love to hear about people's experience with this kind of thing so I
> can better make a decision wrt whether or not I should even go down
> this route.
> 
> thnx,
> Chris


-- 
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] getting to a section of the page

2002-10-15 Thread Simon Taylor

Hi All,
I need to get the action of a button to send me to a certain section of the
page once it posts to the page. The button's value is the id of a field to
be edited.
I want to avoid using the link style link.php?id=342#bookmark

Thanks for any help.
Cheers
_
Simon Taylor
AfriTol (Pty) Ltd.
[EMAIL PROTECTED]

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




RE: [PHP] PHP Upgrade

2002-10-15 Thread Simon Taylor

Ramesh,
Since php 4.2.0 register_globals is always set off - look in your php.ini
Cheers
Simon

-Original Message-
From: Ramesh Nagendra Pillai [mailto:[EMAIL PROTECTED]] 
Sent: 15 October 2002 08:30
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Upgrade


Hai all

I am using Apache/PHP4.0.1/PostgreSQL, I had upgraded
PHP to PHP.4.2.3, now My problem is none of my
PostgreSQL function are working and also the server variables(e.g
$REQUEST_METHOD..)also, Can any one please help me out to fix this problem.
This is the first time I have upgraded my PHP. 

My earlier installation of PHP was default
installation, ie while installing linux7.1 it got
installed, I havent done anything in php.ini file.

Regards
Ramesh N

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com

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




RE: [PHP] Getting the highest number in a column

2002-10-15 Thread Simon Taylor

select MAX(colname)
from table;

Cheers
Simon

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] 
Sent: 15 October 2002 09:29
To: [EMAIL PROTECTED]
Subject: [PHP] Getting the highest number in a column


Using PHP and a MySQL database, I want to grab the highest number in a
particular column.  Right now I have this VERY inefficient code to grab this
number, there's got to be a better way.  Does anyone have any ideas??
 
Thanks!

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




RE: [PHP] People who searched this also searched this!

2002-10-14 Thread Simon Taylor

This sounds a lot harder than it is, all you have to do is first of all make
some space ion your db then you need to cache searches that users have done.
Store the group of searches for unique users, then if someone does a search
match it against the cache and pop up all items which were retrieved by the
other cached searches for the other id's (you can build up the most popular
items if there are lots of matches)..
Amazon also caches your own searches and starts displaying groups of
products which they know you were interested in and related products, I
usually find them spot on so their logic is very good - it is bad for the
credit card though :(
Cheers
Simon
-Original Message-
From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] 
Sent: 14 October 2002 16:42
To: Randum Ian
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] People who searched this also searched this!



Gezz... This REALLY depends on your database design. You might want to track
item IDs and then store them together. There is a bit of logic play on this
one though..


-- 
Maxim Maletsky
[EMAIL PROTECTED]

www.PHPBeginner.com  // where PHP Begins



On Sun, 13 Oct 2002 18:15:16 +0100
"Randum Ian" <[EMAIL PROTECTED]> wrote:

> Hi guys,
> 
> Does anybody have a working example of doing the lists of 'People who 
> searched this also searched this!' that I see on Amazon and other 
> websites.
> 
> Any help much appreciated!
> 
> Randum Ian
> [EMAIL PROTECTED]
> DJ / Reviewer / Webmaster, DancePortal (UK) Limited
> DancePortal.co.uk - Global dance music media
> 
> 
> 
> 
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] simple question

2002-10-14 Thread Simon Taylor

http://www.boutell.com/gd/

-Original Message-
From: Jean-François Marseaut [mailto:[EMAIL PROTECTED]] 
Sent: 14 October 2002 13:51
To: [EMAIL PROTECTED]
Subject: [PHP] simple question


Where can I found last version of the GD library ?

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




RE: [PHP] Updating session variables (resolced: shame on me)

2002-10-11 Thread Simon Taylor

Hehe - no prob - you can also set it to always start in php.ini if it suits
your needs.
Cheers
Simon

-Original Message-
From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] 
Sent: 11 October 2002 12:10
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Updating session variables (resolced: shame on me)



1) I wake up too early this morning
2) I've lost my glasses
3) I forgot... Session_start()

...shame on me...

Thanks to all.

Regards.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]


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




RE: [PHP] Updating session variables values during session

2002-10-11 Thread Simon Taylor

Have you tried it like this?
 $_SESSION['sess_client'] = $ClientName;
 $_SESSION['sess_ref_clientFact'] = $ClientRef;

If it still gives you the old vars I would look at where the $ClientName and
$ClientRef are coming from.
-Original Message-
From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] 
Sent: 11 October 2002 11:32
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Updating session variables values during session


Same problem...

Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]



Le 11/10/02 11:26, « Simon Taylor » <[EMAIL PROTECTED]> a écrit :

> Hiya,
> Try using $_SESSION['variablename']
> To refer to session variables.
> Cheers
> Simon
> 
> -Original Message-
> From: Stéphane Pinel [mailto:[EMAIL PROTECTED]]
> Sent: 11 October 2002 11:16
> To: [EMAIL PROTECTED]
> Subject: [PHP] Updating session variables values during session
> 
> 
> Hi,
> 
> PHP 4.1.X
> 
> I'm trying, during the session time, to change the value of 2 session
> variables:
> 
> My first attempt was simply like this:
> 
> $sess_client = $theClient;
> $sess_ref_clientFact = $theRefClient;
> 
> ...but following pages still get old values from the session 
> variables.
> 
> Then I tried this:
> 
>   session_unregister("sess_client");
>   session_unregister("sess_ref_clientFact");
>   $sess_client = $ClientName;
>   $sess_ref_clientFact = $ClientRef;
>   session_register("sess_client");
>   session_register("sess_ref_clientFact");
> 
> Same, following pages get old values from these 2 session variables...
> 
> I would appreciate if I could get some help ?
> 
> Thanks.
> 
> ---
> Stéphane Pinel
> [EMAIL PROTECTED]
> iChat : [EMAIL PROTECTED]
> 


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




RE: [PHP] Updating session variables values during session

2002-10-11 Thread Simon Taylor

Hiya,
Try using $_SESSION['variablename']
To refer to session variables.
Cheers
Simon

-Original Message-
From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] 
Sent: 11 October 2002 11:16
To: [EMAIL PROTECTED]
Subject: [PHP] Updating session variables values during session


Hi,

PHP 4.1.X

I'm trying, during the session time, to change the value of 2 session
variables:

My first attempt was simply like this:

$sess_client = $theClient;
$sess_ref_clientFact = $theRefClient;

...but following pages still get old values from the session variables.

Then I tried this:

session_unregister("sess_client");
session_unregister("sess_ref_clientFact");
$sess_client = $ClientName;
$sess_ref_clientFact = $ClientRef;
session_register("sess_client");
session_register("sess_ref_clientFact");

Same, following pages get old values from these 2 session variables...

I would appreciate if I could get some help ?

Thanks.

---
Stéphane Pinel
[EMAIL PROTECTED]
iChat : [EMAIL PROTECTED]


-- 
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] Forms issues..

2002-10-11 Thread Simon Taylor

I am having difficulty managing forms. for example I have a table builder
class which builds me a table of a query with all the bells and whistles to
make it editable etc. so it creates it's own form to build itself on,
then I have a dateselector class which builds a nice little graphic date
selector, this also uses it's own form as it is not always in a table - it
can be anywhere - as far as I know you can't have a form in a form so I am
cheating a bit at the moment and only creating the dateselector after the
table on a div then moving it into place..
This is working for me, but being a relative newbie I am sure there is a
better way to handling forms.
Any ideas, comments appreciated.
Thanks
_________
Simon Taylor
AfriTol (Pty) Ltd.
?  [EMAIL PROTECTED]
Å+27 12 361 3303 ext 257
Å+27 72 471 1833
Æ+27 12 365 3810
 

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




RE: [PHP] DB speed

2002-10-10 Thread Simon Taylor

Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
got variable results from different db's - even got an odbc connection to
access to run faster than mysql at one stage!! - something tells me there
are other factors contributing..
Cheers
Simon

-Original Message-
From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
Sent: 10 October 2002 14:17
To: [EMAIL PROTECTED]
Subject: [PHP] DB speed


Hi!

 I'm making some testing over DB.php  (PEAR)

 And i wan't to know if this is normal.

 I've made some script where I connect do SQL server
 and execute one simple (1row) query.

 I use pgsql and mysql. tables and indexes are same for both  servers. So
test table is identical

 Whe i execute those script i get some timing results

PGSQL
Total time: 0.0576
Execution time: 0.0185

MySQL
Total time: 0.0086
Execution time: 0.0028 

Time is in seconds.

My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of data.

I want to know why is sucsh diference. Both servers runing
with socket connections and using connnect (non-persistant)

-- 
tia,
 Uros  mailto:[EMAIL PROTECTED]


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