Re: [PHP] checking users have the latest version of a file

2004-02-19 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote:
I dont understand what you are doing with the md5, and

i assume YOU will know which file is the latest version.

this is what i have to try and find out to prevent that.



How could i check for date modified on an uploaded file ?

Not possible. Uploaded files have modification times set to the time of 
upload.

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


Re: [PHP] SWFShape HOW TO DRAW ELLIPSE????

2004-02-19 Thread Marco Schuler
Hi

Am Mi, 2004-02-18 um 20.37 schrieb Rostislav Kerey:
 Hi all,
  How I can to draw ellipse with Ming functions?
  I have found how to draw circle but not ellipse :(
  Help me please!!!

Not tested and just pseudo-code (from a mathematical view):

for ($degree = 0; $degree = 360; $degree++) {
putPixel(x*cos($degree*pi/180), y*sin($degree*pi/180) );
}

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



Re: [PHP] PDF - Coords

2004-02-19 Thread Jyry Kuukkanen
On Thu, 19 Feb 2004, Juan Torres wrote:

 ¡Hola!
 
 Excuse me, but my english is bad :(.
 
 My problem is: When I'm writting text in a PDF document, I want to know the
 current position, or next position of next text to insert.
 
 I want to know when I'm near the finish page.


¡Hola!

There is no need nor a reason to find out current position using PDF 
functions.

If you are outputting lines after lines, you need to keep track of the
y-position by yourself. The following simple and ugly piece of code should 
demostrate the logic:

define(MAX_Y_POS, 300);
define(ROW_HEIGHT, 4);
$y_pos = 0;
foreach ($many_rows as $row) {
if ($y_pos  MAX_Y_POS) {
makePageChange();
$y_pos = 0;
}; // if
$y_pos += ROW_HEIGHT;

printRow($row);
}; // foreach


If you use pdflib, you might want to take a look at sopdf.php - it's 
available from dataxi.sourceforge.net. Get the latest version of 
solib.tar.gz - that includes sopdf.php



 PD: Do you know Spain or spanish language? ;)

¡Si! Estudio español - este es segundo año, bastante listo :-)
Ahora leo un libro de Montalbán, de Pepe Carvalho :-)))

-- 
Regards,
--Jyry
C|:-(C|:-/C|8-OC|8-/C|:-(

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



[PHP] Make Php with ALL modules / options

2004-02-19 Thread Dave Carrera
Hi List,

Is there a way to easily install Php with ALL additional modules / options
available on FreeBSD 4.7 (not using ports) ?

The mods I can think of at the moment are

GD2+
ImageMagick
MySql
Zlib
XSLT

And any other ones that will make life easier

I ask as I have searched and search but there is no definitive answer to
this kind of question (unless I have not found it, which is more than
likely) and I bow the greater knowledge of my peers on this list for
guidance and or help / examples.

If I get a complete answer that works then I will make a web page for all of
us to utilize if this is required by others may be called (Install Php 4+
with all the bells and whistles) or something like that.

Thank you in advance for any help

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 17/02/2004
 

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



Re: [PHP] PDF - Coords

2004-02-19 Thread Juan Torres
Thanks very much!
You are very nice.
If you want to practise your spanish, you can write me when you want.

Muchos saludos desde España.
Hasta pronto.

Juan Torres.

Jyry Kuukkanen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Thu, 19 Feb 2004, Juan Torres wrote:

  ¡Hola!
 
  Excuse me, but my english is bad :(.
 
  My problem is: When I'm writting text in a PDF document, I want to know
the
  current position, or next position of next text to insert.
 
  I want to know when I'm near the finish page.


 ¡Hola!

 There is no need nor a reason to find out current position using PDF
 functions.

 If you are outputting lines after lines, you need to keep track of the
 y-position by yourself. The following simple and ugly piece of code should
 demostrate the logic:

 define(MAX_Y_POS, 300);
 define(ROW_HEIGHT, 4);
 $y_pos = 0;
 foreach ($many_rows as $row) {
 if ($y_pos  MAX_Y_POS) {
 makePageChange();
 $y_pos = 0;
 }; // if
 $y_pos += ROW_HEIGHT;

 printRow($row);
 }; // foreach


 If you use pdflib, you might want to take a look at sopdf.php - it's
 available from dataxi.sourceforge.net. Get the latest version of
 solib.tar.gz - that includes sopdf.php



  PD: Do you know Spain or spanish language? ;)

 ¡Si! Estudio español - este es segundo año, bastante listo :-)
 Ahora leo un libro de Montalbán, de Pepe Carvalho :-)))

 --
 Regards,
 --Jyry
 C|:-(C|:-/C|8-OC|8-/C|:-(

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



[PHP] Handle NTLM Logins with PHP

2004-02-19 Thread Korn.Christopher
Hi List!

Is it possible to Handle logins via NTLM with PHP?
I can't find anything about this at google :(

Greetings, Chris

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



Re: [PHP] Handle NTLM Logins with PHP

2004-02-19 Thread Stuart
[EMAIL PROTECTED] wrote:
Is it possible to Handle logins via NTLM with PHP?
Yes, but it would be quite involved and not really worth doing.

I can't find anything about this at google :(
Are you using Apache? If yes, a good starting point would be...

http://twiki.org/cgi-bin/view/Codev.WindowsInstallModNTLM

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


RE: [PHP] Nested Loops

2004-02-19 Thread Ford, Mike [LSS]
On 18 February 2004 22:13, Alex Hogan wrote:

 Sorry...,
 
 
 
 Line 17 is: print trtda
 href=\$id\$row2[$rtxt]/a/td/tr;

I haven't a clue what this is relating to (bit *too* much snippage there!), but I 
think that statement is going to need some curly braces to have a chance of working as 
intended:

   print trtda href=\$id\{$row2[$rtxt]}/a/td/tr;


Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Handle NTLM Logins with PHP

2004-02-19 Thread Korn.Christopher
 [EMAIL PROTECTED] wrote:
  Is it possible to Handle logins via NTLM with PHP?
 
 Yes, but it would be quite involved and not really worth doing.

  I can't find anything about this at google :(
 
 Are you using Apache? If yes, a good starting point would be...
 
 http://twiki.org/cgi-bin/view/Codev.WindowsInstallModNTLM

Mhm. Thanks i think i'll try this. 
But I doubt only this is enought for me. 

Is there a way of running a script after trying this login procedure?

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



RE: [PHP] checking users have the latest version of a file

2004-02-19 Thread electroteque
I was considering my only last options is diff and filesize, but then i was
thinking say the latest file is a size of 1mb, the copy of the users machine
is 2mb but is still not in sync with the latest copy then . sorry to trouble
you about this, i would have intergrated php with cvs viewer, but this type
of infrastructure would be painful to get onto the public server, being that
i still dont have cvs on my development machine i insisted i get, therefore
the only way i could get it on in a short time would be to do it myself but
i doubt that can happen hehe ;)

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



Re: [PHP] Handle NTLM Logins with PHP

2004-02-19 Thread Stuart
[EMAIL PROTECTED] wrote:
Mhm. Thanks i think i'll try this. 
But I doubt only this is enought for me. 

Is there a way of running a script after trying this login procedure?
mod_ntlm will handle all the authentication for you transparently. By 
the time Apache gets to executing your script you are assured that the 
user has authenticated and you can get their username from the 
$_SERVER['REMOTE_USER'] variable.

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


[PHP] PHPSESSID and URL rewriting

2004-02-19 Thread Seba
Hi everyone,
I have this situation:
I use some regular expressions to rewrite  the URL of a web site,
in particular:
http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
that becames
http://www.mysite.com/pagina.php?lingua=itacolore=rosso.

Is all ok until I use some session variables.
It happens that the string  ?PHPSESSID=[valore] is merge to the link and
this will cause a damage in the URL rewriting.

Note that the string comes merged by the browser (Explorer, opera) to
the link I wrote before.
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).

Since the links first come in this format, then are rewroted by the rule
in the file htaccess and finally parsed by the webserver (apache , IIS),
How can I avoid it?

I tried with: 
RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
as last rule, but it didn't work.

Can you help me?

thanks in advance
Seba

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



[PHP] generate a image link with php

2004-02-19 Thread Dominique ANOKRE

how to generate a image link with php ?

i use this but it returns errors : 

print(a href=image.htm);
print(img src=image.jpg);
print(/a);

Thanks


Re: [PHP] generate a image link with php

2004-02-19 Thread Stuart
Dominique ANOKRE wrote:
how to generate a image link with php ?

i use this but it returns errors : 

print(a href=image.htm);
print(img src=image.jpg);
print(/a);
Try...

print('a href=image.htm');
print('img src=image.jpg');
print('/a');
And I'd suggest getting a beginners book from the selection here: 
http://php.net/books

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


RE: [PHP] generate a image link with php

2004-02-19 Thread Nguyen Huu Hoa
I think it should the following:
print Create image link\n;
print(a href=\image.htm\);
print(img src=\image.jpg\);
print(/a);

Nguyen,
-Original Message-
From: Dominique ANOKRE [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 19, 2004 6:21 PM
To: Php List
Subject: [PHP] generate a image link with php


how to generate a image link with php ?

i use this but it returns errors : 

print(a href=image.htm);
print(img src=image.jpg);
print(/a);

Thanks

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



Re: [PHP] generate a image link with php

2004-02-19 Thread Dominique ANOKRE
ok
good now - solved !!

thansk you
- Original Message - 
From: Seba [EMAIL PROTECTED]
To: Dominique ANOKRE [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 11:23 AM
Subject: Re: [PHP] generate a image link with php


 It is better:
 
 print(a href='image.htm');
 print(img src='image.jpg');
 print(/a);
 
 Il gio, 2004-02-19 alle 12:20, Dominique ANOKRE ha scritto:
  how to generate a image link with php ?
  
  i use this but it returns errors : 
  
  print(a href=image.htm);
  print(img src=image.jpg);
  print(/a);
  
  Thanks
 

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



[PHP] PHPSESSID and URL rewriting

2004-02-19 Thread Seba
Hi everyone,
I have this situation:
I use some regular expressions to rewrite  the URL of a web site,
in particular:
http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
that becames
http://www.mysite.com/pagina.php?lingua=itacolore=rosso.

Is all ok until I use some session variables.
It happens that the string  ?PHPSESSID=[valore] is merge to the link and
this will cause a damage in the URL rewriting.

Note that the string comes merged by the browser (Explorer, opera) to
the link I wrote before.
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).

Since the links first come in this format, then are rewroted by the rule
in the file htaccess and finally parsed by the webserver (apache , IIS),
How can I avoid it?

I tried with: 
RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
as last rule, but it didn't work.

Can you help me?

thanks in advance
Seba

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



php-general Digest 19 Feb 2004 12:16:25 -0000 Issue 2599

2004-02-19 Thread php-general-digest-help

php-general Digest 19 Feb 2004 12:16:25 - Issue 2599

Topics (messages 178194 through 178236):

Re: checking users have the latest version of a file
178194 by: Chris W. Parker
178196 by: daniel.electroteque.org
178197 by: daniel.electroteque.org
178198 by: daniel.electroteque.org
178202 by: Jason Wong
178220 by: Marek Kilimajer
178229 by: daniel.electroteque.org

fonts
178195 by: Jake McHenry
178199 by: Jake McHenry
178201 by: Ryan A
178203 by: Jake McHenry
178207 by: Binay
178212 by: Paul Furman
178214 by: - Edwin -
178216 by: - Edwin -

Re: diskusage
178200 by: Chakravarthy Cuddapah
178217 by: - Edwin -

Re: Recursive Select Box
178204 by: Matt Palermo

Mimetypes and image uploads
178205 by: daniel.electroteque.org

Re: Parse Error
178206 by: Bob Eldred
178213 by: - Edwin -
178218 by: Bob Eldred

Re: How to detect session expiry
178208 by: Binay

Re: Is it posible to embed scripts from other server?
178209 by: Binay

Re: fopen errors
178210 by: John Nichel

Re: PHP Header to stimulate a POST method or POST string
178211 by: John Nichel
178215 by: daniel.electroteque.org

Re: PDF - Coords
178219 by: Juan Torres
178222 by: Jyry Kuukkanen
178224 by: Juan Torres

Re: SWFShape HOW TO DRAW ELLIPSE
178221 by: Marco Schuler

Make Php with ALL modules / options
178223 by: Dave Carrera

Handle NTLM Logins with PHP
178225 by: Korn.Christopher.SWM.DE
178226 by: Stuart
178228 by: Korn.Christopher.SWM.DE
178230 by: Stuart

Re: Nested Loops
178227 by: Ford, Mike   [LSS]

PHPSESSID and URL rewriting
178231 by: Seba
178236 by: Seba

generate a image link with php
178232 by: Dominique ANOKRE
178233 by: Stuart
178234 by: Nguyen Huu Hoa
178235 by: Dominique ANOKRE

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]


