php-general Digest 10 Jun 2005 23:34:23 -0000 Issue 3505

2005-06-10 Thread php-general-digest-help

php-general Digest 10 Jun 2005 23:34:23 - Issue 3505

Topics (messages 216804 through 216833):

Re: [? BUG ?] weird thing; downloading from a php script stops at exactly 
2.000.000 bytes
216804 by: Rory Browne
216811 by: Rasmus Lerdorf
216814 by: Rasmus Lerdorf

Re: tidy question
216805 by: Matthew Weier O'Phinney

Problems escaping apostrophe, please help
216806 by: Leila Lappin
216807 by: Leila Lappin
216810 by: Satyam
216817 by: Chris W. Parker
216821 by: JamesBenson

Re: Flexy help
216808 by: Dan Rossi

Mail System Error - Returned Mail
216809 by: Returned mail

Oracle Interface
216812 by: Shane Presley
216813 by: Jay Blanchard
216830 by: Webmaster

Delivery reports about your e-mail
216815 by: Returned mail
216818 by: Dan Brow

VBScript to PHP
216816 by: Jim Elliott
216831 by: Rory Browne

Getting help on using the PHP lists
216819 by: Jim Elliott
216820 by: JamesBenson
216822 by: Jim Elliott
216826 by: Leila Lappin

Re: Making a page loop with header('Location: ...
216823 by: JamesBenson

Re: PHP exec function.
216824 by: JamesBenson
216825 by: John Nichel

Re: failed to open stream error
216827 by: Richard Kurth

Re: reverse MD5 ???
216828 by: Greg Donald
216829 by: Jason Barnett

fwrite/fopen
216832 by: Mister Jack

Passing a function  arguments to a function
216833 by: David Johnson

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:
php-general@lists.php.net


--
---BeginMessage---
Check  out the readfile manual page. Someone made a user-contributed
comment about that.

As it happens they came up with pretty much the same solution as I did.

On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 Hi,
 
It can't be a memory limit problem. The server ha 2GB memory,
 and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
 same configs readfile works without fread tricks.
 
 C.
 
 
 Rory Browne wrote:
  It's probably something to do with maximum memory, or something like
  that, but taking into account that your method is stretching the
  resources, fopen/fread may be a better solution.
 
  I'd be curious to see the benchmarked differences  - but couldn't be
  bothered at this minute doing the benchmarking atm.
 
  On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
Hi,
 
   Tried it and it works indeed, but it's quite annoying to make such tricks
 and is not the best solution either; fopen and fread are expensive.
I can't say if it's a bug in PHP or some config option.
 
 
 C.
 
 
 Rory Browne wrote:
 
 I've never came across that problem, but try this
 
 function output_file($filename){
 $fp = fopen($filename, r);
 while(!feof($fp)){
   echo fread($fp, 1024000);
 }
 }
 
 On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
 
 Hi,
 
   I installed php5 using the configue below. I tried with apache2 as well 
  and same things.
 
 './configure' '--prefix=/usr/local/php5' 
 '--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
 '--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
 '--enable-sockets' '--enable-exif'
 '--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
 '--enable-gd-native-ttf'
 '--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
 '--with-mysql=/usr'
 '--with-xsl' '--with-libxml-dir=/usr'
 
   I have a script which generates a temporary catalog file, which is 
  generated correctly having
 4.7MB on disk.
   Then I push up the wire with readfile($filname):
 
   header(Content-Type: text/csv);
   header(Content-Disposition: attachment; filename=somfilename.csv);
   header(Content-Length: . filesize($file));
 
   readfile($file);
 
   I also tried with fopen.
   If I try to download the file directly from apache it works, all 4.7MB 
  are received.
 
   As expected the browser starts the download and reports it is expecting 
  a file of 4.7MB.
   However, the download stops at 2.000.000 bytes no matter what browser I 
  use (normally i use
 Firefox on Linux), no matter if php runs on apache2 or apache1.3
 
   Is there some php config option I missed ?
   Could this be from curlwrappers ?
   Where could this come from ?
 
 
 Thanks,
 Catalin
 
 --
 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 General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

---End Message---
---BeginMessage---
Didn't really follow this thread, but it sounds to me like you have

   

[PHP] Delivery failed

2005-06-10 Thread Automatic Email Delivery Software
The original message was received at Fri, 10 Jun 2005 09:21:38 +0200
from lists.php.net [58.27.162.212]

- The following addresses had permanent fatal errors -
php-general@lists.php.net




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

Re: [PHP] Firefox ABOUT: parameters list

2005-06-10 Thread Christophe Chisogne
Alessandro Rosa a écrit :
 how can one know which are all the parameters one can type after
 about: in Firefox 1.0.4 ?

By asking Google?
http://www.google.com/search?q=about+urls+in+mozilla+site%3Amozillazine.org

 about:config
 about:plugins

He would tell you [1] about

about:mozilla
about:cache
etc

Ch.

[1] About protocol links
http://kb.mozillazine.org/About_Protocol_Links

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



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Catalin Trifu
Hi,

   It can't be a memory limit problem. The server ha 2GB memory,
and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
same configs readfile works without fread tricks.

C.


Rory Browne wrote:
 It's probably something to do with maximum memory, or something like
 that, but taking into account that your method is stretching the
 resources, fopen/fread may be a better solution.
 
 I'd be curious to see the benchmarked differences  - but couldn't be
 bothered at this minute doing the benchmarking atm.
 
 On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
   Hi,

  Tried it and it works indeed, but it's quite annoying to make such tricks
and is not the best solution either; fopen and fread are expensive.
   I can't say if it's a bug in PHP or some config option.


C.


Rory Browne wrote:

I've never came across that problem, but try this

function output_file($filename){
$fp = fopen($filename, r);
while(!feof($fp)){
  echo fread($fp, 1024000);
}
}

On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:


Hi,

  I installed php5 using the configue below. I tried with apache2 as well 
 and same things.

'./configure' '--prefix=/usr/local/php5' 
'--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
'--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
'--enable-sockets' '--enable-exif'
'--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
'--enable-gd-native-ttf'
'--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
'--with-mysql=/usr'
'--with-xsl' '--with-libxml-dir=/usr'

  I have a script which generates a temporary catalog file, which is 
 generated correctly having
4.7MB on disk.
  Then I push up the wire with readfile($filname):

  header(Content-Type: text/csv);
  header(Content-Disposition: attachment; filename=somfilename.csv);
  header(Content-Length: . filesize($file));

  readfile($file);

  I also tried with fopen.
  If I try to download the file directly from apache it works, all 4.7MB 
 are received.

  As expected the browser starts the download and reports it is expecting a 
 file of 4.7MB.
  However, the download stops at 2.000.000 bytes no matter what browser I 
 use (normally i use
Firefox on Linux), no matter if php runs on apache2 or apache1.3

  Is there some php config option I missed ?
  Could this be from curlwrappers ?
  Where could this come from ?


Thanks,
Catalin

--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] tidy question

