[PHP] PHP 5.1.1 still slower than PHP 4.x

2005-12-03 Thread Brian Moon
I had run the numbers a while back when 5.0 came out and found that it was slower than the 4.x releases at that time. It seems that 5.1.1 does not change this. Even very simple scripts take longer. Phorum does not use any OO code, so, maybe that is the deal. Did OO get a big jump in speed?

Re: [PHP] xml-load via dom and http authentication

2005-12-03 Thread Curt Zirzow
On Thu, Dec 01, 2005 at 11:31:45AM -0800, jonathan wrote: i'm loading a dynamically generated xml file like this: $xml=new DomDocument(); $xml-load(menu_render.php?menu_id=$menu_idformat=xml); The problem is that this file is in a directory that requires http authentication (via the

Re: [PHP] Mail SMTP settings

2005-12-03 Thread Curt Zirzow
On Sat, Dec 03, 2005 at 12:45:24AM -0700, Dan wrote: I have a PHP 4.x install on an Apache server. I have a PHP application and a call to the mail function. I have 2 static IP's on the server and I have one web server and one instance of postfix for each IP to basically separate the

[PHP] need session_start() to recall session data.

2005-12-03 Thread Matt Monaco
I have the following two methods as part of a class I'm using to transport data between pages. static function pack($object) { if (session_id() == ) { session_start(); } $class = get_class($object); $_SESSION[cmsSessionArray][$class] =

Re: [PHP] Newline character problem...

2005-12-03 Thread tg-php
In addition to what was mentioned below, you can also wrap your text in PRE/PRE tags to have it output exactly as you've formatted it: echo PRE\n; echo one\n; echo two\n; echo /PRE\n; Actually, I don't think either of these methods is going to output what you want. Even though \n is newline,

Re: [PHP] need session_start() to recall session data.

2005-12-03 Thread Curt Zirzow
On Sat, Dec 03, 2005 at 01:28:21PM -0500, Matt Monaco wrote: I have the following two methods as part of a class I'm using to transport data between pages. static function pack($object) { if (session_id() == ) { session_start(); I wouldn't put a random

Re: [PHP] need session_start() to recall session data.

2005-12-03 Thread Matt Monaco
Yes, I actually changed the destructors to handle the session as you indicated a few minutes after I posted, however I still have no clue as to why I would need to do a session_start() to get data from the session. Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat,

Re: [PHP] Re: A basic question

2005-12-03 Thread Unknown Unknown
Yeah, Apache (or other web server) just gives the HTML page to the web browser without really doing anything, if a page has a .php extension Apache gives the page to PHP which proccesses it and returns it to Apache and Apache gives it to the client. You could do what Matt Monaco says and let every

Re: [PHP] hi everyone

2005-12-03 Thread Unknown Unknown
Quiet? you GOTTA be kidding me, i got like 400 PHP email's here, I don't have to time to read em all On 12/1/05, Mehmet Fatih AKBULUT [EMAIL PROTECTED] wrote: hi. me is registered but till now have had no crucial questions to ask :p but soon will need professional help on php ldap functions

Re: [PHP] javascript, forms and php

2005-12-03 Thread Unknown Unknown
DO NOT validate anything important with javascript, the user can easily bypass the javascript by creating his own HTML page or disabling javascript on his browser. if you *Absouloutly* need to use javascript, check the last page the browser visited with Javascript or PHP and either allow or deny

[PHP] Security/$_REQUEST vars... How do you do it?

2005-12-03 Thread Michael Hulse
Hello, This is my first time posting to the list... I hope this question is not too silly, I am definitely not a guru at PHP. Anyway, in one of my latest projects, I find myself using this bit of code quite a bit: if((isset($_REQUEST['sub'])) (!empty($_REQUEST['sub']))) { ... code

Re: [PHP] Security/$_REQUEST vars... How do you do it?

2005-12-03 Thread comex
if((isset($_REQUEST['sub'])) (!empty($_REQUEST['sub']))) { empty is a language construct, not a function, so that is not necessary. You can just do !empty(...). $error = false; return $error; In your security_check function, you set $error to false in the beginning for no reason; in fact,

Re: [PHP] Security/$_REQUEST vars... How do you do it?

2005-12-03 Thread Michael Hulse
Hi Comex, thanks for the quick response, I really appreciate it. :) On Dec 3, 2005, at 3:29 PM, comex wrote: empty is a language construct, not a function, so that is not necessary. You can just do !empty(...). Oh, do you mean that I should do this instead: if((isset($_REQUEST['sub']))

Re: [PHP] Security/$_REQUEST vars... How do you do it?

2005-12-03 Thread comex
Oh, do you mean that I should do this instead: No, I meant that you don't have to include the isset at all. From the manual: empty() is the opposite of (boolean) var, except that no warning is generated when the variable is not set. -- PHP General Mailing List (http://www.php.net/) To

[PHP] How would you write this?

2005-12-03 Thread Michael B Allen
The following code works but I'm a little new to PHP and I'd like to know if there are better ways to achive the same thing. In the below form example, if the user supplies one or more fields but not all that are required, the form is redisplayed but fields that were supplied are prepopulated and

RE: [PHP] How would you write this?

2005-12-03 Thread Eternity Records Webmaster
Hi... the easiest way I have found to do exactly what your looking for is to use a pear package called html_quickform. I found it easy to use and it saves me hours and hours of work too. If your interested go to www.pear.php.net/html_quickform and have a look. -Original Message- From:

[PHP] XSLT Processing w/ Embedded PHP Strips Trailing '?'

2005-12-03 Thread Michael B Allen
If I run an xslt processor on some xml w/ PHP in it, the closing '?' gets removed: tr tdUsername:/td ?php if ($set != 0 ($set 0x01) == 0) { echo td bgcolor=\#ff\; } else { echo td; } echo /tdinput type=\username\ name=\username\ value=\ . $username . \/;

Re: [PHP] Mail SMTP settings

2005-12-03 Thread Dan
Yes that does work but the return path and my mail headers still show the main domain. My point is that PHP should be acessing my SMTP server specified but it is using the default local host instead. Dan T On Dec 3, 2005, at 11:06 AM, Curt Zirzow wrote: On Sat, Dec 03, 2005 at 12:45:24AM

Re: [PHP] How would you write this?

2005-12-03 Thread Stephen Leaf
I personally would use javascript to evaluate the form and highlight the fields onsubmit. However as a backup I'd do the evaluating in php and add an error label under the field. echo td; if ($noPass) echo color='red'; echo Password/td; if ($noPass) echo td color='red'You must supply a

Re: [PHP] Writing a mailing list program with php/mysql.

2005-12-03 Thread Mark Steudel
Hi there,   There are TONS of tutorials out there on how to store this information into a database instead of just mailing it to your self, just google php and mysql ... First you'll need to create your database using some sort of mysql console (command line, web based like