I saw a similar question "Loads only from the command line". I have a different issue and on windows OS. I need to test some parts of code that has connections to other HTTPS sites, and I assume my browser caches some stuff that drops an error for the output. There for, I need to test my php script with a windows command line - which isnt hard to do. How ever, on pg_fetch_all
it drops Call to undefined Function pg_fetch_all
.
But I assume it connects to the database using pg_connect
, otherwise it would drop an error before hand.
Is there something I am missing? Does pg_fetch_all has some values that I missed on reading about it? Or its simply because it is not loading a plugin, etc..
- I am using PHP5.6
- Loading it with simply: php file.php
My code for SQL as requested.
$station_keys = pg_fetch_all(
pg_query(
get_connection(), "SELECT val, val2, val3, val4 FROM table_keys"));
Everything works fine on browser (maybe apache's doing), the command line thinks it's weird.
My php -m
prints out:
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
odbc
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
pdsql
is missing, it is enabled on wamp, it doesn't load when I am running command line.