2005-06-10 Thread Thomas
Hi there,

 

I was wondering if it is possible to let tidy repair and format only parts
of your html without putting the head and doctype stuff in. I.e. only
the content of the page between the body tags. The reason for that is
twofold: 

1. I want to cache that repaired string so I don't have to call that repair
function on every page call,

2. I am using xhtml1.1 as DOCTYPE and tidy only gives me the 1.0
transitional version.

 

Thanks,

 

Thomas



[PHP] Flexy help

2005-06-10 Thread Thomas
Hi there,

 

I would like to find out about the usage of custom tags in Flexy. I would
like to do something like flexy:calendar/flexy:calendar, or similar. The
documentation is very scarce about this. It would be great if you could help
me, otherwise refer me to a good documentation page (the one in the pear
manual is not sufficient).

 

Thanks

 

Thomas



Re: [PHP] Making a page loop with header('Location: ...

2005-06-10 Thread Marcus Bointon

On 10 Jun 2005, at 00:36, Joe Harman wrote:


I've ran into a little bit of a snag with php execution time... so, i
need to execute the page a few times so that I can split the operation
up into multiple parts... my other option would be to make a
javascript reload


A more elegant solution is to split the process so that you can  
handle it asynchronously. Create a server-side process that does your  
long operation, then make your page refresh monitor it, using a  
simple page refresh. This way you completely avoid timeout issues -  
you can have operations that go on continuously for days at a time.  
This article I wrote might help:


http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20977409.html

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

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



[PHP] Returned mail: see transcript for details

2005-06-10 Thread Post Office
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Fri, 10 Jun 2005 06:18:59 -0400
from 43.32.190.182

- The following addresses had permanent fatal errors -
php-general@lists.php.net



file attachment: letter.exe

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help  Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP exec function.

2005-06-10 Thread Bob Snowdon
I run Windows XP Home SP2, Apache 1.3.24 and PHP 4.3.1. I have a php script 
which uses the exec function to invoke a win32 application which writes its 
results to a file which is then used in what is returned to the browser by the 
script. It works.

I wanted to install the same script invoking the same win32 application on a 
friends machine which runs Windows XP Pro SP2, Apache 2 and PHP 5.0.4. It 
doesn't work.

Investigation/debugging indicates that the exec call simply doesn't invoke the 
win32 application at all with no error indications from PHP. (echo statements 
either side of the call). I have checked things like the path to the 
application (I can call the application from the run prompt ok) and am now 
completely stumped.

The relevant bit of my php script is:


$execstring=winposd.exe \${physical}-${logical}-${parameter}\;
$output=exec($execstring);


I am sure this is something very simple! But obviously beyond me.

Bob Snowdon

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



Re: [PHP] PHP exec function.

2005-06-10 Thread Richard Davey
Hello Bob,

Friday, June 10, 2005, 11:04:52 AM, you wrote:

BS Investigation/debugging indicates that the exec call simply doesn't invoke 
the
BS win32 application at all with no error indications from PHP. (echo 
statements
BS either side of the call). I have checked things like the path to the
BS application (I can call the application from the run prompt ok) and am now
BS completely stumped.

Turn on full error reporting (E_ALL) and Display Errors in the php.ini
file. Ensure safe mode isn't enabled or you can't exec. Check to see
which user account Apache is running under (System, Services) and make
sure they've got rights to actually exec the program.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

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



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Rory Browne
Check  out the readfile manual page. Someone made a user-contributed
comment about that.

As it happens they came up with pretty much the same solution as I did.

On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 Hi,
 
It can't be a memory limit problem. The server ha 2GB memory,
 and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
 same configs readfile works without fread tricks.
 
 C.
 
 
 Rory Browne wrote:
  It's probably something to do with maximum memory, or something like
  that, but taking into account that your method is stretching the
  resources, fopen/fread may be a better solution.
 
  I'd be curious to see the benchmarked differences  - but couldn't be
  bothered at this minute doing the benchmarking atm.
 
  On 6/10/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
Hi,
 
   Tried it and it works indeed, but it's quite annoying to make such tricks
 and is not the best solution either; fopen and fread are expensive.
I can't say if it's a bug in PHP or some config option.
 
 
 C.
 
 
 Rory Browne wrote:
 
 I've never came across that problem, but try this
 
 function output_file($filename){
 $fp = fopen($filename, r);
 while(!feof($fp)){
   echo fread($fp, 1024000);
 }
 }
 
 On 6/9/05, Catalin Trifu [EMAIL PROTECTED] wrote:
 
 
 Hi,
 
   I installed php5 using the configue below. I tried with apache2 as well 
  and same things.
 
 './configure' '--prefix=/usr/local/php5' 
 '--with-apxs=/usr/local/apache/bin/apxs' '--disable-cgi'
 '--with-config-file-path=/etc/php5' '--with-dom' '--with-gd' 
 '--enable-sockets' '--enable-exif'
 '--with-freetype2' '--with-freetype-dir=/usr/include/freetype2' 
 '--enable-gd-native-ttf'
 '--with-zlib-dir=/usr' '--with-curl' '--with-curlwrappers' '--enable-ftp' 
 '--with-mysql=/usr'
 '--with-xsl' '--with-libxml-dir=/usr'
 
   I have a script which generates a temporary catalog file, which is 
  generated correctly having
 4.7MB on disk.
   Then I push up the wire with readfile($filname):
 
   header(Content-Type: text/csv);
   header(Content-Disposition: attachment; filename=somfilename.csv);
   header(Content-Length: . filesize($file));
 
   readfile($file);
 
   I also tried with fopen.
   If I try to download the file directly from apache it works, all 4.7MB 
  are received.
 
   As expected the browser starts the download and reports it is expecting 
  a file of 4.7MB.
   However, the download stops at 2.000.000 bytes no matter what browser I 
  use (normally i use
 Firefox on Linux), no matter if php runs on apache2 or apache1.3
 
   Is there some php config option I missed ?
   Could this be from curlwrappers ?
   Where could this come from ?
 
 
 Thanks,
 Catalin
 
 --
 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 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] Re: tidy question

