Re: [PHP] preg help please :)

2003-10-16 Thread Eugene Lee
On Thu, Oct 16, 2003 at 02:23:45PM +1000, Justin French wrote:
: 
: I have the following:
: 
: ?
: $quote = #822[0|1]{1};;
: $text = preg_replace(
:   /$quote(.*)$quote:$quote(.*)$quote/,
:   a href='\\2'\\1/a,
:   $text
:   );
: ?
: 
: It basically matches link text:url with the added twist of having 
: the quotes converted to #8220; or #8220; by a previous function.
: 
: It works fine if there is one link found inside a string, but falls 
: over horribly if there's two links inside a string.
: 
: How can I improve the (.*) to exclude $quote ?

Try inverting the greediness with a U pattern modifier:

/$quote(.*)$quote:$quote(.*)$quote/U

For more details:

http://www.php.net/manual/en/pcre.pattern.modifiers.php

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



[PHP] generating nested xml from mysql

2003-10-16 Thread daniel
Hi there i am having a problem generating nested xml from mysql

My class is ok with one loop. But there is a problem when i want to do a
query and within that loop result do another query. More specifically i
want my xml to look like this.

menu
top_menu
title/title
sub_menu
   title/title
/sub_menu
/top_menu
/menu

where top menu gets the first loop and sub menu is the second query within
the first query.

Let me know thanks

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



[PHP] Help with file upload

2003-10-16 Thread Bunmi Akinmboni
This is the new code:
?php
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
copy($_FILES['ufile1']['tmp_name'], .);
echo $ufile1_name ;
echo DONE;
echo  ;
print_r($_FILES);
} else {
echo Possible file upload attack. Filename:  .
$_FILES['ufile1']['name'];
echo  ;
print_r($_FILES);
}
?
Bunmi

Bunmi Akinmboni wrote:

Thanks John,
I had done it before and still tried it again now. This is what I get:
Warning: copy(.): failed to open stream: Is a directory in 
/home/ayserve/public_html/fu/fuprocess.php on line 6
ayservenet.jpg DONE Array ( [ufile1] = Array ( [name] = ayservenet.jpg 
[type] = image/pjpeg [tmp_name] = /tmp/php1tARiu [error] = 0 [size] 
= 3030 ) )

Bunmi

John W. Holmes wrote:

Bunmi Akinmboni wrote:

Pls Help.
I have done a lot of reading prior to this yet I just can't seem make 
it work. I wrote an upload program as seen below but the response I 
got was:

Possible file upload attack. Filename: ayservenet.jpg Array ( 
[ufile1] = Array ( [name] = ayservenet.jpg [type] = image/pjpeg 
[tmp_name] = /tmp/phpIMEhdh [error] = 0 [size] = 3030 ) )


[snip]

if (is_uploaded_file($_FILES['ufile1']['name'])) {
copy($_FILES['ufile1']['name'], .);
echo $ufile1_name ;
echo DONE;
echo  ;
print_r($_FILES);
} else {
echo Possible file upload attack. Filename:  . 
$_FILES['ufile1']['name'];
echo  ;
print_r($_FILES);
}
?


You should pass $_FILES['ufile1']['tmp_name'] to is_uploaded_file().



--
'Bunmi Akinmboni
5, Aibu Street, Off Bode Thomas Street,
P.O. Box 6235, Surulere, Lagos, NIGERIA.
Tel: (234) 1-813-3335
Fax: (234) 1-583-2585 (Nigeria Only)
Fax: 1 (309) 285-2383 (International)
Email: [EMAIL PROTECTED]
Web site: http://www.budelak.com
  http://www.ayserve.net
Web Design, Web Hosting, Domain Registration, ICT Consultancy, 
Networking, Internet, eCommerce, System Integrator
===

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


Re: [PHP] Help with file upload

2003-10-16 Thread Marek Kilimajer
Your webserver needs write permission to the directory where you want to 
copy.

Bunmi Akinmboni wrote:

This is the new code:
?php
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
copy($_FILES['ufile1']['tmp_name'], .);
echo $ufile1_name ;
echo DONE;
echo  ;
print_r($_FILES);
} else {
echo Possible file upload attack. Filename:  .
$_FILES['ufile1']['name'];
echo  ;
print_r($_FILES);
}
?
Bunmi

Bunmi Akinmboni wrote:

Thanks John,
I had done it before and still tried it again now. This is what I get:
Warning: copy(.): failed to open stream: Is a directory in 
/home/ayserve/public_html/fu/fuprocess.php on line 6
ayservenet.jpg DONE Array ( [ufile1] = Array ( [name] = 
ayservenet.jpg [type] = image/pjpeg [tmp_name] = /tmp/php1tARiu 
[error] = 0 [size] = 3030 ) )

Bunmi

John W. Holmes wrote:

Bunmi Akinmboni wrote:

Pls Help.
I have done a lot of reading prior to this yet I just can't seem 
make it work. I wrote an upload program as seen below but the 
response I got was:

Possible file upload attack. Filename: ayservenet.jpg Array ( 
[ufile1] = Array ( [name] = ayservenet.jpg [type] = image/pjpeg 
[tmp_name] = /tmp/phpIMEhdh [error] = 0 [size] = 3030 ) )


[snip]

if (is_uploaded_file($_FILES['ufile1']['name'])) {
copy($_FILES['ufile1']['name'], .);
echo $ufile1_name ;
echo DONE;
echo  ;
print_r($_FILES);
} else {
echo Possible file upload attack. Filename:  . 
$_FILES['ufile1']['name'];
echo  ;
print_r($_FILES);
}
?




You should pass $_FILES['ufile1']['tmp_name'] to is_uploaded_file().



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


Re: [PHP] Help with file upload

2003-10-16 Thread Nitin

- Original Message - 
From: Bunmi Akinmboni [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 1:33 PM
Subject: [PHP] Help with file upload


 This is the new code:
 ?php
 if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
  copy($_FILES['ufile1']['tmp_name'], .);

i guess, actual problem is something like::

  copy($_FILES['ufile1']['tmp_name'], .);

while it should be

  copy($_FILES['ufile1']['tmp_name'], ./);

hope it helps


 echo $ufile1_name ;
 echo DONE;
 echo  ;
 print_r($_FILES);
 } else {
  echo Possible file upload attack. Filename:  .
 $_FILES['ufile1']['name'];
 echo  ;
 print_r($_FILES);
 }
 ?

 Bunmi

 Bunmi Akinmboni wrote:

  Thanks John,
  I had done it before and still tried it again now. This is what I get:
 
  Warning: copy(.): failed to open stream: Is a directory in
  /home/ayserve/public_html/fu/fuprocess.php on line 6
  ayservenet.jpg DONE Array ( [ufile1] = Array ( [name] = ayservenet.jpg
  [type] = image/pjpeg [tmp_name] = /tmp/php1tARiu [error] = 0 [size]
  = 3030 ) )
 
  Bunmi
 
  John W. Holmes wrote:
 
  Bunmi Akinmboni wrote:
 
  Pls Help.
  I have done a lot of reading prior to this yet I just can't seem make
  it work. I wrote an upload program as seen below but the response I
  got was:
 
  Possible file upload attack. Filename: ayservenet.jpg Array (
  [ufile1] = Array ( [name] = ayservenet.jpg [type] = image/pjpeg
  [tmp_name] = /tmp/phpIMEhdh [error] = 0 [size] = 3030 ) )
 
 
  [snip]
 
  if (is_uploaded_file($_FILES['ufile1']['name'])) {
  copy($_FILES['ufile1']['name'], .);
  echo $ufile1_name ;
  echo DONE;
  echo  ;
  print_r($_FILES);
  } else {
  echo Possible file upload attack. Filename:  .
  $_FILES['ufile1']['name'];
  echo  ;
  print_r($_FILES);
  }
  ?
 
 
 
  You should pass $_FILES['ufile1']['tmp_name'] to is_uploaded_file().
 


 -- 
 'Bunmi Akinmboni
 5, Aibu Street, Off Bode Thomas Street,
 P.O. Box 6235, Surulere, Lagos, NIGERIA.
 Tel: (234) 1-813-3335
 Fax: (234) 1-583-2585 (Nigeria Only)
 Fax: 1 (309) 285-2383 (International)
 Email: [EMAIL PROTECTED]
 Web site: http://www.budelak.com
http://www.ayserve.net

 Web Design, Web Hosting, Domain Registration, ICT Consultancy,
 Networking, Internet, eCommerce, System Integrator
 ===

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

2003-10-16 Thread Amanda Lau
Hi.
I have a question.
I receive this message three times every time I boot my computer:
Unknown(): Could not load dynamic library 'extensions\php_dbg.dll-
4.3.2' - The specified module could not be found.
Is there a way I can fix this problem?

Amanda

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



[PHP] Information

2003-10-16 Thread hatem gouda

Dear Miss/Mrs./Mr.
I intend to move to Australia and work there as an auditor or an accountant.So I'd 
like to be familiar with Australian accounting environment before I move to there.
So I'd like you to give me some information about MYOB Accountants Office and 
MYOB Taxlike:
* Where can I have courses about them in Egypt ,or How I could have courses by distant 
 education if there is no courses available in Egypt?
* Where can I find self-study books or CDs about them and what is the title of these 
books or CDs(Can I get them free or there are a fee for having them how mush it could 
be).
   I'll be waiting for your reply, 
Wish you all the best,
 
  
Yours faithfully,
   Hatem 
A. Gouda   

































-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

RE: [PHP] php

2003-10-16 Thread Mike Brum
Either confirm that you have php_dbg.dll in your extensions directory or
comment out that line in your php.ini file.

-M

-Original Message-
From: Amanda Lau [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 16, 2003 4:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php


Hi.
I have a question.
I receive this message three times every time I boot my computer:
Unknown(): Could not load dynamic library 'extensions\php_dbg.dll- 4.3.2' -
The specified module could not be found. Is there a way I can fix this
problem?

Amanda

-- 
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] const in PHP

