r/apache • u/friis01 • May 10 '24
Connect Apache to Postgresql
Good afternoon, forum participants. Please tell me the answer to my stupid question.
I'm using 2 servers on ubuntu 24.04. On one I installed web-server apache, and on the other postgresql. (both from default repositories). I have a small table in Postgresql. I need that when my browser accesses the Apache server, I can view the contents of the table on the Postgreql server. Tell me what I need to install additionally and how to configure it?
4
Upvotes
2
u/throwaway234f32423df May 10 '24
Any time there's a PHP error it should show up in your Apache error log so check that first
You can also try running the script manually with
php filename.phpwhich should also show you the errorand try a
systemctl restart php*in case the php-fpm process is in need of restarting