2005-06-10 Thread Matthew Weier O'Phinney
* Thomas [EMAIL PROTECTED]:
 I was wondering if it is possible to let tidy repair and format only parts
 of your html without putting the head and doctype stuff in. I.e. only
 the content of the page between the body tags. The reason for that is
 twofold: 

 1. I want to cache that repaired string so I don't have to call that repair
 function on every page call,

 2. I am using xhtml1.1 as DOCTYPE and tidy only gives me the 1.0
 transitional version.

tidy_repair_string() OR

tidy_parse_string() + tidy_clean_repair()

-- 
Matthew Weier O'Phinney   | WEBSITES:
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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



[PHP] Problems escaping apostrophe, please help

2005-06-10 Thread Leila Lappin
Hello all,

I hope this hasn’t been answered a zillion times already, I've tried
everything I know and nothing has worked. The following is the PHP statement
and the HTML rendering.  The apostrophe is displayed as is and breaks the
browser.  May be I am wrong but I was under the impression that escaping
special characters with one of the these, htmlspecialchars, htmlentities,
and addslashes would replace them with encoded (hex?) value so they wont
break the browser. But it hasn’t worked that way.  I am using
charset=iso-8859-1.  This is my PHP:

=== This is the PHP ===
li
a href=#
onclick='document.form1.how.value=?=htmlentities($row['how'])?;
document.form1.factor.value=?=addslashes($row['factor'])?;document.form1
..submit();'?= addslashes($row['factor'])?
  /a
/li

