php-windows Digest 1 Nov 2008 04:24:34 -0000 Issue 3536

Topics (messages 29062 through 29071):

Re: An Unhandled Win32 Exception Occurred When Executing PHP From Windows
        29062 by: Stut
        29063 by: Alice Wei
        29064 by: Alf Stockton
        29065 by: Alice Wei
        29066 by: Alf Stockton
        29067 by: Alice Wei
        29069 by: Alf Stockton
        29070 by: Stut
        29071 by: Alf Stockton

Re: [PHP-INSTALL] RE: first request
        29068 by: Daniel Brown

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 ---
On 31 Oct 2008, at 12:25, Alice Wei wrote:
I have been looking around for documents on http:// www.microsoft.com on the generation of win32 exception errors, but I am not exactly sure what steps I should take when the debugger is triggered by either a Shockwave file application, or from an HTTP Request.

Here is the code snippet:

 //execute program
shell_exec("C:\Inetpub\wwwroot\incidence\my-manager.exe -d$date -p $event");


When I run the code as embedded in PHP, I see a pop up window with the following words: An unhandled win32 exception occurred in my- manager.exe [2372]. However, when I only run the application using cmd, it does not give me any errors.

 Is there something I should try that I have not?

This is almost certainly due to something that exe file is trying to use and nothing at all to do with PHP. What does my-manager.exe do?

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Hi, 
   To answer your question, the exe file is written in C and creates several 
output files that calculates various variables based on the user input (which 
the PHP handles). 
    What I am surprised about is that when I run the exe file by itself, there 
is no error at all. However, once I use PHP to "call" the file, it does not 
crash, but I have to click No when it executes to allow the program to proceed. 
I tried to follow the instructions from the document in the url below, but I 
could not find the files, and I was not sure if that really is the cause of the 
interruptions of my program. 
    Does this give you more information in helping me solve my problem?

Thanks in advance.

