php-general Digest 10 Apr 2004 12:40:52 -0000 Issue 2697

Topics (messages 183036 through 183065):

Re: List Admins
        183036 by: -{ Rene Brehmer }-
        183041 by: Elfyn McBratney

regular expressions
        183037 by: René Fournier
        183039 by: Richard Harb

Re: Looking for a comprehensive PHP tutorial
        183038 by: -{ Rene Brehmer }-

Store e-mail in DB
        183040 by: Michelle Konzack

Re: Serializing objects and storing them is sessions [fixed]
        183042 by: Kelly Hallman
        183051 by: Tom Rogers
        183054 by: Kelly Hallman

Re: failure notice
        183043 by: Elfyn McBratney

Re: What does MAX_FILE_SIZE do?
        183044 by: Raditha Dissanayake

The Smarty Aftermath
        183045 by: Justin French

Re: Finding value in multi-dimensional array - Solved
        183046 by: Verdon Vaillancourt

require_once '../config.php'; doesn't work?
        183047 by: Mike Zornek
        183048 by: Jason Giangrande
        183049 by: Richard Harb
        183050 by: Marek Kilimajer

Re: Beginner Question
        183052 by: Kris J. Hagel

Re: Beginner Question-Solution-packages
        183053 by: rob

Re: writing a class in php to print form elements
        183055 by: Don Read
        183056 by: Andy B

stripping the query string from url
        183057 by: Andy B

cleaning up html output from php in apache
        183058 by: Merlin
        183060 by: electroteque
        183062 by: Merlin

mysqli
        183059 by: electroteque

error with curl and PHP5 compile
        183061 by: electroteque

Re: (new question on this) http referer
        183063 by: Don Read

PHP5 and pear
        183064 by: electroteque

php as cgi and module at same time
        183065 by: Andy B

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- I'll second that ... keep getting this in response from them:


Thank you !!


Your message has been received; we will treat your message and get back to you as soon as possible.


Besides the fact that mailman more or less makes this list useless for me ... this is just another annoyance...



Rene


At 16:19 09-04-2004, Ryan A wrote:
Please take out these two addresses:

"Information Desk" <[EMAIL PROTECTED]>
"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>

everytime we post to the list we get their damn autoresponders.

-- Rene Brehmer aka Metalbunny

~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[postmaster@ added to Cc:]

Hello,

On Saturday 10 Apr 2004 00:39, -{ Rene Brehmer }- wrote:
> I'll second that ... keep getting this in response from them:
>
> Thank you !!
>
> Your message has been received; we will treat your message and get back to
> you as soon as possible.
>
> Besides the fact that mailman more or less makes this list useless for me
> ... this is just another annoyance...
>
> Rene
>
> At 16:19 09-04-2004, Ryan A wrote:
> >Please take out these two addresses:
> >
> >"Information Desk" <[EMAIL PROTECTED]>
> >"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>
> >
> >everytime we post to the list we get their damn autoresponders.

Yes, postmaster, please do.  The spam mennaces hit me 10+ times on every post 
i make to php-general@ (yes, only three or four today :)

Thanks,
Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

"When I say something, I put my name next to it." -- Isaac Jaffee

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAd1HXaIgMKkVlSLQRAgKbAJ9e+ZnqP9f9iass0XkMjsxuxeWtcACgqdRU
WJRs+1YJWPcdvy1LvkJ6uVg=
=Q5Ir
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message --- I'm trying to 'clean up' some text that is extracted from a web directory, and I need to use (I think) preg_replace or ereg_replace, etc. I've read a bunch of tutorials, but none of them seem to cover the particular thing I want to do. Here's an example of text I need to process:

---------

J.  Smith   ( More Info )
map
driving directions
add to My Directory
update or remove

Did you go to High School with J.  Smith?
 
B. Dixon   ( More Info )
map
driving directions
add to My Directory
update or remove

Did you go to High School with B. Dixon?

M.  Jones   ( More Info )
map
driving directions
add to My Directory
update or remove