2003-10-16 Thread BENARD Jean-philippe
Hi,

With the ArcaAttributes class definition (see below) I've an arror
when trying to use one of the constants of this class as this :

echo ArcaAttributes::ATT_EMPLOYEENUMBER;

Parse error: parse error, expecting `'('' in
/dtpdev01/dtp/racine-web/arca_test/test.php on line 117

It seams waiting only functions when using ::.

Could someone help me ? How to define constant in a cless without the
define() function ? (I don't want to use the define function because it
makes the constant defined everywhere).

Many thanks in advance !


class ArcaAttributes {
/**
 * Liste des attributs à retourner
 * @var array
 */
var $attributes = array();
var $set = false;

const ATT_EMPLOYEENUMBER = 'uid';
const ATT_CN = 'cn';
const ATT_MAIL = 'mail';
const ATT_POSTALADDRESS = 'postofficebox';
const ATT_TELEPHONENUMBER = 'telephonenumber';

const ATT_DEFAULT_PERSON_ATTRIBUTES = array(
ArcaAttributes::ATT_EMPLOYEENUMBER,
ArcaAttributes::ATT_CN,
ArcaAttributes::ATT_MAIL,
ArcaAttributes::ATT_POSTALADDRESS,
ArcaAttributes::ATT_TELEPHONENUMBER
);

function ArcaAttributes($clearList = false) {
if ($clearList)
$this-attributes = array();
else
$this-setDefaultAttributes();
}

function addAttribute($attrib) {
array_push($this-attributes, $attrib);
}

function clearAttributes($clearList = false) {
if ($clearList) {
$this-set = false;
$this-attributes = array();
}
else
$this-setDefaultAttributes();
}

function setDefaultAttributes() {
$this-set = true;
$this-attributes =
ArcaAttributes::ATT_DEFAULT_PERSON_ATTRIBUTES;
}

function is_set() {
if ($this-set === true)
return true;
else
return false;
}
}


(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10

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



php-general Digest 16 Oct 2003 11:16:24 -0000 Issue 2358

2003-10-16 Thread php-general-digest-help

php-general Digest 16 Oct 2003 11:16:24 - Issue 2358

Topics (messages 166260 through 166282):

Re: Session lose value with httpS
166260 by: Chris W. Parker
166261 by: [-^-!-%-
166267 by: Curt Zirzow

Re: Return to browser and keep running!
166262 by: Manuel Vázquez Acosta
166264 by: Chris W. Parker

HTTP_POST_RAW_DATA problem
166263 by: Manuel Vázquez Acosta
166265 by: Raditha Dissanayake

Re: Detecting devices i.e. PDA, Mobile
166266 by: Raditha Dissanayake

Sending htaccess auth information through php
166268 by: daniel.electroteque.org

Re: parsing ini files
166269 by: John W. Holmes

preg help please :)
166270 by: Justin French
166274 by: Eugene Lee

What's a good regex to validate an email address? ;)
166271 by: John W. Holmes

Time Calcuations
166272 by: Jake McHenry
166273 by: John W. Holmes

generating nested xml from mysql
166275 by: daniel.electroteque.org

Help with file upload
166276 by: Bunmi Akinmboni
166277 by: Marek Kilimajer
166278 by: Nitin

php
166279 by: Amanda Lau
166281 by: Mike Brum

Information
166280 by: hatem gouda

const in PHP
166282 by: BENARD  Jean-philippe

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---
 -^-!-%- [mailto:[EMAIL PROTECTED]
on Wednesday, October 15, 2003 3:58 PM said:

 What would cause a session value to be lost, under HTTPS?

Hmm... I'll be coming up against this soon and would like to know the
answer as well.

One question though: can you set values in the $_SESSION array within
HTTPS and retrieve those same values within HTTPS? Are you able to
retreive it in HTTP if it were created in HTTPS?



Chris.

--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
---End Message---
---BeginMessage---



I am able to set and read the values on the same page.

I lose the value (and the session) was I move to another page.



=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.

On Wed, 15 Oct 2003, Chris W. Parker wrote:

  -^-!-%- [mailto:[EMAIL PROTECTED]
 on Wednesday, October 15, 2003 3:58 PM said:

  What would cause a session value to be lost, under HTTPS?

 Hmm... I'll be coming up against this soon and would like to know the
 answer as well.

 One question though: can you set values in the $_SESSION array within
 HTTPS and retrieve those same values within HTTPS? Are you able to
 retreive it in HTTP if it were created in HTTPS?



 Chris.

 --
 Don't like reformatting your Outlook replies? Now there's relief!
 http://home.in.tum.de/~jain/software/outlook-quotefix/

---End Message---
---BeginMessage---
* Thus wrote [-^-!-%- ([EMAIL PROTECTED]):
 
 Hello everyone!
 
 What would cause a session value to be lost, under HTTPS?

what is the output of session_get_cookie_params() on the unsecure
site vs. the secure site.

 
 NOTE: The regular server name is   'mydomain.net', but the secure server
 name is 'secure-servename.net'. Would this affect the session function,
 even though it's the same machine?

Yes, this is what is causing the problem. The secure-servername doesn't
have acces to the cookies (as you'll see from the above results).

You'll have to pass the SESSIONID and ensure that the SESSIONID is 
valid on the secure server side assuming the domain resides on the
same server:

unsecure.php:
$sharedkey = uniqid(mt_rand());
$_SESSION['goodsession'] = md5(SID . 'secretkey' . $sharedkey);
$_SESSION['sharedkey'] = $sharedkey;
?
a href=https://secureserver/?php echo SID?secure server/a
 

secure.php:
$sharedkey = $_SESSION['sharedkey'];
$goodsession = md5(SID . 'secretkey' . $sharedkey);
if ($goodsession != $_SESSION['goodsession']) {
  // bad session data.
}

Although not fool proof and certain conditions need to be met in
order for this to work properly, but its just an example to ensure
that the SESSION is the right one.


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/
---End Message---
---BeginMessage---
 Add before the exit:
 set_time_limit(0);

 http://php.net/set_time_limit

 Curt


You didn't get the idea. I want to be able to keep running a script
disconnected from the browser; once all the output has been sent to the
browser there's no need for the user to wait until the script finish its
execution.
set_time_limit(0); makes the scripts to run completely without the 30
seconds error; but it will keep the connection with the browser; so it does
not solve the problem though

Thanks anyway,
Manu.

Re: [PHP] Return to browser and keep running!

2003-10-16 Thread Marek Kilimajer
Now I noticed you are on windows. There is a user note in the manual 
that says that this function does not work as expected on windows:

[snip]
(by priebe at mi-corporation dot com)
Note that register_shutdown_function() does not work under Apache on 
Windows platforms.  Your shutdown function will be called, but the 
connection will not close until the processing is complete.  Zend tells 
me that this is due to a difference between Apache for *nix and Apache 
for Windows.

I'm seeing similar behavior under IIS (using php4isapi).
[/snip]
But acording to this bug http://bugs.php.net/15209 the behavior changed 
between php 4.0 and 4.1. There should be new function named 
apache_register_shutdown_function and I have a feeling I have seen it 
somewhere in the manual but it seems to be gone. :(

Manuel Vázquez Acosta wrote:
Add before the exit:
set_time_limit(0);
http://php.net/set_time_limit

Curt


You didn't get the idea. I want to be able to keep running a script
disconnected from the browser; once all the output has been sent to the
browser there's no need for the user to wait until the script finish its
execution.
set_time_limit(0); makes the scripts to run completely without the 30
seconds error; but it will keep the connection with the browser; so it does
not solve the problem though
Thanks anyway,
Manu.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ms word problems again !!

2003-10-16 Thread Chris Hayes
At 18:16 15-10-03, you wrote:
I'm trying to send the following header to force ms-word to open a html 
document

header(Content-type: application/msword);

header('Content-Disposition: attachment; filename=invoice.doc');

it works in Mozilla but NOT in IE..

any ideas as its driving me crazy..
I collected various headers to send a csv file to be opened by excel and 
though it looks redundant, it seems to work.
All the caching supression seems to be important.

header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);   // Date in 
the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);  // always 
modified
header(Cache-Control: no-store, no-cache, must-revalidate);   // HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache); // HTTP/1.0

header(Content-type: text/csv);
header('Content-Disposition: inline; 
filename=Aanmeldingen_SENSE_symposium_2003.csv');
echo $string_csv;

and
In a previous version I also had to supress the word ;atachment; for the 
content disposition i think, for MSIE 5.5. Is that your MSIE version? I do 
not use it anymore. Maybe a google search helps to explain this better than 
I can.
if (strstr($_SERVER[HTTP_USER_AGENT],MSIE 5.5)) {$att = ;} else {$att 
=  attachment;;}

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


Re: [PHP] const in PHP

2003-10-16 Thread Marek Kilimajer
Are you using php5? const is not available in php4 or less.

BENARD Jean-philippe wrote:

Hi,

With the ArcaAttributes class definition (see below) I've an arror
when trying to use one of the constants of this class as this :
	echo ArcaAttributes::ATT_EMPLOYEENUMBER;

Parse error: parse error, expecting `'('' in
/dtpdev01/dtp/racine-web/arca_test/test.php on line 117
	It seams waiting only functions when using ::.

Could someone help me ? How to define constant in a cless without the
define() function ? (I don't want to use the define function because it
makes the constant defined everywhere).
Many thanks in advance !