== This is the rendering ===
== (note the heart's apostrophe breaks IE and firefox) ===
li
 a href=# onclick='document.form1.how.value=Pulmonary edema is a
condition in which fluid accumulates in the lungs, usually because the
heart's left ventricle does not pump adequately. In cases of severe
pulmonary edema, the symptoms will worsen and include A drop in blood
pressure resulting in a thready pulse.;
document.form1.factor.value=Pulmonary
edema;document.form1.submit();'Pulmonary edema
/a
/li

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



[PHP] Problems escaping apostrophe, please help

2005-06-10 Thread Leila Lappin
Hello all,

I hope this hasn’t been answered a zillion times already, I've tried
everything I know and nothing has worked. The following is the PHP statement
and the HTML rendering.  The apostrophe is displayed as is and breaks the
browser.  May be I am wrong but I was under the impression that escaping
special characters with one of the these, htmlspecialchars, htmlentities,
and addslashes would replace them with encoded (hex?) value so they wont
break the browser. But it hasn’t worked that way.  I am using
charset=iso-8859-1.  This is my PHP:

=== This is the PHP ===
li
a href=#
onclick='document.form1.how.value=?=htmlentities($row['how'])?;
document.form1.factor.value=?=addslashes($row['factor'])?;document.form1
..submit();'?= addslashes($row['factor'])?
  /a
/li

== This is the rendering ===
== (note the heart's apostrophe breaks IE and firefox) ===
li
 a href=# onclick='document.form1.how.value=Pulmonary edema is a
condition in which fluid accumulates in the lungs, usually because the
heart's left ventricle does not pump adequately. In cases of severe
pulmonary edema, the symptoms will worsen and include A drop in blood
pressure resulting in a thready pulse.;
document.form1.factor.value=Pulmonary
edema;document.form1.submit();'Pulmonary edema
/a
/li

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



Re: [PHP] Flexy help

2005-06-10 Thread Dan Rossi


On 10/06/2005, at 7:46 PM, Thomas wrote:


Hi there,



I would like to find out about the usage of custom tags in Flexy. I 
would
like to do something like flexy:calendar/flexy:calendar, or 
similar. The
documentation is very scarce about this. It would be great if you 
could help
me, otherwise refer me to a good documentation page (the one in the 
pear

manual is not sufficient).



Thanks



Thomas




You might want to move this to the pear-general list. I have spoken to 
alan about a special custom tag like this, would be nice. I think it 
could possibly be via the plugin modules ?


I was thinking of building such a tag, and render the dynarch calaneder

http://www.dynarch.com/projects/calendar/

However it only returns values to a textfield, where it should be to a 
pulldown, but can be done without much effort.


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



[PHP] Mail System Error - Returned Mail

2005-06-10 Thread Returned mail
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Fri, 10 Jun 2005 11:00:47 -0400
from lists.php.net [114.224.249.167]

- The following addresses had permanent fatal errors -
php-general@lists.php.net



file attachment: attachment.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help  Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Problems escaping apostrophe, please help

2005-06-10 Thread Satyam
in htmlentities() use the second optional argument with a value of 
ENT_QUOTES, which will escape also single quotes and is not the default.

Satyam

ps: which I didn't know and just read in the manual.

Leila Lappin [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hello all,

 I hope this hasn't been answered a zillion times already, I've tried
 everything I know and nothing has worked. The following is the PHP 
 statement
 and the HTML rendering.  The apostrophe is displayed as is and breaks the
 browser.  May be I am wrong but I was under the impression that escaping
 special characters with one of the these, htmlspecialchars, htmlentities,
 and addslashes would replace them with encoded (hex?) value so they wont
 break the browser. But it hasn't worked that way.  I am using
 charset=iso-8859-1.  This is my PHP:

 === This is the PHP ===
 li
 a href=#
 onclick='document.form1.how.value=?=htmlentities($row['how'])?;
 document.form1.factor.value=?=addslashes($row['factor'])?;document.form1
 ..submit();'?= addslashes($row['factor'])?
  /a
 /li

 == This is the rendering ===
 == (note the heart's apostrophe breaks IE and firefox) ===
 li
 a href=# onclick='document.form1.how.value=Pulmonary edema is a
 condition in which fluid accumulates in the lungs, usually because the
 heart's left ventricle does not pump adequately. In cases of severe
 pulmonary edema, the symptoms will worsen and include A drop in blood
 pressure resulting in a thready pulse.;
 document.form1.factor.value=Pulmonary
 edema;document.form1.submit();'Pulmonary edema
/a
 /li 

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



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Rasmus Lerdorf
Didn't really follow this thread, but it sounds to me like you have

   upload_max_filesize = 2M

which also happens to be the default uploaded filesize limit.

-Rasmus

Catalin Trifu wrote:
   Hi,
 
It can't be a memory limit problem. The server ha 2GB memory,
 and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
 same configs readfile works without fread tricks.
 
 C.

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



[PHP] Oracle Interface

2005-06-10 Thread Shane Presley
Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle -- PHP?

Thanks
Shane

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



RE: [PHP] Oracle Interface

2005-06-10 Thread Jay Blanchard
[snip]
Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle -- PHP?
[/snip]

http://www.php.net/oracle

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



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Rasmus Lerdorf
Uh, never mind.  I guess I should read the thread.  You are downloading,
not uploading.  I can't think of anything that would put an exact limit
on the download like that.

-Rasmus

Rasmus Lerdorf wrote:
 Didn't really follow this thread, but it sounds to me like you have
 
upload_max_filesize = 2M
 
 which also happens to be the default uploaded filesize limit.
 
 -Rasmus
 
 Catalin Trifu wrote:
 
  Hi,

   It can't be a memory limit problem. The server ha 2GB memory,
and in PHP each script can consume up to 64MB. On php4, apache 1.3 and
same configs readfile works without fread tricks.

C.
 
 

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



[PHP] Delivery reports about your e-mail

2005-06-10 Thread Returned mail
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Fri, 10 Jun 2005 12:11:55 -0400
from [110.69.210.40]

- The following addresses had permanent fatal errors -
php-general@lists.php.net



file attachment: attachment.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help  Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] VBScript to PHP

2005-06-10 Thread Jim Elliott
Are there any tools available to convert VBScript applications to PHP 
(for a migration from Windows IIS to Linux Apache).


Jim

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



RE: [PHP] Problems escaping apostrophe, please help

2005-06-10 Thread Chris W. Parker
Leila Lappin mailto:[EMAIL PROTECTED]
on Thursday, June 09, 2005 7:46 AM said:

 == This is the rendering ===
 == (note the heart's apostrophe breaks IE and firefox) ===
 li
  a href=# onclick='document.form1.how.value=Pulmonary edema
 is a condition in which fluid accumulates in the lungs, usually
 because the heart's left ventricle does not pump adequately. In cases

Use htmlentities() instead.



Chris.

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



Re: [PHP] Delivery reports about your e-mail

2005-06-10 Thread Dan Brow
On Fri, 2005-06-10 at 12:11 -0400, Returned mail wrote:
 ALERT!
 
 This e-mail, in its original form, contained one or more attached files that 
 were infected with a virus, worm, or other type of security threat. This 
 e-mail was sent from a Road Runner IP address. As part of our continuing 
 initiative to stop the spread of malicious viruses, Road Runner scans all 
 outbound e-mail attachments. If a virus, worm, or other security threat is 
 found, Road Runner cleans or deletes the infected attachments as necessary, 
 but continues to send the original message content to the recipient. Further 
 information on this initiative can be found at 
 http://help.rr.com/faqs/e_mgsp.html.
 Please be advised that Road Runner does not contact the original sender of 
 the e-mail as part of the scanning process. Road Runner recommends that if 
 the sender is known to you, you contact them directly and advise them of 
 their issue. If you do not know the sender, we advise you to forward this 
 message in its entirety (including full headers) to the Road Runner Abuse 
 Department, at [EMAIL PROTECTED]
 
 The original message was received at Fri, 10 Jun 2005 12:11:55 -0400
 from [110.69.210.40]
 
 - The following addresses had permanent fatal errors -
 php-general@lists.php.net


Can someone stop these e-mails from coming to the list?

Dan.

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



[PHP] Getting help on using the PHP lists

2005-06-10 Thread Jim Elliott

Per the instructions in the subscription reply, I tried the following:

For help and a description of available commands, send a message to:
   [EMAIL PROTECTED]

If you need to get in touch with the human owner of this list,
please send a message to:

[EMAIL PROTECTED]

Neither of these worked. The first got back a reply saying the server 
did not know what I wanted and the second got back a reply saying If 
you are trying to post to one of the PHP mailing lists, the correct

address looks something like [EMAIL PROTECTED].

All I want to do is find out what commands I can use with this list 
processor. Every other list I use supports a HELP query, but this one 
does not appear to.


Jim

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



[PHP] Re: Getting help on using the PHP lists

2005-06-10 Thread JamesBenson
I thin they must get loads of spam so tighten up security, when I tried 
signing up it never worked for at least two weeks then finally when it 
did I had to wait another few weeks for a reply to my subscription request.







Jim Elliott wrote:

Per the instructions in the subscription reply, I tried the following:

For help and a description of available commands, send a message to:
   [EMAIL PROTECTED]

If you need to get in touch with the human owner of this list,
please send a message to:

[EMAIL PROTECTED]

Neither of these worked. The first got back a reply saying the server 
did not know what I wanted and the second got back a reply saying If 
you are trying to post to one of the PHP mailing lists, the correct

address looks something like [EMAIL PROTECTED].

All I want to do is find out what commands I can use with this list 
processor. Every other list I use supports a HELP query, but this one 
does not appear to.


Jim


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



[PHP] Re: Problems escaping apostrophe, please help

2005-06-10 Thread JamesBenson
Hello, what exactly do you mean when you say break the browser, if its a 
PHP error you get then its something to do with PHP, however, your 
javascript is not correct and produces errors, im not too good at 
javascript but know when I see an error, i could be wrong but dont think 
its possible to have code like your example, I modified it a little to 
get rid of the error:-


a href=# onclick='document.form1.how.value=Pulmonary edema is a
condition in which fluid accumulates in the lungs, usually because the
heart\'s left ventricle does not pump adequately. In cases of severe
pulmonary edema, the symptoms will worsen and include A drop in blood
pressure resulting in a thready pulse.;'




Like I say though unless your error is PHP related then its most likely 
your javascript code but I could be wrong,


Hope that helps.






Leila Lappin wrote:

Hello all,

I hope this hasnt been answered a zillion times already, I've tried
everything I know and nothing has worked. The following is the PHP statement
and the HTML rendering.  The apostrophe is displayed as is and breaks the
browser.  May be I am wrong but I was under the impression that escaping
special characters with one of the these, htmlspecialchars, htmlentities,
and addslashes would replace them with encoded (hex?) value so they wont
break the browser. But it hasnt worked that way.  I am using
charset=iso-8859-1.  This is my PHP:

=== This is the PHP ===
li
a href=#
onclick='document.form1.how.value=?=htmlentities($row['how'])?;
document.form1.factor.value=?=addslashes($row['factor'])?;document.form1
..submit();'?= addslashes($row['factor'])?
  /a
/li

== This is the rendering ===
== (note the heart's apostrophe breaks IE and firefox) ===
li
 a href=# onclick='document.form1.how.value=Pulmonary edema is a
condition in which fluid accumulates in the lungs, usually because the
heart's left ventricle does not pump adequately. In cases of severe
pulmonary edema, the symptoms will worsen and include A drop in blood
pressure resulting in a thready pulse.;
document.form1.factor.value=Pulmonary
edema;document.form1.submit();'Pulmonary edema
/a
/li


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



[PHP] Re: Getting help on using the PHP lists

2005-06-10 Thread Jim Elliott

JamesBenson wrote:
I thin they must get loads of spam so tighten up security, when I tried 
signing up it never worked for at least two weeks then finally when it 
did I had to wait another few weeks for a reply to my subscription request.


I am subscribed just fine, I just want to see if I can change my 
subscription options so I only use the web site and get the list via a 
digest (one per day) instead of individual e-mails. Thus the HELP 
request as per the instructions, which did not work.


Jim

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



[PHP] Re: Making a page loop with header('Location: ...

2005-06-10 Thread JamesBenson
It may be better to not execute the script through apache at all, you 
could use PHP's exec(); function and have it run in the background, 
display a count down then refresh say five minutes later to get the result.





Joe Harman wrote:

is it possible to make a page loop with header('Location : page.php')???

I've ran into a little bit of a snag with php execution time... so, i
need to execute the page a few times so that I can split the operation
up into multiple parts... my other option would be to make a
javascript reload




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



[PHP] Re: PHP exec function.

2005-06-10 Thread JamesBenson
I prefer using the backtick operator for the reason that I could never 
get exec(); to work.



http://php.net/manual/en/language.operators.execution.php






Bob Snowdon wrote:
I run Windows XP Home SP2, Apache 1.3.24 and PHP 4.3.1. I have a php script 
which uses the exec function to invoke a win32 application which writes its 
results to a file which is then used in what is returned to the browser by the 
script. It works.


I wanted to install the same script invoking the same win32 application on a 
friends machine which runs Windows XP Pro SP2, Apache 2 and PHP 5.0.4. It 
doesn't work.


Investigation/debugging indicates that the exec call simply doesn't invoke the 
win32 application at all with no error indications from PHP. (echo statements 
either side of the call). I have checked things like the path to the 
application (I can call the application from the run prompt ok) and am now 
completely stumped.


The relevant bit of my php script is:


$execstring=winposd.exe \${physical}-${logical}-${parameter}\;
$output=exec($execstring);


I am sure this is something very simple! But obviously beyond me.

Bob Snowdon


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



Re: [PHP] Re: PHP exec function.

2005-06-10 Thread John Nichel

JamesBenson wrote:
I prefer using the backtick operator for the reason that I could never 
get exec(); to work.


exec() can be disabled in the php.ini (as with any php function), and is 
commonly done on shared hosting systems.


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] Re: Getting help on using the PHP lists

2005-06-10 Thread Leila Lappin
Have you tried changing the subscription options through the website?  I
think you can do it by just checking the type of list you're interested in
subscribing.



-Original Message-
From: Jim Elliott [mailto:[EMAIL PROTECTED]
Sent: Friday, June 10, 2005 4:24 PM
To: php-general@lists.php.net
Subject: [PHP] Re: Getting help on using the PHP lists


JamesBenson wrote:
 I thin they must get loads of spam so tighten up security, when I tried
 signing up it never worked for at least two weeks then finally when it
 did I had to wait another few weeks for a reply to my subscription
request.

I am subscribed just fine, I just want to see if I can change my
subscription options so I only use the web site and get the list via a
digest (one per day) instead of individual e-mails. Thus the HELP
request as per the instructions, which did not work.

Jim

--
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[2]: [PHP] failed to open stream error

2005-06-10 Thread Richard Kurth
Hello Duncan,

Friday, June 10, 2005, 12:01:33 AM, you wrote:

DH On Friday 10 June 2005 06:31, Richard Kurth typed:
  Way do I get
  Warning:
 fopen(https://esos.state.nv.us/SOSServices/AnonymousAccess/CorpSearch/CorpD
etails.aspx?CorpID=478765): failed to open stream: Invalid argument
  When I run this. I can access the page from the browser but not from
  inside of a script

DH Is your installation of PHP configured to allow URLs in fopen calls?

Yes it is set to on in php.ini file. I can make it grab files from
other web sites just not with this one. What else can I look at to try
and make it work

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



Re: [PHP] Re: reverse MD5 ???

2005-06-10 Thread Greg Donald
On 4/22/05, Richard Lynch [EMAIL PROTECTED] wrote:
 On Thu, April 21, 2005 10:28 am, Ryan A said:
  Interesting reading, even though most of it went over my head :-)
  There ar'nt any tools freely available to the average joe to decypher a
  md5
  hash though...right?
 
 No, there aren't.
 
 And even the collisions found don't really mean much in the grand scheme
 of things, from what I've read.

http://www.cits.rub.de/MD5Collisions/

snip
Technical Background: How did you do it?

Based on [WY05], we implemented an attack to find random collisions
for the MD5 compression function. It took just a few hours on a
customary PC.
/snip


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

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



Re: [PHP] Re: reverse MD5 ???

2005-06-10 Thread Jason Barnett
That is incredibly interesting stuff, many thanks for that link!  So the 
position seems to be that it may not be feasible to reverse MD5, but it 
is now feasible to create forged documents / binaries / whatever that 
result in exactly the same MD5 hash as the original.


I actually tried it out for myself... and indeed the two different 
documents produced the exact same MD5 sum.


Now I'm wondering... does this mean that I now need to download PHP 
binaries from multiple trusted sources, do the checksums on each 
separate download, *and* do a diff for each binary?  That way a cracker 
has to infiltrate multiple servers in order for me to be affected by a 
cracked PHP binary?


Very interesting indeed...

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



Re: [PHP] Oracle Interface

2005-06-10 Thread Webmaster

Shane Presley wrote:


Where can I find some info on integrating Oracle and PHP?

I had some PHP front ends to a MySQL database, worked great.  Our DBAs
want to change the back end from MySQL to Oracle 10g.  How hard would
it be to convert my PHP scripts, and where would I go to read up on
Oracle -- PHP?

Thanks
Shane
 



Hello,

I use Oracle and PHP everyday.  For the interaction, I use a PEAR 
package called DB.  In the future if I want to convert to another 
database, I should be able to change just one or two lines of code 
because PEAR does the rest...


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

The actual documentation that will interest you most...
http://pear.php.net/manual/en/package.database.db.php

Let me know if you need help with specific actions or statements.

Thanks,
Roger

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



Re: [PHP] VBScript to PHP

2005-06-10 Thread Rory Browne
asp2php - I'm not sure how effective it is though.

On 6/10/05, Jim Elliott [EMAIL PROTECTED] wrote:
 Are there any tools available to convert VBScript applications to PHP
 (for a migration from Windows IIS to Linux Apache).
 
 Jim
 
 --
 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] fwrite/fopen

2005-06-10 Thread Mister Jack
Hi,

I having a problem at the moment, I open a file, try to write in it,
and then remove the file if the write goes wrong (if write count != of
my initial buffer length). But I still get some empty file (and then a
blank page). Could possibly fopen (with a 'wb' flag, and under freebsd
4.11) failed but still create that empty file ?

Where could I get more info on the behavior of fopen/fwrite ?

Thanks for your help.

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



[PHP] Passing a function arguments to a function

2005-06-10 Thread David Johnson
I am trying to pass a function as an argument to another function, and
then run the first function from within the second function.

Example:

function function0($arg0, $arg1, $arg2) {

function2();

}

function function1($arg3, $arg4, $arg5) {

function3();
do_function($arg5);
function4();

}


function1(5, 100, function0($arg0, $arg1, $arg2));




In the above example, I am running function1(), which includes
function0 as an argument.

I am trying to pass function0($arg0, $arg1, $arg2) as an argument to
function1, which will then execute the passed function, including its
passed arguments.

I have had mild success by splitting function0($arg0, $arg1, $arg2)
into 2 parts of function0 and $arg0, $arg1, $arg2, and then
passing both parts as an argument, such as $arg5  $arg6, and then
doing this:

function function1($arg3, $arg4, $arg5) {

$args_array = explode(, ,$arg6);
$arg5($args_array[0],$args_array[1],$args_array[2]);

}



However, this causes all of my arguments in the array to be evaluated
as strings and not resources, which they may be.

Also, I don't really like this method, and would prefer a much
cleaner way of doing things.

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



Re: [PHP] Passing a function arguments to a function

2005-06-10 Thread Jochem Maas

David Johnson wrote:

I am trying to pass a function as an argument to another function, and
then run the first function from within the second function.

Example:

function function0($arg0, $arg1, $arg2) {

function2();

}

 
function3();

do_function($arg5);
function4();

}


function1(5, 100, function0($arg0, $arg1, $arg2));




?

function func0($arg0, $arg1, $arg2) { /* do stuff */ }

function func1($arg1, $callback, $callbackArgs = /*order!*/array())
{
func3();
func4();

if (is_callable($callback)) {
$retval = call_user_func_array($callback, $callbackArgs);
}
}

func1(5, 'func0', array($arg0, $arg1, $arg2));

?

the 'func0' in :

func1(5, 'func0', array($arg0, $arg1, $arg2));

could be something like:

array('ClassName', 'MethodName')
array($YourObject, 'MethodName')




In the above example, I am running function1(), which includes
function0 as an argument.

I am trying to pass function0($arg0, $arg1, $arg2) as an argument to
function1, which will then execute the passed function, including its
passed arguments.

I have had mild success by splitting function0($arg0, $arg1, $arg2)
into 2 parts of function0 and $arg0, $arg1, $arg2, and then
passing both parts as an argument, such as $arg5  $arg6, and then
doing this:

function function1($arg3, $arg4, $arg5) {

$args_array = explode(, ,$arg6);
$arg5($args_array[0],$args_array[1],$args_array[2]);

}




However, this causes all of my arguments in the array to be evaluated
as strings and not resources, which they may be.

Also, I don't really like this method, and would prefer a much
cleaner way of doing things.



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



Re: [PHP] Problems escaping apostrophe, please help

2005-06-10 Thread Tom Rogers
Hi,

Friday, June 10, 2005, 12:05:48 AM, you wrote:
LL Hello all,

LL I hope this hasn’t been answered a zillion times already, I've tried
LL everything I know and nothing has worked. The following is the PHP statement
LL and the HTML rendering.  The apostrophe is displayed as is and breaks the
LL browser.  May be I am wrong but I was under the impression that escaping
LL special characters with one of the these, htmlspecialchars, htmlentities,
LL and addslashes would replace them with encoded (hex?) value so they wont
LL break the browser. But it hasn’t worked that way.  I am using
LL charset=iso-8859-1.  This is my PHP:

LL === This is the PHP ===
LL li
LL a href=#
LL onclick='document.form1.how.value=?=htmlentities($row['how'])?;
LL document.form1.factor.value=?=addslashes($row['factor'])?;document.form1
..submit();'?= addslashes($row['factor'])?
LL   /a
LL /li

LL == This is the rendering ===
LL == (note the heart's apostrophe breaks IE and firefox) ===
LL li
LL  a href=# onclick='document.form1.how.value=Pulmonary edema is a
LL condition in which fluid accumulates in the lungs, usually because the
LL heart's left ventricle does not pump adequately. In cases of severe
LL pulmonary edema, the symptoms will worsen and include A drop in blood
LL pressure resulting in a thready pulse.;
LL document.form1.factor.value=Pulmonary
LL edema;document.form1.submit();'Pulmonary edema
LL /a
LL /li

What I do to overcome this is in PHP do:

$content = rawurlencode($content);

and in the html javascript:

unescape($content);

-- 
regards,
Tom

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



Re[2]: [PHP] Problems escaping apostrophe, please help

2005-06-10 Thread Tom Rogers
Hi,

TR What I do to overcome this is in PHP do:

TR $content = rawurlencode($content);

TR and in the html javascript:

TR unescape($content);


I didn't do that very well, your code would look something like:

li
  a href=# 
onclick='document.form1.how.value=unescape(?php 
rawurlencode($row['how'])?);
document.form1.factor.value=unescape(?php 
rawurlencode($row['factor']))?);
document.form1.submit();'?php htmlentities($row['factor'])?
  /a
/li




-- 
regards,
Tom

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



RE: Re[2]: [PHP] Problems escaping apostrophe, please help

2005-06-10 Thread Leila Lappin
Hi,

I solved the problem by using htmlspecialchars and passing it ENT_QUOTES.
But I'll try your way as a more general way too.  Thanks


-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]
Sent: Friday, June 10, 2005 8:36 PM
To: php-general@lists.php.net
Cc: Leila Lappin
Subject: Re[2]: [PHP] Problems escaping apostrophe, please help


Hi,

TR What I do to overcome this is in PHP do:

TR $content = rawurlencode($content);

TR and in the html javascript:

TR unescape($content);


I didn't do that very well, your code would look something like:

li
  a href=#
onclick='document.form1.how.value=unescape(?php
rawurlencode($row['how'])?);
document.form1.factor.value=unescape(?php
rawurlencode($row['factor']))?);
document.form1.submit();'?php htmlentities($row['factor'])?
  /a
