Basicly i want to Lampp's Apache web server as main webserver for 3 Databases type that i have mysql (bundling with Lampp default),PostgreSql-10 (fully installed and tested),MongoDb (not yet started to install). i have a problem with the postgre DB that wont connect with my web in xampp apache htdocs i run a test in a test folder index.php for testing connection like this..

$connection = pg_connect ("host=localhost dbname=survey user=postgres password=linux101114");
if($connection) {
   echo 'connected';
} else {
    echo 'there has been an error connecting';

but when i run it return just a blank page.. any suggestion for me i need a web server like apache that can run multiple web with 3 type database connection.. (pgsql,mysql,monggo)

  • 1
    What happens if you run php index.php locally?
    – Jos
    Jul 30, 2018 at 10:08
  • i new to ubuntu so..im formerly windows user..im a web programmer..usualy i put my projects on xampp>htdocs.. now i put my project on opt/lampp/apache2/htdocs.. projects that use mysql database is work fine but not the postgreSQl one..that wont connect to the pgsql database..lampp already configured correctly like windows xampp..
    – CMD Dzeko
    Jul 30, 2018 at 11:18
  • that the problem i dont know where to put the php index.php if i want to test localy..
    – CMD Dzeko
    Jul 30, 2018 at 11:21
  • cd to the directory where this page index.php is stored, and enter php index.php.
    – Jos
    Jul 30, 2018 at 11:40
  • but when i open from browser its still return nothing,,i test with localhost and
    – CMD Dzeko
    Jul 30, 2018 at 14:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.