class ArcaAttributes {
/**
 * Liste des attributs à retourner
 * @var array
 */
var $attributes = array();
var $set = false;

const ATT_EMPLOYEENUMBER = 'uid';
const ATT_CN = 'cn';
const ATT_MAIL = 'mail';
const ATT_POSTALADDRESS = 'postofficebox';
const ATT_TELEPHONENUMBER = 'telephonenumber';

const ATT_DEFAULT_PERSON_ATTRIBUTES = array(
ArcaAttributes::ATT_EMPLOYEENUMBER,
ArcaAttributes::ATT_CN,
ArcaAttributes::ATT_MAIL,
ArcaAttributes::ATT_POSTALADDRESS,
ArcaAttributes::ATT_TELEPHONENUMBER
);

function ArcaAttributes($clearList = false) {
if ($clearList)
$this-attributes = array();
else
$this-setDefaultAttributes();
}

function addAttribute($attrib) {
array_push($this-attributes, $attrib);
}

function clearAttributes($clearList = false) {
if ($clearList) {
$this-set = false;
$this-attributes = array();
}
else
$this-setDefaultAttributes();
}

function setDefaultAttributes() {
$this-set = true;
$this-attributes =
ArcaAttributes::ATT_DEFAULT_PERSON_ATTRIBUTES;
}
function is_set() {
if ($this-set === true)
return true;
else
return false;
}
}

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : +33 1-30-03-47-83 * Fax : +33 1-30-03-42-10
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ms word problems again !!

2003-10-16 Thread pete M
thankyou,thankyou, thankyou, thankyou, thankyou, !!

I spent at least a day on trying to get it to work - now does

pete ;-

Chris Hayes wrote:
At 18:16 15-10-03, you wrote:

I'm trying to send the following header to force ms-word to open a 
html document

header(Content-type: application/msword);

header('Content-Disposition: attachment; filename=invoice.doc');

it works in Mozilla but NOT in IE..

any ideas as its driving me crazy..
I collected various headers to send a csv file to be opened by excel and 
though it looks redundant, it seems to work.
All the caching supression seems to be important.

header(Expires: Mon, 26 Jul 1997 05:00:00 GMT);   // Date 
in the past
header(Last-Modified:  . gmdate(D, d M Y H:i:s) .  GMT);  // 
always modified
header(Cache-Control: no-store, no-cache, must-revalidate);   // HTTP/1.1
header(Cache-Control: post-check=0, pre-check=0, false);
header(Pragma: no-cache); // HTTP/1.0

