Quantcast
Channel: FastCGI Module
Viewing all 205 articles
Browse latest View live

the php-cgi terminated after requesting on php 7.x via fastcgi in iis 7.5

$
0
0

I run php 7.1.16 (7.0.29) via fastcgi in iis 7.5, sometimes get 502 errors, i found the php-cgi terminated after requesting in resources monitor.

running environment: windows 2008 r2 + iis 7.5 + php 7.1.6 (7.0.29) x64

fastcgi configuration: maxInstances=100, InstanceMaxRequests=1000, PHP_FCGI_MAX_REQUESTS=1000

test script: for /l %a in (1,1,100) do curl http://127.0.0.1/phpinfo.php

the phpinfo.php:

<?php
phpfino();


Within a domain, impersonate the incoming user via fastcgi (IIS 10, python, django, wfastcgi, ms sql)

$
0
0

Hello all, would really appreciate guidance on this, i've been going in circles for some time.

Setup:

I'm using Django 1.11.9 with IIS 10 on Windows server 2016 datacenter edition via wfastcgi 3.0. Django talks to MS SQL via django-pyodbc-azure. The Application Pool identity uses a limited rights AD user (not msa or gmsa). Kerberos is set up and working. django-pyodbc-azure allows pass-through authentication, and that is working too.

Diagram:

IIS -> FastCGI -> python -> wfastcgi -> django -> django-pyodbc-azure -> pyodbc -> ms sql

At present, the incoming user at ms sql is the same as the application pool user.

Goal:

I would like db calls to be initiated *as the domain user that made them*, and not the IIS App Pool identity user. The db is a legacy db that relies on the incoming connections being made using the originating user credentials for authorisation and auditing purposes.

Attempted:

After much unsuccessful fiddling of my own, I asked the PTVS team since i imagined that wfastcgi might need to handle this (https://github.com/Microsoft/PTVS/issues/4018) and zooba suggested that the IIS team might have a better idea about this.

"I believe this would need to be a configuration option in the FastCGI module, rather than wfastcgi, as it needs to be applied before starting the worker process. wfastcgi only applies after the process is started, so there's not a lot we can do by then.

You may want to ask this on an IIS forum. We are not IIS experts here, and the people who know are unlikely to drop by."

Any idea about how to accomplish this with IIS / Django would be highly appreciated.

Error: FastCGI is not a recognized native module....

$
0
0

Win10.

I am trying to install PHP on my IIS and it is all going well until I get to here where I'm supposed to be adding a Module Mapping.

The instructions are to enter  Request path:  *.php   Module:  FastCGIModule   Executable:  C;\php\php-cgi.exe  Name: FastCGI

and IIS won't accept that.  Gives the error 'not native... specify at least one enabled native module..'

Can you provide any help with that?   Something I should have configured first?  Or a module name I can use?

scriptProcessor could not be found in application configuration

$
0
0

I keep getting this message whenever I try to test localhost/phpinfo.php on my IIS 7.5 on Windows 7, SP1. I have already configured PHP with IIS.  Please let me know what else I could test to get rid of this error.

Thanks.

P.S: Created a new thread in this section instead of discussing it in my old thread which started off with different error.

migration from apache to IIS cause error "Allowed memory size exhausted"

$
0
0

Hello, 

I made an little application on Apache and it works well. I have set the memory_conf at 256M in php.ini. 

Today i tried to migrate from apache to IIS, and i got this error "Allowed memory size exhausted". I do not understand why the same php configuration do not  work on IIS. 

Is there something i missed ? 

window server 2012R2

php 7.1.22 NTS VC14 X64

PHP 7.2

$
0
0

I have IIS 7.5 configured to use php 5.3.9 Works great no problems, however, any newer version like php 7.2 returns an error. 

The command line returns the same error cgi /fastcgi has stopped working.  I have used manual installs and the web platform installer.  Receive the same error with the newer php versions.  Haven't found a fix for this, does any one know the settings that will work?

FastCGI / CGI - php-cgi.exe - Memory usage

$
0
0

Hi

We are running IIS 8 on a MS Server 2012 machine with FastCGI PHP (5.6).

As the website is being used (it is an intranet site using PHP / MySQL) multiple new Fast CGI/CGI processes are invoked (php-cgi.exe) - I assume relating to the number of concurrent requests.

Each of these processes is allocating 600MB of memory.

I am using a small number of extensions (mysqli, curl, exif, gd, mbstring) and the memory limit in PHP is 256MB. If I reduce the memory limit, I can't even view a basic phpinfo page - a FastCGI error is returned.

Is 600MB for each FastCGI process to be expected? If not, any thoughts about why this might be happening?

Thank you.

Old PHP 5.3.9 FastCGI process exited unexpectedly on typo3

$
0
0

Hello,

i need to install an old version of typo3 (4.5.7) in my system. So i installed an iis 10 on Win Server 2016 with FastCGI and PHP 5.3.9.  The Visual C++ 2008 9.0.30729 and 9.0.30729.6161 did i install. PHPInfo and PHP Scripts works fine. But if i start the typo3 page it displays: FastCGI process exited unexpectedly. The Error Code is: 0x000000ff if i start the Tracing i get the following messages:

<div class="content-container"> <div class="summary-container hidden" id="section_errors" style="display: block;">
<div id="section_errors_details">
<div id="section_errors_208_details">
ModuleNameFastCgiModule
NotificationEXECUTE_REQUEST_HANDLER
HttpStatus500
HttpReasonInternal Server Error
HttpSubStatus0
ErrorCodethe extended attributes are inconsistent. (0xff)
ConfigExceptionInfo
</div>
</div>
</div> </div>

I spend a lot of time to find a solution but nothing works.

Can anyone help me?

Thanks!

André

<div id="content"> <div class="content-container">
<div id="details-left"></div>
</div> </div>


WinCache hard to find.

$
0
0

I've been stuck on PHP 7.1 for Windows because that's the latest WinCache I could find. I just went looking deeper and eventually found https://forums.iis.net/t/1237884.aspx, which has a link to https://windows.php.net/downloads/pecl/releases/wincache/2.0.0.8/, which has a 7.2 download., and its logs subdirectory has a 7.3. The main is still 7.2, which I'll take.

Then I checked out simple searches. Google and Bing searches for WinCache both havehttps://www.iis.net/downloads/microsoft/wincache-extension at the top of the organic SERP. That page shows 5.*, 7.0, and 7.1, but no later.

Google #2 and Bing #3 is http://php.net/manual/en/book.wincache.php and is old, for PHP 5.

Google #3 and Bing #4 is https://pecl.php.net/package/WinCache, with a 2.0.0.8 link to a 2016 tarball.

Bing #2 and Google #4 is https://sourceforge.net/projects/wincache/, which shows only 7.2.

Then I searched GitHub for WinCache. That found many entries, mostly old. What I thought to be the only recognizable name was php/pecl-caching-wincache, but despite saying updated last year, all of its files are 4-9 years old.

It would be a big help if iis.net, php.net, pecl.php.net, SourceForge, and GitHub all featured the same downloads or links to a single master distribution, and that the top of Google and Bing organic SERPs pointed to good pages.

php 7.3.x when is it coming to Web Platform Installer

$
0
0

Hello, I am very interested in getting php 7.3.x in IIS. Does someone know when it will be available at web platform installer ?

Kind regards

IIS8.5: PHP/Wordpress rights to write files

$
0
0

Hello IIS Community
I am running a Windows Server 2012 R2 Server, which is Hosting several ASP.NET site and two wordpress sites.
The PHP Version is 5.6.20

When we are trying to install a plugin or an update we get an error e.g. like 
"Warning! Could not update D:\Websites\...\wp-config.php!"

So far I configured each site to use its own application pool using this manual:
https://www.iis.net/learn/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-3-configure-php-application-security
And I gave read and write Access to the apppool user, as I would do with an ASP.NET Website, too.

In phpinfo I am seeing now the correct Appool ID is used in variable APP_POOL_ID.
Whats a Little bit strange is that USERNAME is COMPUTERNAME$ instead of IIS Apppool\Apppoolname

So I made a test and created a new file using fopen, there I see the owner of the file is IUSR.

My question:

 - So does it mean my site is running as IUSR instead of Appool User?
 - How can I achieve using the Appool user in PHP?

Thanks for any help


Mark

php-cgi.exe crash on facebook callback

$
0
0

Hi,

we have a domain with php 7 (no matter cgi or fastcgi) on windows 2012 IIS8 that cause the crash of php-cgi.exe sistematically only when
the facebook callback was thrown, we have updated the php to the lastest version possible and tested x86 and x64  version Thread Safe and Non Thread Safe, the result is the same php-cgi.exe crashes on facebook callback

The browser outputs 502.2 Bad Gateway

On event viewer we have this:

Faulting application name: php-cgi.exe, version: 7.1.3.0, time stamp: 0x58c87e08
Faulting module name: php7.dll, version: 7.1.3.0, time stamp: 0x58c88218
Exception code: 0xc0000005
Fault offset: 0x0000000000480275
Faulting process id: 0x5b628
Faulting application start time: 0x01d2a889c6caa76c
Faulting application path: D:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP71x64\php-cgi.exe
Faulting module path: D:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP71x64\php7.dll
Report Id: 048f0b3d-147d-11e7-946a-d4ae52d40b64
Faulting package full name:
Faulting package-relative application ID:

Thanks

M.

IIS 8.5 PHP can't change session.save_path

$
0
0

I can't change session.save_path in php.ini, value is ignored. I changed it to:

session.save_path = "c:\PHP\Sessions"

In php manager I can see correct value, but phpinfo() always shows session.save_path="c:\windows\temp".

Thousands of sess_* files are generated there, and aren't deleted.

Any help? Thank you.

IIS 8.5, PHP 7.3.4 (PHP 7.2.7 the same), Windows Server 2012 R2.

Python(django) + PyRFC Connection() - HTTP Error 500.0 - Internal Server Error

$
0
0

Hi Everyone 

I have issue with PyRFC connection to SAP by host on IIS 7

before I use PyRFC my application work fine and after I import PyRFC and Connect to Bapi Server IIS will show detail as below 

HTTP Error 500.0 - Internal Server Error
c:\python27\python27.exe - The FastCGI process exited unexpectedly

Detailed Error Information:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler safetystock
Error Code 0xffffffff
Requested URL http://safety.svi.co.th:80/api_test/
Physical Path D:\safetystock\api_test\
Logon Method Anonymous
Logon User Anonymous
Request Tracing Directory C:\inetpub\logs\FailedReqLogFiles

and this is my code:

from pyrfc import Connection
conn = Connection(user='sapconnect', passwd='mypassword', ashost='myhost', sysnr='00', client='100')

When compiler run to line Connection() IIS will show error 500 but I try to run localhost on server application work fine.

I already added full permission to root project folder and root python folder but it not work.

I has been stuck in this problem for 3 days. Help me please

python 2.7 64 bit

django 1.11.16

pyrfc 1.9.96

Moving from CGI to FastCGI

$
0
0

Hey all,

Have what will hopefully be an easy question. Running an old website right now on IIS 8.5 that uses Python. The site has a script map configured for the python scripts, and it just passes them directly to the Python executable with the standard arguments (-u "%s" "%s") for any requests to those scripts. The problem is, that process is slow, and it queues up each request and only does 1 at a time. For performance reasons, I'm wondering if migrating to FastCGI is possible. 

Problem is, I'm not a developer, and my IIS admin experience is limited to say the least. Looking around, it seems most information online related to FastCGI is focused on PHP. What I have found for Python is quite a bit more complex than I need. Is there a simple (rough) equivalent to the script mapping setup for FastCGI? 

Thanks!


Install PHP 7.3 32-bit on Win Sever 2016 with IIS 10

$
0
0

My  employer needs to install the 32-bit version of PHP on a Windows Server 2016 running IIs 10.0.  The OS and IIS are 64-bit apps.  We are using FastCGI with PHP 7.3.10/.  Using the cmd prompt PHP is running fine.  In the browser the response to any php file is HTTP Error 500.0 - Internal Server Error.

So it appears that IIS does not like the 32-bit app.

My first question is will the 32-bit version of PHP run in this environment?  

Yes, I do know that the 64-bit version is much better and faster.  We have a 32-bit driver for our ERP that forces the use of 32 bit applications. 

I can find no useful errors so any suggestions on logging and debugging would be helpful.

Thanks!!

Upgrade php from 7.2.7 to 7.2.24

$
0
0

Sorry if im in the wrong thread. I am completely new to php- no experience with it and i need to upgrade from  7.2.7 to 7.2.24. I cannot find any helpful instructions or How-To's on how to do this. I need some guidance

IIS Application Memory Limits with FastCGI

$
0
0

I am trying to set a memory limit on my application pool so that a user cannot exceed that set amount. If I set the application pool Private Memory Limit to 0 for example (unlimited) and set Max. Instances for the FastCGI process (PHP) to 0 (unlimited) and send it about 250 users I see about 10-12 php-cgi.exe processes in server explorer taking up about 20MB each so around 250MB in use and the w3wp.exe is about 20MB as well however when I'm using Resource Monitor the worker_processes total memory for that application pool is like 43MB which is not even near what I'm seeing in task manager. Thoughts?

The FastCGI Process Exited Unexpectedly

$
0
0

Hi,

I have a Windows Server 2016 running under Azure and have installed PHP 7.1 in c:\php with php.ini running therein.  I created a PHP_FastCGI Handler mapping to c:\php\php-cgi.exe and am now at the point where I need to activate a custom plugin within Wordpress.  I ensure that IIS_USRS and Network Service have full control to c:\inetpub\wwwroot\wordpress.  My default document type is .php in IIS as well.

Upon activation of the Wordpress custom plugin, I received the error The FastCGI Process Exited Unexpectedly. 

What additional steps must be taken to ensure an error-free configuration?  Thanks for your help and guidance.

Is site level fastcgi configuration possible?

$
0
0

Hi friends. I was able to get my Python application working by configuring <fastCGI> at the  system.webServer applicationHost.config level. However, if I remove the fastCGi configuration from the applicationHost.config, and place it at the web.config (site) level, I receive the following error:

<handler> scriptProcessor could not be found in <fastCGI> application configuration

The documentation states one can configure fastCGI at the site level, but this does not seem to be the case.  Is there a way to configure fastCGI in my web.config without requiring administrative rights over applicationHost.config? 

Viewing all 205 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>