Fatal Error Call To Undefined Function Pg_connect Windows
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings call to undefined function pg_connect() xampp and policies of this site About Us Learn more about Stack Overflow
Php Fatal Error Call To Undefined Function Pg_connect() Linux
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation fatal error call to undefined function pg_connect() wamp Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it
Call To Undefined Function Pg_connect() Ubuntu
only takes a minute: Sign up Fatal error: Call to undefined function pg_connect up vote 6 down vote favorite 1 I am using Windows 7, php 5.3.5 and WAMP server. I have two php files: trigger.php and background.php. I want to run background.php as a background process. I have to call this file from trigger.php. To accomplish this I used below call to undefined function pg_connect() mac method. I included following code in trigger.php to make background.php to process in background. $handle = popen('start /b C:\wamp\bin\php\php5.3.5\php.exe C:\wamp\www\email3.php','r'); in background.php I have the follwing code to connect to database. $conn_string = "host=localhost port=5432 dbname=tagbase user=postgres password=postgres"; now, on parsing this line am getting the follwing error : Fatal error: Call to undefined function pg_connect() in C:\wamp\www\background.php on line 3 Call Stack: 0.0002 322792 1. {main}() C:\wamp\www\background.php:0 By searching in in the internet I found some solutions, and made changes as recommended below in php.ini, uncommented, extension=php_pdo_pgsql.dll, uncommented, extension=php_pgsql.dll, uncommented, extension_dir = "c:/wamp/bin/php/php5.3.5/ext/", also I do have php_pdo_pgsql.dll and php_pgsql.dll files in c:/wamp/bin/php/php5.3.5/ext/ folder. Any suggestions are appreciated. php windows wamp share|improve this question edited Feb 13 '13 at 8:20 Spontifixus 4,61872341 asked Feb 13 '13 at 8:07 Shashidhar Gr 1451314 4 do you enable this extensions in php.ini and restart server ?) –BattleBit Feb 13 '13 at 8:09 yes Mr.BattleBit. i enabled. but same error. –Shashidhar Gr Feb 13 '13 at 8:13 in your apache config file put this Loadfile "C:\php\libpq.dll". Also
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more
Codeigniter Call To Undefined Function Pg_connect()
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Call To Undefined Function Pg_connect() Centos
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping php5-pgsql windows each other. Join them; it only takes a minute: Sign up getting Fatal error: Call to undefined function pg_connect up vote 1 down vote favorite I'm developing my first program with php. I searched a lot of forums http://stackoverflow.com/questions/14849010/fatal-error-call-to-undefined-function-pg-connect and about 3 or 4 hours, but got nothing. Here is my index.php code:
program loaded successfully
When I load this page I see this: program loaded successfully no Fatal error: Call to undefined function pg_connect() in D:\courses\web programing\hw2\cinema\index.php on line 9 I installed php-5.4.14-Win32-VC9-x86 on my windows and run my project with this comment: php.exe" -S http://stackoverflow.com/questions/16061517/getting-fatal-error-call-to-undefined-function-pg-connect localhost:80 -t "D:\courses\web programing\hw2\cinema" I have php.ini-development and php.ini-production in php folder and Uncommented extension=php_pgsql.dll, extension=php_pdo_pgsql.dll in both files. I'm using postgresql 9.2 So where is my mistake? php postgresql share|improve this question edited Apr 17 '13 at 15:05 asked Apr 17 '13 at 13:34 amir.sh 58312 do phpinfo() and check out what is the .ini file you should edit. –gmaliar Apr 17 '13 at 13:38 Hmm it tell me this:Configuration File (php.ini) Path C:\Windows . but I have no php.ini in Windows folder –amir.sh Apr 17 '13 at 13:40 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote postgreSQL should be activates in the php.ini to activate these functions. share|improve this answer answered Apr 17 '13 at 13:37 Simon 12629 how to activate postgreSQL in my php.ini? (and I don't have any php.ini as i said) –amir.sh Apr 17 '13 at 13:41 add a comment| up vote 0 down vote accepted Solved It's wired but the problem was that php try to load php.ini from Windows folder and no php.ini exist there. So I copied one of my php.ini files in Windows folder and problem solved. It seems like a bug. share|improve this answer answered Apr 17 '13 at 15:06 amir.sh 58312 add a comment| Your Answer draft saved draft discarded Sign up or logpgsql-announce pgsql-bugs pgsql-docs pgsql-general pgsql-interfaces pgsql-jobs pgsql-novice pgsql-performance pgsql-php https://www.postgresql.org/message-id/4cb3dbb70602022015p38d6127aj@mail.gmail.com pgsql-sql pgsql-students Developer lists Regional lists Associations User groups Project lists Inactive lists IRC Local User Groups Featured Users International https://bytes.com/topic/apache/answers/835863-fatal-error-call-undefined-function-pg_connect Sites Propaganda Resources Weekly News php and postgresql on windows From: Przemek Kowalczyk
Ask a Question Need help? Post your question and get tips & solutions from a community of 418,550 IT Pros & Developers. It's quick & easy. Fatal error: Call to undefined function pg_connect() in 100+ P: 274 creative1 I get following error: Fatal error: Call to undefined function pg_connect() in C:\www\desiorb.dev\public_html\httpdocs\index.php on line 18 said line is to connect to postres pg_Connect.... I also want to tell that: I am setting up virtual host on my computer, apache works for projects that don't have database support. I uncomment php.ini file for postgres. Apache runs fine there is no error. I have right user name and password entered i am sure about that part. I re-installed postgres to make sure it works. I started the database. I can see databse conenctivtivity in pgAdmin any other suggestions? Thanks in advance. Sep 5 '08 #1 Post Reply Share this Question 2 Replies Expert 5K+ P: 5,058 Atli Hi. This happens when the PostgreSQL module is missing. Make sure that you uncomment / create the extension line in you php.ini. Like: Expand|Select|Wrap|Line Numbers extension=pgsql.so;ForUnix extension=pgsql.dll;ForWindows Also, make sure that the file actually exist in the directory specified by the extension_dir directive. You can look for the PostgreSQL info in the phpinfo() output to see if it has been loaded properly. If you can't find it, it hasn't been loaded. Sep 11 '08 #2 reply 100+ P: 274 creative1 thanks, I actually I was wrong in specifying version number for the php I have installed. I fixed it . Regards Oct 27 '08 #3 reply Message Cancel Changes Post your reply Join Now >> Sign in to post your reply or Sign up for a free account. Similar topics Fatal error: Call to undefined function pg_connect() Fatal error: Call to undefined function fe() Upgarding php4 to php5 l