header(Content-type: text/csv);
header('Content-Disposition: inline; 
filename=Aanmeldingen_SENSE_symposium_2003.csv');
echo $string_csv;

and
In a previous version I also had to supress the word ;atachment; for the 
content disposition i think, for MSIE 5.5. Is that your MSIE version? I 
do not use it anymore. Maybe a google search helps to explain this 
better than I can.
if (strstr($_SERVER[HTTP_USER_AGENT],MSIE 5.5)) {$att = ;} else 
{$att =  attachment;;}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Regular Expressions

2003-10-16 Thread Shmuel
I have a misspelled sentence like this: I am not aIone.
I want to change the capital I to small l, but only in
the beginning of a word.
How is this done in regular expression ?

Any help appreciated.

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


[PHP] Regular expressions

2003-10-16 Thread Shmuel
I have a misspelled sentence like this: I am not aIone.
I want to change the capital I to small l, but only in
the beginning of a word.
How is this done in regular expression ?

Any help appreciated.

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


Re: [PHP] Regular Expressions

2003-10-16 Thread Jacob Vennervald
preg_replace(/aIone/, alone, I am not aIone);

But you don't need regular expressions for this.

Jacob

On Thu, 2003-10-16 at 14:35, Shmuel wrote:
 I have a misspelled sentence like this: I am not aIone.
 I want to change the capital I to small l, but only in
 the beginning of a word.
 
 How is this done in regular expression ?
 
 Any help appreciated.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Venlig hilsen / Best regards,
Jacob Vennervald
System Developer
Proventum Solutions ApS
Tuborg Boulevard 12
2900 Hellerup
Denmark
Phone:  +45 36 94 41 66
Mobile: +45 61 68 58 51

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



Re: [PHP] Regular Expressions

2003-10-16 Thread Justin French
On Thursday, October 16, 2003, at 10:35  PM, Shmuel wrote:

I have a misspelled sentence like this: I am not aIone.
I want to change the capital I to small l, but only in
the beginning of a word.
How is this done in regular expression ?
You want to change an uppercase i/I into a lowercase l/L??
Define begining of a word -- do you mean the first character, or the 
first few chars, or the first half of the word.

Perhaps rather than a generic example, how about a specific example of 
what you need to change?

Justin

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


Re: [PHP] Regular Expressions

2003-10-16 Thread Eugene Lee
On Thu, Oct 16, 2003 at 03:35:57PM +0300, Shmuel wrote:
: 
: I have a misspelled sentence like this: I am not aIone.
: I want to change the capital I to small l, but only in
: the beginning of a word.

This doesn't make sense.  It sounds like you want to replace every
occurance of 'I' inside a word with a 'l'.

preg_replace('/(\B)I(\B)/', '\1l\2', $yourstring)

Then again, I could be misreading.

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



[PHP] Sessions.. (I'm learning), can't call a variable?

2003-10-16 Thread Tristan . Pretty
Not sure if this is a MySQL Q. or a PHP one, but here goes...

I'm just learning sessions...
And I'm trying to add a session variable to a MySQL database.
I've done this page that takes the results from a previous form...
But I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING' 
On line 83
Which is the line that relates to the line:
\$_SESSION['salutation'];\, 

I've tried removing the ';' but it change nothing...?
Can anyone see my error?

=
?
session_start();
header(Cache-control: private);

   $_SESSION['salutation'] = $_POST['salutation'];

//MySQL connection stuff
mysql_query(INSERT INTO $table (
salutation,
name,
city
} VALUES {
\$_SESSION['salutation'];\, 
\$_SESSION['name'];\, 
\$_SESSION['city'];\
}

?
//Rest of page... thanks etc...
=

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP] Sessions.. (I'm learning), can't call a variable?

2003-10-16 Thread Chris Boget
 Which is the line that relates to the line:
 \$_SESSION['salutation'];\, 
 I've tried removing the ';' but it change nothing...?
 Can anyone see my error?

Either take out the quotes surrounding the word 'salutation' or
take the variable out of the string:

\ . $_SESSION[salutation] . \,

Also, you don't need the semicolon as part of the query.

Chris

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



[PHP] PHP Class ArrayQueue

2003-10-16 Thread Antonio Bologna
Hello everyone, I'm just curious, I implemented a Array Queue in php, but
not sure why is not working, this ArrayQueue is missing some functions like
doubleQueue and dequeue, but anyway I'm trying to implmeneted in php, does
anyone knows what's wrong? Thanks

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



Re: [PHP] Sessions.. (I'm learning), can't call a variable?

2003-10-16 Thread James E Hicks III
Try this.
 mysql_query(INSERT INTO $table (
 salutation,
 name,
 city
 } VALUES {
 \.$_SESSION['salutation'].\,
 \.$_SESSION['name'].\,
 \.$_SESSION['city'].\
 }

James

On Thursday 16 October 2003 08:36 am, [EMAIL PROTECTED] wrote:
 Not sure if this is a MySQL Q. or a PHP one, but here goes...

 I'm just learning sessions...
 And I'm trying to add a session variable to a MySQL database.
 I've done this page that takes the results from a previous form...
 But I get this error:
 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
 `T_NUM_STRING'
 On line 83
 Which is the line that relates to the line:
 \$_SESSION['salutation'];\,

 I've tried removing the ';' but it change nothing...?
 Can anyone see my error?

 =
 ?
 session_start();
 header(Cache-control: private);

$_SESSION['salutation'] = $_POST['salutation'];

 //MySQL connection stuff
 mysql_query(INSERT INTO $table (
 salutation,
 name,
 city
 } VALUES {
 \$_SESSION['salutation'];\,
 \$_SESSION['name'];\,
 \$_SESSION['city'];\
 }

 ?
 //Rest of page... thanks etc...
 =

 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***

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



Re: [PHP] HTTP_POST_RAW_DATA problem

2003-10-16 Thread Manuel Vázquez Acosta
Oh! Thanks, I'm using cURL to send the post, I will check if I send a
content-type header.

Manu.


Raditha Dissanayake [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi,

 RAW_POST_DATA does not get populated for known content types. That's why
 i got a little help from perl when building the megaupload progress bar.


 Manuel Vázquez Acosta wrote:

 Hello:
 
 I'm running into a problem when trying to get $HTTP_POST_RAW_DATA; it
always
 returns NULL althought my php.ini always_populate_raw_post_data is set to
 On.
 
 My env: Windows XP-Pro; Apache 1.3.24/PHP module 4.3.3
 
 Any ideas?
 Manu.
 
 
 


 -- 
 Raditha Dissanayake.
 
 http://www.radinks.com/sftp/  |  http://www.raditha/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] PHP Class ArrayQueue (2)

2003-10-16 Thread Antonio Bologna
Sorry, here it is the code:



?php

/* Trying to use queues in PHP, let
 * see if that works.
 */

class ArrayQueue {

var $theArray = array();
var $currentSize;
var $front;
var $back;
var $DEFAULT_CAPACITY = 10;

function increment($x) {
  if(++$x == $theArray.length)
$x = 0;
  return $x;
}

function ArrayQueue() {
  $theArray = ($DEFAULT_CAPACITY);
  ArrayQueue::makeEmpty();
}

function isEmpty() {
  return $currentSize = 0;
}

function enqueue($Obj) {
  if($currentSize == $theArray.length)
ArrayQueue::doubleQueue();
  $back = ArrayQueue::increment($back);
  $theArray[$back] = $Obj;
  $currentSize++;
}

function makeEmpty() {
  $currentSize = 0;
  $front = 0;
  $back = -1;
}

function objReturn() {
 return $front;
}
}

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



Re: [PHP] Return to browser and keep running!

2003-10-16 Thread Manuel Vázquez Acosta
Outch! I have read the long discussion of this bug. But I tested the
register_shutdown_function on a RH system with Apache 1.3.24 and it didn't
work either (the connection keeps alive).
The apache_register_shutdown_function doesn't exists in either system.

Manu.

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



[PHP] Re: Regular Expressions

2003-10-16 Thread Manuel Vázquez Acosta
Um! This is like an OCR error.
Maybe you'll need a dictionary and craft a soundex/diffin' scheme. I don't
think regexp will solve this problem nicely.

Manu.

Shmuel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have a misspelled sentence like this: I am not aIone.
 I want to change the capital I to small l, but only in
 the beginning of a word.

 How is this done in regular expression ?

 Any help appreciated.

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



Re: [PHP] HTTP_POST_RAW_DATA problem

2003-10-16 Thread Raditha Dissanayake
Hi,

You will most probably need to send a content type other than 
mulitpart/form-data for it to work. When you do you will find that the 
variables may not be populated.



Manuel Vázquez Acosta wrote:

Oh! Thanks, I'm using cURL to send the post, I will check if I send a
content-type header.
Manu.

Raditha Dissanayake [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 

Hi,

RAW_POST_DATA does not get populated for known content types. That's why
i got a little help from perl when building the megaupload progress bar.
Manuel Vázquez Acosta wrote:

   

Hello:

I'm running into a problem when trying to get $HTTP_POST_RAW_DATA; it
 

always
 

returns NULL althought my php.ini always_populate_raw_post_data is set to
On.
My env: Windows XP-Pro; Apache 1.3.24/PHP module 4.3.3

Any ideas?
Manu.


 

--
Raditha Dissanayake.

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

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/  |  http://www.raditha/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] where is my session data on my new server?

2003-10-16 Thread Ford, Mike [LSS]
On 14 October 2003 14:45, David T-G wrote:

 Mike, et al --
 
 ...and then Ford, Mike   [LSS] said...
 %
 % On 14 October 2003 11:26, David T-G wrote:
 %
 %  I ran a phpinfo() comparison and didn't see anything markedly
 %  different (except for how the output is formatted, which
 made things
 %  delightfully more challenging), but I also don't know for what I'm
 %  looking.  I also don't know what other information I
 should provide,
 %  but I'm
 %  hesitant to
 %  bomb the list with two phpinfo() outputs :-)
 
 [Dude, what did you do to my paragraph formatting?!?]

Not me, boss -- it's this crappy M$ Outlook thingie they force me to use at work... ;-Z

 % Well, rather than post two complete phpinfos, can you hone
 it down to just those entries which *are* different.  I'd
 
 OLD:
session.use_trans_sid
 
  1 1
 NEW:
 
session.use_trans_sid Off Off

Oh-ho!! I'd seriously suspect this might have something to do with it.  Set this back 
to On on the new server and see what transpires.

 % It might also help to post a (short!) fragment of the relevant code.

[...] 

   session_save ;  # save for later

Actually this looks a bit suspicious too -- I'm not 100% sure that session_save is 
actually going to be called without parentheses () after it; that would certainly be 
the case in most of the languages I'm used to, but I could be wrong for PHP.  You 
should also probably include a session_write_close() to make sure you completely close 
out the session.

   - includestuff.inc:
 
   session_start ; # kick things off

And I'd have the same doubts about this.  Even stylistically I would prefer to see (), 
just as a visual confirmation that this is intended as a function call.

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] PHP Class ArrayQueue (2)

2003-10-16 Thread Marek Kilimajer
You need to read manual section about object oriented programing in php:
http://www.php.net/oop
Antonio Bologna wrote:

Sorry, here it is the code:



?php

/* Trying to use queues in PHP, let
 * see if that works.
 */
class ArrayQueue {

var $theArray = array();
var $currentSize;
var $front;
var $back;
var $DEFAULT_CAPACITY = 10;
function increment($x) {
  if(++$x == $theArray.length)
$x = 0;
  return $x;
}
function ArrayQueue() {
  $theArray = ($DEFAULT_CAPACITY);
  ArrayQueue::makeEmpty();
}
function isEmpty() {
  return $currentSize = 0;
}
function enqueue($Obj) {
  if($currentSize == $theArray.length)
ArrayQueue::doubleQueue();
  $back = ArrayQueue::increment($back);
  $theArray[$back] = $Obj;
  $currentSize++;
}
function makeEmpty() {
  $currentSize = 0;
  $front = 0;
  $back = -1;
}
function objReturn() {
 return $front;
}
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Is this possible?

2003-10-16 Thread Joseph Bannon
Is it possible to set two variables at once like this...

$test = $variable = 5;

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



Re: [PHP] Is this possible?

2003-10-16 Thread Robert Cummings
Write a small script and see.

Rob.

On Thu, 2003-10-16 at 11:36, Joseph Bannon wrote:
 Is it possible to set two variables at once like this...
 
 $test = $variable = 5;
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Is this possible?

2003-10-16 Thread Raquel Rice
On Thu, 16 Oct 2003 10:36:38 -0500
Joseph Bannon [EMAIL PROTECTED] wrote:

 Is it possible to set two variables at once like this...
 
 $test = $variable = 5;
 

Yes.

--
Raquel

To sin by silence when they should protest makes cowards out of men.
  --Abraham Lincoln

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



RE: [PHP] Is this possible?

2003-10-16 Thread Joseph Bannon
 Write a small script and see.


Yep, it worked. Thanks

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



[PHP] How do you keep browser from timing out during lengthy process

2003-10-16 Thread James E Hicks III
I have a program that when an operator clicks on a button initiates an ftp 
transfer of a large file. The program also checks for succesful completion of 
the transfer and advises the operator of the transfer status. How do I keep 
the operators browser from timing out so that the status can be displayed 
upon transfer completion?

James

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



[PHP] Merging document changes

2003-10-16 Thread Jason Godesky
I'm working on a collection of functions for handling text documents; when 
a Document is added, its text is broken into paragraphs, and each 
paragraph is saved to the database as a separate record.  The problem is 
editing the document, because I only want to update those paragraphs that 
have been changed (like CVS).  I've been trying to find information on how 
some of the versioning software out there does it, but haven't found 
anything really helpful.  As far as I can see, the troublesome points are 
when a new paragraph is added, or an old paragraph is deleted.  How can 
you tell the difference between this, and simply a heavily edited 
paragraph?  And how does one maintain the association between edited and 
existing paragraphs with these possibilities throwing the iteration out of 
whack?

--
Jason Godesky
[EMAIL PROTECTED]
http://www.tribaldawn.com/jason/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mozilla

2003-10-16 Thread Joseph Bannon
Does IE use mozilla? I'm writing a PHP script to keep track of user
agents.

J.

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



RE: [PHP] mozilla

2003-10-16 Thread Chris W. Parker
Joseph Bannon mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 9:24 AM said:

 Does IE use mozilla? I'm writing a PHP script to keep track of user
 agents.

1. Your question isnt' clear.

2. Please don't submit lazy lazy lazy questions like this to the list.
(I think) You also asked the question about $x = $y = 1; did you not?

3. It would take you less time to write your own test page and find out
for yourself than it would to write an email to a list and wait for a
reply.



Chris.


--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



RE: [PHP] mozilla

2003-10-16 Thread Joseph Bannon
  Does IE use mozilla? I'm writing a PHP script to keep track of user
agents.

 Your question isnt' clear.


What is not clear about it? I'm trying to keep keep track of user agents
with php.

J.

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



Re: [PHP] mozilla

2003-10-16 Thread Ray Hunter
Heavens no...

--
Ray

On Thu, 2003-10-16 at 10:24, Joseph Bannon wrote:
 Does IE use mozilla? I'm writing a PHP script to keep track of user
 agents.
 
 J.

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



RE: [PHP] mozilla

2003-10-16 Thread Chris W. Parker
Joseph Bannon mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 9:33 AM said:

 Your question isnt' clear.
 
 What is not clear about it? I'm trying to keep keep track of user
 agents with php.

I think you mean to say Does the word 'mozilla' appear in the IE user
agent string?

And my answer is: I'm going to let you be the detective this time
because I'm pretty sure I know the answer, but I wouldn't be positive
unless I tested it out.


Also, why don't you just get awstats or webalizer and put your website
logs through it?


--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] mozilla

2003-10-16 Thread John Nichel
Joseph Bannon wrote:
Does IE use mozilla? I'm writing a PHP script to keep track of user
agents.


Your question isnt' clear.


What is not clear about it? I'm trying to keep keep track of user agents
with php.
J.

Then write some test scripts, or google.  IE identifies as Mozilla 
because, and I quote Mozilla's site...

Rather than using other methods of content-negotiation, some 
ill-advised webmasters have chosen to look at the User-Agent to decide 
whether the browser being used was capable of using certain features 
(frames, for example), and would serve up different content for browsers 
that identified themselves as ``Mozilla''.

Consequently, Microsoft made their browser lie, and claim to be Mozilla, 
because that was the only way to let their users view many web pages in 
their full glory:

Mozilla/2.0 (compatible; MSIE 3.02; Update a; AOL 3.0; Windows 95)

--
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] php site

2003-10-16 Thread Lai, Kenny
hey, does anyone have any good links they use for their php references?

i'd also like to know how most people approach coding php from an OOP
standpoint

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



RE: [PHP] mozilla

2003-10-16 Thread Chris W. Parker
John Nichel mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 9:39 AM said:

 Then write some test scripts, or google.

I used user agent strings and gosh darn it, look what I found!! (page
is slow to load)

http://www.pgts.com.au/pgtsj/pgtsj0208c.html


Chris.

p.s. Please properly strip your replies.

--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



RE: [PHP] mozilla

2003-10-16 Thread Joseph Bannon
 I think you mean to say Does the word 'mozilla' appear in the IE user
agent string?


That is not what I'm asking. I already know it appears there. But I
already got my answer.

Now my question is if IE doesn't use mozilla, why does it put it in the
user agent?

J.

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



Re: [PHP] php site

2003-10-16 Thread Robert Cummings
On Thu, 2003-10-16 at 12:42, Lai, Kenny wrote:
 hey, does anyone have any good links they use for their php references?
 
 i'd also like to know how most people approach coding php from an OOP
 standpoint

Not that I'm plugging for you to use InterJinn (though you can feel
free) you can see how I used OOP to create the framework.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] mozilla

2003-10-16 Thread Chris W. Parker
Joseph Bannon mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 9:47 AM said:

 I think you mean to say Does the word 'mozilla' appear in the IE
 user agent string? 
 
 That is not what I'm asking. I already know it appears there. But I
 already got my answer.

ok well then that proves my point exactly!!

 Now my question is if IE doesn't use mozilla, why does it put it in
 the user agent?

I'm not telling.

--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



RE: [PHP] mozilla

2003-10-16 Thread Joseph Bannon
Thanks John, you answered my question.

J.

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



[PHP] nested require_once

2003-10-16 Thread Craig Lonsbury
Hi All,
I just wanted to confirm that require_once works as I think it should,
but
the manual isn't too clear about nesting scripts (or i'm just thick =).

What I think is/should be happening is that dbLib.ink is only included
in
index.php once, but when I run helperLib.php on its own, it has
dbLib.php.

In index.php, i have
   require_once(includes/outputLib.php);
   require_once(includes/dbLib.php);
   require_once(includes/helperLib.php);

and then within helperLib.php, i have
   require_once(dbLib.php);

I know this seems to be exactly what the whole 'once' part is about, but
better safe than sorry.

thank you,
Craig

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



Re: [PHP] mozilla

2003-10-16 Thread Chris Shiflett
--- Joseph Bannon [EMAIL PROTECTED] wrote:
 Does IE use mozilla?

No.

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



RE: [PHP] nested require_once

2003-10-16 Thread Chris W. Parker
Craig Lonsbury mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 9:45 AM said:

 I know this seems to be exactly what the whole 'once' part is about,
 but better safe than sorry.

That is correct. It only includes the file once regardless of how many
times the file is requested within the same page.


Chris.

--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] How do you keep browser from timing out during lengthy process

2003-10-16 Thread Rory McKinley
James

Courtesy of a site called Freshwater Software:

To change the timeout value that Internet Explorer uses:

1. Start the Registry Editor
2. Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion
\ InternetSettings
3. Select New  DWORD from the Edit menu
4. Call it ReceiveTimeout with a data value of SECONDS*1000
5. Restart your computer

For example, if you want the timeout to be 5 minutes, set the ReceiveTimeout
data value to 30 (300 * 1000)


Rory McKinley
Nebula Solutions
+27 82 857 2391
[EMAIL PROTECTED]
There are 10 kinds of people in this world,
those who understand binary and those who don't (Unknown)
- Original Message - 
From: James E Hicks III [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 5:48 PM
Subject: [PHP] How do you keep browser from timing out during lengthy
process


 I have a program that when an operator clicks on a button initiates an ftp
 transfer of a large file. The program also checks for succesful completion
of
 the transfer and advises the operator of the transfer status. How do I
keep
 the operators browser from timing out so that the status can be displayed
 upon transfer completion?

 James

 -- 
 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] Slow searches in large database

2003-10-16 Thread Cesar Cordovez
Manu, et al,

The database in alenet.com is rather tiny (about 28 docs, as you 
mentioned).  I developed the procedure for a intranet with some 5000 
records.  It is working fine.  It has some 20+ clients that are 
constantly hitting the database.  The server is a desktop (nothing out 
of the ordinary, running win32)



Manuel Vázquez Acosta wrote:
I used a variant of this scheme a time ago and it worked well though I had
not reached 2 000 records.
I separated the words using strtok().

Manu.

PD: How large is the http://www.alenet.com DB; I searched the word 'the'
(which is likely to be in every english doc) and it returned only 28 docs.
Manu.

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


Re: [PHP] Slow searches in large database

2003-10-16 Thread Cesar Cordovez
Curt, et al:

You just described my procedure!  I do exacly that, plus, I also save a 
soundex or metaphone code for each word so I can check spelling and 
closest matches.

Cesar.

Curt Zirzow wrote:
Instead of just adding a word to table of words, you add a field
that holds the qty of times it appears in the document.  So now the
sql looks something like:
select qty, docid  from keywords where word='people' order by qty

With an index on qty, the query should be rather fast. And now you
can join the keyword table and the main document table together so
you can display the results:
select k.qty, doc.*  from keywords k, documents doc 
  where k.docid = doc.id k.word='people' 
  order by k.qty

I do this very exact thing for my graphs and reports listed below.

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


Re: [PHP] Sessions.. (I'm learning), can't call a variable?

2003-10-16 Thread Jake McHenry

- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 8:36 AM
Subject: [PHP] Sessions.. (I'm learning), can't call a variable?


 Not sure if this is a MySQL Q. or a PHP one, but here goes...

 I'm just learning sessions...
 And I'm trying to add a session variable to a MySQL database.
 I've done this page that takes the results from a previous form...
 But I get this error:
 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
 `T_NUM_STRING'
 On line 83
 Which is the line that relates to the line:
 \$_SESSION['salutation'];\,

 I've tried removing the ';' but it change nothing...?
 Can anyone see my error?

 =
 ?
 session_start();
 header(Cache-control: private);

$_SESSION['salutation'] = $_POST['salutation'];

 //MySQL connection stuff
 mysql_query(INSERT INTO $table (
 salutation,
 name,
 city
 } VALUES {
 \$_SESSION['salutation'];\,
 \$_SESSION['name'];\,
 \$_SESSION['city'];\
 }

 ?
 //Rest of page... thanks etc...
 =

 *
 The information contained in this e-mail message is intended only for
 the personal and confidential use of the recipient(s) named above.
 If the reader of this message is not the intended recipient or an agent
 responsible for delivering it to the intended recipient, you are hereby
 notified that you have received this document in error and that any
 review, dissemination, distribution, or copying of this message is
 strictly prohibited. If you have received this communication in error,
 please notify us immediately by e-mail, and delete the original message.
 ***




Try this:

VALUES
('.addslashes($yourvar1).','.addslashes($yourvar2).','.addslashes(
$yourvar3).'));


Jake

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



[PHP] Looking for a programmer designer to hire

2003-10-16 Thread Joseph Bannon
Are there any sites I can post a bid request for programmers and graphic designers?

J.

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



RE: [PHP] Looking for a programmer designer to hire

2003-10-16 Thread Chris W. Parker
Joseph Bannon mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 11:22 AM said:

 Are there any sites I can post a bid request for programmers and
 graphic designers? 

I've seen requests posted to this list in the past and not heard anyone
complain (that I can remember). So it should be ok to do it here. I
tried googling for a real website but didn't find anything. I know
they're out there though.


HTH,
Chris.


--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] Looking for a programmer designer to hire

2003-10-16 Thread Dan Joseph
www.itmoonlighter.com

-Dan Joseph

 Are there any sites I can post a bid request for programmers and 
 graphic designers?

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



Re: [PHP] Looking for a programmer designer to hire

2003-10-16 Thread John Nichel
Joseph Bannon wrote:

Are there any sites I can post a bid request for programmers and graphic designers?

J.

There's Rent-A-Coder (http://www.rentacoder.com/RentACoder/default.asp)

--
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] Looking for a programmer designer to hire

2003-10-16 Thread Didier McGillis
I've asked for help and replied to help, but try and do the answer back off 
list.


From: Chris W. Parker [EMAIL PROTECTED]
To: Joseph Bannon 
[EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: RE: [PHP] Looking for a programmer  designer to hire
Date: Thu, 16 Oct 2003 11:26:55 -0700

Joseph Bannon mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 11:22 AM said:
 Are there any sites I can post a bid request for programmers and
 graphic designers?
I've seen requests posted to this list in the past and not heard anyone
complain (that I can remember). So it should be ok to do it here. I
tried googling for a real website but didn't find anything. I know
they're out there though.
HTH,
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*   
http://join.msn.com/?page=features/junkmail

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


Re: [PHP] Finally, PDF Header for PDF stuffs that work....

2003-10-16 Thread Scott Fletcher
IE just don't work depending on some of the IE's version because of the IE's
countless bugs.  So, a different method of controlling the data output to
the browser is needed.  That's when I use the fopen() stuffs and it solve
the problem.  It is evident by reduced customer's calling tech support
(us)... Questions about IE problem is something you would have to ask M$ on
why it is using hte faulty IE.

Scott F.

Curt Zirzow [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 * Thus wrote Scott Fletcher ([EMAIL PROTECTED]):
  //Can't use readfile() due to poor controlling of the file download.
  //(IE have this problems)...
  //readfile($filepath);

 readfile has no effect on how IE handles downloads.

 
  //use fopen() instead of readfile...
  $fp = fopen($filepath, 'rb');
  $pdf_buffer = fread($fp, $filesize);
  fclose ($fp);
 
  print $pdf_buffer;

 Loading the whole file in memory and not doing anything with it
 before sending it to the client doesn't make much sense.

 
  //Required, to keep IE from running into problems
  //when opening the file while downloading or downloading...
  //(IE been acting strange...)
  exit();

 This also doesn't effect IE.


 Curt
 -- 
 My PHP key is worn out

   PHP List stats since 1997:
   http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Looking for a programmer designer to hire

2003-10-16 Thread Brent Baisley
craigslist.org is a popular spot to post requests for projects, jobs or 
assistance. If you want official bidding and management assistance, 
eWork.com is a site I've used before as a bidder.

On Thursday, October 16, 2003, at 02:21 PM, Joseph Bannon wrote:

Are there any sites I can post a bid request for programmers and 
graphic designers?

J.

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


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Alternative to die()????

2003-10-16 Thread Scott Fletcher
I am wondering if there is an better alternative to the die() because it
prevent the HTML codes from being send to the browser, including some php
echo codes with HTML in it.

Thanks..
 Scott F.

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



Re: [PHP] Regular Expressions

2003-10-16 Thread Shmuel
Eugene Lee wrote:
On Thu, Oct 16, 2003 at 03:35:57PM +0300, Shmuel wrote:
: 
: I have a misspelled sentence like this: I am not aIone.
: I want to change the capital I to small l, but only in
: the beginning of a word.

This doesn't make sense.  It sounds like you want to replace every
occurance of 'I' inside a word with a 'l'.
	preg_replace('/(\B)I(\B)/', '\1l\2', $yourstring)

Then again, I could be misreading.
I want to replace every occurance of 'I' inside a word with a 'a',
but *NOT* in the beginning of the word. ie. Ill doesn't change,
but miIk changes to Milk.
This is a problem that occurs whit subrip. It can't distinguish
between those two letters.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: mozilla

2003-10-16 Thread Scott Fletcher
Later version of IE will display the Mozilla in the user agent coding
So, PHP or JavaScript user agent stuffs is pretty useless  Mozilla can
also pretent to be a different browser, like Opera or IE, etc..

Scott F.

Joseph Bannon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Does IE use mozilla? I'm writing a PHP script to keep track of user
agents.

J.

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



Re: [PHP] Alternative to die()????

2003-10-16 Thread Chris Shiflett
--- Scott Fletcher [EMAIL PROTECTED] wrote:
 I am wondering if there is an better alternative to the die()
 because it prevent the HTML codes from being send to the browser,
 including some php echo codes with HTML in it.

Please explain what you're wanting to do. This question makes as much sense as
asking for an alternative to echo, because echo sends output to the browser.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] Alternative to die()????

2003-10-16 Thread Leif K-Brooks
Scott Fletcher wrote:

I am wondering if there is an better alternative to the die() because it
prevent the HTML codes from being send to the browser, including some php
echo codes with HTML in it.
 

If you don't want the page to end, don't use die at all. Simple as that.

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Alternative to die()????

2003-10-16 Thread Robert Cummings
On Thu, 2003-10-16 at 14:44, Scott Fletcher wrote:
 I am wondering if there is an better alternative to the die() because it
 prevent the HTML codes from being send to the browser, including some php
 echo codes with HTML in it.

You can use exit()

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Re: mozilla

2003-10-16 Thread Jay Smith
Joseph Bannon wrote:

 Does IE use mozilla? I'm writing a PHP script to keep track of user
 agents.
 
 J.

Have you tried using the get_browser() function? Take a look at it, it'll
make keeping track of user agents must easier. (It was recently given a
facelift in PHP 4.3.3, so try to use that. Versions below 4.3.3 don't
report the user agent as accurately as 4.3.3 and up.)

J

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



Re: [PHP] Regular Expressions

2003-10-16 Thread Eugene Lee
On Thu, Oct 16, 2003 at 09:41:39PM +0300, Shmuel wrote:
: Eugene Lee wrote:
: On Thu, Oct 16, 2003 at 03:35:57PM +0300, Shmuel wrote:
: : 
: : I have a misspelled sentence like this: I am not aIone.
: : I want to change the capital I to small l, but only in
: : the beginning of a word.
: 
: This doesn't make sense.  It sounds like you want to replace every
: occurance of 'I' inside a word with a 'l'.
: 
:  preg_replace('/(\B)I(\B)/', '\1l\2', $yourstring)
: 
: Then again, I could be misreading.
: 
: I want to replace every occurance of 'I' inside a word with a 'a',
: but *NOT* in the beginning of the word. ie. Ill doesn't change,
: but miIk changes to Milk.
: 
: This is a problem that occurs whit subrip. It can't distinguish
: between those two letters.

Okay... so did my preg_replace() above work for you?  Or not?  If not,
do you have examples of it not working?

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



[PHP] PHP Date()ing logic.....

2003-10-16 Thread Ryan A
Hi,
I'm just screwing around with the date() function and timestamps but have
run into a little logic problem...
So far (as you can see with the below posted code) I can manipulate
days,hours and minutes...any idea on how to do months and years?
Lastly the goal of this is to make take all the parameters and make 1
timestamp out of it...any ideas? or links?
The code is really easy to understand and was taken from the manual but have
commented it a bit none the less, so it should be real easy to understand
even without executeing it.

Thanks in advance.

Cheers,
-Ryan
P.S around 20 lines of simple code below, if testing code copy and name your
file t1.php.

htmlheadtitle Testing Dates/title/head
bodyform type=get action=t1.phpinput type=text name=minput type=text
name=hinput type=text name=dinput type=submit/form/body/html
?php
## minutes ##
echo br**MINUTES**br;
$minutes=$_GET['m'];if(!isset($_GET['m'])){$minutes=1;}
echo 'year - mo-da-hr-m - s : - : b$minutes/b is set to
'.$minutes.'br';
echo date(Y-m-d-H-i-s).nbsp; nbsp; Currentbr;
echo date(Y-m-d-H-i-s,(time() + $minutes*60));
## hours ##
echo brbr**HOURS**br;
$hours=$_GET['h'];if(!isset($_GET['h'])){$hours=1;}
echo 'year - mo-da-hr-m: - : b$hours/b is set to '.$hours.'br';
echo date(Y-m-d-H-i).nbsp; nbsp; Currentbr;
echo date(Y-m-d-H-i,(time() + $hours*3600));
## days ##
echo brbr**DAYS**br;
$days=$_GET['d'];if(!isset($_GET['d'])){$days=1;}
echo 'year - mo-da-hr-m : - : b$days/b is set to '.$days.'br';
// $days=24*3600;
echo date(Y-m-d-H-i).nbsp; nbsp; Currentbr;
echo date(Y-m-d-H-i,(time() + $days*(24*3600)));
?

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



[PHP] HTML output buffering

2003-10-16 Thread Robin Kopetzky
Good afternoon!

Is there a simple way to have PHP buffer all HTML output via echo/print
until the program flushes the output buffer??

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

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



Re: [PHP] HTML output buffering

2003-10-16 Thread Chris Shiflett
--- Robin Kopetzky [EMAIL PROTECTED] wrote:
 Is there a simple way to have PHP buffer all HTML output via
 echo/print until the program flushes the output buffer??

Yes, output buffering:

http://www.php.net/ob_start

Hope that helps.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



Re: [PHP] HTML output buffering

2003-10-16 Thread Mohamed Lrhazi
On Thu, 2003-10-16 at 15:50, Robin Kopetzky wrote:
 Good afternoon!
 
 Is there a simple way to have PHP buffer all HTML output via echo/print
 until the program flushes the output buffer??
 

http://us2.php.net/manual/en/ref.outcontrol.php

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



Re: [PHP] HTML output buffering

2003-10-16 Thread CPT John W. Holmes
From: Robin Kopetzky [EMAIL PROTECTED]

 Is there a simple way to have PHP buffer all HTML output via echo/print
 until the program flushes the output buffer??

You can buffer the output yourself using the output buffering functions. Is
that what you're looking for?

More info: http://us2.php.net/manual/en/ref.outcontrol.php

---John Holmes...

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



Re: [PHP] Looking for a programmer designer to hire

2003-10-16 Thread Bob Rea
At 02:35 PM 10/16/2003 -0400, Brent Baisley wrote:
craigslist.org is a popular spot to post requests for projects, jobs or 
assistance. If you want official bidding and management assistance, 
eWork.com is a site I've used before as a bidder.
www.webhostingtalk.com has specific forums for discussion and advertising 
of these topics.

Bob Rea
Office Manager
Dragon Networks
770-458-1350, x 2000
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTML output buffering

2003-10-16 Thread Marek Kilimajer
Yes! And surprisingly it is called output buffering. Search the manual 
before you post.

Robin Kopetzky wrote:
Good afternoon!

Is there a simple way to have PHP buffer all HTML output via echo/print
until the program flushes the output buffer??
Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] HTML output buffering

2003-10-16 Thread Robin Kopetzky
Thank you for responding - Doh! I didn't look before leaping Oh, boy...

Sparky

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



[PHP] converting GET to POST

2003-10-16 Thread Kris Yates
Currently, I am posting via GET to third party server as seen below:

   $item=urlencode($item);
   header(Location: https://www.fake.com/fake.php?item=$item;);
I want to reconfigure my header calls to POST instead of using GET for 
sending $item to third party server.  Is this doable?

Thank you,

Kris

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


Re: [PHP] converting GET to POST

2003-10-16 Thread Chris Shiflett
--- Kris Yates [EMAIL PROTECTED] wrote:
 Currently, I am posting via GET to third party server as seen below:
 
 $item=urlencode($item);
 header(Location: https://www.fake.com/fake.php?item=$item;);
 
 I want to reconfigure my header calls to POST instead of using GET
 for sending $item to third party server. Is this doable?

No, you can't force a remote Web client to send a POST request. Maybe this is
possible with JavaScript, but I hope not.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

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



[PHP] intercepting URLs in a control-system

2003-10-16 Thread Alan Lord
Please forgive any obvious ignorances on my part, I am just learning PHP...

Having read quite a bit on-line, I am interested in trying to trap URLs
sent to my site so I can process the request and respond without
neccessarily having a real page to serve. If this makes any sense, how do
I do it? Because I expect that apache (in my case) would not like a URL that
contains extra directories/files and would reject it.

An example:

Web Site Root:

www.abc.com/index.php

On that page are a tags to further information but which physically don't
exist. It will be automatically generated from a database. For example:

www.abc.com/cars/volvo/X70.html

If I don't have that directory tree and a file called X70.html. Could I
trap the http/URL request (BEFORE apache throws it out) and process it in
my PHP control-engine which will find the right information and respond
accordingly?

Thanks in advance,

Alan

PS, if there are any examples of this (GPL) which you know of, please just
pass me the link.

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



Re: [PHP] converting GET to POST

2003-10-16 Thread Marek Kilimajer
You can do it this way:

form action=https://www.fake.com/fake.php;
input type=hidden name=item value=?= $item ?
input type=submit
/form
Kris Yates wrote:
Currently, I am posting via GET to third party server as seen below:

   $item=urlencode($item);
   header(Location: https://www.fake.com/fake.php?item=$item;);
I want to reconfigure my header calls to POST instead of using GET for 
sending $item to third party server.  Is this doable?

Thank you,

Kris

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


Re: [PHP] Regular Expressions

2003-10-16 Thread Curt Zirzow
* Thus wrote Shmuel ([EMAIL PROTECTED]):
 Eugene Lee wrote:
 On Thu, Oct 16, 2003 at 03:35:57PM +0300, Shmuel wrote:
 : 
 : I have a misspelled sentence like this: I am not aIone.
 : I want to change the capital I to small l, but only in
 : the beginning of a word.
 
 This doesn't make sense.  It sounds like you want to replace every
 occurance of 'I' inside a word with a 'l'.
 
  preg_replace('/(\B)I(\B)/', '\1l\2', $yourstring)
 
 Then again, I could be misreading.
 
 I want to replace every occurance of 'I' inside a word with a 'a',
 but *NOT* in the beginning of the word. ie. Ill doesn't change,
 but miIk changes to Milk.
 
 This is a problem that occurs whit subrip. It can't distinguish
 between those two letters.

Is one of your end users' keyboard misslabeled and they use an 'I'
instead of an 'l'.  Trying to fix mispellings this way makes no
sense at all.  

You want to use pspell  module for checking for spelling and fixing
them.

http://php.net/pspell


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] intercepting URLs in a control-system

2003-10-16 Thread Ray Hunter

 Having read quite a bit on-line, I am interested in trying to trap URLs
 sent to my site so I can process the request and respond without
 neccessarily having a real page to serve. If this makes any sense, how do
 I do it? Because I expect that apache (in my case) would not like a URL that
 contains extra directories/files and would reject it.

Try looking at apache mod_rewrite and see if that will work for you...i
have used it to do url rewrites for me and have a main php page handle
the requests.

--
BigDog

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



Re: [PHP] Alternative to die()????

2003-10-16 Thread Curt Zirzow
* Thus wrote Chris Shiflett ([EMAIL PROTECTED]):
 --- Scott Fletcher [EMAIL PROTECTED] wrote:
  I am wondering if there is an better alternative to the die()
  because it prevent the HTML codes from being send to the browser,
  including some php echo codes with HTML in it.
 
 Please explain what you're wanting to do. This question makes as much sense as
 asking for an alternative to echo, because echo sends output to the browser.

btw, the answer to that is print()
  http://php.net/print

:)

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] Finally, PDF Header for PDF stuffs that work....

2003-10-16 Thread John Herren
OK, here's a different problem.

If I call a pdf file directly, the Acrobat plugin begins to display the 
file almost immediately. Here is the reponse header for calling the file 
directly:

HTTP/1.1 200 OK
Date: Thu, 16 Oct 2003 20:41:28 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12 
OpenSSL/0.9.6b PHP/4.3.3 mod_perl/1.26
X-Meta-MSSmartTagsPreventParsing: TRUE
X-MSSmartTagsPreventParsing: TRUE
Last-Modified: Thu, 16 Oct 2003 17:08:17 GMT
ETag: 94174-341fcb-3f8ed081
Accept-Ranges: bytes
Content-Length: 3416011
Connection: close
Content-Type: application/pdf

I wrote a pdf-serving script for anti-leech purposes, and it works fine, 
except that the acrobat plugin waits for the entire file to come down 
the pipe before anything is displayed. The mystery for me is that the 
headers--the important ones anyway--look exactly the same. Dig:

HTTP/1.1 200 OK
Date: Thu, 16 Oct 2003 20:44:45 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12 
OpenSSL/0.9.6b PHP/4.3.3 mod_perl/1.26
X-Meta-MSSmartTagsPreventParsing: TRUE
X-MSSmartTagsPreventParsing: TRUE
X-Powered-By: PHP/4.3.3
X-Accelerated-By: PHPA/1.3.3r2
Accept-Ranges: bytes
Content-Length: 3416011
Connection: close
Content-Type: application/pdf

Here's what's serving the file:

header(Content-Type: application/pdf);
header(Accept-Ranges: bytes);
header(Content-Length: .filesize($thefile));
readfile($thefile);
Can anybody tell me why the browser is waiting for the entire file 
before it's displayed(using php)? I don't think the average user will 
have the patience to stare at a blank browser waiting for the file.

Thanks!

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


RE: [PHP] intercepting URLs in a control-system

2003-10-16 Thread Chris W. Parker
Alan Lord mailto:[EMAIL PROTECTED]
on Thursday, October 16, 2003 1:40 PM said:

 Having read quite a bit on-line, I am interested in trying to trap
 URLs sent to my site so I can process the request and respond without
 neccessarily having a real page to serve. If this makes any sense,
 how do I do it?

Yes. Like another poster suggested you'll want to use mod_rewrite. You
can turn urls such as www.abc.com/cars/volvo/X70.html into
www.abc.com/cars.php?make=volvomodel=X70

 Because I expect that apache (in my case) would not
 like a URL that contains extra directories/files and would reject it.

Yes, it's called a 404.


HTH,
Chris.


--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] php site

2003-10-16 Thread Becoming Digital
The object-oriented design is part of why I like InterJinn so much.

Edward Dudlik
Those who say it cannot be done
should not interrupt the person doing it.

wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU



- Original Message - 
From: Robert Cummings [EMAIL PROTECTED]
To: Lai, Kenny [EMAIL PROTECTED]
Cc: PHP-General [EMAIL PROTECTED]
Sent: Thursday, 16 October, 2003 12:45
Subject: Re: [PHP] php site


On Thu, 2003-10-16 at 12:42, Lai, Kenny wrote:
 hey, does anyone have any good links they use for their php references?
 
 i'd also like to know how most people approach coding php from an OOP
 standpoint

Not that I'm plugging for you to use InterJinn (though you can feel
free) you can see how I used OOP to create the framework.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
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] intercepting URLs in a control-system

2003-10-16 Thread Marek Kilimajer
Another option besides mod_rewrite is ErrorDocument directive in .htaccess:

ErrorDocument 404 404.php

In 404.php you trap the request, url will be in $_SERVER['REQUEST_URI']

Alan Lord wrote:
Please forgive any obvious ignorances on my part, I am just learning PHP...

Having read quite a bit on-line, I am interested in trying to trap URLs
sent to my site so I can process the request and respond without
neccessarily having a real page to serve. If this makes any sense, how do
I do it? Because I expect that apache (in my case) would not like a URL that
contains extra directories/files and would reject it.
An example:

Web Site Root:

www.abc.com/index.php

On that page are a tags to further information but which physically don't
exist. It will be automatically generated from a database. For example:
www.abc.com/cars/volvo/X70.html

If I don't have that directory tree and a file called X70.html. Could I
trap the http/URL request (BEFORE apache throws it out) and process it in
my PHP control-engine which will find the right information and respond
accordingly?
Thanks in advance,

Alan

PS, if there are any examples of this (GPL) which you know of, please just
pass me the link.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Finally, PDF Header for PDF stuffs that work....

2003-10-16 Thread Curt Zirzow
* Thus wrote John Herren ([EMAIL PROTECTED]):
 
 header(Content-Type: application/pdf);
 header(Accept-Ranges: bytes);
 header(Content-Length: .filesize($thefile));
 readfile($thefile);
 
 Can anybody tell me why the browser is waiting for the entire file 
 before it's displayed(using php)? I don't think the average user will 
 have the patience to stare at a blank browser waiting for the file.

This is a pdf issue I believe. There is an option in the PDF called
'Fast Web View', if this is set adobe doesn't need to read the
whole thing before starting to view.

Check the pdf's 'Document properties' and You'll see if the option
is set or not.  If not, resave the document enabling that option.

Acrobat 5 has a nice little batch thing to convert serveral
docuements into this mode.

HTH,

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



Re: [PHP] converting GET to POST

2003-10-16 Thread Lee Doolan
 Marek == Marek Kilimajer [EMAIL PROTECTED] writes:
 Kris == Kris Yates writes:

Marek You can do it this way:
Marek form action=https://www.fake.com/fake.php;
Marek input type=hidden name=item value=?= $item ?
Marek input type=submit
Marek /form

Actually, I think that if you do it this way, someone will have to
click on the submit button.  If you want to redirect with a post, then
look in to using the CURL library.

Marek Kris Yates wrote:
Kris Currently, I am posting via GET to third party server as seen below:
Kris $item=urlencode($item);
Kris header(Location: https://www.fake.com/fake.php?item=$item;);
Kris I want to reconfigure my header calls to POST instead of using GET
Kris for sending $item to third party server.  Is this doable?
Kris Thank you,
Kris Kris
Kris 

-- 
no toll on the internet; there are paths of many kinds;
whoever passes this portal will travel freely in the world

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



Re: [PHP] converting GET to POST

2003-10-16 Thread John Nichel
Lee Doolan wrote:
Marek == Marek Kilimajer [EMAIL PROTECTED] writes:
Kris == Kris Yates writes:


Marek You can do it this way:
Marek form action=https://www.fake.com/fake.php;
Marek input type=hidden name=item value=?= $item ?
Marek input type=submit
Marek /form
Actually, I think that if you do it this way, someone will have to
click on the submit button.  If you want to redirect with a post, then
look in to using the CURL library.
Right.  Either that, or remove the submit button, and have JavaScript 
submit the form on page load.

--
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] Finally, PDF Header for PDF stuffs that work....

2003-10-16 Thread John Herren
Curt Zirzow wrote:

* Thus wrote John Herren ([EMAIL PROTECTED]):

header(Content-Type: application/pdf);
header(Accept-Ranges: bytes);
header(Content-Length: .filesize($thefile));
readfile($thefile);
Can anybody tell me why the browser is waiting for the entire file 
before it's displayed(using php)? I don't think the average user will 
have the patience to stare at a blank browser waiting for the file.


This is a pdf issue I believe. There is an option in the PDF called
'Fast Web View', if this is set adobe doesn't need to read the
whole thing before starting to view.
Check the pdf's 'Document properties' and You'll see if the option
is set or not.  If not, resave the document enabling that option.
Acrobat 5 has a nice little batch thing to convert serveral
docuements into this mode.
HTH,

Curt
I appreciate that advice. And Fast Web View is disabled. But I still 
don't understand why calling the file directly gives immediate output, 
but if I generate the headers and readfile() the file to the browser 
(same exact file) it waits to get the whole file.

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


Re: [PHP] converting GET to POST

2003-10-16 Thread Marek Kilimajer
Lee Doolan wrote:
Actually, I think that if you do it this way, someone will have to
click on the submit button.  If you want to redirect with a post, then
look in to using the CURL library.
Kris wants to redirect the user so CURL library would not work for this.

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


Re: [PHP] where is my session data on my new server?

2003-10-16 Thread David T-G
Mike --

...and then Ford, Mike   [LSS] said...
% 
% On 14 October 2003 14:45, David T-G wrote:
% 
%  ...and then Ford, Mike   [LSS] said...
%  %
%  % On 14 October 2003 11:26, David T-G wrote:
%  %
%  %  I ran a phpinfo() comparison and didn't see anything markedly
...
%  should provide,
%  %  but I'm
%  %  hesitant to
%  %  bomb the list with two phpinfo() outputs :-)
%  
%  [Dude, what did you do to my paragraph formatting?!?]
% 
% Not me, boss -- it's this crappy M$ Outlook thingie they force me to use at work... 
;-Z

