Re: [PHP] Detect file size BEFORE upload it

2005-10-05 Thread Jasper Bryant-Greene
Ruben wrote: I have been trying _several_ ways to control the size of the files that can be uploaded in a form. The problem is that I was able to detect file size after complete file is transfered. I need to detect file size before all file is transfered, in order to cancel it and preserve

[PHP] Detect file size BEFORE upload it

2005-10-05 Thread Ruben
Hi, I have been trying _several_ ways to control the size of the files that can be uploaded in a form. The problem is that I was able to detect file size after complete file is transfered. I need to detect file size before all file is transfered, in order to cancel it and preserve server r

Re: [PHP] caching parsed XML files as DOM objects in memory

2005-10-05 Thread Petr Smith
Jasper Bryant-Greene wrote: Petr Smith wrote: is it possible to cache parsed XML files somehow? I'm writing template library based on XML. But it's not very efficient to create new DomDocument, load XML template, process it and show on every page hit. XML parsing is not very fast, and because

Re: [PHP] PHP and XML

2005-10-05 Thread Stephen Leaf
On Wednesday 05 October 2005 09:46 pm, Robbert van Andel wrote: > Thanks, I'm investigating XSL and it looks pretty good. We use an RPM > based installation of PHP version 5.0.4. I see on PHP.net's website that > XSL comes standard with PHP 5 and you need to enable it by adding the > argument --w

[PHP] mail() with port & authentication

2005-10-05 Thread Brian Dunning
Do I need to use Pear to specify port 587 and authentication when sending mail? I could not find any way to do it using mail(). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP5 OOP how do I get the list of all classes dynamically?

2005-10-05 Thread Oliver Grätz
You can get an array of all declared classes with http://de.php.net/manual/en/function.get-declared-classes.php If you need more context (e.g. only subclasses of X) you should definitely have a close look at the reflection api. AllOLLi "Being lectured by the President on fiscal res

RE: [PHP] PHP and XML

2005-10-05 Thread Robbert van Andel
Thanks, I'm investigating XSL and it looks pretty good. We use an RPM based installation of PHP version 5.0.4. I see on PHP.net's website that XSL comes standard with PHP 5 and you need to enable it by adding the argument --with-xsl to the configure line. How do I do this when we did not build P

Re: [PHP] PHP and XML

2005-10-05 Thread Stephen Leaf
On Wednesday 05 October 2005 06:20 pm, [EMAIL PROTECTED] wrote: > My company recently installed google's search appliance and I am working > on some scripts to display the search results on our various websites. > The problem I'm having is using the XML parsing functions I've used on > other pages

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-05 Thread Robert Cummings
On Wed, 2005-10-05 at 21:15, Bruce Gilbert wrote: > thanks for the reply. > > and where on the page would that need to go? Within the head tags? > and would it need to be within Right after this line: mail ($to, $subject, $msg, $mailheaders); And you will already be within PHP interpretat

Re: [PHP] caching parsed XML files as DOM objects in memory

2005-10-05 Thread Jasper Bryant-Greene
Petr Smith wrote: is it possible to cache parsed XML files somehow? I'm writing template library based on XML. But it's not very efficient to create new DomDocument, load XML template, process it and show on every page hit. XML parsing is not very fast, and because I'm parsing XHTML with entit

[PHP] PHP5 OOP how do I get the list of all classes dynamically?

2005-10-05 Thread Daevid Vincent
I have a class class XMLRule { ... } And many of these: class is_username extends XMLRule { } class is_device extends XMLRule { } Is there a way in PHP5 to get a list of all the 'extends' classes I have 'defined'

RE: [PHP] caching parsed XML files as DOM objects in memory

2005-10-05 Thread Daevid Vincent
Sadly I thought of doing the same thing only to have my face crapped on by this extreme lameness: http://www.php.net/manual/en/ref.session.php "Some types of data can not be serialized thus stored in sessions. It includes resource variables or objects with circular references (i.e. objects which

[PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-05 Thread Bruce Gilbert
thanks for the reply. and where on the page would that need to go? Within the head tags? and would it need to be within ??? On 10/5/05, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Wed, 2005-10-05 at 20:44, Bruce Gilbert wrote: > > I have a form that submits and returns on the same page and

Re: [PHP] form not submitting when I change action from PHP_SELF to thanks page

2005-10-05 Thread Robert Cummings
On Wed, 2005-10-05 at 20:44, Bruce Gilbert wrote: > I have a form that submits and returns on the same page and works fine. > > I know want to change the submission action from {$_SERVER['PHP_SELF']} > > to an external thanks page so the form method would change to: > Why not just redirect to

[PHP] form not submitting when I change action from PHP_SELF to thanks page

2005-10-05 Thread Bruce Gilbert
I have a form that submits and returns on the same page and works fine. I know want to change the submission action from {$_SERVER['PHP_SELF']} to an external thanks page so the form method would change to: now I need to know what else I have to change in the form below to change to get the

[PHP] PHP and XML

2005-10-05 Thread php
My company recently installed google's search appliance and I am working on some scripts to display the search results on our various websites. The problem I'm having is using the XML parsing functions I've used on other pages is not working because the returned XML has invalid xml characters in

Re: [PHP] Scripts not working outside of Zend Studio

2005-10-05 Thread Steve Harp
On Wed, 5 Oct 2005 16:25:03 -0500, [EMAIL PROTECTED] (Greg Donald) wrote: >error_reporting( Well that now gives me errors. Thanks very much... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Scripts not working outside of Zend Studio

2005-10-05 Thread Greg Donald
On 10/5/05, Steve Harp <[EMAIL PROTECTED]> wrote: > I've got the php.ini set to throw errors: > error_reporting = E_ALL & E_NOTICE & E_STRICT > display_errors = On But which php.ini on your system is your web server using? Many newer Linux distros for example ship with multiple php.ini files,

[PHP] Scripts not working outside of Zend Studio

2005-10-05 Thread Steve Harp
Hi All, I'm testing a session management script which seems to work fine in the Zend Studio debugger. However, when I load the script directly into a browser (http://localhost/my_test.php), it displays a blank screen and the only code in the browser's view source is . I can right click the "Debu

[PHP] Possible bug in array_diff() php v4.4.0 or at least some odd behavior

2005-10-05 Thread Edward Vermillion
I have two arrays: $faqDataPost: array 1 => array 'faq_order' => '1' 'faq_question' => 'What is the air speed of a fully laden swallow?' 'show_question' => '1' 'faq_answer' => 'African or European?' 3 => array 'faq_order' => '2' 'faq_question' => '

Re: [PHP] is_subclass_of() weird behaviour with APC

2005-10-05 Thread ogrange
2005/10/5, Jochem Maas <[EMAIL PROTECTED]>: ... > > function Object() > > { > > if (!is_subclass_of($this, "Object")) > > { > > could it be a case-sensitivity problem (within APC) > so that maybe this does work?: > > if (!is_subclass_of($this, "object")) ... It behaves the same. I get

Re: [PHP] sessions

2005-10-05 Thread Jochem Maas
blackwater dev wrote: I have an old site which uses this code on login: //it does a query then if ($affected_rows>0){ session_start(mysite); is 'mysite' a constant? if not then that line should be: session_start('mysite'); session_register('admin'); $wardadmin

[PHP] sessions

2005-10-05 Thread blackwater dev
I have an old site which uses this code on login: //it does a query then if ($affected_rows>0){ session_start(mysite); session_register('admin'); $wardadmin = yes; header("location: admin.php"); } and in the top of admin.php: session_start(mysite);

Re: [PHP] Handling competing edits in a wiki engine?

2005-10-05 Thread Jochem Maas
Niels Ganser wrote: Skippy: The real downside I see it having to rely on JavaScript, but that's that. The real downside - if I understand the concept correctly - ist that an open browser window isn't equal to an 'active' session. I.e. the famous lunch break still "breaks" the application a

Re: [PHP] Handling competing edits in a wiki engine?

2005-10-05 Thread Niels Ganser
Skippy: > The real downside I see it having to rely on JavaScript, but that's > that. The real downside - if I understand the concept correctly - ist that an open browser window isn't equal to an 'active' session. I.e. the famous lunch break still "breaks" the application as the ping is sent to

[PHP] Re: Php is not writing errors in logfile

2005-10-05 Thread Jacob Friis Saxberg
On 10/5/05, Jacob Friis Saxberg <[EMAIL PROTECTED]> wrote: > I have asked Php to log errors in a file but it doesn't. > > error_reporting = E_ALL > display_errors = Off > log_errors = On > error_log = /var/log/php-errors.log > > Any idea what's wrong? Sorry, this solved my problem: error_log = /v

Re: [PHP] Php is not writing errors in logfile

2005-10-05 Thread Jacob Friis Saxberg
On 10/5/05, Skippy <[EMAIL PROTECTED]> wrote: > Quoting Jacob Friis Saxberg <[EMAIL PROTECTED]>: > > > I have asked Php to log errors in a file but it doesn't. > > > > error_reporting = E_ALL > > display_errors = Off > > log_errors = On > > error_log = /var/log/php-errors.log > > > > Any idea what'

Re: [PHP] Php is not writing errors in logfile

2005-10-05 Thread Jacob Friis Saxberg
On 10/5/05, Stephen Leaf <[EMAIL PROTECTED]> wrote: > On Wednesday 05 October 2005 08:16 am, Jacob Friis Saxberg wrote: > > I have asked Php to log errors in a file but it doesn't. > > > > error_reporting = E_ALL > > display_errors = Off > > log_errors = On > > error_log = /var/log/php-errors.log >

Re: [PHP] Php is not writing errors in logfile

2005-10-05 Thread Skippy
Quoting Jacob Friis Saxberg <[EMAIL PROTECTED]>: > I have asked Php to log errors in a file but it doesn't. > > error_reporting = E_ALL > display_errors = Off > log_errors = On > error_log = /var/log/php-errors.log > > Any idea what's wrong? Maybe that's not the right php.ini. Look at phpinfo().

[PHP] Php is not writing errors in logfile

2005-10-05 Thread Jacob Friis Saxberg
I have asked Php to log errors in a file but it doesn't. error_reporting = E_ALL display_errors = Off log_errors = On error_log = /var/log/php-errors.log Any idea what's wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] caching parsed XML files as DOM objects in memory

2005-10-05 Thread Petr Smith
Hi, is it possible to cache parsed XML files somehow? I'm writing template library based on XML. But it's not very efficient to create new DomDocument, load XML template, process it and show on every page hit. XML parsing is not very fast, and because I'm parsing XHTML with entities, all DTD'

Re: [PHP] Handling competing edits in a wiki engine?

2005-10-05 Thread Skippy
Quoting Silvio Porcellana <[EMAIL PROTECTED]>: > Ok, I don't know if this makes much sense, but you end up with a script > that gets executed (without user interaction) every 'n' microseconds, so > your session data is always up to date (at maximum, with a delay of 'n' > * 2 microseconds). You'd h

Re: [PHP] Global unavailable?

2005-10-05 Thread Jochem Maas
Marcus Bointon wrote: On 5 Oct 2005, at 13:37, Jochem Maas wrote: if changing the declaration in a.inc.php fixes it then you must NOT be including b.inc.php form the global scope. Well, that's what I thought, but it just isn't! The include really is in the global scope outside any class or

Re: [PHP] Global unavailable?

2005-10-05 Thread Marcus Bointon
On 5 Oct 2005, at 13:37, Jochem Maas wrote: if changing the declaration in a.inc.php fixes it then you must NOT be including b.inc.php form the global scope. Well, that's what I thought, but it just isn't! The include really is in the global scope outside any class or function definition. Th

Re: [PHP] is_subclass_of() weird behaviour with APC

2005-10-05 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hello, I posted to pecl-dev but got no reply. I'm sorry if you already read this message on pecl-dev. I'm experiencing strange behaviour with APC. We use the famous trick to simulate an abstract class in PHP 4 using is_subclass_of(), as in : class Object { // propert

Re: [PHP] Global unavailable?

2005-10-05 Thread Jochem Maas
Marcus Bointon wrote: I have a simple situation: in a.inc.php: $a = 1; in b.class.php require 'a.inc.php'; class b { function test() { global $a; echo $a; } } With this pattern, $a is NOT visible within class b, even though it is declared in the global scope and I'm

[PHP] is_subclass_of() weird behaviour with APC

2005-10-05 Thread ogrange
Hello, I posted to pecl-dev but got no reply. I'm sorry if you already read this message on pecl-dev. I'm experiencing strange behaviour with APC. We use the famous trick to simulate an abstract class in PHP 4 using is_subclass_of(), as in : class Object { // properties... function Object()

[PHP] Global unavailable?

2005-10-05 Thread Marcus Bointon
I have a simple situation: in a.inc.php: $a = 1; in b.class.php require 'a.inc.php'; class b { function test() { global $a; echo $a; } } With this pattern, $a is NOT visible within class b, even though it is declared in the global scope and I'm using the global keywo

Re: [PHP] session_destroy(): Session object destruction failed

2005-10-05 Thread Dan Rossi
All standard apache/php4 stuff. The first session is a non cookie session ini_set('session.use_cookies', 0); session_name('sID'); session_start(); ini_set('session.gc_maxlifetime', 14440); ill attempt the sleep(1) i guess On 05/10/2005, at 6:36 PM, [EMAIL PROTECTED] wrote: Hi there! Are you

Re: [PHP] query regerding copying files using php

2005-10-05 Thread Jochem Maas
Suresh Pandian wrote: hello friends, i have a query in writng the content of one file to another. i attempted it. it only writes the html codings.it could not write the php scripts inside the file. Suresh - it helps if you desribe what you are trying to achieve _and_ why, this is because t

Re: [PHP] possibly buffer problem, including a bit of code this time

2005-10-05 Thread Jochem Maas
matt VanDeWalle wrote: oops, sorry about the lack of any code with my last problem message. ok this is a start, still your descriptions assume too much - remember no on this list knows you or your code - you must be very explicit (the more you are the better the help people can give) I am stil

[PHP] Re: php.ini & magic quotes

2005-10-05 Thread Jochem Maas
hey Jay, did you figure out your ini/quotes problem? Jochem Maas wrote: Jay Blanchard wrote: Everyday I scratch my head. In php.ini in the C:\WINNT it is said; ; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = Off ; Magic quotes for runtime-generated data, e.g. data f

Re: [PHP] session_destroy(): Session object destruction failed

2005-10-05 Thread Dan Rossi
:| The php compile error was the subject thats what keeps being triggered and i get emails from my system about. Session object destruction failed. I have googled about this yes it was something to do with the session_set_cookie after session destroy which triggers this but no fix. On 05/10/2