Alice
> CC: [EMAIL PROTECTED]
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Date: Fri, 31 Oct 2008 12:35:43 +0000
> Subject: Re: [PHP-WIN] An Unhandled Win32 Exception Occurred When Executing 
> PHP From Windows
> 
> On 31 Oct 2008, at 12:25, Alice Wei wrote:
> >  I have been looking around for documents on http:// 
> > www.microsoft.com on the generation of win32 exception errors, but I  
> > am not exactly sure what
> > steps I should take when the debugger is triggered by either a  
> > Shockwave file application, or from an HTTP Request.
> >
> > Here is the code snippet:
> >
> >  //execute program
> >  shell_exec("C:\Inetpub\wwwroot\incidence\my-manager.exe -d$date -p 
> > $event");
> >
> >
> > When I run the code as embedded in PHP, I see a pop up window with  
> > the following words: An unhandled win32 exception occurred in my- 
> > manager.exe [2372].
> > However, when I only run the application using cmd, it does not give  
> > me any errors.
> >
> >  Is there something I should try that I have not?
> 
> This is almost certainly due to something that exe file is trying to  
> use and nothing at all to do with PHP. What does my-manager.exe do?
> 
> -Stut
> 
> -- 
> http://stut.net/
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us

--- End Message ---
--- Begin Message ---
Alice Wei wrote:
Hi, To answer your question, the exe file is written in C and creates several output files that calculates various variables based on the user input (which the PHP handles). What I am surprised about is that when I run the exe file by itself, there is no error at all. However, once I use PHP to "call" the file, it does not crash, but I have to click No when it executes to allow the program to proceed. I tried to follow the instructions from the document in the url below, but I could not find the files, and I was not sure if that really is the cause of the interruptions of my program. Does this give you more information in helping me solve my problem?

Thanks in advance.
Do you have the source of the exe? Is it C or C++ or C#?

--
Regards,
Alf Stockton            www.stockton.co.za

Courage is your greatest present need.

--- End Message ---
--- Begin Message ---
> 
> Alice Wei wrote:
> > Hi, 
>
> To answer your question, the exe file is written in C and creates
several output files that calculates various variables based on the
user input (which the PHP handles). 
> > What I am surprised
about is that when I run the exe file by itself, there is no error at
all. However, once I use PHP to "call" the file, it does not crash, but
I have to click No when it executes to allow the program to proceed. I
tried to follow the instructions from the document in the url below,
but I could not find the files, and I was not sure if that really is
the cause of the interruptions of my program. 
> >     Does this give you more information in helping me solve my problem?
> > 
> > Thanks in advance.
> Do you have the source of the exe? Is it C or C++ or C#?

The
exe file is written in C, but I don't have the source file of it, since
my client wanted me to execute it using that to prevent my having to
execute several codes. 
 I have just tried using command prompt to
execute the command below, and there were no errors, and no Visual
Studio Just In-Time Debugger pop up boxes generated.
  my-manager.exe -d24 -p20

Do I have to install Visual Studio on the machine of where my PHP is executing 
this exe file?

Thanks in advance.

Alice


> -- 
> Regards,
> Alf Stockton          www.stockton.co.za
> 
> Courage is your greatest present need.
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

--- End Message ---
--- Begin Message ---
Alice Wei wrote:
Alice Wei wrote:
Hi,
To answer your question, the exe file is written in C and creates
several output files that calculates various variables based on the
user input (which the PHP handles).
What I am surprised
about is that when I run the exe file by itself, there is no error at
all. However, once I use PHP to "call" the file, it does not crash, but
I have to click No when it executes to allow the program to proceed. I
tried to follow the instructions from the document in the url below,
but I could not find the files, and I was not sure if that really is
the cause of the interruptions of my program.
    Does this give you more information in helping me solve my problem?

Thanks in advance.
Do you have the source of the exe? Is it C or C++ or C#?

The
exe file is written in C, but I don't have the source file of it, since
my client wanted me to execute it using that to prevent my having to
execute several codes. I have just tried using command prompt to
execute the command below, and there were no errors, and no Visual
Studio Just In-Time Debugger pop up boxes generated.
  my-manager.exe -d24 -p20

Do I have to install Visual Studio on the machine of where my PHP is executing 
this exe file?

I do not believe that that would make much difference.

--
Regards,
Alf Stockton            www.stockton.co.za

You could live a better life, if you had a better mind and a better body.

--- End Message ---
--- Begin Message ---
Hi, Al and those who have replied:

  I think I am still in midst of this mystery, but it looks like that this 
error is triggered when I am trying to run this PHP code with the lines I have 
posted from a Shockwave file application. 
  When I only have the PHP with the shell_exec command, it is not giving me any 
errors. 

  You are right, my errors do not come from PHP this time. 

Alice

> Date: Fri, 31 Oct 2008 15:43:06 +0200
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] An Unhandled Win32 Exception Occurred When Executing 
> PHP From Windows
> 
> Alice Wei wrote:
> >> Alice Wei wrote:
> >>> Hi, 
> >> To answer your question, the exe file is written in C and creates
> > several output files that calculates various variables based on the
> > user input (which the PHP handles). 
> >>> What I am surprised
> > about is that when I run the exe file by itself, there is no error at
> > all. However, once I use PHP to "call" the file, it does not crash, but
> > I have to click No when it executes to allow the program to proceed. I
> > tried to follow the instructions from the document in the url below,
> > but I could not find the files, and I was not sure if that really is
> > the cause of the interruptions of my program. 
> >>>     Does this give you more information in helping me solve my problem?
> >>>
> >>> Thanks in advance.
> >> Do you have the source of the exe? Is it C or C++ or C#?
> > 
> > The
> > exe file is written in C, but I don't have the source file of it, since
> > my client wanted me to execute it using that to prevent my having to
> > execute several codes. 
> >  I have just tried using command prompt to
> > execute the command below, and there were no errors, and no Visual
> > Studio Just In-Time Debugger pop up boxes generated.
> >   my-manager.exe -d24 -p20
> > 
> > Do I have to install Visual Studio on the machine of where my PHP is 
> > executing this exe file?
> > 
> I do not believe that that would make much difference.
> 
> -- 
> Regards,
> Alf Stockton          www.stockton.co.za
> 
> You could live a better life, if you had a better mind and a better body.

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

--- End Message ---
--- Begin Message ---
Alice Wei wrote:
Hi, Al and those who have replied:

I think I am still in midst of this mystery, but it looks like that this error is triggered when I am trying to run this PHP code with the lines I have posted from a Shockwave file application. When I only have the PHP with the shell_exec command, it is not giving me any errors. You are right, my errors do not come from PHP this time.
Is the PATH environment variable the same in all cases? I am not really a Windows expert but I do know that the PATH can vary between Windows itself and a DOS box. It may be worth checking.

--
Regards,
Alf Stockton            www.stockton.co.za

You will become rich and famous unless you don't.

--- End Message ---
--- Begin Message ---
On 31 Oct 2008, at 13:17, Alice Wei wrote:
Alice Wei wrote:
Hi,

