Gateway Timeout

General discussions around KeyHelp.
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Gateway Timeout

Post by boka003 »

Hello all,

I facing this error:
Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.



I have installed sqlsrv extension for PHP. And then it tells me to add an extension to php.ini: https://prnt.sc/eQfW8L9DOGYO

I have found some topic at the forum that I don't need to edit php.ini directly, so I have pasted "extension=pdo_sqlsrv.so" under user PHP settings inside keyhelp and a timeout error showed up.


How can I fix this?
Does it need to be done via keyhelp database? or there is another way?


How can I add these PHP extensions to php.ini in the right way?
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hallo,

if you install the PHP module via apt-get for the system PHP version you do not need to do anything

If you compile it by yourself for the Keyhelp PHP versions, I already wrote how to do this:

viewtopic.php?p=40585#p40585
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

Thanks,

I have install it using this procedure

Code: Select all

sudo apt install php7.4-dev
sudo update-alternatives --set php /usr/bin/php7.4
sudo update-alternatives --set php-config /usr/bin/php-config7.4
sudo update-alternatives --set phpize /usr/bin/phpize7.4
sudo pecl install -f sqlsrv
sudo pecl install -f pdo_sqlsrv
sudo phpenmod -v 7.4 sqlsrv pdo_sqlsrv
sudo service apache2 restart 


But is there any way to fix getaway timeout error at keyhelp?


REGARDS
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hallo,
update-alternatives --set php /usr/bin/php7.4
Why????? If you change the default version of the System Keyhelp cannot work anymore.

For Gateway Timeout you must check the logs of the domain and PHP-FPM Log.
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

I was getting this error: pecl/sqlsrv requires PHP (version >= 8.0.0), installed version is 7.4.3-4ubuntu2.19 No valid packages found install failed


The only solution that I have found is this: https://askubuntu.com/questions/1277339 ... -sqlsrv-so


I will restore the server backup, but is there any other way to install sqlsrv extension at PHP 7.4?
Regards
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hallo,

what operating system are you using?
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

It is Ubuntu 20.04
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hallo,

the default PHP version of Ubuntu 20 is PHP 7.4


So you can simply install the PHP modules via apt-get

They are activated automatically by apt
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

If I try to install sqlsrv via apt-get, this error shows up:

pecl/sqlsrv requires PHP (version >= 8.0.0), installed version is 7.4.3-4ubuntu2.19
No valid packages found
install failed
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hallo,

OK this module seems only available via PECL.

For PHP 7.4 you must use an older version, e.g.

pecl install sqlsrv-5.10.0
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

Thanks, I have done that now, but still is showing same message about php.ini

Code: Select all

Build process completed successfully
Installing '/usr/lib/php/20190902/sqlsrv.so'
install ok: channel://pecl.php.net/sqlsrv-5.10.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=sqlsrv.so" to php.ini
root@servint:~#
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hello,

Code: Select all

echo "extension=sqlsrv.so" > /etc/php/7.4/mods-available/sqlsrv.ini
phpenmod sqlsrv
/etc/init.d/php7.4-fpm restart


Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

Thanks a lot,

All that has been done: https://prnt.sc/3TrA_8XHVBqM
But this extension still doesn't showing: https://prnt.sc/FeqooszXAxPG
User avatar
Florian
Keyweb AG
Posts: 1261
Joined: Wed 20. Jan 2016, 02:28

Re: Gateway Timeout

Post by Florian »

Hello,

have you done the same for the module pdo_sqlsrv, too?
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
boka003
Posts: 48
Joined: Fri 7. Jan 2022, 10:17

Re: Gateway Timeout

Post by boka003 »

Hello,


Yes, I have done it: https://prnt.sc/ylLklKtDnuti
And then: https://prnt.sc/HBJeUkAVX6pD


Thanks!
Post Reply