Bleah -- sucks to work there, man!  But thanks for the help.


% 
%  % Well, rather than post two complete phpinfos, can you hone
%  it down to just those entries which *are* different.  I'd
%  
%  OLD:
% session.use_trans_sid
%  
%   1 1
%  NEW:
%  
% session.use_trans_sid Off Off
% 
% Oh-ho!! I'd seriously suspect this might have something to do with it.  Set this 
back to On on the new server and see what transpires.

Funny you should mention that...  I took a look at this today and it had
magically been turned back on!  Didn't matter, though -- and httpd was
restarted at least some hours after the ini file was modified, so it
should have picked up the change (and I checked phpinfo via httpd and it
shows on).

This is what lets me have sessions even without cookies, right?  Yes,
this is a Good Thing(tm).


% 
%  % It might also help to post a (short!) fragment of the relevant code.
% 
% [...] 
% 
%session_save ;# save for later
% 
% Actually this looks a bit suspicious too -- I'm not 100% sure that session_save is 
actually going to be called without parentheses () after it; that would certainly be 
the case in most of the languages I'm used to, but I could be wrong for PHP.  You 
should also probably include a session_write_close() to make sure you completely close 
out the session.

I fixed this and session_start but to no avail.

The demo code that our ISP (who built and manages the system) used to
prove that sessions were working is

  ?php