Did you go to High School with M. Jones?

---------

The above is a string. I want to eliminate, for example, all the lines that say "Did you... ?", but I don't know how to refer to them because they are each a little different (because of the name). I know regular expressions can do this, but I can't seem to wrap my mind around the necessary arguments... This being my first foray into regex. I've written feeble stuff like:

$result = ereg_replace("Did you go\[a-zA-Z]\?","",$result);

But of course it doesn't work. Any ideas? Thanks.

...Rene
--- End Message ---
--- Begin Message ---
Saturday, April 10, 2004, 2:02:04 AM, you wrote:

> I'm trying to 'clean up' some text that is extracted from a web 
> directory, and I need to use (I think) preg_replace or ereg_replace,
> etc. I've read a bunch of tutorials, but none of them seem to cover the
> particular thing I want to do. Here's an example of text I need to 
> process:

> ---------

> J.  Smith   ( More Info )
> map
> driving directions
> add to My Directory
> update or remove

> Did you go to High School with J.  Smith?

<snipped>

without further ado:
$str = <your stuff here>;
$what = array("/\r\nupdate or remove/", "/\r\nDid you go.*\?\r\n/i");
$with = array('', '');

echo preg_replace($what, $with, $str);

hth
Richard

--- End Message ---
--- Begin Message --- I've got a "Lean C++ in 24 hours" which has only proven useless to me ... and that's after nearly 20 years programming in nearly all other programming languages... so I basically don't like them ... the "Learn ... in 21 days seems alot better written" ... both series are by Sams btw


Rene


At 16:38 09-04-2004, jon roig wrote:
People always mock me when I mention it, but I really dig the "Learn in
24 Hours" books.

-- jon

-- Rene Brehmer aka Metalbunny

~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/

--- End Message ---
--- Begin Message ---
Am 2004-04-09 19:18:18, schrieb MadHD:
>Hi,
>i'm searching some script that can read e-mails with attachments from an
>account pop3 and that store them in a db.
>Someone can help me?
>Thanks, Heber.

Use fetchmail to get the Mails and forward ist to procmail. 
Here you install a filter like

:0 ci
* ^To.*(MadHD)
| /your/path/to/your/program [ --some-options-possible ]

I have curently around 4,7 Million E-Mails in my postgresql...
And each month around 120.000 more !

Oh yes, I do the job from a BASH-Script and put it into the 
postgresql with a commandline tool. 

Oh yes, before processing I use 

:0 fh
| formail -f -I Received: -I Envelope-to: -I Delivered-to: -I Return-Path:

To kill the unneccesary Headers... and protect my Download-E-Mails 
to become not SPAM'ed, because my postgresql is world readable.

Oh yes, Attachments are unpacked and saved with the Mesage-ID and 
an enhancement on a seperat Web-Server.

Greetings
Michelle

-- 
Registered Linux-User #280138 with the Linux Counter, http://counter.li.org/ 

--- End Message ---
--- Begin Message ---
Apr 9 at 2:49pm, Jason Giangrande wrote:
> Kelly Hallman wrote:
> > Try it without serializing, it works.
> 
> After retesting, it seems you are correct.  I guess the same bad 
> __sleep() code that was causing the object not to unserialize at all was 
> also preventing automatic serialization.

For some reason, if I include a __sleep() method in an object, PHP
segfaults on me...so I couldn't tell you anything about that :) Argh!

> However; it does not seem to harm anything if serialize() and
> unserialize() are called manually on an object.  It's just extra code
> that doesn't do anything, and therefore, can be removed.

In my testing, I tried to create an array with a value that was an object. 
I serialized that, and the object was not serialized and that key did not 
appear in the returned serialized representation of that array.

I don't know the default session handler's internals, but if you look at a
session file that it creates, it seems to serialize the $_SESSION array. 
If any of the values are objects, they appear to be serialized as well.

Given the above facts, my guess is that the handler actually goes through
and serializes any session variables that are objects (or perhaps any
values !is_scalar()), then serializes the entire $_SESSION array.