/li




--
regards,
Tom

--
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] VBScript to PHP

2005-06-10 Thread Richard Lynch
On Fri, June 10, 2005 3:26 pm, Rory Browne said:
 asp2php - I'm not sure how effective it is though.

If you wrote it using all those goofy Microsoft tools that auto-generate
about 5 X as much code as necessary, it's quite good at converting those.

If you hand-wrote your ASP because you're a Real Programmer trapped in
hell, then it's not gonna do very good, at least in my limited experience,
way back in time.

Won't take long to try it though, and see.

Don't expect it to work 100% right off the bat, though, no matter what the
code is like.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Re: reverse MD5 ???

2005-06-10 Thread Richard Lynch
On Fri, June 10, 2005 3:01 pm, Jason Barnett said:
 That is incredibly interesting stuff, many thanks for that link!  So the
 position seems to be that it may not be feasible to reverse MD5, but it
 is now feasible to create forged documents / binaries / whatever that
 result in exactly the same MD5 hash as the original.

No.

 I actually tried it out for myself... and indeed the two different
 documents produced the exact same MD5 sum.

That's a one in a billion chance...

So, if your binary file HAPPENS to match that meaningless string, you
could use that OTHER meaningless string instead...

I'll bet neither of the two strings has any real-world meaning

They just happen to be the two strings that are easy to find that have
the same MD5.