--
---BeginMessage---
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Wednesday, February 18, 2004 3:42 PM said:

 Hi there i am developing a collaboration filespace, i was wondering if
 there is any way either using diff or filesize to check if users have
 the latest version of a file before uploading their copy ?

md5 the file.

i assume YOU will know which file is the latest version. if their hash
does not match your hash they don't have the same file and should
therefore be updated.

 Let me know thankyou.

ok sure no problem.


chris.
---End Message---
---BeginMessage---
I dont understand what you are doing with the md5, and

i assume YOU will know which file is the latest version.

this is what i have to try and find out to prevent that.

 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Wednesday, February 18, 2004 3:42 PM said:

 Hi there i am developing a collaboration filespace, i was wondering if
 there is any way either using diff or filesize to check if users have
 the latest version of a file before uploading their copy ?

 md5 the file.

 i assume YOU will know which file is the latest version. if their hash
 does not match your hash they don't have the same file and should
 therefore be updated.

 Let me know thankyou.

 ok sure no problem.


 chris.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
---End Message---
---BeginMessage---
 I dont understand what you are doing with the md5, and

 i assume YOU will know which file is the latest version.

 this is what i have to try and find out to prevent that.

 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Wednesday, February 18, 2004 3:42 PM said:


What i'm gonna ask is, would simply checking that the new file being upload
is larger than the latest file updated work ?
---End Message---
---BeginMessage---
 I dont understand what you are doing with the md5, and

 i assume YOU will know which file is the latest version.

 this is what i have to try and find out to prevent that.


How could i check for date modified on an uploaded file ?
---End Message---
---BeginMessage---
On Thursday 19 February 2004 09:19, [EMAIL PROTECTED] wrote:

 What i'm gonna ask is, would simply checking that the new file being upload
 is larger than the latest file updated work ?

Only if the latest version is always larger than the previous versions.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post

[PHP] headers_list function

2004-02-19 Thread Juan Torres
Hi,

how can I use 'header_list()' function. My manual says: Might be only in
CVS.
What is CVS? How do I install CVS?

Thanks

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



Re: [PHP] post variables

2004-02-19 Thread julian haffegee
Hi all,


I solved this today. It seems odd.

If you define an action it DOES NOT work, but if you skip that entirely the
POST variables are sent!

so
form  method='POST' works
form  method='POST' action ='something.php' doesn't work.

Why would this be?

thanks

Jules



- Original Message - 
From: julian haffegee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 1:58 PM
Subject: Re: [PHP] post variables



 Hi Chris

 print_r($_REQUEST); (is this what you mean by HTTP Request?)
 print_r($_POST);
 print_r($_GET);

 all give Array()

 its apache release 10327100 (is that what you mean?)

 If I change the form method to GET works, and we get

 REQUEST: Array ( [username] = aa [password] = aa )
 _GET: Array ( [username] = aa [password] = aa )
 _POST: Array ( )




  Do you have a way to capture the raw HTTP? I'd like to see:
 
  1. The HTTP Request
  2. The output of print_r($_POST)
  3. What Web server you're using (and version)
 
  With this, I feel certain that we can figure something out.
 
  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



Re: [PHP] headers_list function

2004-02-19 Thread Richard Davey
Hello Juan,

Thursday, February 19, 2004, 1:13:56 PM, you wrote:

JT how can I use 'header_list()' function. My manual says: Might be only in
JT CVS.
JT What is CVS? How do I install CVS?

In a nutshell, if it's in CVS and you need it for a live site - ignore
it. CVS is the repository where all the beta versions of PHP are
worked on. So you can grab a copy from there, *compile* it yourself and
then test it.

Either that, or your manual is outdated and it's moved from CVS to
live :) it's worth checking that too.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] post variables

2004-02-19 Thread Duncan Hill
On Thursday 19 February 2004 13:32, julian haffegee wrote:
 Hi all,


 I solved this today. It seems odd.

 If you define an action it DOES NOT work, but if you skip that entirely the
 POST variables are sent!

 so
 form  method='POST' works
 form  method='POST' action ='something.php' doesn't work.

I have -never- seen that behaviour.  In fact, I use explicit actions all the 
time, and have no problem with $_POST.

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



[PHP] Problem with Sessions

2004-02-19 Thread Sheni R. Meledath
Hello:

Session is not working in PHP script file when executed through the browser 
IE 5.0 on Windows 2000 platform. In IE latest versions the script is 
working fine. Does anybody have any solution or report related to this. PHP 
version on the server is 4.3.

Sheni R Meledath
[EMAIL PROTECTED] 

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


[PHP] Re: XSL-FO

2004-02-19 Thread memoimyself
Hello Juan,

On 18 Feb 2004 at 13:51, Juan Torres wrote:

 Does PHP allow parser a XML with a XSL-FO and create a PDF?

Your English is kind of difficult to understand, but I guess you want to know if you 
can 
perform XSL-FO transformations with PHP. If this is your question, the answer is 'no': 
PHP does have an extension to perform XSLT transformations, but not XSL-FO. Maybe 
someone out there has developed a class to do this?

Erik

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



[PHP] Re: PHPSESSID and URL rewriting

2004-02-19 Thread memoimyself
Hello Seba,

Check your php.ini file: you'll probably find that session.use_trans_sid is set to 
1, 
which is actually a security hazard. If you set session.use_trans_sid to 0, session 
IDs 
will no longer be automatically sent as GET variables.

Cheers,

Erik


On 19 Feb 2004 at 13:15, Seba wrote:

 Hi everyone,
 I have this situation:
 I use some regular expressions to rewrite  the URL of a web site,
 in particular:
 http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
 that becames
 http://www.mysite.com/pagina.php?lingua=itacolore=rosso.
 
 Is all ok until I use some session variables.
 It happens that the string  ?PHPSESSID=[valore] is merge to the link and
 this will cause a damage in the URL rewriting.
 
 Note that the string comes merged by the browser (Explorer, opera) to
 the link I wrote before.
 (http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).
 
 Since the links first come in this format, then are rewroted by the rule
 in the file htaccess and finally parsed by the webserver (apache , IIS),
 How can I avoid it?
 
 I tried with: 
 RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
 as last rule, but it didn't work.
 
 Can you help me?
 
 thanks in advance
 Seba

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



[PHP] Re: Mimetypes and image uploads

2004-02-19 Thread memoimyself
On 19 Feb 2004 at 15:53, [EMAIL PROTECTED] wrote:

 I just discovered something totally bizarre with file uploads and mime
 types, if i have the document open i am trying to upload say a word file
 application/octet-stream and if i close the document application/msword ,
 why is this ?

My guess: MS Word locks a file while it's open, so it's being copied before it's 
uploaded.

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



Re: [PHP] PHP Header to stimulate a POST method or POST string????

2004-02-19 Thread Scott Fletcher
I still get this message with the class HTTP_Request (Pear).

--snip--
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
in /home/website/emarket/www/zz_test_dir/Net/Socket.php on line 108

Warning: fsockopen() [function.fsockopen]: unable to connect to
216.109.118.68:80 in /home/website/emarket/www/zz_test_dir/Net/Socket.php on
line 108
--snip--

The script I put down are

--snip--
?
   include('Request.php');

   $a = new HTTP_Request('http://www.yahoo.com/');
   $a-sendRequest();
   echo $a-getResponseBody();
?
--snip--

Scott F.
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Firstly i luv the subject mwuahhaha, you may want to check out the pear
 class HTTP_Request , it'll do post and get sockets.

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



Re: [PHP] PHP Header to stimulate a POST method or POST string????

2004-02-19 Thread Scott Fletcher
Yes, the script on the box can run and hit google.  I did with telent and it
connected successfully and type a make-up word 'get' follow by the enter key
and got a response below...

--snip--
htmlheadtitle400 Bad Request/titlestyle!--body {font-family:
arial,sans-serif}div.nav {margin-top: 1ex}div.nav A {font-size: 10pt;
font-family: arial,sans-serif}span.nav {font-size: 10pt; font-family:
arial,sans-serif; font-weight: bold}div.nav A,span.big {font-size: 12pt;
color: #cc}div.nav A {font-size: 10pt; color: black}A.l:link {color:
#6f6f6f}A.u:link {color: green}//--/style/headbody text=#00
bgcolor=#fftable border=0 cellpadding=2 cellspacing=0
width=100%trtd rowspan=3 width=1% nowrapbfont face=times
color=#0039b6 size=10G/fontfont face=times color=#c41200
size=10o/fontfont face=times color=#f3c518 size=10o/fontfont
face=times color=#0039b6 size=10g/fontfont face=times color=#30a72f
size=10l/fontfont face=times color=#c41200
size=10e/fontnbsp;nbsp;/btdnbsp;/td/trtrtd
bgcolor=#3366ccfont face=arial,sans-serif
color=#ffbError/b/td/trtrtdnbsp;/td/tr/tableblockqu
oteH1Bad Request/H1Your client has issued a malformed or illegal
request.p/blockquotetable width=100% cellpadding=0
cellspacing=0trtd bgcolor=#3366ccimg alt= width=1
height=4/td/tr/table/body/htmlConnection closed.
--snip--

John Nichel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Scott Fletcher wrote:

  This is what I get...
 
  --snip--
  1
  Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect
failed
  in /home/website/emarket/www/zz_test.php on line 4
 
  Warning: fsockopen() [function.fsockopen]: unable to connect to
  www.google.com:80 in /home/website/emarket/www/zz_test.php on line 4
  [13] [Permission denied]
  --snip--

 Can the box where the script lives and runs hit google?

 -- 
 By-Tor.com
 It's all about the Rush
 http://www.by-tor.com

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



RE: [PHP] Nested Loops

2004-02-19 Thread Alex Hogan
Thanks for the help guys...,

After some sleep and some food this is where it's gone;

$query = select wn_pdate, wn_text, wn_id  . 
  from whatsnew  .
  order by wn_pdate;

$pdate = ;
while($row = mssql_fetch_array($result)){
if ($pdate != $row[0]) {
print trtd . $row[0]/td/tr;
$pdate = $row[0];
}

print trtda href=\$id\ . $row[1] . /a/td/tr;
}

Results;

Date 1
Item one
Item two
Item three

Date 2
Item four
Item five
Item six 

... etc

It produces the results that I was looking for and it's much less code.


alex hogan


 -Original Message-
 From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 19, 2004 4:50 AM
 To: 'Alex Hogan'; PHP General list
 Subject: RE: [PHP] Nested Loops
 
 On 18 February 2004 22:13, Alex Hogan wrote:
 
  Sorry...,
 
 
 
  Line 17 is: print trtda
  href=\$id\$row2[$rtxt]/a/td/tr;
 
 I haven't a clue what this is relating to (bit *too* much snippage
 there!), but I think that statement is going to need some curly braces to
 have a chance of working as intended:
 
print trtda href=\$id\{$row2[$rtxt]}/a/td/tr;
 
 
 Cheers!
 
 Mike
 
 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




[PHP] fsockopen failed with permission denied error...

2004-02-19 Thread Scott Fletcher
Hi Everyone!

Sample code below...

--snip--
$fp = fsockopen(www.cnn.com, 80, $errno, $errstr, 30);
--snip--

I get the error message, permission denied along with 13.  When I read the
bugs.php.net and found out that I need to add the @ to it so I did this..

--snip--
$fp = @fsockopen(www.cnn.com, 80, $errno, $errstr, 30);
--snip--

I get a different error message, it said ...

--snip--
Addr family not supported by protocol (66)
--snip--

Does anyone know what it meant and what is the workaround to it?

Thanks,
 FletchSOD

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



Re: [PHP] fopen errors

2004-02-19 Thread John Nichel
Hunter, Jess wrote:
Thanks for the reply, you are right, the file is going on a Linux box, but
the source file is located on the client computer (windoze).
You cannot open a remote file by using it's directory path on the remote 
system.  The two ways to do this would be to a) (recommended) open it 
with a URL, thus the 'client' computer would need to be running a web 
server, or b) mount the remote drive as a share on the *nix box, and 
access the file thru the share.

http://us4.php.net/manual/en/function.fopen.php

The addslashes was part of the original sample script.
It was probably made for text to be entered in a db, and in that case 
(if you are using MySQL), the function mysql_escape_string() would be a 
better choice...

http://us4.php.net/manual/en/function.mysql-escape-string.php

The storage would only be temporary, I intend to make it so when the file is
viewed, there will be an option to delete it.  The binary images would only
reside in the DB for 2-4 weeks tops.
Most seem to think (including myself) that it is better to store binary 
files in the file system, and put the text url/path to them in the db.