If that is the case, my original claim that a session variable that was
serialized would then be serialized again is probably untrue. The reason
being that the serialized session variable would be a scalar value and the
asession handler would not serialize it again.

So you're correct, it's the same difference. The only downside I can see 
to serializing it yourself is that you've got to always unserialize it 
before you can do anything with it. Then, you'd also need to reserialize 
it and store the result back into that session variable.

If you just let the session handler do the serialization then you can use 
that object directly and any changes would not require reassignment.

$User =& $_SESSION['User'];
$User->loggedin = true;

versus

$User = unserialize($_SESSION['User']);
$User->loggedin = true;
$_SESSION['User'] = serialize($User);

Of course, the first example could also be written as:
$_SESSION['User']->loggedin = true;

I always assumed that serialize would just serialize objects that were
within an array, and that the session handler was merely doing something
like serialize($_SESSION); So I learned something about serialize() and
the session handler's behavior in regards to how it deals with objects. 

-- 
Kelly Hallman

--- End Message ---
--- Begin Message ---
Hi,

Saturday, April 10, 2004, 10:51:20 AM, you wrote:
KH> Apr 9 at 2:49pm, Jason Giangrande wrote:
>> Kelly Hallman wrote:
>> > Try it without serializing, it works.
>> 
>> After retesting, it seems you are correct.  I guess the same bad 
>> __sleep() code that was causing the object not to unserialize at all was
>> also preventing automatic serialization.

KH> For some reason, if I include a __sleep() method in an object, PHP
KH> segfaults on me...so I couldn't tell you anything about that :) Argh!


Is your __sleep() function returning the array required by serialization ?

-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Apr 10 at 1:39pm, Tom Rogers wrote:
> Is your __sleep() function returning the array required by serialization?

Since you mentioned it, I tried returning an array and it did not
segfault, thought it was initially unclear what the array was for.

After reading over most of the documentation about serializing objects for
the Nth time, I finally found this sentence, which I didn't recall:

"It can clean up the object and is supposed to return an array with the 
names of all variables of that object that should be serialized."

I guess that's pretty clear, but it's not the first time I missed a
half-sentence in the manual that provided a very key bit of information.  
It doesn't help that this is the only mention within serveral full pages
related to the topic of serializing objects.

I think "must" seems more apropos than "supposed to" considering the
result/consequence... It's probably just my older version of PHP, but a
segfault seems like a pretty extreme error message :)

Thanks for pointing me in the right direction! It's so much easier to find
the explanation when you already have the answer....

--Kelly

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello PHP group :)

The qmail alias for ezmlm-postmaster seems broken.  Please see the below 
message (apologies if I should have sent this elsewhere)

Elfyn

- ----------  Forwarded Message  ----------

Subject: failure notice
Date: Saturday 10 Apr 2004 00:47
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

Hi. This is the qmail-send program at pb1.pair.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<[EMAIL PROTECTED]>:
That is not a valid email address.

- --- Below this line is a copy of the message.

Return-Path: <[EMAIL PROTECTED]>
Received: (qmail 1390 invoked by uid 1010); 10 Apr 2004 00:47:50 -0000
Delivered-To: [EMAIL PROTECTED]
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 1334 invoked from network); 10 Apr 2004 00:47:50 -0000
Received: from unknown (HELO smtp-out4.blueyonder.co.uk) (195.188.213.7)
  by pb1.pair.com with SMTP; 10 Apr 2004 00:47:50 -0000
Received: from london.i.emcb.co.uk ([62.30.188.142]) by
 smtp-out4.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.5600); Sat, 10
 Apr 2004 01:47:50 +0100
From: Elfyn McBratney <[EMAIL PROTECTED]>
Organization: EMCB
To: [EMAIL PROTECTED]
Subject: Re: [PHP] ATTN:  List Admins
Date: Sat, 10 Apr 2004 01:45:59 +0000
User-Agent: KMail/1.6.1
Cc: -{ Rene Brehmer }- <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]>
 <[EMAIL PROTECTED]> In-Reply-To:
 <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <[EMAIL PROTECTED]>
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 10 Apr 2004 00:47:51.0429 (UTC)
 FILETIME=[73C24B50:01C41E95]

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[postmaster@ added to Cc:]