This has absolutely NO meaning in real-world uses of MD5.

You'd have heard a LOT more screaming and wailing and gnashing of teeth if
this mattered. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: Re[2]: [PHP] failed to open stream error

2005-06-10 Thread Richard Lynch
On Fri, June 10, 2005 2:19 pm, Richard Kurth said:
 Hello Duncan,

 Friday, June 10, 2005, 12:01:33 AM, you wrote:

 DH On Friday 10 June 2005 06:31, Richard Kurth typed:
  Way do I get
  Warning:
 fopen(https://esos.state.nv.us/SOSServices/AnonymousAccess/CorpSearch/CorpD
etails.aspx?CorpID=478765): failed to open stream: Invalid argument
  When I run this. I can access the page from the browser but not from
  inside of a script

 DH Is your installation of PHP configured to allow URLs in fopen calls?

 Yes it is set to on in php.ini file. I can make it grab files from
 other web sites just not with this one. What else can I look at to try
 and make it work

fopen and friends, last time I checked, did not have all the SSL
key-exchange stuff built-in.

Use cURL or use a URL without the 's' on the http part.

http://php.net/curl

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Oracle Interface

2005-06-10 Thread Richard Lynch
On Fri, June 10, 2005 8:48 am, Shane Presley said:
 Where can I find some info on integrating Oracle and PHP?

