View previous topic :: View next topic |
Author |
Message |
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Thu Mar 29, 2012 12:17 pm Post subject: CGI environment variables are not added |
|
|
I have two linux (suse and gentoo). On Suse my test fastcgi program works successfully. But on Gentoo I have a problems. I see program is run but with problems. Among CGI variables is only FCGI_ROLE and other is absent. Abyss configures are identical on both PC.
Help me to solve problem. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Mon Apr 02, 2012 11:06 pm Post subject: Re: CGI environment variables are not added |
|
|
Vladimir wrote: | I have two linux (suse and gentoo). On Suse my test fastcgi program works successfully. But on Gentoo I have a problems. I see program is run but with problems. Among CGI variables is only FCGI_ROLE and other is absent. Abyss configures are identical on both PC.
Help me to solve problem. |
How are you checking the CGI variables? What language are you using? _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Tue Apr 03, 2012 7:31 am Post subject: Re: CGI environment variables are not added |
|
|
admin wrote: | Vladimir wrote: | I have two linux (suse and gentoo). On Suse my test fastcgi program works successfully. But on Gentoo I have a problems. I see program is run but with problems. Among CGI variables is only FCGI_ROLE and other is absent. Abyss configures are identical on both PC.
Help me to solve problem. |
How are you checking the CGI variables? What language are you using? |
I use C and FastCGI library. I checked CGI variables by two ways. First way was getting of CGI variable by standard functions from the FastCGI library. I got only FCGI_ROLE and anothers (for ex. REQUEST_METHOD, SERVER_NAME, HTTP_X_FORWARDED_FOR etc) were NULL. Second way was getting of system environ variable. I saw all system variables plus FCGI_ROLE. All results I saved to log file.
At the same time no data send out.
Yesterday trying to understand problem I installed Apache on Gentoo linux and my test program had worked successfully. As the final result I think I have to do some changing in Abyss config. But I would like to remind that like config successfully works on Suse linux. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Tue Apr 03, 2012 3:13 pm Post subject: Re: CGI environment variables are not added |
|
|
Vladimir,
Can you show us the source code of a simple C example to be able to test it? _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Wed Apr 04, 2012 9:33 am Post subject: Re: CGI environment variables are not added |
|
|
admin wrote: | Vladimir,
Can you show us the source code of a simple C example to be able to test it? |
Yes, of cause. Test project can be downloaded from for_aprelium.tar.gz. Please, see threaded.cpp, other modules were added for logging. I used fcgi-2.4.1 library and boost 1.44.0-5.1 |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1298
|
Posted: Wed Apr 04, 2012 4:39 pm Post subject: Re: CGI environment variables are not added |
|
|
Vladimir,
Please enable full input/output logging in FastCGI parameters and monitors what is reported in that file for your test requests. This log shows what is sent to the FastCGI application and what is received. It my help you determine what's going on.
We also strongly suggest that you install PHP on both systems and set it to use FastCGI. Next, create a simple test.php page and visit it:
Code: | <?php
phpinfo();
?> |
It will show you what PHP gets as its environment variables and will help you compare with your own program. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Thu Apr 05, 2012 4:04 pm Post subject: Re: CGI environment variables are not added |
|
|
admin wrote: | Vladimir,
Please enable full input/output logging in FastCGI parameters and monitors what is reported in that file for your test requests. This log shows what is sent to the FastCGI application and what is received. It my help you determine what's going on.
We also strongly suggest that you install PHP on both systems and set it to use FastCGI. Next, create a simple test.php page and visit it:
Code: | <?php
phpinfo();
?> |
It will show you what PHP gets as its environment variables and will help you compare with your own program. |
Thanks, I have got successful result. I have done all you suggested. On Suse Linux as all have worked so far and all have been working. The Gentoo Linux required a lot of attention. It is set on industrial computer. And I compiled additional php module. After I reinstalled Abyss and added my test fcgi program and test.php. Everything has been working. I don't know reason but all have worked. I guess maybe any modules were absent. PHP pulled many modules.
Once more thanks you!
Last edited by Vladimir on Thu Apr 05, 2012 4:37 pm; edited 1 time in total |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Thu Apr 05, 2012 4:07 pm Post subject: Re: CGI environment variables are not added |
|
|
admin wrote: | Vladimir,
Please enable full input/output logging in FastCGI parameters and monitors what is reported in that file for your test requests. This log shows what is sent to the FastCGI application and what is received. It my help you determine what's going on.
We also strongly suggest that you install PHP on both systems and set it to use FastCGI. Next, create a simple test.php page and visit it:
Code: | <?php
phpinfo();
?> |
It will show you what PHP gets as its environment variables and will help you compare with your own program. |
Thanks, I have got successful result. I have done all you suggested. On Suse Linux as all have worked so far and all have been working. The Gentoo Linux required a lot of attention. It is set on industrial computer. And I compiled additional php module. After I reinstalled Abyss and added my test fcgi program and test.php. Everything has been working. I don't know reason but all have worked. I guess maybe any modules were absent. PHP pulled many modules.
Once more thanks you!
Last edited by Vladimir on Thu Apr 05, 2012 4:40 pm; edited 1 time in total |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Thu Apr 05, 2012 4:14 pm Post subject: Re: CGI environment variables are not added |
|
|
admin wrote: | Vladimir,
Please enable full input/output logging in FastCGI parameters and monitors what is reported in that file for your test requests. This log shows what is sent to the FastCGI application and what is received. It my help you determine what's going on.
We also strongly suggest that you install PHP on both systems and set it to use FastCGI. Next, create a simple test.php page and visit it:
Code: | <?php
phpinfo();
?> |
It will show you what PHP gets as its environment variables and will help you compare with your own program. |
Thanks, I have got successful result. I have done all you suggested. On Suse Linux as all have worked so far and all have been working. The Gentoo Linux required a lot of attention. It is set on industrial computer. And I compiled additional php module. After I reinstalled Abyss and added my test fcgi program and test.php. Everything has been working. I don't know reason but all have worked. I guess maybe any modules were absent. PHP pulled many modules.
Once more thanks you! |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Thu Apr 05, 2012 4:46 pm Post subject: |
|
|
Please delete this and last two posts because I have not permissions. There was system failure and posts were sent three times. |
|
Back to top |
|
|
Vladimir -
Joined: 29 Mar 2012 Posts: 8
|
Posted: Fri Apr 06, 2012 12:55 pm Post subject: Re: CGI environment variables are not added |
|
|
Vladimir wrote: | admin wrote: | Vladimir,
Please enable full input/output logging in FastCGI parameters and monitors what is reported in that file for your test requests. This log shows what is sent to the FastCGI application and what is received. It my help you determine what's going on.
We also strongly suggest that you install PHP on both systems and set it to use FastCGI. Next, create a simple test.php page and visit it:
Code: | <?php
phpinfo();
?> |
It will show you what PHP gets as its environment variables and will help you compare with your own program. |
Thanks, I have got successful result. I have done all you suggested. On Suse Linux as all have worked so far and all have been working. The Gentoo Linux required a lot of attention. It is set on industrial computer. And I compiled additional php module. After I reinstalled Abyss and added my test fcgi program and test.php. Everything has been working. I don't know reason but all have worked. I guess maybe any modules were absent. PHP pulled many modules.
Once more thanks you! |
Ha-Ha! I was glad early. On Gentoo test.php works via CGI/ISAPI interface but my test fcgi program doesn't work (interface FastCGI). I was in hurry and ran my test program on suse server (there is all finely). But now I know why it is so! I found abyss bug. Abyss can't work with long environment variables. There is very long LS_COLORS variable on Gentoo. Now here it has length equal 1419 bytes. Process interrupts on function send_table_item(key="LS_COLORS" .....). It is obvious from fastcgi.log. In support I cut LS_COLORS and alleluia! my test program was running successfully. Please, test and be convinced yourself. |
|
Back to top |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Mon May 07, 2012 2:44 pm Post subject: Re: CGI environment variables are not added |
|
|
Vladimir,
The status of this problem has not been clear. We did tests on Ubuntu and there were no problems with very long environment variables. It could be an issue with some versions of Glibc installed on some distributions. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Vanleeuwen -
Joined: 12 Sep 2013 Posts: 2
|
Posted: Thu Sep 12, 2013 3:52 am Post subject: |
|
|
Yesterday trying to understand problem I installed Apache on Gentoo linux and my test program had worked successfully. As the final result I think I have to do some changing in Abyss config. But I would like to remind that like config successfully works on Suse linux. _________________ aprelium |
|
Back to top |
|
|
Vanleeuwen -
Joined: 12 Sep 2013 Posts: 2
|
Posted: Thu Sep 12, 2013 3:58 am Post subject: |
|
|
After I reinstalled Abyss and added my test fcgi program and test.php. Everything has been working. I don't know reason but all have worked. I guess maybe any modules were absent. PHP pulled many modules. _________________ aprelium |
|
Back to top |
|
|
|