Hello,

On Saturday 10 Apr 2004 00:39, -{ Rene Brehmer }- wrote:
> I'll second that ... keep getting this in response from them:
>
> Thank you !!
>
> Your message has been received; we will treat your message and get back to
> you as soon as possible.
>
> Besides the fact that mailman more or less makes this list useless for me
> ... this is just another annoyance...
>
> Rene
>
> At 16:19 09-04-2004, Ryan A wrote:
> >Please take out these two addresses:
> >
> >"Information Desk" <[EMAIL PROTECTED]>
> >"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>
> >
> >everytime we post to the list we get their damn autoresponders.

Yes, postmaster, please do.  The spam mennaces hit me 10+ times on every po=
st=20
i make to php-general@ (yes, only three or four today :)

Thanks,
Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

"When I say something, I put my name next to it." -- Isaac Jaffee

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAd1S/aIgMKkVlSLQRAm9rAJ9RNC3Qy+GxWs4Y+sxWDlUyp90vGgCeLDa0
D0UVtFnZUUfJmrMjxKWXlbs=
=1F4n
-----END PGP SIGNATURE-----

--- End Message ---
--- Begin Message --- Richard Davey wrote:

Hello Ben,

Friday, April 9, 2004, 3:36:04 AM, you wrote:

BR> Well, is there actually a way to do this or a way to check the filesize
BR> and send a nice message to the user that the file is over the BR> limit--other than just some error being thrown?


Not until it gets to the server, no. JavaScript can't read local
filesystem files, Java I believe can - but you can't rely on people
having it installed (I don't for example), even Flash has no local
file access abilities (thank goodness).


shamless plug: http://www.radinks.com/upload/ - Rad Upload can impose file size limitations before a single byte is transfered. Yes it's java - but you can have your web page in such a way so that the java plug in auto installs for people who do not have it.



--
Raditha Dissanayake.
---------------------------------------------
http://www.radinks.com/print/upload.php
SFTP, FTP and HTTP File Upload solutions

--- End Message ---
--- Begin Message --- In the aftermath of the Smarty debate (which turned from intelligent to stupid very quickly), I decided to look closely at templating again (though not smarty), and I've found one are where these excel in comparison to PHP.

Textpattern [1] is a gamma release CMS/blog tool which uses XML templating very effectively -- and I can't see an easy way to reproduce this with straight PHP.

<txp:foo a='cat' b='dog' c='mouse'>something</txt:foo> might translate to the following PHP code:
<?=tag_foo(array('a'=>'cat','b'=>'dog','c'=>'mouse'),'something'); ?> OR
<?=tag_foo('cat','dog','mouse','something'); ?>


Easy enough, except this is where the XHTML wins:
For the PHP versions, the template designer must have an in-depth knowledge of the functions. He/she must get the parameters in the right order, know which ones have default values, etc etc. Making a mistake will generate errors and break code.


The XHTML version on the other hand doesn't ask any more or less of the designer than XHTML does. I can switch the order of the arguments, leave some out, etc etc, leaving the hard work to the PHP function on the other end to sort it all out.


So, my question is:


Am I missing something in regards to PHP's functions that would give us some more simplicity? The closest I can think of is to pass the attributes in any order using 'attr=value', then using funct_get_args() to sort it all out:
<?=tag_foo('b=dog','a=cat','content=something','c=mouse')?>


But this is STILL less intuitive than:
<txp:foo b='dog' a='cat' c='mouse'>something</txt:foo>


Any ideas? John????


---
Justin French
http://indent.com.au

--- End Message ---
--- Begin Message ---
Hi,

Thanks much to Richard and Andy for the input :)  This one did the job...