session_start() ;
$_SESSION[count]++ ;
print $_SESSION[count] ;
  ?

and, sure enough, the count goes up as you reload the page.  Yay -- sort of.

So I stepped back and made *myself* a small page.  It's

  session_name('goof') ;
  session_start ;
  session_register('g') ;
  $passwordcom = G ;

  print _POST ISbrpre. ; print_r($_POST) ; print ./prebr\n; ###
  print _SESSION ISbrpre. ; print_r($_SESSION) ; print ./prebr\n;   ###
  print _SESSION[g] IS .$_SESSION[g].br\n;  ###
  print g IS .$g. AND passwordcom IS .$passwordcom.br\n;###
  if ( $_SESSION[g] != $passwordcom )   # no password (yet)?
  {
if ( $_SESSION[g] !=  )   # is this a second try?
{
  print Invalid Password.  Authorized access only.brnbspbr\n ;
#  session_unregister('g') ;
}
echo form method='post';
print Password:br input type='password' name='g';
print brbrbrcenterinput type='submit' value='   ENTER   '\n ;
print /form\n; 
session_write_close() ;
exit ;  # nothing else to do
  }

to mirror fairly closely the real page (in fact it's mostly taken from
the real page).

Something I realized as I was working on this is that we only ever refer
to the passed variable as $g (actually $pw).  That smacks awfully of a
globals setting; $pw is set from $_SESSION[pw] when present.  But all of
my global settings look the same.