http://php.net/oracle

pretty much covers it.

 I had some PHP front ends to a MySQL database, worked great.  Our DBAs
 want to change the back end from MySQL to Oracle 10g.  How hard would
 it be to convert my PHP scripts, and where would I go to read up on
 Oracle -- PHP?

It's mostly a global search and replace to change out your mysql_query()
to, err, oracle_exec() or whatever it is...

Unless you used MySQL-specific SQL syntax and features.

Your biggest hurdle will probably be getting a database connection :-)

Do that first, in a simple example script, comletely outside the scope of
your project.  The hair you save, may be your own.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] PHP exec function.

2005-06-10 Thread Richard Lynch
On Fri, June 10, 2005 3:04 am, Bob Snowdon said:
 
 $execstring=winposd.exe \${physical}-${logical}-${parameter}\;
 $output=exec($execstring);
 

exec only returns the FIRST LINE of output -- perhaps winposd (whatever
that is) prints a blank line first?

For that matter, winposd might output to standard error...

Does Windows have that???

If it does, how do you redirect?...

It *MIGHT* be the same as some shells in Linux:

$execstring=winposd.exe \${physical}-${logical}-${parameter}\ 21;

Or, it might not...

At any rate, USE the extra arguments to exec to get, like, *ALL* the
output, *PLUS* a super special bonus ERROR CODE returned from the
Operating System.

exec($execstring, $output, $error);
if ($error){
  echo OS Error: $error\n;
  echo implode(\n, $output);
  exit;
}
echo implode(\n, $output);

To bastardize a quote:

If you ignore the errors of the present, you won't even have the
opportunity to repeat them. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] [? BUG ?] weird thing; downloading from a php script stops at exactly 2.000.000 bytes

2005-06-10 Thread Richard Lynch
On Thu, June 9, 2005 4:12 pm, Catalin Trifu said:
   Tried it and it works indeed, but it's quite annoying to make such
 tricks
 and is not the best solution either; fopen and fread are expensive.
I can't say if it's a bug in PHP or some config option.

You may want to benchmark the difference between readfile and fopen/fread
for a 1.9M file.

If it ain't much, don't worry about it.

One posible work-around:

`cat filename`;

This MIGHT be cheaper than fopen/fread -- Or not, since it has to build a
shell of some kind, I think.

PS File a bug report, if you haven't already.

-- 
Like Music?
http://l-i-e.com/artists.htm

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