php-general Digest 10 Jun 2005 23:34:23 -0000 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:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
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 ---
--- Begin Message ---
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.

--- End Message ---
--- Begin Message ---
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.
> 
> 

--- End Message ---
--- Begin Message ---
* "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

--- End Message ---
--- Begin Message ---
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>

--- End Message ---
--- Begin Message ---
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>

--- End Message ---
--- Begin Message ---
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> 

--- End Message ---
--- Begin Message ---
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.

--- End Message ---
--- Begin Message --- 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 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>

--- End Message ---
--- Begin Message ---

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.
--- End Message ---
--- Begin Message ---
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 -----
<[email protected]>



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. 

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
[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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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 -----
<[email protected]>



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. 

--- End Message ---
--- Begin Message ---
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 -----
> <[email protected]>


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

Dan.

--- End Message ---
--- Begin Message --- Are there any tools available to convert VBScript applications to PHP (for a migration from Windows IIS to Linux Apache).

Jim

--- End Message ---
--- Begin Message ---
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
> 
>

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message --- 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

--- End Message ---
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
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: [email protected]
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

--- End Message ---
--- Begin Message --- 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



--- End Message ---
--- Begin Message --- 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

--- End Message ---
--- Begin Message ---
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]

--- End Message ---
--- Begin Message ---
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,
 Richard                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
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/

--- End Message ---
--- Begin Message --- 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...

--- End Message ---
--- Begin Message ---
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.

--- End Message ---
--- Begin Message ---
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.

--- End Message ---

Reply via email to