Page 1 of 2
Gateway Timeout
Posted: Wed 4. Oct 2023, 10:53
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?
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 11:26
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 11:42
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 12:02
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.
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 12:26
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 12:42
by Florian
Hallo,
what operating system are you using?
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 12:44
by boka003
It is Ubuntu 20.04
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 12:49
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 13:00
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 13:14
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 14:03
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:~#
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 14:31
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 14:49
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
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 15:03
by Florian
Hello,
have you done the same for the module pdo_sqlsrv, too?
Re: Gateway Timeout
Posted: Wed 4. Oct 2023, 15:28
by boka003