The two results of this code are at

  http://www.locations.org/sessions/testme.php
  http://test.locations.org/sessions/testme.php

and are slightly different.   I'm still not sure what to make of it
all and I definitely don't know where to go next :-(


TIA  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] PHP Date()ing logic.....

2003-10-16 Thread Becoming Digital
If you want to manipulate months in this manner, you'll first need a month input box.  
Once you've got that covered, it's just a matter of using mktime() to create the 
appropriate date.

Edward Dudlik
Those who say it cannot be done
should not interrupt the person doing it.

wishy washy | www.amazon.com/o/registry/EGDXEBBWTYUU



- Original Message - 
From: Ryan A [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, 16 October, 2003 15:42
Subject: [PHP] PHP Date()ing logic.


Hi,
I'm just screwing around with the date() function and timestamps but have
run into a little logic problem...
So far (as you can see with the below posted code) I can manipulate
days,hours and minutes...any idea on how to do months and years?
Lastly the goal of this is to make take all the parameters and make 1
timestamp out of it...any ideas? or links?
The code is really easy to understand and was taken from the manual but have
commented it a bit none the less, so it should be real easy to understand
even without executeing it.

Thanks in advance.

Cheers,
-Ryan
P.S around 20 lines of simple code below, if testing code copy and name your
file t1.php.

htmlheadtitle Testing Dates/title/head
bodyform type=get action=t1.phpinput type=text name=minput type=text
name=hinput type=text name=dinput type=submit/form/body/html
?php
## minutes ##
echo br**MINUTES**br;
$minutes=$_GET['m'];if(!isset($_GET['m'])){$minutes=1;}
echo 'year - mo-da-hr-m - s : - : b$minutes/b is set to
'.$minutes.'br';
echo date(Y-m-d-H-i-s).nbsp; nbsp; Currentbr;
echo date(Y-m-d-H-i-s,(time() + $minutes*60));
## hours ##
echo brbr**HOURS**br;
$hours=$_GET['h'];if(!isset($_GET['h'])){$hours=1;}
echo 'year - mo-da-hr-m: - : b$hours/b is set to '.$hours.'br';
echo date(Y-m-d-H-i).nbsp; nbsp; Currentbr;
echo date(Y-m-d-H-i,(time() + $hours*3600));
## days ##
echo brbr**DAYS**br;
$days=$_GET['d'];if(!isset($_GET['d'])){$days=1;}
echo 'year - mo-da-hr-m : - : b$days/b is set to '.$days.'br';
// $days=24*3600;
echo date(Y-m-d-H-i).nbsp; nbsp; Currentbr;
echo date(Y-m-d-H-i,(time() + $days*(24*3600)));
?

-- 
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] error reporting

