Running Postgresql 7.4 under windows using cygwin
PHP Version 4.1.2
Apache 1.3.12 (Win32)
phpPgAdmin 3.3.1
1. Successfully created a database (called testx) & tables with pqsql
2. Edited phpPgAdmin/conf/config.inc.php
$conf['servers'][0]['desc'] = 'PostgreSQL';
$conf['servers'][0]['host'] = '127.0.0.1'; (Also tried localhost and '' )
$conf['servers'][0]['port'] = 5432;
$conf['servers'][0]['defaultdb'] = 'testx';
3. pg_hba.conf file is
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
4. Edited libraries/lib.inc.php to echo comments as it progressed through script. Display of global variables appeared OK but not finding /connecting to database
5. Edited misc.php (and other scripts) to hardcode database testx but still failing. Expecting $_REQUEST['database']
6. Ran database.php only with hardcoded database but still failing. Login failed gives me no error message to help pinpoint the problem
7. browser.php will display the 2 databases I have created OK but if I click on one it displays the login screen
8.index.php runs OK but requests login on the browser frame and the main database frame. Continually reverts to login page.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's the configuration I use. I notice you have to use 127.0.0.1 IIRC since windows doesn't do the unix socket properly.
> 6. Ran database.php only with hardcoded database but still failing. Login failed
> gives me no error message to help pinpoint the problem
No, we consider it a security hole.
> 7. browser.php will display the 2 databases I have created OK but if I click
> on one it displays the login screen
How can you get the browser up if you can't login?
> 8.index.php runs OK but requests login on the browser frame and the main database
> frame. Continually reverts to login page.
Do you have cookies set up correctly? I notice windows seems to have difficulty in non-cookie mode. Set the session.save_path in your php.ini to c:\windows\temp and make sure your browser accepts cookies.
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much for your prompt reply. Unfortunately I stll have no luck...
1. How do you run postmaster? Try running it on the cygwin commandline like this:
/usr/bin/postmaster -D /usr/local/pgsql/data
Gave same result as usual way: postmaster -D /usr/local/pgsql/data
& gave database system is ready. Will also provide log messages
That's the configuration I use. I notice you have to use 127.0.0.1 IIRC since windows doesn't do the unix socket properly.
jwm - also created dirs & specific paths for:
$conf['servers'][0]['pg_dump_path'] = 'c:/cygwin//usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = 'c:/cygwin//usr/bin/pg_dumpall';
> 7. browser.php will display the 2 databases I have created OK but if I click
> on one it displays the login screen
How can you get the browser up if you can't login?
jwm http://localhost/phpPgAdmin/index.php gave split screen each with a login screen
entering the correct login gave the list of databases for browser.php in the left hand window
entering the correct login gave the welcome page for database.php with error
Warning: Undefined index: database in c:\apache\htdocs\phppgadmin\classes\Misc.php on line 285. The links from the navigation bar were missing the database eg Schemas gave phpPgAdmin/database.php?database=
clicking on one of the databases listed in the browser.php window reverted to the login screen in hte browser window
clicking on Create Schemas reverted to the login screen in the database window
Do you have cookies set up correctly? I notice windows seems to have difficulty in non-cookie mode. Set the session.save_path in your php.ini to c:\windows\temp and make sure your browser accepts cookies.
jwm
1.session.save_path=c:\windows\temp - already set
2. In IE6 Browser Tools>Internet>Privacy >advanced Privacy Settings ticked 'Always allow session cookies' & prompt for others
3. Set Browser privacy and security to LOW
3. In Firewall permitted ingoing and outgoing packages for postgresql.exe
4. I just want to run phpPgAdmin on my local hard drive for development so .. Turning off the firewall completely - made no difference
5. I can run phpMyAdmin successfully.
Thank you for your assistance. Any further suggestions greatly appreciated
JWM
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1. How do you run postmaster? Try running it on the cygwin commandline like this:
/usr/bin/postmaster -D /usr/local/pgsql/data
same result as usual way: postmaster -D /usr/local/pgsql/data
& gave database system is ready. Will also provide log messages
That's the configuration I use. I notice you have to use 127.0.0.1 IIRC since windows doesn't do the unix socket properly.
jwm - also created dirs & specific paths for:
$conf['servers'][0]['pg_dump_path'] = 'c:/cygwin//usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = 'c:/cygwin//usr/bin/pg_dumpall';
How can you get the browser up if you can't login?
jwm http://localhost/phpPgAdmin/index.php gave split screen each with a login screen
entering the correct login gave the list of databases for browser.php in the left hand window
entering the correct login gave the welcome page for database.php with error
Warning: Undefined index: database in c:\apache\htdocs\phppgadmin\classes\Misc.php on line 285. The links from the navigation bar were missing the database eg Schemas gave phpPgAdmin/database.php?database=
clicking on one of the databases listed in the browser.php window reverted to the login screen in hte browser window
clicking on Create Schemas reverted to the login screen in the database window
> 8.index.php runs OK but requests login on the browser frame and the main database
> frame. Continually reverts to login page.
Do you have cookies set up correctly? I notice windows seems to have difficulty in non-cookie mode. Set the session.save_path in your php.ini to c:\windows\temp and make sure your browser accepts cookies.
jwm
1.session.save_path=c:\windows\temp - already set
2. In IE6 Browser Tools>Internet>Privacy >advanced Privacy Settings ticked 'Always allow session cookies' & prompt for others
3. Set Browser privacy and security to LOW
3. In Firewall permitted ingoing and outgoing packages for postgresql.exe
4. I just want to run phpPgAdmin on my local hard drive for development so .. Turning off the firewall completely - made no difference
5. I can run phpMyAdmin successfully.
Thank you for your assistance. Any further help greatly appreciated.
JWM
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I read this on the PostgreSQL Doc-Site
16.3.2. Client Connection Problems (http://www.postgresql.org/docs/7.4/interactive/postmaster-start.html#CLIENT-CONNECTION-PROBLEMS)
Although the error conditions possible on the client side are quite varied and application-dependent, a few of them might be directly related to how the server was started up. Conditions other than those shown below should be documented with the respective client application.
psql: could not connect to server: Connection refused
Is the server running on host "server.joe.com" and accepting
TCP/IP connections on port 5432?
This is the generic "I couldn't find a server to talk to" failure. It looks like the above when TCP/IP communication is attempted. A common mistake is to forget to configure the server to allow TCP/IP connections.
-----------------------------
After tha i configured my postgresql.conf (located in /usr/local/pgsql/data), and added the following lines:
tcpip_socket = true
port = 5432
By default these values are commented out.
I hope i could get some help.
Greetz
David from Germany
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Running Postgresql 7.4 under windows using cygwin
PHP Version 4.1.2
Apache 1.3.12 (Win32)
phpPgAdmin 3.3.1
1. Successfully created a database (called testx) & tables with pqsql
2. Edited phpPgAdmin/conf/config.inc.php
$conf['servers'][0]['desc'] = 'PostgreSQL';
$conf['servers'][0]['host'] = '127.0.0.1'; (Also tried localhost and '' )
$conf['servers'][0]['port'] = 5432;
$conf['servers'][0]['defaultdb'] = 'testx';
3. pg_hba.conf file is
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
4. Edited libraries/lib.inc.php to echo comments as it progressed through script. Display of global variables appeared OK but not finding /connecting to database
5. Edited misc.php (and other scripts) to hardcode database testx but still failing. Expecting $_REQUEST['database']
6. Ran database.php only with hardcoded database but still failing. Login failed gives me no error message to help pinpoint the problem
7. browser.php will display the 2 databases I have created OK but if I click on one it displays the login screen
8.index.php runs OK but requests login on the browser frame and the main database frame. Continually reverts to login page.
.. and yes I have turned off extra_login_security" in /conf/config.inc.php
> 1. Successfully created a database (called testx) & tables with pqsql
How do you run postmaster? Try running it on the cygwin commandline like this:
/usr/bin/postmaster -D /usr/local/pgsql/data
(changing paths to match your setup)
That will show you the log of any problems that the postmaster has. Try logging in via phpPgAdmin and see if you get any more information.
> 2. Edited phpPgAdmin/conf/config.inc.php
> $conf['servers'][0]['desc'] = 'PostgreSQL';
> $conf['servers'][0]['host'] = '127.0.0.1'; (Also tried localhost and '' )
> $conf['servers'][0]['port'] = 5432;
> $conf['servers'][0]['defaultdb'] = 'testx';
That's the configuration I use. I notice you have to use 127.0.0.1 IIRC since windows doesn't do the unix socket properly.
> 6. Ran database.php only with hardcoded database but still failing. Login failed
> gives me no error message to help pinpoint the problem
No, we consider it a security hole.
> 7. browser.php will display the 2 databases I have created OK but if I click
> on one it displays the login screen
How can you get the browser up if you can't login?
> 8.index.php runs OK but requests login on the browser frame and the main database
> frame. Continually reverts to login page.
Do you have cookies set up correctly? I notice windows seems to have difficulty in non-cookie mode. Set the session.save_path in your php.ini to c:\windows\temp and make sure your browser accepts cookies.
Chris
Thank you very much for your prompt reply. Unfortunately I stll have no luck...
1. How do you run postmaster? Try running it on the cygwin commandline like this:
/usr/bin/postmaster -D /usr/local/pgsql/data
Gave same result as usual way: postmaster -D /usr/local/pgsql/data
& gave database system is ready. Will also provide log messages
> 2. Edited phpPgAdmin/conf/config.inc.php
> $conf['servers'][0]['desc'] = 'PostgreSQL';
> $conf['servers'][0]['host'] = '127.0.0.1'; (Also tried localhost and '' )
> $conf['servers'][0]['port'] = 5432;
> $conf['servers'][0]['defaultdb'] = 'testx';
That's the configuration I use. I notice you have to use 127.0.0.1 IIRC since windows doesn't do the unix socket properly.
jwm - also created dirs & specific paths for:
$conf['servers'][0]['pg_dump_path'] = 'c:/cygwin//usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = 'c:/cygwin//usr/bin/pg_dumpall';
> 7. browser.php will display the 2 databases I have created OK but if I click
> on one it displays the login screen
How can you get the browser up if you can't login?
jwm
http://localhost/phpPgAdmin/index.php gave split screen each with a login screen
entering the correct login gave the list of databases for browser.php in the left hand window
entering the correct login gave the welcome page for database.php with error
Warning: Undefined index: database in c:\apache\htdocs\phppgadmin\classes\Misc.php on line 285. The links from the navigation bar were missing the database eg Schemas gave phpPgAdmin/database.php?database=
clicking on one of the databases listed in the browser.php window reverted to the login screen in hte browser window
clicking on Create Schemas reverted to the login screen in the database window
Do you have cookies set up correctly? I notice windows seems to have difficulty in non-cookie mode. Set the session.save_path in your php.ini to c:\windows\temp and make sure your browser accepts cookies.
jwm
1.session.save_path=c:\windows\temp - already set
2. In IE6 Browser Tools>Internet>Privacy >advanced Privacy Settings ticked 'Always allow session cookies' & prompt for others
3. Set Browser privacy and security to LOW
3. In Firewall permitted ingoing and outgoing packages for postgresql.exe
4. I just want to run phpPgAdmin on my local hard drive for development so .. Turning off the firewall completely - made no difference
5. I can run phpMyAdmin successfully.
Thank you for your assistance. Any further suggestions greatly appreciated
JWM
1. How do you run postmaster? Try running it on the cygwin commandline like this:
/usr/bin/postmaster -D /usr/local/pgsql/data
same result as usual way: postmaster -D /usr/local/pgsql/data
& gave database system is ready. Will also provide log messages
> 2. Edited phpPgAdmin/conf/config.inc.php
> $conf['servers'][0]['desc'] = 'PostgreSQL';
> $conf['servers'][0]['host'] = '127.0.0.1'; (Also tried localhost and '' )
> $conf['servers'][0]['port'] = 5432;
> $conf['servers'][0]['defaultdb'] = 'testx';
That's the configuration I use. I notice you have to use 127.0.0.1 IIRC since windows doesn't do the unix socket properly.
jwm - also created dirs & specific paths for:
$conf['servers'][0]['pg_dump_path'] = 'c:/cygwin//usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = 'c:/cygwin//usr/bin/pg_dumpall';
How can you get the browser up if you can't login?
jwm
http://localhost/phpPgAdmin/index.php gave split screen each with a login screen
entering the correct login gave the list of databases for browser.php in the left hand window
entering the correct login gave the welcome page for database.php with error
Warning: Undefined index: database in c:\apache\htdocs\phppgadmin\classes\Misc.php on line 285. The links from the navigation bar were missing the database eg Schemas gave phpPgAdmin/database.php?database=
clicking on one of the databases listed in the browser.php window reverted to the login screen in hte browser window
clicking on Create Schemas reverted to the login screen in the database window
> 8.index.php runs OK but requests login on the browser frame and the main database
> frame. Continually reverts to login page.
Do you have cookies set up correctly? I notice windows seems to have difficulty in non-cookie mode. Set the session.save_path in your php.ini to c:\windows\temp and make sure your browser accepts cookies.
jwm
1.session.save_path=c:\windows\temp - already set
2. In IE6 Browser Tools>Internet>Privacy >advanced Privacy Settings ticked 'Always allow session cookies' & prompt for others
3. Set Browser privacy and security to LOW
3. In Firewall permitted ingoing and outgoing packages for postgresql.exe
4. I just want to run phpPgAdmin on my local hard drive for development so .. Turning off the firewall completely - made no difference
5. I can run phpMyAdmin successfully.
Thank you for your assistance. Any further help greatly appreciated.
JWM
i use debian sarge, phppgadmin 3.5.1 pqsql 7.4
i edited file /etc/postgresql/postmaster.conf
line 30.1
origin>>> POSTMASTER_OPTIONS = ''
edited>>> POSTMASTER_OPTIONS = '-i'
and then restart postgresql
/etc/init.d/postgresql restart
type ps -ef
u should see postmaster runs with -i
u can login via phppqadmin
ok
I had the Same problem.
I read this on the PostgreSQL Doc-Site
16.3.2. Client Connection Problems (http://www.postgresql.org/docs/7.4/interactive/postmaster-start.html#CLIENT-CONNECTION-PROBLEMS)
Although the error conditions possible on the client side are quite varied and application-dependent, a few of them might be directly related to how the server was started up. Conditions other than those shown below should be documented with the respective client application.
psql: could not connect to server: Connection refused
Is the server running on host "server.joe.com" and accepting
TCP/IP connections on port 5432?
This is the generic "I couldn't find a server to talk to" failure. It looks like the above when TCP/IP communication is attempted. A common mistake is to forget to configure the server to allow TCP/IP connections.
-----------------------------
After tha i configured my postgresql.conf (located in /usr/local/pgsql/data), and added the following lines:
tcpip_socket = true
port = 5432
By default these values are commented out.
I hope i could get some help.
Greetz
David from Germany