As for your suggestion to modify the script to meet my needs, that is what I
am trying to do...  Thanks for the assistance
Look in the manual for explanations of the functions you're trying to 
use.  Copying an example will rarely do what YOU need/want it to do, and 
you'll have a better understanding how to modify it by reading how the 
individual functions work.

-Original Message-
From:   John Nichel [SMTP:[EMAIL PROTECTED]
Please don't reply directly to me (or anyone else on the list) unless 
asked to do so.  When you just reply to an individual, your message does 
not make it into the list archives, and won't be searchable by the next 
person who comes along with the same problem (that is IF people would 
actually search the archives).
snip

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How check if URL is running ok before try open it?

2004-02-19 Thread M
Hello, I decided to make a pre-URL caller into my script, so when user
try link to another URL, instead show these annoying http errors (when
URL off), I could direct him to more user friendly environment.

I checked FOPEN($url-name,'R') command, but in some cases it will pop up
fire-walls alerts for users who uses firewalls, when FOPEN is executed.

I would like to try more silent tricks for this task, and appreciate any
help.

Mig

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



[PHP] PHP-INSTALL Compile Error

2004-02-19 Thread Jim Thompson
I'm getting this error when running a make on php 4.3.4 on AIX 5.2:

ld: 0711-317 ERROR: Undefined symbol: .pow
ld: 0711-317 ERROR: Undefined symbol: .ceil
ld: 0711-317 ERROR: Undefined symbol: .floor
ld: 0711-317 ERROR: Undefined symbol: .sin
ld: 0711-317 ERROR: Undefined symbol: .cos
ld: 0711-317 ERROR: Undefined symbol: .tan
ld: 0711-317 ERROR: Undefined symbol: .asin
ld: 0711-317 ERROR: Undefined symbol: .acos
ld: 0711-317 ERROR: Undefined symbol: .atan
ld: 0711-317 ERROR: Undefined symbol: .atan2
ld: 0711-317 ERROR: Undefined symbol: .sinh
ld: 0711-317 ERROR: Undefined symbol: .cosh
ld: 0711-317 ERROR: Undefined symbol: .tanh
ld: 0711-317 ERROR: Undefined symbol: .exp
ld: 0711-317 ERROR: Undefined symbol: .expm1
ld: 0711-317 ERROR: Undefined symbol: .log
ld: 0711-317 ERROR: Undefined symbol: .log10
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-317 ERROR: Undefined symbol: .fmod
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.

Can anyone help with this?

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



[PHP] str_replace to replace /n with p not having desired effect.

2004-02-19 Thread Dave G
PHP Listers,
I am trying to use str_replace to format text taken from a MySQL
TEXT field and make it so that it is compatible with my CSS formatting.
Essentially, I want to ensure that new lines are replaced with p tags
with the appropriate CSS class designation.
The code I have created with assistance from information found
on the web, looks like this:

$charInfoCss = 'p class=content' . str_replace('\n', '/p\np
class=content\n', $charInfo[introE]) . '/p';

The output looks like this:
p class=contentBlah blah blah blah.
Another line of blah blah blah.
A third line of blah blah blah./p

The output I desire is this:
p class=contentBlah blah blah blah./p
p class=contentAnother line of blah blah blah./p
p class=contentA third line of blah blah blah./p

How do I correct my code to accomplish this?

Thank you.

-- 
Yoroshiku!
Dave G
[EMAIL PROTECTED]

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



Re: [PHP] str_replace to replace /n with p not having desired effect.

2004-02-19 Thread Adam Voigt
Single quotes don't work for the escape characters.
Use double quotes around the str_replace where there is a \n.



On Thu, 2004-02-19 at 10:52, Dave G wrote:
 PHP Listers,
   I am trying to use str_replace to format text taken from a MySQL
 TEXT field and make it so that it is compatible with my CSS formatting.
 Essentially, I want to ensure that new lines are replaced with p tags
 with the appropriate CSS class designation.
   The code I have created with assistance from information found
 on the web, looks like this:
 
 $charInfoCss = 'p class=content' . str_replace('\n', '/p\np
 class=content\n', $charInfo[introE]) . '/p';
 
   The output looks like this:
 p class=contentBlah blah blah blah.
 Another line of blah blah blah.
 A third line of blah blah blah./p
 
   The output I desire is this:
 p class=contentBlah blah blah blah./p
 p class=contentAnother line of blah blah blah./p
 p class=contentA third line of blah blah blah./p
 
   How do I correct my code to accomplish this?
 
   Thank you.
 
 -- 
 Yoroshiku!
 Dave G
[EMAIL PROTECTED]
-- 

Adam Voigt
[EMAIL PROTECTED]

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



Re: [PHP] str_replace to replace /n with p not having desired effect.

2004-02-19 Thread Richard Davey
Hello Dave,

Thursday, February 19, 2004, 3:52:54 PM, you wrote:

DG $charInfoCss = 'p class=content' . str_replace('\n', '/p\np
class=content\n', $charInfo[introE]) . '/p';

Double-bag it:

str_replace(\n, /p\np class=\content\\n, $charInfo[introE])

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] How check if URL is running ok before try open it?

2004-02-19 Thread Pablo Gosse
snipHello, I decided to make a pre-URL caller into my script, so when
user
try link to another URL, instead show these annoying http errors (when
URL off), I could direct him to more user friendly environment.

I checked FOPEN($url-name,'R') command, but in some cases it will pop up
fire-walls alerts for users who uses firewalls, when FOPEN is executed.

I would like to try more silent tricks for this task, and appreciate any
help./snip

Create custom error handling pages which you would specify in your
apache configuration.

In your conf file you would need to add something like:

ErrorDocument 403 /path/to/403.php
ErrorDocument 404 /path/to/404.php

wherever you define the configuration directives for the site in
question.

Hope that helps.

Cheers,
Pablo

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



[PHP] Re: Problem with Sessions

2004-02-19 Thread Jas
Sheni R. Meledath wrote:
Hello:

Session is not working in PHP script file when executed through the 
browser IE 5.0 on Windows 2000 platform. In IE latest versions the 
script is working fine. Does anybody have any solution or report related 
to this. PHP version on the server is 4.3.

Sheni R Meledath
[EMAIL PROTECTED]
Well ask yourself a couple of questions...
1. Did you do a 'session_start();' at the top of your script?
2. What Web server are you running? (IIS / Apache etc.)
3. Does my PHP.INI file have the session.save_path directive set?
4. In the folder specified by PHP.INI are there any sess_99898... files?
5. Did you post any examples of your code so we can help pinpoint the 
exact problem?

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


RE: [PHP] str_replace to replace /n with p not having desiredeffect. [SOLVED]

2004-02-19 Thread Dave G
 From: Adam 
 Single quotes don't work for the escape characters.
 Use double quotes around the str_replace where there is a \n.
and...
 From: Richard
 Double-bag it:
 str_replace(\n, /p\np class=\content\\n, $charInfo[introE])

It's always the simplest of mistakes that one overlooks.
Thanks guys! That's done the trick.

-- 
Yoroshiku!
Dave G
[EMAIL PROTECTED]

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



[PHP] Serious PHP5b4 speed issues

2004-02-19 Thread Andrew Lee Paul
Hello all

I have recently installed PHP 5.0 Beta 4 on my
development server and am very concerned with
performance. I have read everywhere, that PHP5 offers
increased performance. However, in my tests, the
requests per second have decreased dramatically:

PHP5: Requests per second:4.23 [#/sec] (mean)
PHP4: Requests per second:23.08 [#/sec] (mean)

Full test results are below.

The environment and the requested page are identical
in both tests (using ab). The tests were run on
Apache/1.3.28.

Has anyone else experienced similar behavior? Or can
anyone suggest what is happening...

Thank you in advance.

Andrew




 Results with PHP5 module loaded 

snip

Concurrency Level:  10
Time taken for tests:   236.372 seconds
Complete requests:  1000
Failed requests:0
Broken pipe errors: 0
Total transferred:  12732000 bytes
HTML transferred:   12514000 bytes
Requests per second:4.23 [#/sec] (mean)
Time per request:   2363.72 [ms] (mean)
Time per request:   236.37 [ms] (mean, across all
concurrent requests)
Transfer rate:  53.86 [Kbytes/sec] received

snip



 Results with PHP4 module loaded 

snip

Concurrency Level:  10
Time taken for tests:   43.328 seconds
Complete requests:  1000
Failed requests:0
Broken pipe errors: 0
Total transferred:  12728000 bytes
HTML transferred:   12514000 bytes
Requests per second:23.08 [#/sec] (mean)
Time per request:   433.28 [ms] (mean)
Time per request:   43.33 [ms] (mean, across all
concurrent requests)
Transfer rate:  293.76 [Kbytes/sec] received

snip



__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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



[PHP] XSLT in php v5 beta 4

2004-02-19 Thread Steve Dieke
I am guesing that I have installed something incorrectly.  I am trying to
use the function xslt_create().  I installed php v5 Beta 4 successfully. but
when I try to use the function xslt_create() I get the following error:

Fatal Error: Call to undefined function xslt_create()

I have a test php page that uses phpinfo() and here's what the xml related
setting say.

xml
XML Support  active
XML Namespace Support  active
libxml2 Version  2.6.6

xsl
XSL  enabled
libxslt Version  1.1.3
libxslt compiled against libxml Version  2.6.6
EXSLT  enabled
libexslt Version  1.1.3

My environment is the following:
Fedora Core 1
php - version 5 beta 4
apache -  2.0.48

Anyone have any ideas?  I have looked at the articles on php.net and didn't
see anything that I thought would help.

Thanks,
Steve

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



Re: [PHP] headers_list function

2004-02-19 Thread Chris Shiflett
--- Juan Torres [EMAIL PROTECTED] wrote:
 how can I use 'header_list()' function. My manual says: Might be only
 in CVS. What is CVS? How do I install CVS?

This is another way of saying that this might not be in any release of PHP
to date. CVS is the version control system used in development. There is
information on the site about how to check out from CVS. If you don't know
what CVS is, that's a good indication that this is probably not something
you should do. But, I'll let you decide:

http://www.php.net/anoncvs.php

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

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



[PHP] Can't remove an element from an array

2004-02-19 Thread Brian Dunning
Hi, I have an array that holds the item_id's for a shopping cart. I am 
trying to remove the item specified by a GET like this:

foreach ($_SESSION[cart_array] as $item) {
  if ($item==$_GET[item_id]) {unset($_SESSION[cart_array], $item); 
break;}
}

But it removes ALL items from the cart. And then when I view the cart 
on the next page, EVERYTHING is back, including the item I tried to 
remove. What am I doing wrong? Thanks!

- Brian

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


Re: [PHP] Can't remove an element from an array

2004-02-19 Thread John Nichel
Brian Dunning wrote:

Hi, I have an array that holds the item_id's for a shopping cart. I am 
trying to remove the item specified by a GET like this:

foreach ($_SESSION[cart_array] as $item) {
  if ($item==$_GET[item_id]) {unset($_SESSION[cart_array], $item); 
break;}
}

But it removes ALL items from the cart. And then when I view the cart on 
the next page, EVERYTHING is back, including the item I tried to remove. 
What am I doing wrong? Thanks!

- Brian

Because you're unsetting the WHOLE 'cart_array'.  If you're 'cart_array' 
is set up like this

Cart -
Item0 -
stuff
stuff
Item1 -
stuff
stuff
Item2 -
stuff
stuff
And someone wants to delete Item1 from their cart

unset ( $_SESSION['cart_array']['Item1'] );

http://us4.php.net/manual/en/function.unset.php

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Can't remove an element from an array

2004-02-19 Thread Chris
You have two separate problems here:
1) unset($_SESSION[cart_array], $item)
   This unsets $_SESSION[cart_array] and also $item,
   it should be unset($_SESSION[cart_array][$item])
2) The method of unsetting session variables depends on whether you have
register_globals on, it's all here:
http://www.php.net/manual/en/ref.session.php . The Examples section has
detailed examples that should help you fix your problem

 -Original Message-
 From: Brian Dunning [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 19, 2004 8:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can't remove an element from an array


 Hi, I have an array that holds the item_id's for a shopping cart. I am
 trying to remove the item specified by a GET like this:

 foreach ($_SESSION[cart_array] as $item) {
if ($item==$_GET[item_id]) {unset($_SESSION[cart_array], $item);
 break;}
 }

 But it removes ALL items from the cart. And then when I view the cart
 on the next page, EVERYTHING is back, including the item I tried to
 remove. What am I doing wrong? Thanks!

 - Brian

 --
 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] checking users have the latest version of a file

2004-02-19 Thread Chris W. Parker
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Wednesday, February 18, 2004 5:18 PM said:

 I dont understand what you are doing with the md5, and
 
 i assume YOU will know which file is the latest version.
 
 this is what i have to try and find out to prevent that.

the md5 thing will just give you an easy way to determine if two (or
more) files are different from each other. even if there's one byte
different within the files, you'll get a different hash from the md5
function.

if you don't know what an md5 hash is you can use this as an example:

?php

echo md5(stereolab).br/;
echo md5(stareolab).br/;

?


it's possible to perform an md5 hash on an entire file from the command
line so you'll need to figure out how to do that. if you so choose to do
that at all.



chris.

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



Re: [PHP] Serious PHP5b4 speed issues

2004-02-19 Thread Raditha Dissanayake
Hi,

I am a guy who doesn't believe in 'requests per second' and 'number of 
concurrent users' stats so please ignore the rest of this message if you 
wish:

The problem here could be that while it's possible to improve the speed 
of execution it's not possible to do so for the full set of functions or 
features available in a particular language. There will be areas where 
there is huge boost in speed and there may be areas where there is slow 
down and it's quite possible that you have hit one of them.

Secondly it's quite possible that the optimization techniques used with 
one version may be counter productive with another version.
If you better describe the functionality of your pages i think you will 
be more likely to recieve a better answer (from me or someone better 
qualified).

best regards.



Andrew Lee Paul wrote:

Hello all

I have recently installed PHP 5.0 Beta 4 on my
development server and am very concerned with
performance. I have read everywhere, that PHP5 offers
increased performance. However, in my tests, the
requests per second have decreased dramatically:
PHP5: Requests per second:4.23 [#/sec] (mean)
PHP4: Requests per second:23.08 [#/sec] (mean)
Full test results are below.

The environment and the requested page are identical
in both tests (using ab). The tests were run on
Apache/1.3.28.
Has anyone else experienced similar behavior? Or can
anyone suggest what is happening...
Thank you in advance.

Andrew



 

Results with PHP5 module loaded 
 

snip

Concurrency Level:  10
Time taken for tests:   236.372 seconds
Complete requests:  1000
Failed requests:0
Broken pipe errors: 0
Total transferred:  12732000 bytes
HTML transferred:   12514000 bytes
Requests per second:4.23 [#/sec] (mean)
Time per request:   2363.72 [ms] (mean)
Time per request:   236.37 [ms] (mean, across all
concurrent requests)
Transfer rate:  53.86 [Kbytes/sec] received
snip



 

Results with PHP4 module loaded 
 

snip

Concurrency Level:  10
Time taken for tests:   43.328 seconds
Complete requests:  1000
Failed requests:0
Broken pipe errors: 0
Total transferred:  12728000 bytes
HTML transferred:   12514000 bytes
Requests per second:23.08 [#/sec] (mean)
Time per request:   433.28 [ms] (mean)
Time per request:   43.33 [ms] (mean, across all
concurrent requests)
Transfer rate:  293.76 [Kbytes/sec] received
snip



__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Unexpected ;

2004-02-19 Thread Paul Furman
I don't see what's wrong with this if statement:

while ... and ... {
  if (($pic_num + 1) = $thumb_num {
 $tab = ((($pics * $page) - 1) + $pic_num); }
Error unexpected ; on the last line there.

I added some extra () to make sure I had everything together  not two 
statements or something odd like that. The while loop above works with 
the if statement removed.

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


Re: [PHP] Unexpected ;

2004-02-19 Thread Raditha Dissanayake
should be
if (($pic_num + 1) = $thumb_num) {
Paul, with PHP the Parsers error is usally above the line number that's 
actually reffered to.

Paul Furman wrote:

I don't see what's wrong with this if statement:

while ... and ... {
  if (($pic_num + 1) = $thumb_num {
 $tab = ((($pics * $page) - 1) + $pic_num); }
Error unexpected ; on the last line there.

I added some extra () to make sure I had everything together  not two 
statements or something odd like that. The while loop above works with 
the if statement removed.



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: PHPSESSID and URL rewriting

2004-02-19 Thread seba
Unfortunately I do can not oblige users which will use those pages to accept
cookies .
The pages are for an e-commerce web site.
If I use the directive
session.use_trans_sid  = 0
is not possible to MANTAIN THE SAME phpsessid value among differents pages,
isn t it?

Cheers,

Seba



- Original Message - 
From: [EMAIL PROTECTED]
To: PHP General list [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 2:45 PM
Subject: [PHP] Re: PHPSESSID and URL rewriting


 Hello Seba,

 Check your php.ini file: you'll probably find that session.use_trans_sid
is set to 1,
 which is actually a security hazard. If you set session.use_trans_sid to
0, session IDs
 will no longer be automatically sent as GET variables.

 Cheers,

 Erik


 On 19 Feb 2004 at 13:15, Seba wrote:

  Hi everyone,
  I have this situation:
  I use some regular expressions to rewrite  the URL of a web site,
  in particular:
  http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
  that becames
  http://www.mysite.com/pagina.php?lingua=itacolore=rosso.
 
  Is all ok until I use some session variables.
  It happens that the string  ?PHPSESSID=[valore] is merge to the link and
  this will cause a damage in the URL rewriting.
 
  Note that the string comes merged by the browser (Explorer, opera) to
  the link I wrote before.
 
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d
4fs65df4s65fd4).
 
  Since the links first come in this format, then are rewroted by the rule
  in the file htaccess and finally parsed by the webserver (apache , IIS),
  How can I avoid it?
 
  I tried with:
  RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
  as last rule, but it didn't work.
 
  Can you help me?
 
  thanks in advance
  Seba

 -- 
 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] Unexpected ;

2004-02-19 Thread Alex Hogan
Did you close your loop?


while ... and ... {
   if (($pic_num + 1) = $thumb_num {
  $tab = ((($pics * $page) - 1) + $pic_num); 
   }
}


alex


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




RE: [PHP] Unexpected ;

2004-02-19 Thread Alex Hogan
You also forgot to close your if statement.

while ... and ... {
   if (($pic_num + 1) = $thumb_num) {
  $tab = ((($pics * $page) - 1) + $pic_num); }



alex


 -Original Message-
 From: Paul Furman [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 19, 2004 11:33 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Unexpected ;
 
 I don't see what's wrong with this if statement:
 
 while ... and ... {
if (($pic_num + 1) = $thumb_num {
   $tab = ((($pics * $page) - 1) + $pic_num); }
 
 Error unexpected ; on the last line there.
 
 
 I added some extra () to make sure I had everything together  not two
 statements or something odd like that. The while loop above works with
 the if statement removed.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] Unexpected ;

2004-02-19 Thread Neil Freeman
You're missing a right bracket within the if statement.

Paul Furman wrote:
***
This Email Has Been Virus Swept
***
I don't see what's wrong with this if statement:

while ... and ... {
  if (($pic_num + 1) = $thumb_num {
 $tab = ((($pics * $page) - 1) + $pic_num); }
Error unexpected ; on the last line there.

I added some extra () to make sure I had everything together  not two 
statements or something odd like that. The while loop above works with 
the if statement removed.

--
--
 www.curvedvision.com
--
This communication is confidential to the intended recipient(s). If you are not that person you are not permitted to make use of the information and you are requested to notify the sender immediately of its receipt then destroy the copy in your possession. Any views or opinions expressed are those of the originator and may not represent those of Advanced System Architectures Ltd.

*** This Email Has Been Virus Checked ***

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


Re: [PHP] Unexpected ;

2004-02-19 Thread Michal Migurski
I don't see what's wrong with this if statement:

while ... and ... {
   if (($pic_num + 1) = $thumb_num {
  $tab = ((($pics * $page) - 1) + $pic_num); }

Looks like you need an editor that's syntax-aware.
May I recommend: jEdit, BBedit, UltraEdit?

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] Re: Recursive Select Box

2004-02-19 Thread Justin Patrin
PEAR DB is just a pckage which allows you to connect to any DB with the 
same interface, it will work with mysql.

http://pear.php.net/package/DB

If you don't want to use that, just switch the calls to mysql ones:

function getSelect($link, $catParent = 0, $indent = '') {
  $sth = mysql_query('SELECT * FROM categories WHERE Cat_Parent = 
'.$catParent, $link);
  while($rec = mysql_fetch_assoc($sth)) {
echo 'option 
value='.$rec['Cat_ID'].''.$indent.$rec['Cat_Name'].'/option';
getSelect($link, $rec['Cat_ID'], $indent.'  ');
  }
}

$link = mysql_connect('example.com', 'username', 'password');
echo 'select name=selectBox';
getSelect($link);
echo '/select';
Matt Palermo wrote:

No, i'm using a MySQL DB.

Justin Patrin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Matt Palermo wrote:


Hey everyone.  I'm looking for assistance/suggestions/answers on how to
build a select dropdown box from data that needs to be pulled
recursively

from a MySQL database.  Basically the situation is mainly for a
dicussion

thread system type of thing where I have categories nested inside
categories, nested inside categories...  Anyway, I want to be able to
build

a drop down box containing all the categories indented underneath it's
parent category to look something similar to this:
-
Top Level Category
- Nested Category
 - Lower level
  - Etc
Top Level Category
- Nested Category
Top Level Category
-
Then the user will be able to select one from the dropdown menu.  I have
all

the categories stored in a MySQL database called site_categories.  The
table

is setup like this:

__
| Cat_ID | Cat_Parent |   Cat_Name |
|-|
|1   | 0 |   Top Level  1  |
|-|
|2   | 1 |   Nested 1|
|-|
|3   | 0 |   Top Level   2 |
|-|
|4   | 2 |   Nested 2|
|-|
Sorry for the bad pictures you hopefully you get the idea.  Anything
with a

0 Cat_Parent is a Top Level category.  Then the others are all nested
inside

other categories that have the same Cat_ID as the nested categories
Cat_Parent.  I basically need help creating a properly indented dropdown
menu box using this structure from the database.  I assume I'm gonna
have to

use some sort of recursion here, but I'm not sure how to go about this.
Please help if you can.
Thanks,

Matt
http://sweetphp.com
I'd suggest using a recursive function. (I'm assuming you're using PEAR
DB...)
function getSelect($db, $catParent = 0, $indent = '') {
  $sth = $db-query('SELECT * FROM categories WHERE Cat_Parent =
'.$catParent);
  while($rec = $sth-fetchRow()) {
echo 'option
value='.$rec['Cat_ID'].''.$indent.$rec['Cat_Name'].'/option';
getSelect($db, $rec['Cat_ID'], $indent.'  ');
  }
}
$db = DB::connect('mysql://user:[EMAIL PROTECTED]/db');
$db-setFetchMode(DB_FETCHMODE_ASSOC);
echo 'select name=selectBox';
getSelect($db);
echo '/select';
I think that will work ;-)

--
paperCrane Justin Patrin


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


[PHP] Re: fsockopen failed with permission denied error...

2004-02-19 Thread Justin Patrin
Scott Fletcher wrote:

Hi Everyone!

Sample code below...

--snip--
$fp = fsockopen(www.cnn.com, 80, $errno, $errstr, 30);
--snip--
I get the error message, permission denied along with 13.  When I read the
bugs.php.net and found out that I need to add the @ to it so I did this..
--snip--
$fp = @fsockopen(www.cnn.com, 80, $errno, $errstr, 30);
--snip--
I get a different error message, it said ...

--snip--
Addr family not supported by protocol (66)
--snip--
Does anyone know what it meant and what is the workaround to it?

Thanks,
 FletchSOD
Try the example at: http://us4.php.net/fsockopen

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


[PHP] variables

2004-02-19 Thread Dominique ANOKRE
hello, 


how can i put the character \ in a variable ?

I've done the code below but errors occurs : 

$barre_oblique = \;


Parse error: parse error, unexpected T_STRING 

Please help 


[PHP] Re: Unexpected ;

2004-02-19 Thread Paul Furman
Thanks folks, it was the missing paren on the if statement.
if (...{...}
if (...){...}
I'm using PSPad as an editor with syntax highlighting and it works 
pretty well but I don't always g.

Paul Furman wrote:

I don't see what's wrong with this if statement:

while ... and ... {
  if (($pic_num + 1) = $thumb_num {
 $tab = ((($pics * $page) - 1) + $pic_num); }
Error unexpected ; on the last line there.

I added some extra () to make sure I had everything together  not two 
statements or something odd like that. The while loop above works with 
the if statement removed.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] variables

2004-02-19 Thread Adam Voigt
Escape it.

$string = \\;

Or, use single quotes:

$string = '\';


On Thu, 2004-02-19 at 12:49, Dominique ANOKRE wrote:
 hello, 
 
 
 how can i put the character \ in a variable ?
 
 I've done the code below but errors occurs : 
 
 $barre_oblique = \;
 
 
 Parse error: parse error, unexpected T_STRING 
 
 Please help 
-- 

Adam Voigt
[EMAIL PROTECTED]

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



Re: [PHP] variables

2004-02-19 Thread Adam Voigt
Whoops, mistyped on my reply, you need to escape it with the single
quotes to.


On Thu, 2004-02-19 at 12:49, Dominique ANOKRE wrote:
 hello, 
 
 
 how can i put the character \ in a variable ?
 
 I've done the code below but errors occurs : 
 
 $barre_oblique = \;
 
 
 Parse error: parse error, unexpected T_STRING 
 
 Please help 
-- 

Adam Voigt
[EMAIL PROTECTED]

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



Re: [PHP] variables

2004-02-19 Thread Richard Davey
Hello Dominique,

Thursday, February 19, 2004, 5:49:43 PM, you wrote:

DA how can i put the character \ in a variable ?
DA I've done the code below but errors occurs :
DA $barre_oblique = \;
DA Parse error: parse error, unexpected T_STRING
DA Please help 

$barre_oblique = \\;

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] Unexpected ;

2004-02-19 Thread John Nichel
Paul Furman wrote:

I don't see what's wrong with this if statement:

while ... and ... {
  if (($pic_num + 1) = $thumb_num {
^

You're missing a closing parentheses...

 $tab = ((($pics * $page) - 1) + $pic_num); }

Error unexpected ; on the last line there.

I added some extra () to make sure I had everything together  not two 
statements or something odd like that. The while loop above works with 
the if statement removed.



--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] variables

2004-02-19 Thread Dominique ANOKRE
ok thanks 
pb solved

thank you everybody
- Original Message - 
From: Richard Davey [EMAIL PROTECTED]
To: Dominique ANOKRE [EMAIL PROTECTED]
Cc: Php List [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 5:52 PM
Subject: Re: [PHP] variables


 Hello Dominique,
 
 Thursday, February 19, 2004, 5:49:43 PM, you wrote:
 
 DA how can i put the character \ in a variable ?
 DA I've done the code below but errors occurs :
 DA $barre_oblique = \;
 DA Parse error: parse error, unexpected T_STRING
 DA Please help 
 
 $barre_oblique = \\;
 
 -- 
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html
 
 -- 
 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] Table's config

2004-02-19 Thread [Scripts]
Hello All,
I am trying to do a install script.
Here is my question:
I want to do a $prefix
This is what I have:
$prefix = demo_;
$table_name = '.$prefix.auth_users';

This is not working, am I missing something??

Thanks in advance,
~WILL~
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Table's config

2004-02-19 Thread Richard Davey
Hello [Scripts],

Thursday, February 19, 2004, 6:14:31 PM, you wrote:

S This is what I have:
S $prefix = demo_;

S $table_name = '.$prefix.auth_users';

S This is not working, am I missing something??

Just syntax/quote issues, try:

$table_name = $prefix . auth_users;

So much simpler :)

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Generating Sub Headings

2004-02-19 Thread Nicole
I have data that looks like this:

(20, '1915', '192', '', '', '312', '525', '404', '', 'title')
(21, '1915', '338', '', '', '736', '0', '929', '', 'title')
(22, '1917', '193', '', '', '447', '0', '1275', '', 'title')
(23, '1919', '129', '', '', '208', '636', '0', '', 'title')
(24, '1919', '274', '', '', '581', '321', '1634', '', 'title')

The second value is the year, I have have multiple files for the same year.
What I want to do is output the values under Year sub headings.

So it prints like this:
-

b1915/b
p(20, '1915', '192', '', '', '312', '525', '404', '', 'title')br
(21, '1915', '338', '', '', '736', '0', '929', '', 'title')

b1917/b
p(22, '1917', '193', '', '', '447', '0', '1275', '', 'title')

b1919/b
p(23, '1919', '129', '', '', '208', '636', '0', '', 'title')br
(24, '1919', '274', '', '', '581', '321', '1634', '', 'title')

-

I have a function that displays each history in a loop. Here's the
function:

-

function display_history($dbArray,$yearArray)
{
 while($field = mysql_fetch_array($dbArray))
 {
  $yeartitle=;
   while($years = mysql_fetch_array($yearArray))
  {
   if ( $years[year] != $yeartitle)
   {
print pb . $years[year] . /b;
   }
print pa href=\ . $field[filename] . \ . $field[year];
//print the Resolution or Act Number
if (!$field[res_no]  !$field[j_res_no])
{
 print  - Act #  . $field[act_no];
}
elseif (!$field[act_no]  !$field[j_res_no])
{
 print  - Res #  . $field[res_no];
}
else
{
 print  - J.Res.#  . $field[j_res_no];
}

//print the Public Law Number
if ($field[pl_no]!=0)
{
 print , P.L.  . $field[pl_no];
}
//print the Senate Bill Number
if ($field[sb_no]!=0)
{
 print , SB  . $field[sb_no];
}

//print the House Bill Number
if ($field[hb_no]!=0)
{
 print , HB  . $field[hb_no];
}

//close the link
print /a - ;

//print the Misc Text or Part Number if there is one
if ($field[misc_part_no] != )
{
 print $field[misc_part_no] .  - ;
}

//print the title and number of pages
print $field[title] .  - [ . $field[pgs] .  pgs - ;

//print the file size
if ($field[mb] != 0)
{
 print $field[mb] . mb];
}
else
{
 print $field[kb] . kb] ;
}
   $yeartitle = $years[year];
  }
 }
}

-

The values being passed in are:

-

//get all of the histories from the table sorted by year
//then resolution number then by act number
$result = mysql_query(SELECT * FROM table ORDER BY
year, res_no, j_res_no, act_no, misc_part_no,$connect);

//get the years from the same table
$yrArray = mysql_query(SELECT * FROM table ORDER BY
 year,$connect);

//display histories
display_history($result,$yrArray);

-

I'm sure it's an easy solution ... but here's what a resulting page looks
like:

-
1501

1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]

1913

1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]
1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]
1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]
1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]

1925

1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]
1501 - Act # 90, P.L. 647, SB 582 - this test - [5 pgs - 55kb]
-

And so on, always putting the right years and the right number of histories
below the year, but always listing the first history and nothing else.  My
loop works if I don't have the while loop in there with the subheadings ...

Thank in advance for any help you can offer!

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



RE: [PHP] Generating Sub Headings

2004-02-19 Thread Chris W. Parker
Nicole mailto:[EMAIL PROTECTED]
on Thursday, February 19, 2004 10:28 AM said:

 I have data that looks like this:

[snip]

 The second value is the year, I have have multiple files for the same
 year. What I want to do is output the values under Year sub headings.

ok woh. that's way too much code for me to wade through so i'll just
give you some ideas. hopefully you're not already implementing it.

1. you want to put your data in order (either ascending or descending)
but the year. and according to your short data snippet it looks like
you're already doing this. good job.

2. you need to somehow compare the date that's currently ready to be
printed with what was ALREADY printed. the way you do this is by having
a temporary variable that stores the previous year data. when the next
loop cycle occurs you can say is this current date the same as the
previous cycles date? and then act appropriately.

for (...)
{
$current_date = $new_date;

// if the current date does not equal the
// old date you're obviously moving into
// a new year and you should therefore
// start a new group.
if ($current_date != $old_date)
{
echo br/br/1915br/\n;
}
else
{
echo nbsp;nbsp;(20, '1915', ...)br/\n;
}

$old_date = $current_date;
}

but of course instead of hard coding what gets printed you'd use your
variables to print the correct values.



hth,
chris.

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



Re: [PHP] Generating Sub Headings

2004-02-19 Thread Nicole
Sorry about all of the code.  I do do what you say to do there.

My year sub headings are changing correctly, it's the data that's printed
under each heading that isn't correct.

Nicole

Chris W. Parker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Nicole mailto:[EMAIL PROTECTED]
on Thursday, February 19, 2004 10:28 AM said:

 I have data that looks like this:

[snip]

 The second value is the year, I have have multiple files for the same
 year. What I want to do is output the values under Year sub headings.

ok woh. that's way too much code for me to wade through so i'll just
give you some ideas. hopefully you're not already implementing it.

1. you want to put your data in order (either ascending or descending)
but the year. and according to your short data snippet it looks like
you're already doing this. good job.

2. you need to somehow compare the date that's currently ready to be
printed with what was ALREADY printed. the way you do this is by having
a temporary variable that stores the previous year data. when the next
loop cycle occurs you can say is this current date the same as the
previous cycles date? and then act appropriately.

for (...)
{
$current_date = $new_date;

// if the current date does not equal the
// old date you're obviously moving into
// a new year and you should therefore
// start a new group.
if ($current_date != $old_date)
{
echo br/br/1915br/\n;
}
else
{
echo nbsp;nbsp;(20, '1915', ...)br/\n;
}

$old_date = $current_date;
}

but of course instead of hard coding what gets printed you'd use your
variables to print the correct values.



hth,
chris.

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



Re: [PHP] Serious PHP5b4 speed issues

2004-02-19 Thread Andrew Lee Paul
Thank you for your comments.

So that we have a page to compare between PHP4 and
PHP5, I have taken the home page of php.net. I have a
local copy – 'php.local' and re-ran the tests on the
first page (ab running on 'php.local')

   ab http://php.loca/ -n1000 -c10

Again, the results are alarming - PHP5 seems to be
about 50% slower :-(

Below are the results.


 Results with PHP5 module loaded 

snip

Concurrency Level:  10
Time taken for tests:   113.320 seconds
Complete requests:  1000
Failed requests:0
Broken pipe errors: 0
Total transferred:  26031972 bytes
HTML transferred:   25689608 bytes
Requests per second:8.82 [#/sec] (mean)
Time per request:   1133.20 [ms] (mean)
Time per request:   113.32 [ms] (mean, across all
concurrent requests)
Transfer rate:  229.72 [Kbytes/sec] received

snip


 Results with PHP4 module loaded 

snip

Document Path:  /
Document Length:25651 bytes

Concurrency Level:  10
Time taken for tests:   64.971 seconds
Complete requests:  1000
Failed requests:0
Broken pipe errors: 0
Total transferred:  26056665 bytes
HTML transferred:   25710578 bytes
Requests per second:15.39 [#/sec] (mean)
Time per request:   649.71 [ms] (mean)
Time per request:   64.97 [ms] (mean, across all
concurrent requests)
Transfer rate:  401.05 [Kbytes/sec] received

snip







--- Raditha Dissanayake [EMAIL PROTECTED] wrote:
 Hi,
 
 I am a guy who doesn't believe in 'requests per
 second' and 'number of 
 concurrent users' stats so please ignore the rest of
 this message if you 
 wish:
 
 The problem here could be that while it's possible
 to improve the speed 
 of execution it's not possible to do so for the full
 set of functions or 
 features available in a particular language. There
 will be areas where 
 there is huge boost in speed and there may be areas
 where there is slow 
 down and it's quite possible that you have hit one
 of them.
 
 Secondly it's quite possible that the optimization
 techniques used with 
 one version may be counter productive with another
 version.
 If you better describe the functionality of your
 pages i think you will 
 be more likely to recieve a better answer (from me
 or someone better 
 qualified).
 
 best regards.
 
 
 
 Andrew Lee Paul wrote:
 
 Hello all
 
 I have recently installed PHP 5.0 Beta 4 on my
 development server and am very concerned with
 performance. I have read everywhere, that PHP5
 offers
 increased performance. However, in my tests, the
 requests per second have decreased dramatically:
 
 PHP5: Requests per second:4.23 [#/sec] (mean)
 PHP4: Requests per second:23.08 [#/sec] (mean)
 
 Full test results are below.
 
 The environment and the requested page are
 identical
 in both tests (using ab). The tests were run on
 Apache/1.3.28.
 
 Has anyone else experienced similar behavior? Or
 can
 anyone suggest what is happening...
 
 Thank you in advance.
 
 Andrew
 
 
 
 
   
 
 Results with PHP5 module loaded 
   
 
 
 snip
 
 Concurrency Level:  10
 Time taken for tests:   236.372 seconds
 Complete requests:  1000
 Failed requests:0
 Broken pipe errors: 0
 Total transferred:  12732000 bytes
 HTML transferred:   12514000 bytes
 Requests per second:4.23 [#/sec] (mean)
 Time per request:   2363.72 [ms] (mean)
 Time per request:   236.37 [ms] (mean, across
 all
 concurrent requests)
 Transfer rate:  53.86 [Kbytes/sec] received
 
 snip
 
 
 
   
 
 Results with PHP4 module loaded 
   
 
 
 snip
 
 Concurrency Level:  10
 Time taken for tests:   43.328 seconds
 Complete requests:  1000
 Failed requests:0
 Broken pipe errors: 0
 Total transferred:  12728000 bytes
 HTML transferred:   12514000 bytes
 Requests per second:23.08 [#/sec] (mean)
 Time per request:   433.28 [ms] (mean)
 Time per request:   43.33 [ms] (mean, across
 all
 concurrent requests)
 Transfer rate:  293.76 [Kbytes/sec]
 received
 
 snip
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail SpamGuard - Read only the mail you
 want.
 http://antispam.yahoo.com/tools
 
   
 
 
 
 -- 
 Raditha Dissanayake.


 http://www.radinks.com/sftp/ |
 http://www.raditha.com/megaupload
 Lean and mean Secure FTP applet with | Mega Upload -
 PHP file uploader
 Graphical User Inteface. Just 150 KB | with progress
 bar.
 


__
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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



Re: [PHP] Generating Sub Headings

2004-02-19 Thread Richard Davey
Hello Nicole,

Thursday, February 19, 2004, 6:28:13 PM, you wrote:

N And so on, always putting the right years and the right number of histories
N below the year, but always listing the first history and nothing else.  My
N loop works if I don't have the while loop in there with the subheadings ...

In looking quickly at the code, I can't see a chance for the $field
value to ever be updated. You call it once (in the first while
statement) and populate the field array with the SQL results, you then
move into the 2nd while loop which handles the years. But once in that
loop you don't fill the $field array with any new data, so it's using
the same data over and over again for every year. I believe, although
I've not looked at it for very long, it's simply that the while loops
are nested in such a way that the field values never get a chance to
re-populate themselves.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] Generating Sub Headings

2004-02-19 Thread Nicole
That's exactly it!

I don't know why I didn't think about that.  For anyone else reading this, I
added

$field = mysql_fetch_array($dbArray);

above the line that reads

$yeartitle = $years[year];

And now it works!

Richard Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello Nicole,

 Thursday, February 19, 2004, 6:28:13 PM, you wrote:

 N And so on, always putting the right years and the right number of
histories
 N below the year, but always listing the first history and nothing else.
My
 N loop works if I don't have the while loop in there with the subheadings
...

 In looking quickly at the code, I can't see a chance for the $field
 value to ever be updated. You call it once (in the first while
 statement) and populate the field array with the SQL results, you then
 move into the 2nd while loop which handles the years. But once in that
 loop you don't fill the $field array with any new data, so it's using
 the same data over and over again for every year. I believe, although
 I've not looked at it for very long, it's simply that the while loops
 are nested in such a way that the field values never get a chance to
 re-populate themselves.

 --
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html

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



[PHP] PHP PDFs...

2004-02-19 Thread Russell P Jones
Is there any way to deal with PDFS using PHP and not installing PHPlib? I
simply need to pull the first page of a PDF document and print it out
using PHP. (Like a PDF preview of sorts)...

Any ideas?

Russ Jones

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



[PHP] Re: Generating Sub Headings

2004-02-19 Thread Nicole
Can we take this one step further and make it so that if you're searching
and you want to only see histories with the works parking in the title it
only puts the year headings for the years that actually have a history that
meets this criteria?

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



[PHP] date

2004-02-19 Thread Madcat
hi there

how do i make php give me yesterday's date?

i tried

date(Y-m-d)-1

but if today would be the 1st of july (2004-07-01), yesterday would be 00.
july (2004-07-00) according to that calculator.
is there any way to make this one get it right? without any if-structures if
possible

regards

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



RE: [PHP] date

2004-02-19 Thread Jay Blanchard
[snip]
hi there

how do i make php give me yesterday's date?

i tried

date(Y-m-d)-1

but if today would be the 1st of july (2004-07-01), yesterday would be
00.
july (2004-07-00) according to that calculator.
is there any way to make this one get it right? without any
if-structures if
possible
[/snip]

http://www.php.net/strtotime

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



[PHP] Problem with Apache!

2004-02-19 Thread



 Hello! My name is 
Artem!
 I want to tell you about my 
problem. Please, help me
When I changed my "httpd.conf" file like in book by 
Julie C.Meloni, I try to open file phpinfo.php from directory "C:\Program 
Files\Apache Group\Apache2\htdocs".
But when I open Internet Explorer and write http://localhost/phpinfo.phpin it 
I see an error like "Object not found!". Why?

I attached my "httpd.conf" file... Maybe deal in 
this file?
 Please, answer me... I really 
need your help...
 
Artem.
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See URL:http://httpd.apache.org/docs-2.0/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with / (or drive:/ for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with /, the value of ServerRoot is prepended -- so logs/foo.log
# with ServerRoot set to /usr/local/apache will be interpreted by the
# server as /usr/local/apache/logs/foo.log.
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., c:/apache instead of c:\apache).
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at URL:http://httpd.apache.org/docs-2.0/mod/core.html#lockfile);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot C:/Program Files/Apache Group/Apache2

#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
#ScoreBoardFile logs/apache_runtime_status

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile logs/httpd.pid

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to Off to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
## 

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
IfModule mpm_winnt.c
ThreadsPerChild 250
MaxRequestsPerChild  0
/IfModule

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the VirtualHost
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place 

Re: [PHP] Problem with Apache!

2004-02-19 Thread BAO RuiXian


  wrote:

Hello! My name is Artem!
I want to tell you about my problem. Please, help me
When I changed my httpd.conf file like in book by Julie C.Meloni, I 
try to open file phpinfo.php from directory C:\Program Files\Apache 
Group\Apache2\htdocs.
But when I open Internet Explorer and write 
http://localhost/phpinfo.php in it I see an error like Object not 
found!. Why?
Do you have the file phpinfo.php in C:\Program Files\Apache 
Group\Apache2\htdocs?

Please don't send HTML format message to the list, instead a plain text 
message is most welcome.

Best

Bao

 
I attached my httpd.conf file... Maybe deal in this file?
Please, answer me... I really need your help...
Artem.

 

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


Re: [PHP] Problem with Apache!

2004-02-19 Thread BAO RuiXian


  wrote:

Please, tell me, do you check my httpd.conf file?
 

Yes, I have checked your httpd.conf file. It is missing the following line:

LoadModule php4_module YourRealPath/php4apache2.dll

Please keep discussion on the list.

Best

Bao

Maybe deal in it??

E-mail: [EMAIL PROTECTED]


- Original Message -
From: BAO RuiXian [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 11:40 PM
Subject: Re: [PHP] Problem with Apache!
 

  wrote:

   

   Hello! My name is Artem!
   I want to tell you about my problem. Please, help me
When I changed my httpd.conf file like in book by Julie C.Meloni, I
try to open file phpinfo.php from directory C:\Program Files\Apache
Group\Apache2\htdocs.
But when I open Internet Explorer and write
http://localhost/phpinfo.php in it I see an error like Object not
found!. Why?
 

Do you have the file phpinfo.php in C:\Program Files\Apache
Group\Apache2\htdocs?
Please don't send HTML format message to the list, instead a plain text
message is most welcome.
Best

Bao

   

I attached my httpd.conf file... Maybe deal in this file?
   Please, answer me... I really need your help...
   Artem.


 

   



 

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


Re: [PHP] PHP PDFs...

2004-02-19 Thread Marek Kilimajer
Russell P Jones wrote:
Is there any way to deal with PDFS using PHP and not installing PHPlib? I
simply need to pull the first page of a PDF document and print it out
using PHP. (Like a PDF preview of sorts)...
Any ideas?

Russ Jones

Do you want to print the pdf on the server? PHPlib would not help you 
with this, it's for creating pdf documents. On unices you can execute 
lpr(1) command. I don't know about windoses.

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


[PHP] PHP Security Issue?

2004-02-19 Thread Ed Lazor
Hi Everyone,

Oddball error randomly shows up when accessing pages on my web hosting
provider.  The error message is below.  

My account is obb4wine.  PHP behaves as if I'm the account budguy when
the script error occurs.  A page refresh usually makes the error go
away.  The error happens frequently enough that site users are
complaining.

Any ideas?

-Ed





PHP:  4.3.4.  (See below for Configure Command)
 
Apache:  Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2
mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634 mod_ssl/2.8.16
OpenSSL/0.9.6b



Error Message:


Warning: Unknown(): open_basedir restriction in effect.
File(/home/obb4wine/public_html/prepend.php) is not within the allowed
path(s): (/home/budguy:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown
on line 0

Warning: Unknown(/home/obb4wine/public_html/prepend.php): failed to open
stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening
'/home/obb4wine/public_html/prepend.php' for inclusion
(include_path='.:/home/obb4wine/public_html') in Unknown on line 0


-
PHP Configure Command
-

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
'--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom'
'--with-dom-xslt' '--with-dom-exslt' '--enable-ftp' '--with-gd'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl'
'--with-kerberos' '--with-mcrypt' '--with-ming=../ming-0.2a'
'--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl'
'--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets'
'--enable-track-vars' '--enable-versioning' '--enable-wddx'
'--with-xmlrpc' '--with-zlib'

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



[PHP] heavy parsing of text, storing both versions

2004-02-19 Thread Justin French
Hi all,

I'm building a CMS that does heavy parsing of a HTML shorthand plain 
text to XHTML strict, in a similar way to Textile 
http://www.textism.com/tools/textile/.

The problem is this conversion might take place on 2-3 columns of text, 
and unlimited other fields (my CMS has user-defined data models), and 
since they'll need to edit this text at a later date, I either need to:

1. Parse the text on demand into HTML -- the parsing script is to 
heavy/slow for this.

2. Store both the plain (shorthand HTML) text and parsed XHTML versions 
of each field -- the problem with this being that i'm storing double 
the data in the database... combine this with versioning of each 
'page', and I'm going to be storing a LOT of data in the DB.

100 articles x 3 versions each x 500 words x 6 chars per word = 900,000 
chars;
add a whole bunch of XHTML to this, and it's looking pretty huge.  
Double the articles or versions, and it's scary :)

It also means I need to have two fields for each field (input and 
parsed), which makes the MySQL tables a lot more complex, etc.

3. write a reverse set of functions which converts the XHTML back to 
the shorthand on demand for editing -- this seems great, but I don't 
like the idea of maintaining two functions for such a beast.

Has anyone got any further ideas?

---
Justin French
http://indent.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: I don't understand you!

2004-02-19 Thread BAO RuiXian


  wrote:

Sorry, I'm from Ukraine and, maybe, my English too bad... But I don't
understand your words Please keep the discussion on the list.
 

It means that don't send your response only to me, but to the list you 
originally sent, i.e. [EMAIL PROTECTED] so that others will also 
benefit/critisize/contribute.

And, you words Don't send html format message I'm not understand too.
 

Check your email client's settings, to figure out how to send only plain 
text message.

Sorry, but, please, explaine... I'll do all that you say... :-)
And, next. I can't find php4apache2.dll in C:\PHP4 and in all other
directories on my computer?
Have you ever downloaded php package to install? Or you only created a 
empty directory C:\PHP4?:)
I suggest you visit www.php.net site or goole 'how to install php on 
windows' to find the basics.

Best

Bao

PS: Don't change the subject line each time. It will make people hard to 
follow.

Help me, please... I'm waiting for you... I have only about 5 minutes...
Please, help me. It's very improtant!
Best regards.

E-mail: [EMAIL PROTECTED]
- Original Message -
From: BAO RuiXian [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Sent: Friday, February 20, 2004 1:09 AM
Subject: Re: About file php4apache2.dll
 

Now, I write this line on top: Please keep the discussion on the list.

  wrote:

   

I haven't file php4apache2.dll on my computer...
What can I do?
 

I noticed you have a alias for php to c:\php4 in your httpd.conf file.
Can't you find php4apache2.dll there?
Say this again: Don't send html format message.

Best

Bao

   

- Original Message -
From: BAO RuiXian [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 20, 2004 12:48 AM
Subject: Re: [PHP] Problem with Apache!


 

  wrote:



   

Please, tell me, do you check my httpd.conf file?



 

Yes, I have checked your httpd.conf file. It is missing the following

   

line:

 

LoadModule php4_module YourRealPath/php4apache2.dll

Please keep discussion on the list.

Best

Bao



   

Maybe deal in it??

E-mail: [EMAIL PROTECTED]


- Original Message -
From: BAO RuiXian [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 11:40 PM
Subject: Re: [PHP] Problem with Apache!




 

  wrote:





   

 Hello! My name is Artem!
 I want to tell you about my problem. Please, help me
When I changed my httpd.conf file like in book by Julie C.Meloni, I
try to open file phpinfo.php from directory C:\Program Files\Apache
Group\Apache2\htdocs.
But when I open Internet Explorer and write
http://localhost/phpinfo.php in it I see an error like Object not
found!. Why?


 

Do you have the file phpinfo.php in C:\Program Files\Apache
Group\Apache2\htdocs?
Please don't send HTML format message to the list, instead a plain
   

text
 

message is most welcome.

Best

Bao





   

I attached my httpd.conf file... Maybe deal in this file?
 Please, answer me... I really need your help...
 Artem.






 

   



 

   



 

   



 

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


[PHP] Re: heavy parsing of text, storing both versions

2004-02-19 Thread Torsten Schabdach
Hi Justin,

I'm building a CMS that does heavy parsing of a HTML shorthand plain 
text to XHTML strict, in a similar way to Textile 
http://www.textism.com/tools/textile/.
The problem is this conversion might take place on 2-3 columns of text, 
and unlimited other fields (my CMS has user-defined data models),
Could you please provide a short example or an URL of your data model?
This would clear things a little bit.
2. [...] I'm going to be storing a LOT of data in the DB.
Why not save both as files? Maybe you find a structure for this,  i.e. 
http://example.org/articles/2004/02/19/text34_v3.html or something like 
this. You save the editfiles and cache the xhtml-output.

3. write a reverse set of functions which converts the XHTML back to the 
shorthand on demand for editing -- this seems great, but I don't like 
the idea of maintaining two functions for such a beast.
Only parse one way. I mean only from your format to XHTML. There is no 
need for converting back (I believe). your people edit the text, after 
that they open up the browser and hitting refresh. So that's when your 
parser comes in play. And with caching only once per document.

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


Re: [PHP] php as cgi with static libraries?

2004-02-19 Thread Marten Lehmann
that's what I already did (--enable-static=db4), but after that a 'ldd 
php' still showed me references to libdb.so. I don't want to build php 
with absolutely no dynamic libaries, only certain libaries shall be 
compiled in statically.
Still no answer? Is noone experienced enough in the building-process 
(may affect gcc in general, not php-specific).

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


Re: [PHP] Headers Again

2004-02-19 Thread PETCOL
Stuart,

Unfortunately history tells me that php like ColdFusion will one day be
bought out by the big corporates, or at least they'll have a considerable
financial vested interest in it.

At which time we hope way off in the future, we'll all have to start paying
for support and maintenance contracts.

Allaire owned ColdFusion, the developer network was extremely co-operative,
then joint venture between Macromedia and Allaire, now if you want good old
assistance you need a Devnet contract.

Cheers,  I'm going to bed.

Col


Stuart [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 PETCOL wrote:
  Stuart
 
  Thank you.

 Don't thank me[1], thank them. Preferably with cash[2].

 [1] I will accept cash if offered.
 [2] http://marc.theaimsgroup.com/?q=about#Begware

 -- 
 Stuart

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



[PHP] Security Issue?

2004-02-19 Thread Ed Lazor
Hi Everyone,

Oddball error randomly shows up when accessing pages on my web hosting
provider.  The error message is below.

My account is obb4wine.  PHP behaves as if I'm the account budguy when
the script error occurs.  A page refresh usually makes the error go
away.  The error happens frequently enough that site users are
complaining.

Any ideas?

-Ed





PHP:  4.3.4.  (See below for Configure Command)

Apache:  Apache/1.3.29 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2
mod_bwlimited/1.4 PHP/4.3.4 FrontPage/5.0.2.2634 mod_ssl/2.8.16
OpenSSL/0.9.6b



Error Message:


Warning: Unknown(): open_basedir restriction in effect.
File(/home/obb4wine/public_html/prepend.php) is not within the allowed
path(s): (/home/budguy:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown
on line 0

Warning: Unknown(/home/obb4wine/public_html/prepend.php): failed to open
stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening
'/home/obb4wine/public_html/prepend.php' for inclusion
(include_path='.:/home/obb4wine/public_html') in Unknown on line 0


-
PHP Configure Command
-

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
'--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom'
'--with-dom-xslt' '--with-dom-exslt' '--enable-ftp' '--with-gd'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl'
'--with-kerberos' '--with-mcrypt' '--with-ming=../ming-0.2a'
'--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl'
'--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets'
'--enable-track-vars' '--enable-versioning' '--enable-wddx'
'--with-xmlrpc' '--with-zlib'

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



Re[2]: [PHP] date

2004-02-19 Thread Tom Rogers
Hi,

Friday, February 20, 2004, 6:32:27 AM, you wrote:
JB [snip]
JB hi there

JB how do i make php give me yesterday's date?

JB i tried

JB date(Y-m-d)-1

JB but if today would be the 1st of july (2004-07-01), yesterday would be
JB 00.
JB july (2004-07-00) according to that calculator.
JB is there any way to make this one get it right? without any
JB if-structures if
JB possible
JB [/snip]

JB http://www.php.net/strtotime

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


date('Y-m-d',strtotime('-1 day'));

-- 
regards,
Tom

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



Re: [PHP] PHP PDFs...

2004-02-19 Thread Evan Nemerson
On Thursday 19 February 2004 11:42 am, Russell P Jones wrote:
 Is there any way to deal with PDFS using PHP and not installing PHPlib? I
 simply need to pull the first page of a PDF document and print it out
 using PHP. (Like a PDF preview of sorts)...

 Any ideas?

I'm assuming you meant pdflib, not phplib? If I'm reading your question right, 
I don't know of a way to do it purely from PHP. However,

gs -q -dNOPAUSE -dBATCH -sOutputFile=output_file.pdf -sDEVICE=pdfwrite 
-dFirstPage=1 -dLastPage=1 -f input_file.pdf

will give you what you want. What you want is a PDF of the first page of 
another PDF, right?


 Russ Jones

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety.

-Benjamin Franklin

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



Re: [PHP] heavy parsing of text, storing both versions

2004-02-19 Thread John W. Holmes
Justin French wrote:
Hi all,

I'm building a CMS that does heavy parsing of a HTML shorthand plain 
text to XHTML strict, in a similar way to Textile 
http://www.textism.com/tools/textile/.

1. Parse the text on demand into HTML -- the parsing script is to 
heavy/slow for this.

2. Store both the plain (shorthand HTML) text and parsed XHTML versions 
of each field -- the problem with this being that i'm storing double the 
data in the database... 

3. write a reverse set of functions which converts the XHTML back to the 
shorthand on demand for editing -- this seems great, but I don't like 
the idea of maintaining two functions for such a beast.
Well, you pretty much listed all of the options. Personally, I'd 
probably go with #2 because hard drive space is cheap. But... if the 
process is really that intensive and you're really that concerned about 
space, then I'd do #3. It doesn't seem like it'd be that hard to 
maintain as you're just reversing everything and how often do you expect 
it to change? Sorry I can't offer a better option. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


Re: [PHP] heavy parsing of text, storing both versions

2004-02-19 Thread joel boonstra
On Fri, Feb 20, 2004 at 10:35:11AM +1100, Justin French wrote:
 1. Parse the text on demand into HTML -- the parsing script is to 
 heavy/slow for this.
 
 2. Store both the plain (shorthand HTML) text and parsed XHTML versions 
 of each field -- the problem with this being that i'm storing double 
 the data in the database... combine this with versioning of each 
 'page', and I'm going to be storing a LOT of data in the DB.
snip
 3. write a reverse set of functions which converts the XHTML back to 
 the shorthand on demand for editing -- this seems great, but I don't 
 like the idea of maintaining two functions for such a beast.
 
 
 Has anyone got any further ideas?

4. Store the plain (shorthand HTML) text and when users 'save' changes,
generate a static page containing the transformed XHTML version.  You
will have the processing overhead once (when data is changed), and
everytime else visitors get static files.

It sounds like #3 would be quite difficult.  Going from HTML-XHTML you
know what the end result would look like.  Going the other way, you
won't know for sure what the users originally entered when they authored
the content.  I'm assuming this isn't a 1-to-1 transformation, so that
these:

  bSome bold text/b
  BSome bold text/B
  bSome bold text/B

will all get turned into:

  strongSome bold text/strong

If you turn the strong text back into b, then it's not clear which
of the three options you should use.

Unless I'm misunderstanding...

joel

-- 
[ joel boonstra | gospelcom.net ]

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



Re: [PHP] Re: heavy parsing of text, storing both versions

2004-02-19 Thread Justin French
On Friday, February 20, 2004, at 10:58  AM, Torsten Schabdach wrote:

Hi Justin,

I'm building a CMS that does heavy parsing of a HTML shorthand 
plain text to XHTML strict, in a similar way to Textile 
http://www.textism.com/tools/textile/.
The problem is this conversion might take place on 2-3 columns of 
text, and unlimited other fields (my CMS has user-defined data 
models),
Could you please provide a short example or an URL of your data model?
This would clear things a little bit.
Well, I'm still trying to define the DM, but something like this:

pages
id,path,status,dataModel_id
1,/products/foo/,1,3col
2,/home/,1,2col
etc
dataModel_3col
pageid, title,desc,keywords,col1,col2,col3
dataModel_2col
pageid, title,desc,keywords,col1,col2
... the above would be enough if it were all plain text, but since I'm 
doing a lot of parsing (especially on textarea's), dataModel 3col 
might look more like this:

dataModel_3col
pageid,title,desc_in,desc_out,keywords,col1_in,col1_out, 
col2_in,col2_out, col3_in,col3_out

There may be an entirely better way of doing this though :)


2. [...] I'm going to be storing a LOT of data in the DB.
Why not save both as files? Maybe you find a structure for this,  i.e. 
http://example.org/articles/2004/02/19/text34_v3.html or something 
like this. You save the editfiles and cache the xhtml-output.
That's a good idea which I'll definitely look into... ideally, I was 
hoping for everything to sit in one place -- either a database OR file 
structure -- not both. It makes for an easier learning curve, easier 
back-ups, etc etc.

The other problem with the above is that I don't wish to merge the 
fields with the template at this point -- I want that to be on-the-fly. 
 So the question is how to store the multiple fields (in their parsed 
state) in flat files.  I guess simple XML would be an option...

pageid4/pageid
titleParsed title/title
descParsed desc/desc
keywords.../keywords
col1.../col1
col2.../col2
col3.../col3
... but that's adding complexity that perhaps doesn't need to be there.

I think I'd rather everything in the database.  Perhaps I need to keep 
all the versions of the input text in one table, and all the versions 
of the output in another -- in this case, I could choose to keep ALL 
versions of the input, but perhaps only 1-5 versions of the output... 
reducing the double data.

So, the process of adding/editing a page might be:

- user hits submit
- input saved into dataModel_3col_in (all versions are stored)
- input parsed
- output saved into dataModel_3col_out
- older versions of output (eg any more than 3) are cleaned out
And the process of retrieving data for output to a page would be simply 
retrieving the latest from dataModel_3col_out.

My only concern here is that there's 2 tables for every data model, 
which need to match at all times.


3. write a reverse set of functions which converts the XHTML back to 
the shorthand on demand for editing -- this seems great, but I don't 
like the idea of maintaining two functions for such a beast.
Only parse one way. I mean only from your format to XHTML. There is no 
need for converting back (I believe). your people edit the text, after 
that they open up the browser and hitting refresh. So that's when your 
parser comes in play. And with caching only once per document.
---
Justin French
http://indent.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] heavy parsing of text, storing both versions

2004-02-19 Thread John W. Holmes
joel boonstra wrote:

On Fri, Feb 20, 2004 at 10:35:11AM +1100, Justin French wrote:

1. Parse the text on demand into HTML -- the parsing script is to 
heavy/slow for this.

2. Store both the plain (shorthand HTML) text and parsed XHTML versions 
of each field -- the problem with this being that i'm storing double 
the data in the database... combine this with versioning of each 
'page', and I'm going to be storing a LOT of data in the DB.
snip

3. write a reverse set of functions which converts the XHTML back to 
the shorthand on demand for editing -- this seems great, but I don't 
like the idea of maintaining two functions for such a beast.

Has anyone got any further ideas?


4. Store the plain (shorthand HTML) text and when users 'save' changes,
generate a static page containing the transformed XHTML version.  You
will have the processing overhead once (when data is changed), and
everytime else visitors get static files.
Isn't that just an alternate version of #2? You're still duplicating the 
data and taking up storage space. Again, I wouldn't really be worried 
about this, but that's the issue presented in #2. Sure, static files 
would probably be faster, but that doesn't answer the issue of when/how 
to do the conversion.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

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


[PHP] Flash and Sessions

2004-02-19 Thread Jack Baty
I have a page with an embedded Flash movie that I'm having trouble with. The
Flash movie loads and calls a different url on the same host, retrieving some
XML and parsing it.

The problem is that many people are reporting that they lose thier session
when leaving the page with the Flash movie. Essentially, when posting the
form on that page, they get kicked out of the app. After removing the Flash
movie completely, the problem goes away. This seems to occur about 1 out of 5
posts, but only for about 1/3 of the users. This doesn't seem to be specific
to a particular Flash or browser version, as I'm using the same combination
as some of the folks reporting problems and have never seen it. Server is IIS
5 and PHP 4.3.3. It also doesn't seem to be a cookie or javascript issue
either.

Any thoughts?

-- 
Jack Baty
Fusionary Media - http://www.fusionary.com/

for life is not a paragraph, and death i think is no parenthesis.
-e.e. cummings

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



Re: [PHP] heavy parsing of text, storing both versions

2004-02-19 Thread joel boonstra
On Thu, Feb 19, 2004 at 09:15:35PM -0500, John W. Holmes wrote:
2. Store both the plain (shorthand HTML) text and parsed XHTML
versions 
of each field -- the problem with this being that i'm storing double 
the data in the database... combine this with versioning of each 
'page', and I'm going to be storing a LOT of data in the DB.
snip
 4. Store the plain (shorthand HTML) text and when users 'save' changes,
 generate a static page containing the transformed XHTML version.  You
 will have the processing overhead once (when data is changed), and
 everytime else visitors get static files.
 
 Isn't that just an alternate version of #2? You're still duplicating the 
 data and taking up storage space. Again, I wouldn't really be worried 
 about this, but that's the issue presented in #2. Sure, static files 
 would probably be faster, but that doesn't answer the issue of when/how 
 to do the conversion.

Version #2 involved an identical database structure, or multiple
database fields, or some sort of redundant data storage that mirrors the
HTML database structure.  The bigger problem to me seemed to be the
complexity introduced into the database, not the extra storage space
required.

This solves the script run problem (only runs once), and lets the
database remain as originally planned.

The point is that the XHTML version is only necessary for display on the
finished webpage, and the simple HTML version is only necessary for
editing in the administrative interface.  Publishing static XHTML files
eliminates the need to do database interactivity on each page request
(after all, the content isn't going to change with each request, is it?)
and keeping the HTML in the database lets the admin. interface be as
interactive and dynamic as is necessary.

Just my $.02, though -- I'm not going to have to end up maintaining
this, so the best answer is the one that works the best for the OP.

joel

-- 
[ joel boonstra | gospelcom.net ]

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



[PHP] PEAR DB 1.6.0 has been released

2004-02-19 Thread Daniel Convissor
[This has be cross-posted. Be careful when following up, please.]

Greetings:

Crack open the beer, PEAR DB 1.6.0 is here!  (Hey, I'm a bit giddy
with excitement that my intense work during the past seven weeks
has come to fruition.)

For those unfamiliar with PEAR DB, it's a package of PHP classes
that provide an object oriented API with common methods of accessing
thirteen of PHP's database driver extensions:
dBase, FrontBase, InterBase, Informix, mSQL, MS SQL Server,
MySQL, Oracle, ODBC (tested with DB2 and Access), PostgreSQL,
SQLite and Sybase.

Key links for PEAR DB:

Download:http://pear.php.net/get/DB
Change Log:  http://pear.php.net/package-changelog.php?package=DB
Manual:  http://pear.php.net/manual/en/package.database.php
Home Page:   http://pear.php.net/package/DB

Notable changes since 1.5.0RC2 include:

* New portability features, making it possible to write
  applications which can be easily ported between DBMS's.

* Tons of bug fixes, making the package actually work for more
  than just MySQL systems.

* Improved error reporting.

* Getting prepare/execute to work the same way for all DBMS's
  and allow escaping of placeholder characters.

* Deploying tableInfo() in more drivers and officially moving
  it from DB_result to DB_common.  See the documentation for
  proper usage.

* Making the test suite simpler to use and work on both
  windows and *nix platforms.

* Various optimizations, several of which were uncovered
  using Zend Studio's Code Analyzer.

* Countless documentation corrections.

* Full PHP 5 compatibility.

* Requiring PHP to be at version 4.2.0 or higher.

* Deprecating quote() and quoteString().

If you're one of the lucky few people using PHP's mysqli extension,
do note that the DB file/class has been renamed from mysql4 to mysqli,
but the online documentation won't reflect this modification until
they're rebuilt on Sunday.  Similarly, there are a few other features
and documentation bugs that won't show up there until then either.

Is Dutch, German or Russian your native language?  The manual needs
translating into these languages.  Join in by signing up for the
pear-doc mailing list at http://pear.php.net/support.php.

For those of you in and around New York City this coming
Tuesday, February 24th, I'll be giving a presentation about this at
the NYPHP meeting.  See http://nyphp.org/ for more info.

If you like the changes I've made to DB since version 1.5.0RC2, make
a donation: http://www.analysisandsolutions.com/donate/donate.htm

Enjoy,

--Dan

PS:  I'm not on this list/newsgroup.  Just posting this as an
announcement.  So, if you wish to contact me, please do so directly
or via cc.

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

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



[PHP] Advice Needed

2004-02-19 Thread daniel
Hi there, i have finally built a project space for work, its a collaborate
space for storing important key documents (not public), what is the best
way to store these, outside the web directory or would it be safe within a
htaccess protected directory ? Being that to access that directory i would
have to send the login and pass to the link of the file which i fopen up
and either header output to the browser or download.

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



[PHP] PROBLEM: Explorer trying to save my *.php files...

2004-02-19 Thread
Now, my problem is next:
When I tryin' to view my phpinfo.php file, Internet Explorer is invite
me to save it to disk Not To Open Why?
I have 11 files in my PHP directory:

LICENSE
MSVCRT.DLL
php4ts.dll
php4isapi.dll
php.exe
php.ini
php.ini-optimized
php_calendar.dll
php_imap.dll
php_ldap.dll
README.txt

And I don't have php4apache2.dll in C:\PHP4. Maybe, you'll send me this
file, if deal in it?
I need your help



  wrote:

Sorry, I'm from Ukraine and, maybe, my English too bad... But I don't
understand your words Please keep the discussion on the list.


It means that don't send your response only to me, but to the list you
originally sent, i.e. [EMAIL PROTECTED] so that others will also
benefit/critisize/contribute.

And, you words Don't send html format message I'm not understand too.


Check your email client's settings, to figure out how to send only plain
text message.

Sorry, but, please, explaine... I'll do all that you say... :-)
And, next. I can't find php4apache2.dll in C:\PHP4 and in all other
directories on my computer?

Have you ever downloaded php package to install? Or you only created a
empty directory C:\PHP4?:)
I suggest you visit www.php.net site or goole 'how to install php on
windows' to find the basics.

Best

Bao

PS: Don't change the subject line each time. It will make people hard to
follow.

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



RE: [PHP] Re: PEAR DB 1.6.0 has been released

2004-02-19 Thread electroteque
unfortunately i tried mdb and it was totally unusable and badly documented,
and to port pear db over to mdb was impossible, i find pear db ok, even
adodb is cool, i had to build my own class specifically just for mysql with
pretty good performance as no others could.

-Original Message-
From: Jakes [mailto:[EMAIL PROTECTED]
Sent: Friday, February 20, 2004 5:13 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [PHP] Re: PEAR DB 1.6.0 has been released


What is performance like using this class? I've gone through the class and
it just seams to be over kill, for a DB API (13 databases).

Are there any time stats showing the different time in using a single DB API
class to the PEAR class.

Thanks


Daniel Convissor [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 [This has be cross-posted. Be careful when following up, please.]

 Greetings:

 Crack open the beer, PEAR DB 1.6.0 is here!  (Hey, I'm a bit giddy
 with excitement that my intense work during the past seven weeks
 has come to fruition.)

 For those unfamiliar with PEAR DB, it's a package of PHP classes
 that provide an object oriented API with common methods of accessing
 thirteen of PHP's database driver extensions:
 dBase, FrontBase, InterBase, Informix, mSQL, MS SQL Server,
 MySQL, Oracle, ODBC (tested with DB2 and Access), PostgreSQL,
 SQLite and Sybase.

 Key links for PEAR DB:

 Download:http://pear.php.net/get/DB
 Change Log:  http://pear.php.net/package-changelog.php?package=DB
 Manual:  http://pear.php.net/manual/en/package.database.php
 Home Page:   http://pear.php.net/package/DB

 Notable changes since 1.5.0RC2 include:

 * New portability features, making it possible to write
   applications which can be easily ported between DBMS's.

 * Tons of bug fixes, making the package actually work for more
   than just MySQL systems.

 * Improved error reporting.

 * Getting prepare/execute to work the same way for all DBMS's
   and allow escaping of placeholder characters.

 * Deploying tableInfo() in more drivers and officially moving
   it from DB_result to DB_common.  See the documentation for
   proper usage.

 * Making the test suite simpler to use and work on both
   windows and *nix platforms.

 * Various optimizations, several of which were uncovered
   using Zend Studio's Code Analyzer.

 * Countless documentation corrections.

 * Full PHP 5 compatibility.

 * Requiring PHP to be at version 4.2.0 or higher.

 * Deprecating quote() and quoteString().

 If you're one of the lucky few people using PHP's mysqli extension,
 do note that the DB file/class has been renamed from mysql4 to mysqli,
 but the online documentation won't reflect this modification until
 they're rebuilt on Sunday.  Similarly, there are a few other features
 and documentation bugs that won't show up there until then either.

 Is Dutch, German or Russian your native language?  The manual needs
 translating into these languages.  Join in by signing up for the
 pear-doc mailing list at http://pear.php.net/support.php.

 For those of you in and around New York City this coming
 Tuesday, February 24th, I'll be giving a presentation about this at
 the NYPHP meeting.  See http://nyphp.org/ for more info.

 If you like the changes I've made to DB since version 1.5.0RC2, make
 a donation: http://www.analysisandsolutions.com/donate/donate.htm

 Enjoy,

 --Dan

 PS:  I'm not on this list/newsgroup.  Just posting this as an
 announcement.  So, if you wish to contact me, please do so directly
 or via cc.

 --
  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 data intensive web and database programming
 http://www.AnalysisAndSolutions.com/
  4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

--
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] PEAR::MAIL Problem

2004-02-19 Thread Stanley Chan
Dear Listmates,

I am using PEAR::MAIL and my code includes the below;

// Send Email Out
$mailCfg = array(
host  = 127.0.0.1,
port  = 25,
auth  = false
);
$mailRecipient = $hashValue[emailaddress];
$mailHeader = array(
From  = [EMAIL PROTECTED],
To= $mailRecipient,
Subject   = Test Message
);
$mailBody = $myContent; 
$mailMgr = Mail::factory(smtp, $mailCfg);
$mailResult = $mailMgr-send($mailRecipient,
$mailHeader, $mailBody);

It is found that the variable $mailResult is always
true but the email cannot be received whenever. 

On the other hand, in the same machine, I can use the
native function mail() very well. It works well.

So I doubt the problem of PEAR::MAIL. Should I
consider anything?

My server is using Qmail and sendmail command is a
shortcut of Qmail executes (standard way).

Please help.

-stan


_
...
  
http://us.rd.yahoo.com/evt=22281/*http://ringtone.yahoo.com.hk/

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



[PHP] Re: XSLT in php v5 beta 4

2004-02-19 Thread Lucian Cozma
I think your problems comes from configuring php with domxml instead of xslt
lib ( that requires sablotron).
You can use domxml's xslt transformations. I actually recomend it. It's
faster and in my opinion more flexible and reliable. (see
http://www.php.net/manual/en/ref.domxml.php for more info )


Extract from manual for installing sablotron:

On UNIX, run configure with the --enable-xslt --with-xslt-sablot options.
The SablotronT library should be installed somewhere your compiler can find
it.
Make sure you have the same libraries linked to the SablotronT library as
those, which are linked with PHP. The configuration
options: --with-expat-dir=DIR --with-iconv-dir=DIR are there to help you
specify them. When asking for support, always mention these directives, and
whether there are other versions of those libraries installed on your system
somewhere. Naturally, provide all the version numbers.


Extract from manual for installing domxml:

This extension is only available if PHP was configured
with --with-dom[=DIR]. Add --with-dom-xslt[=DIR] to include DOM XSLT
support. DIR is the libxslt install directory. Add --with-dom-exslt[=DIR] to
include DOM EXSLT support, where DIR is the libexslt install directory.


If you're still having problems, send me the config line for php.

Regards,
Lucian

Steve Dieke [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am guesing that I have installed something incorrectly.  I am trying to
 use the function xslt_create().  I installed php v5 Beta 4 successfully.
but
 when I try to use the function xslt_create() I get the following error:

 Fatal Error: Call to undefined function xslt_create()

 I have a test php page that uses phpinfo() and here's what the xml related
 setting say.

 xml
 XML Support  active
 XML Namespace Support  active
 libxml2 Version  2.6.6

 xsl
 XSL  enabled
 libxslt Version  1.1.3
 libxslt compiled against libxml Version  2.6.6
 EXSLT  enabled
 libexslt Version  1.1.3

 My environment is the following:
 Fedora Core 1
 php - version 5 beta 4
 apache -  2.0.48

 Anyone have any ideas?  I have looked at the articles on php.net and
didn't
 see anything that I thought would help.

 Thanks,
 Steve

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



  1   2   >