To answer your question, the exe file is written in C and creates
several output files that calculates various variables based on the
user input (which the PHP handles).
What I am surprised
about is that when I run the exe file by itself, there is no error at
all. However, once I use PHP to "call" the file, it does not crash, but
I have to click No when it executes to allow the program to proceed. I
tried to follow the instructions from the document in the url below,
but I could not find the files, and I was not sure if that really is
the cause of the interruptions of my program.
Does this give you more information in helping me solve my problem?

Thanks in advance.
Do you have the source of the exe? Is it C or C++ or C#?

The
exe file is written in C, but I don't have the source file of it, since
my client wanted me to execute it using that to prevent my having to
execute several codes.
I have just tried using command prompt to
execute the command below, and there were no errors, and no Visual
Studio Just In-Time Debugger pop up boxes generated.
 my-manager.exe -d24 -p20

Do I have to install Visual Studio on the machine of where my PHP is executing this exe file?

That debugging window is appearing therefore you must have VS installed on the machine you're running it on.

There are many things you need to be careful of when executing a shell from PHP, primarily these are ensuring that permissions are correct and that the thing you're executing does not attempt to use anything other than stdin/out/err (i.e. nothing outside the standard C library, so no windows etc).

The window usually indicates an unhandled exception or other catastrophic event, in which case you need to be taking it back to where you got it from and telling them about it. Unless the debugging window indicates that it's PHP that's crashing not your exe. I'd double check that first if I were you.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Stut wrote:
On 31 Oct 2008, at 13:17, Alice Wei wrote:
Alice Wei wrote:
Hi,

To answer your question, the exe file is written in C and creates
several output files that calculates various variables based on the
user input (which the PHP handles).
As you appear to know what the .exe does why not rewrite it in PHP.

--
Regards,
Alf Stockton            www.stockton.co.za

Keep it short for pithy sake.

--- End Message ---
--- Begin Message ---
On Fri, Oct 31, 2008 at 4:33 AM, michael glancy
<[EMAIL PROTECTED]> wrote:
> HI Daniel
>
> I installed Xampp last night but it still didnt have those extensions
> installed.
>
> was there something else I should have done ?

    For the benefit of others now and in the future (through the
archives and web searches), please keep replies on the list.
(Forwarded to the Windows PHP list as well.)

    Here's a quick run-down for all of the extensions you mentioned
needing for Magento.  Note that, with XAMPP on Windows, php.ini is
probably in one of the following locations (where X:\ is the drive
letter on which XAMPP or XAMPPLite is installed):
                X:\xampp\apache\bin\php.ini
                X:\xampp\php\php.ini
                X:\xampplite\php\php.ini

    1.) To get pdo_mysql working on Windows with XAMPP, edit your
php.ini file and make sure the following lines exist and are
uncommented (don't have a semicolon [;] in front of them):
                extension=php_pdo.dll
                extension=php_pdo_mysql.dll

    2.) For mcrypt to work, you have to do the same thing as above -
edit the php.ini file - making sure this time that these lines exist
and are uncommented:
                extension = php_mcrypt.dll
                extension=php_mcrypt_filter.dll extension =
php_mcrypt_filter.dll
                extension=php_mhash.dll extension = php_mhash.dll

    3.) For cURL, it's much of the same.  Edit your php.ini file and
make sure this line is there, and that it's not commented:
                extension=php_curl.dll

    4.) For GD, once again, edit the php.ini file and make sure this
line is there, and that it's not commented:
                extension=php_gd2.dll

    5.) Restart Apache and try your Magento installation again.


    TIPS:

        a.) Google is your friend.  Always search for your answers
there before sending a question to the list.  Often searching for what
you want to do, along with the keyword `howto` or separate words `how
to install` will give you the answer you need with the first result.

        b.) For the official page on installing Windows extensions for
PHP, go to:
                http://www.php.net/manual/en/install.windows.extensions.php

        c.) To find out where your extension directory is, create a
file in the web root of XAMPP (it should be the `htdocs` (without
quotes) subdirectory within the XAMPP installation directory, by
default).  Name it phpinfo.php and put only the following code into
it:
                <?php phpinfo(); ?>
            .... then access that page by going to
http://servername/phpinfo.php and finding the field named
"extension_dir" in the `Configuration->PHP Core` section.

        d.) When you know your extension directory, check that to make
sure the extensions mentioned above in the installation instructions
(the .dll files) actually exist in the extension directory.

        e.) Any time you make changes to php.ini or httpd.conf
(Apache's configuration file), you must ALWAYS restart Apache to have
these changes take effect.

-- 
</Daniel P. Brown>
http://www.parasane.net/
[EMAIL PROTECTED] || [EMAIL PROTECTED]
Ask me about our current hosting/dedicated server deals!

--- End Message ---

Reply via email to