PSQL Select not working – or other simple commands not working
Working with command line postgres tool psql and having an issue?
Why doesn’t the psql command show the simple select query?
PSQL select not working is a problem that can happen in either of the following scenarios:
- Are you on the right database?
Chances are you might not be on the right database at all and the relation you are trying to find might not be there at all:Check if you are on the right database.
Run the command
\l to see the available databases.How to connect to the postgres database from the list?
Use the command
Let’s say the database name is inventory then:
\c inventory will connect you to the right database
Continue reading psql select not working →
The first one would be just to double check if we have correct configuration for xdebug.
But the main and common culprit for this is using
If you want pdo to thow exception so that you can see what is going on kinda thing.. you can add the following parameter when you instantiate PDO just next to the password part of the pdo
array(PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)
**Note: This is not the best way to handle exception by any means!!
This is the issue when you are having a fresh install of apache usually.
You need to tell apache should handle the extensions so that it could process them accordingly.
On you apache path, go to the config and open the httpd.conf file
and add the following
AddType application/x-httpd-php .php
Also, make sure the Module for php is installed as well..
in your httpd.conf file, search for:
#LoadModule php5_module libexec/apache2/libphp5.so
and, of course, uncomment that to enable php.
This might have some to do with the /home/[your-user-name]/.bashrc file.
Check for that file, if it is not existing at all copy it from /etc/skel/.bashrc using
sudo cp /etc/skel/.bashrc /home/[your-user-name]/.