2003-10-16 Thread Richard Baskett
If I use:

ini_set(error_reporting, 0);
ini_set(display_errors, 0);

It still shows the errors.. if I use the error_reporting function.. it still
shows the errors, no matter what I do.. it still shows the errors!

What am I missing?  I have it set in the php,ini to show errors, but I want
to be able to suppress them within the individual scripts, but it's not
working.. and when I use ini_get() it shows their values to be what I just
set them to be, but yet.. it is still showing the errors! Ugh :(

Help!

Rick

Every person you meet - and everything you do in life - is an opportunity
to learn something. - Tom Clancy

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



Re: [PHP] error reporting

2003-10-16 Thread John W. Holmes
Richard Baskett wrote:
If I use:

ini_set(error_reporting, 0);
ini_set(display_errors, 0);
It still shows the errors.. if I use the error_reporting function.. it still
shows the errors, no matter what I do.. it still shows the errors!
What am I missing?  I have it set in the php,ini to show errors, but I want
to be able to suppress them within the individual scripts, but it's not
working.. and when I use ini_get() it shows their values to be what I just
set them to be, but yet.. it is still showing the errors! Ugh :(
What kind of errors? Ths will not prevent parse errors from being shown.

--
---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] error reporting

2003-10-16 Thread Richard Baskett
on 10/16/03 16:51, John W. Holmes at [EMAIL PROTECTED] wrote:

 Richard Baskett wrote:
 If I use:
 
 ini_set(error_reporting, 0);
 ini_set(display_errors, 0);
 
 It still shows the errors.. if I use the error_reporting function.. it still
 shows the errors, no matter what I do.. it still shows the errors!
 
 What am I missing?  I have it set in the php,ini to show errors, but I want
 to be able to suppress them within the individual scripts, but it's not
 working.. and when I use ini_get() it shows their values to be what I just
 set them to be, but yet.. it is still showing the errors! Ugh :(
 
 What kind of errors? Ths will not prevent parse errors from being shown.

Hmm.. ok well that's what I didn¹t want to be shown :)  Ok then if I disable
error_reporting and display_errors in php.ini, how can I on a script basis,
show the parse errors and other errors?  Since I couldn¹t get that to work
either :(

Rick

Science without religion is lame, religion without science is blind. -
Albert Einstein

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



[PHP] imageloadfont() broken?

2003-10-16 Thread Paul
Ok ive spent numerous hours trying to just find one
working example of imageloadfont()  and i have yet to
come across one.

Right now im at about the point to hack apart the gd
source code to change one of their built in fonts. but
id rather not do that.

So exactly how does imageloadfont() work,  what does
the file extension look like that it requires?

Also what about if i want to create my own gdfont, in
the src it looks like

  0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0,
  1, 1, 0, 0, 1, 1, 0,
  1, 1, 1, 0, 1, 1, 0,
  1, 1, 1, 0, 1, 1, 0,
  1, 1, 1, 1, 1, 1, 0,
  1, 1, 0, 1, 1, 1, 0,
  1, 1, 0, 1, 1, 1, 0,
  1, 1, 0, 0, 1, 1, 0,
  1, 1, 0, 0, 1, 1, 0,
  0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0,

for char 78 which is a N
and it also includes the 

gdFont gdFontMediumBoldRep = {
  256,
  0,
  7,
  13,
  gdFontMediumBoldData
};


Which i fully understand, im just curious exactly what
is this imageloadfont() looking for.  do I just make
my own gd file, compile it to a binary, and name it
myfont.gd ?  or what?  otherwise gonna just reinstall
the font into gd itself, but be nice that a function
thats labelled in the manual actually works on some
sort of live example.

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



  1   2   >