logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: FCGID not working with Python 3.8
Author
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Mon 14 Dec '20 3:48    Post subject: FCGID not working with Python 3.8 Reply with quote

Hey guys, I have my HTTPD 2.4.46 running using fcgid module version 2.3.10, I have it configured for PHP and Python, I have no problems running PHP, but Python scripts give this error:

Quote:
mod_fcgid: get overlap result error
End of script output before headers


This is how I have them configured:

Quote:
AddHandler fcgid-script .php .py

FcgidWrapper "d:/php/php-cgi.exe" .php
FcgidWrapper "C:/Program\ Files/Python38/python.exe" .py


This is the Python file I'm trying to run:

Quote:
#!"C:\Program Files\Python38\python.exe"
print("Content-Type: text/html\n\n")
print("<HTML>\n")
print("<HEAD>\n")
print("<TITLE>Test Page</TITLE>\n")
print("</HEAD>\n")
print("<BODY>\n")
print("<H1>IT WORKS!</H1>\n")
print("</BODY>\n")
print("</HTML>\n")


I'm not sure if it's because I have both running as FCGI, but if I'm making a mistake, please let me know.

Thanks.
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 692

PostPosted: Mon 14 Dec '20 9:12    Post subject: Reply with quote

Have a look at :

https://www.apachelounge.com/viewtopic.php?t=3006
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 14 Dec '20 10:19    Post subject: Reply with quote

I never got is running with mod_fcgid. Only plain old cgi.

The only think that I found so far is https://stackoverflow.com/questions/59801387/how-to-install-mod-wsgi-into-apache-on-windows

But I'm too lazy to try it, since I don't use python.
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Mon 14 Dec '20 22:07    Post subject: Reply with quote

Thank you guys, so Python doesn't work with FCGID, I cannot use WSGI because it only works with Apache running as Prefork, which I don't have because I use HTTP2 which doesn't work with Prefork, I did try running it as regular CGI, but I don't remember what happened, but I'll try again to see what happens.
Back to top
jfha73



Joined: 18 Aug 2011
Posts: 62
Location: New York

PostPosted: Mon 14 Dec '20 22:23    Post subject: Reply with quote

I don't know what I was doing wrong before, but it's working now as a regular CGI.

Thanks everybody.
Back to top


Reply to topic   Topic: FCGID not working with Python 3.8 View previous topic :: View next topic
Post new topic   Forum Index -> Apache