if($_SESSION['OBJ_user']->modSettings['listings']['active'] == '1') {

I'm still not entirely sure I understand the syntax ;)

verdon


> From: Richard Harb <[EMAIL PROTECTED]>
> Date: Fri, 9 Apr 2004 22:49:44 +0200

> Let's see:
> if($_SESSION['OBJ_user']->modSettings['listings']['active'] == '1') {
> 
> That should be it ...
> 
> Sidenote: use single quotes whenever the string needn't be evaluated
> (i.e. is a variable itself) you save a couple cycles every time.
> 


>> phpws_user Object
>> (
>>   [user_id] => 5
>>   [username] => agent
>>   [password] => 77abcd5cb2ef4a366c2749ea9931c79e
>>   [email] => [EMAIL PROTECTED]
>> 
>>   [modSettings] => Array
>>       (
>>           [listings] => Array
>>               (
>>                   [active] => 1
>>                   [first_name] => Agent
>>                   [last_name] => Guy
>>               )
>> 
>>       )
>> 
>>   [error] => Array
>>       (
>>       )
>> 
>>   [temp_var] => 
>>   [last_on] => 1081527610
>>   [js_on] => 1
>>   [user_settings] =>
>> )
> 
> 

On 4/9/04 4:06 PM, "Richard Harb" <[EMAIL PROTECTED]> wrote:

> do a print_r() for the structure. --> print_r($_SESSION["OBJ_user"]);
> and look at the page source.
> 
> at each level ...
> if is says array refer to it with ['property']
> if obj (stdClass or otherwise) use -> that arrow thingy
> 

> 
> Friday, April 9, 2004, 9:43:36 PM, you wrote:
> 
>> Hi, being somewhat of a noob, I hope I'm using the right language to phrase
>> this question...
> 
>> In a project I am working with, I have a multi-dimensional array in session
>> when a user logs in. Visually, it looks something like...

--- End Message ---
--- Begin Message ---
Is it true I can't include a file up a dir like this:

require_once '../config.php';

This seems to work though:

require_once 'settings/db.php';

Strange.

~ Mike
-----
Mike Zornek
Web Designer, Media Developer, Programmer and Geek
Personal site: <http://MikeZornek.com>
New Project: <http://WebDevWiki.com>

--- End Message ---
--- Begin Message --- Mike Zornek wrote:
Is it true I can't include a file up a dir like this:

require_once '../config.php';

You should be able to include a file up one (or more) directories. Are you sure it's only up one directory from were your script is being called from?


This seems to work though:

require_once 'settings/db.php';

Strange.

-- Jason Giangrande <[EMAIL PROTECTED]> http://www.giangrande.org http://www.dogsiview.com

--- End Message ---
--- Begin Message ---
Depends on where the executed script is located ...
And it always depends on the script that is called - if you give a
relative path like you did here.

if the script you called would be
http://www.example.com/news/2004-04-10/mypage.php

then config.php would have to be in /news

if your layout is like:
/   (root)
|-settings/
|-news/
  |-2004-04-10/

and you call a script in root then db.php would be included, but not
if called from the dir news ...

You could either prepend something (like $_SERVER['DOCUMENT_ROOT']) or
you define something like
define ('MY_SETTINGS_DIR', '/usr/local/www/settings');
so the path will be absolute ...

or you could write some function that calculates the relative path to
root no matter where the script you called resides in - and prepend
that string then ...

or ....

hth

Richard


Saturday, April 10, 2004, 4:36:31 AM, you wrote:

> Is it true I can't include a file up a dir like this:

> require_once '../config.php';

> This seems to work though:

> require_once 'settings/db.php';

> Strange.

> ~ Mike
> -----
> Mike Zornek
> Web Designer, Media Developer, Programmer and Geek
> Personal site: <http://MikeZornek.com>
> New Project: <http://WebDevWiki.com>




--- End Message ---
--- Begin Message --- Mike Zornek wrote:
Is it true I can't include a file up a dir like this:

require_once '../config.php';

This seems to work though:

require_once 'settings/db.php';

Strange.


Both works as long as other settings permit it - file permission and owner, safe mode restrictions

--- End Message ---
--- Begin Message ---
On Thu, 2004-04-08 at 22:30, rob wrote:
> I am a newcomer to PHP and I am looking for an intsallation package similar
> to to FoxPro for MAC OSX 10.2.(Ie intsall appache, MY SQL and Latest version
> of PHP) Does anyone know where I may find one?
> Thanks RB

Try http://www.serverlogistics.com

They have packaged installers for Apache, MySQL and PHP with Preference
Panes you can drop in to control the Apache and MySQL processes if you
want them.

Kris

--- End Message ---
--- Begin Message ---
On 10/4/04 1:37 AM, "jon roig" <[EMAIL PROTECTED]> wrote:

Thank you for your help! Php and mysql ship on MAC OSX servers but not on on
the normal machines.
Apple provides support for these two at
http://developer.apple.com/internet/opensource/osdb.html for help on MySQL
on MAC OSX including step by step instructions on how to install it.
Assistance with PHP is found at
http://developer.apple.com/internet/opensource/php.html including help on
how to install it.
I have not found integrated packages for Macs like FoxPro but the above
links will get you up and running.
Marc Linnage has a standalone installer for the latest release of PHP for
OSX at http://www.entropy.ch/software/macosx/php/- very easy to install for
beginners.
I had trouble installing MySQL(from MySQL.com) but found the server
logistics package a breeze at http://www.serverlogistics.com/mysql.php
Once again thks for pointing me to the developer section at Apple
RB

--- End Message ---
--- Begin Message ---
On 07-Apr-2004 Andy B wrote:
> hi...
> 
> is it totally usefull/reasonable to write a class in php that prints
> different different form elements in html...
> 
> i.e. inputs, buttons, drop downs, multi selects and son? that way (at
> least
> i think) then it would be easier to change the element attributes
> dynamically...
> 

I think just about everybody re-invents that wheel ...

Regards,
-- 
Don Read                                     [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

--- End Message ---
--- Begin Message ---
>I think just about everybody re-invents that wheel ...
well i dont have much of a choice but to reinvent that wheel because as far
as im aware of the gpl/lgpl doesnt allow me to write code, say sell that
webservice/php program for $100 and also have gpl/lgpl code in it (as well
as copyright problems too)...

unless im missing something that is...

--- End Message ---
--- Begin Message ---
i have to write code for the following standard:
1. 13 links at the top and bottom of the page
2. those links reload the same page with a query string that will be part of
a mysql query
3. all query strings that come from anywhere except from say
www.test.com/ViewEvents.php get stripped out and ignored...
anybody know how i should go about trying to do that?? i guess the main part
im needing info on is how to strip the query_string unless it comes from the
links on that page....

--- End Message ---
--- Begin Message --- Hi there,

I am searching for a way to strip the white spaces from each
php generated html site. Goal is to speed up the pages.

During my research for apache modules I found one for perl:
http://search.cpan.org/~geoff/Apache-Clean-0.05/Clean.pm

Is there something for php as well?

Thanx for any hint,

Merlin
--- End Message ---
--- Begin Message ---
Htmltidy ?

> -----Original Message-----
> From: Merlin [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 10, 2004 5:04 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] cleaning up html output from php in apache
> 
> 
> Hi there,
> 
> I am searching for a way to strip the white spaces from each
> php generated html site. Goal is to speed up the pages.
> 
> During my research for apache modules I found one for perl:
> http://search.cpan.org/~geoff/Apache-Clean-0.05/Clean.pm
> 
> Is there something for php as well?
> 
> Thanx for any hint,
> 
> Merlin
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Htmltidy
I found it on the net, but it lacks on documentation. Is this a tool to include
into apache as a library which cleans up each php generated html page?

thanx

merlin

Electroteque wrote:

Htmltidy ?


-----Original Message-----
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 10, 2004 5:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] cleaning up html output from php in apache


Hi there,


I am searching for a way to strip the white spaces from each
php generated html site. Goal is to speed up the pages.

During my research for apache modules I found one for perl:
http://search.cpan.org/~geoff/Apache-Clean-0.05/Clean.pm

Is there something for php as well?

Thanx for any hint,

Merlin

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

--- End Message ---
--- Begin Message ---
bloody excellent, it has its own wrapper object, the prepared statements
feature looks cool

http://www.zend.com/php5/articles/php5-mysqli.php

--- End Message ---
--- Begin Message ---
Hi there i am getting a wierd error when trying to compile php5 with curl

 ext/curl/interface.lo
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c: In function
`curl_free_post':
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:655: warning: passing arg 1
of
`curl_formfree' from incompatible pointer type
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c: In function
`alloc_curl_handle
':
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:723: error: invalid
application
 of `sizeof' to an incomplete type
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c: In function
`zif_curl_setopt':
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:1008: error: duplicate case
val
ue
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:853: error: previously used
her
e
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:1050: warning: passing arg
1 of
 `curl_formadd' from incompatible pointer type
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:1050: warning: passing arg
2 of
 `curl_formadd' from incompatible pointer type
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:1057: warning: passing arg
1 of
 `curl_formadd' from incompatible pointer type
/usr/share/src/php-5.0.0RC1/ext/curl/interface.c:1057: warning: passing arg
2 of
 `curl_formadd' from incompatible pointer type
*** Error code 1


I have googled it everywhere and keep getting the same answer of fixed in
cvs also the latest interface.c is greater than the suppose cvs fixed file.
??

--- End Message ---
--- Begin Message ---
On 08-Apr-2004 John Nichel wrote:
> Joe Szilagyi wrote:
>> Just a follow up on this one--I've seen where consistently that
>> $HTTP_REFERER will only show local referers, but not stuff from
>> other
>> sites/hostnames. This is on mod_php... any workaround for that?
>> 
>> Regards,
>> Joe
> 
> The referrer is sent by the referring machine.  If that machine isn't
> setting it, you can't get it.  If memory serves, I think I remember 
> someone claiming that this could also be blocked at a
> firewall...don't 
> know if that's true or not though.

Not a firewall. The 'Referer' is in the headers, that would mean the FW
would have to edit the stream (~shudder~).

A 'proxy' server on the other hand will re-write headers :

mysql> select url from urls where url not like 'http%' limit 5;
+----------------------------------------------------------+
| url                                                      |
+----------------------------------------------------------+
| 1.0 TECH002                                              |
| 1.1 wall:800 (squid/2.5.STABLE2)                         |
| 1.0 px2nr (NetCache NetApp/5.5D1)                        |
| 1.0 arnink[D4BB2507] (Traffic-Server/5.2.1-58896 [uSc ]) |
| 1.1 ffm2-t6-1.mcbone.net:3228 (Squid/2.1.PATCH1)         |
+----------------------------------------------------------+
5 rows in set (0.00 sec)

FYI: 

mysql> select count(*) from urls;
+----------+
| count(*) |
+----------+
|   261511 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from urls where url not like 'http%';
+----------+
| count(*) |
+----------+
|    69594 |
+----------+
1 row in set (0.38 sec)

mysql> select 69594/ 261511;
+---------------+
| 69594/ 261511 |
+---------------+
|          0.27 |
+---------------+
1 row in set (0.00 sec)

So 27% of my hits are by proxy (for this site/month anyhow).

Regards,
-- 
Don Read                                     [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

--- End Message ---
--- Begin Message ---
Pear does not seem to be actually in the sources for some reason

[PEAR] XML_RPC: The following errors where found (use force option to
install an
yway):
missing package name
missing summary
missing description
missing license
missing version
missing release state
missing release date
missing release notes
no maintainer(s)
no files

did this for all of them ??

--- End Message ---
--- Begin Message ---
is it possible to have php installed with apache as cgi and module both at
the same time...??

--- End Message ---

Reply via email to