I need to execute a php file on apache tomcat server that needs to access postgresql database. The server is Centos Linux. I have apache tomcat 7 , php , postgresql and php-potgresql installed.
$ cat /etc/php.d/pgsql.ini [gives the following]
; Enable pgsql extension module
extension=pgsql.so
However on loading the required page on a browser, i get the fowllowing error:
HTTP Status 500 - java.lang.RuntimeException: PHP Fatal error: Call to undefined function pg_connect() in /home/criminfo/apache-tomcat-7.0.41/webapps/JavaBridgeTemplate621/hybrid.php on line 4
type Exception report
message java.lang.RuntimeException: PHP Fatal error: Call to undefined function pg_connect() in /home/criminfo/apache-tomcat-7.0.41/webapps/JavaBridgeTemplate621/hybrid.php on line 4
description The server encountered an internal error that prevented it from fulfilling this request.
Any directions on how to fix this will be appreciated.
Related
Octane is installed with roadrunner while following the official guide, on the Ubuntu 18.04 server. Each step works as expected until the server is started:
php artisan octane:start --server=roadrunner --port=8181
Then, an error is received and the command exits. The complete stacktrace is attached:
INFO Server running…
Local: http://127.0.0.1:8181
Press Ctrl+C to stop the server
INFO [INFO] RoadRunner server started; version: 2.6.3, buildtime: 2021-12-03T11:37:00+0000
PHP Warning: require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18
PHP Fatal error: Uncaught Error: Failed opening required '/path/vendor/bin/bootstrap.php' (include_path='.:/usr/share/php') in /path/vendor/bin/roadrunner-worker:18
Stack trace:
#0 {main}
thrown in /path/vendor/bin/roadrunner-worker on line 18
INFO error occurred: WorkerAllocate:
INFO goridge_frame_receive: EOF, plugin: http.Plugin
ERROR 2021-12-07T12:01:53.048Z ERROR container/poller.go:16 vertex got an error {"id": "http.Plugin", "error": "WorkerAllocate:\n\tgoridge_frame_receive: EOF"}
ERROR github.com/spiral/endure/pkg/container.(*Endure).poll.func1
ERROR github.com/spiral/endure#v1.0.10/pkg/container/poller.go:16
ERROR handle_serve_command: WorkerAllocate:
ERROR goridge_frame_receive: EOF
Since roadrunner is based on go, I don't have much insights on how to navigate through the error. Please let me know if anyone has solved this issue before, thanks.
You should fix all warnings like this one: PHP Warning: require(/path/vendor/bin/bootstrap.php): Failed to open stream: No such file or directory in /path/vendor/bin/roadrunner-worker on line 18
These warnings appear in the stdout, but stdout is used as a process fd to communicate with the RR. That means if some data is sent to the stdout (like PHP warning) before RR initializes all processes (aka worker), RR will stop allocating the workers and exit with code 1.
I have recently installed laravel through softaculous in CPanel. After the installation, when I tried to open the website, it shows 500 Internal Server Error. Actually, I am a beginner in Laravel. The following errors I got from error_log.
[08-Aug-2020 12:56:03 UTC] PHP Fatal error: Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) in /home/hugar/public_html/jityo.com/vendor/nesbot/carbon/src/Carbon/Translator.php on line 18
[08-Aug-2020 12:56:03 UTC] PHP Fatal error: Uncaught ErrorException: Declaration of Illuminate\Http\Response::setContent($content) should be compatible with Symfony\Component\HttpFoundation\Response::setContent(?string $content) in /home/hugar/public_html/jityo.com/vendor/laravel/framework/src/Illuminate/Http/Response.php:14
Every assistance will be appreciated!.
Check the server php version and the php version in composer.json file of laravel framework, if it's not a match then you have to change the server php version and it will work like a charm. this happened with me as well.
The php version(7.1) on the server was lesser than php version in composer.json(7.2).
The problem fixed by upgrading the php version(7.4) on the server.
I've had to upgrade PHP from 7.0.10 to 7.3.12 on WampServer.
Since then I've been unable to update local WordPress sites, receiving error:
Download failed.: No working transports found
I've checked the PHP error log and I see:
PHP Fatal error: Uncaught Error: Call to undefined function openssl_verify()
Wamp icon > PHP > PHP Extensions > openssl + curl are enabled.
Help appreciated.
When running drush cim/cr commands in a Drupal 8 (core 8.5.5) project i get the following error:
Fatal error: Default value for parameters with a class type hint can only be NULL in E:\Work\EmakinaCH\IheidCH\web\modules\contrib\search_api_solr\src\Plugin\search_api\backend\SearchApiSolrBackend.php on line 2669
[error] Drush command terminated abnormally due to an unrecoverable error.
Error: Default value for parameters with a class type hint can only be NULL in E:\Work\EmakinaCH\IheidCH\web\modules\contrib\search_api_solr\src\Plugin\search_api\backend\SearchApiSolrBackend.php, line 2669
And here's the aforementioned line of code
protected function flattenKeys($keys, array $fields = [], string $parse_mode_id = 'phrase') {
This error only occurs on one test machine which is running Win10 + Wamp 64-bit version 3.1.0, regardless of which php version is run on it 5.6, 7.0 or 7.1.9. On any other linux machine i use there are no issues.
Anyone know how to fix this, or what is the cause of this error?
Thanks
I recently transferred my magento website from an old server to a new one, and when I opened the home page, it gives me Internal Server Error 500. In the server error log, i can see the following error:
PHP Fatal error: Class 'IntlDateFormatter' not found in /home/evonengc/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93
How can I solve this error?
go to php.ini and enable the extension
;extension=php_intl.dll
to
extension=php_intl.dll
and restart Apache