I have a postgresql database on an OpenBSD 3.3 machine.
On that machine I have php and apache installed as well:
paris# pkg_info
openmotif-2.1.30.5 Motif toolkit
openmotif-demos-2.1.30.5 Motif toolkit demos
enscript-1.6.3-a4 convert ASCII files to PostScript
jpeg-6b IJG's JPEG compression utilities
libungif-4.1.0b1 tools and library routines for working with GIF images
png-1.2.5p1 library for manipulating PNG images
tiff-3.5.7 tools and library routines for working with TIFF images
freetype-1.3.1 free and portable TrueType font rendering engine
freetype-doc-1.3.1 documentation for FreeType
tcl-8.3.5 Tool Command Language
tk-8.3.5 graphical toolkit for Tcl
postgresql-7.3.2 PostgreSQL RDBMS
postgresql-docs-7.3.2 PostgreSQL RDBMS documentation
libiconv-1.8 character set conversion library
gettext-0.10.40p1 GNU gettext
gmake-3.80 GNU make
recode-3.6 convert files between character sets and usages
php4-core-4.2.3p1 server-side HTML-embedded scripting language
php4-extensions-4.2.3 informational package about PHP4 extensions
php4-pear-4.2.3 collection of base classes for common PHP tasks
php4-pgsql-4.2.3 pgsql database access extensions for php4
pdflib-4.0.3 C library to produce PDF files
php4-pdf-4.2.3 pdf viewing and creation extensions for php4
bzip2-1.0.2 block-sorting file compressor, unencumbered
autoconf-2.13p0 automatically configure source code on many Un*x platforms
autoconf-2.52p0 automatically configure source code on many Un*x platforms
gd-1.8.3 graphics library for fast PNG creation
tcsh-6.12.00 extended C-shell with many useful features
bash-2.05b GNU Bourne Again Shell
Next to this machine I have a Linux RedHat 9 workstation with Apache 2 running.
I have installed phpPgAdmin on both machines and configured the config file to reach my database on The OpenBSD station. To check phpPgAdmin I use mozilla on the Linux station and I browse the directory where phpPgAdmin is installed, on the Linux machine (server 1, Apache 2.0) and on the OpenBSD machine (server 2, Apache 1.3)
On the RH Linux machine it works perfectly. I can login and browse the database without any single problem.
On OpenBSD I can't... First of all, phpPgAdmi does not appear automagically as it does on the Linux server and when I click on a php file to access a function, it keeps on asking me the login and the passwd (they are accepted and validated but still, asked over and over again...).
Has any one seen this before? Where the problem can come from? Not from the database in itself coz it's validated by the Linux test. Can it be a hidden swith of OpenBSD, Apache 1.3 on OpenBSD?
Any help greatly appreciated
Daniel Tourde (ted@foi.se)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sounds like maybe your Apache config on your OpenBSD machine is a bit screwy. If you get a list of PHP files instead of phpPgAdmin, then your Apache isn't recognising index.php files as the default document.
Try checking your logs for apache and postgresql to see if they are logging any errors. PostgreSQL in particular will log the reason you cannot log in.
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer. I suspect as you said a configuration problem in either php.ini or httpd.conf. Somewhere but where?...
I looked in the apache error file. And here is what I found:
If, in my browser I type explicitely: http://paris.foi.se/phpPgAdmin/index.php
and if I look in /home/www/logs/error_log (Apache error log), I can read:
[Fri Oct 17 11:36:32 2003] [error] PHP Warning: open(/tmp/sess_7eb3af36d4f5b99c4833685570ce6654, O_RDWR) failed: No such file or directory (2) in /htdocs/phpPgAdmin/libraries/lib.inc.php on line 77
[Fri Oct 17 11:36:32 2003] [error] PHP Warning: open(/tmp/sess_7eb3af36d4f5b99c4833685570ce6654, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
[Fri Oct 17 11:36:32 2003] [error] PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
Which is strange cause session.save_path is correctly set to /tmp (I checked). On my Linux box I have indeed this sess_xxxx file created but it never appears on the OpenBSD box. This might explain why the system keeps on asking me the login and passwd to access the database and why php scripts interact so badly with each others. However, it still does not explain why it does not look for index.php automatically.
I found nowhere in php.ini or httpd.conf a reference to an index.php
Any idea?
Daniel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found the solution to the second problem:
In php.ini, session.save_path = /tmp
refers to /var/www/tmp, not /tmp ... This was tricky...
The directory does not exist by default. I had to create one...
Now everything works perfectly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I have a postgresql database on an OpenBSD 3.3 machine.
On that machine I have php and apache installed as well:
paris# pkg_info
openmotif-2.1.30.5 Motif toolkit
openmotif-demos-2.1.30.5 Motif toolkit demos
enscript-1.6.3-a4 convert ASCII files to PostScript
jpeg-6b IJG's JPEG compression utilities
libungif-4.1.0b1 tools and library routines for working with GIF images
png-1.2.5p1 library for manipulating PNG images
tiff-3.5.7 tools and library routines for working with TIFF images
freetype-1.3.1 free and portable TrueType font rendering engine
freetype-doc-1.3.1 documentation for FreeType
tcl-8.3.5 Tool Command Language
tk-8.3.5 graphical toolkit for Tcl
postgresql-7.3.2 PostgreSQL RDBMS
postgresql-docs-7.3.2 PostgreSQL RDBMS documentation
libiconv-1.8 character set conversion library
gettext-0.10.40p1 GNU gettext
gmake-3.80 GNU make
recode-3.6 convert files between character sets and usages
php4-core-4.2.3p1 server-side HTML-embedded scripting language
php4-extensions-4.2.3 informational package about PHP4 extensions
php4-pear-4.2.3 collection of base classes for common PHP tasks
php4-pgsql-4.2.3 pgsql database access extensions for php4
pdflib-4.0.3 C library to produce PDF files
php4-pdf-4.2.3 pdf viewing and creation extensions for php4
bzip2-1.0.2 block-sorting file compressor, unencumbered
autoconf-2.13p0 automatically configure source code on many Un*x platforms
autoconf-2.52p0 automatically configure source code on many Un*x platforms
gd-1.8.3 graphics library for fast PNG creation
tcsh-6.12.00 extended C-shell with many useful features
bash-2.05b GNU Bourne Again Shell
Next to this machine I have a Linux RedHat 9 workstation with Apache 2 running.
I have installed phpPgAdmin on both machines and configured the config file to reach my database on The OpenBSD station. To check phpPgAdmin I use mozilla on the Linux station and I browse the directory where phpPgAdmin is installed, on the Linux machine (server 1, Apache 2.0) and on the OpenBSD machine (server 2, Apache 1.3)
On the RH Linux machine it works perfectly. I can login and browse the database without any single problem.
On OpenBSD I can't... First of all, phpPgAdmi does not appear automagically as it does on the Linux server and when I click on a php file to access a function, it keeps on asking me the login and the passwd (they are accepted and validated but still, asked over and over again...).
Has any one seen this before? Where the problem can come from? Not from the database in itself coz it's validated by the Linux test. Can it be a hidden swith of OpenBSD, Apache 1.3 on OpenBSD?
Any help greatly appreciated
Daniel Tourde (ted@foi.se)
Hi,
Sounds like maybe your Apache config on your OpenBSD machine is a bit screwy. If you get a list of PHP files instead of phpPgAdmin, then your Apache isn't recognising index.php files as the default document.
Try checking your logs for apache and postgresql to see if they are logging any errors. PostgreSQL in particular will log the reason you cannot log in.
Chris
Hello Christopher,
Thanks for your answer. I suspect as you said a configuration problem in either php.ini or httpd.conf. Somewhere but where?...
I looked in the apache error file. And here is what I found:
If, in my browser I type explicitely:
http://paris.foi.se/phpPgAdmin/index.php
and if I look in /home/www/logs/error_log (Apache error log), I can read:
[Fri Oct 17 11:36:32 2003] [error] PHP Warning: open(/tmp/sess_7eb3af36d4f5b99c4833685570ce6654, O_RDWR) failed: No such file or directory (2) in /htdocs/phpPgAdmin/libraries/lib.inc.php on line 77
[Fri Oct 17 11:36:32 2003] [error] PHP Warning: open(/tmp/sess_7eb3af36d4f5b99c4833685570ce6654, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
[Fri Oct 17 11:36:32 2003] [error] PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
Which is strange cause session.save_path is correctly set to /tmp (I checked). On my Linux box I have indeed this sess_xxxx file created but it never appears on the OpenBSD box. This might explain why the system keeps on asking me the login and passwd to access the database and why php scripts interact so badly with each others. However, it still does not explain why it does not look for index.php automatically.
I found nowhere in php.ini or httpd.conf a reference to an index.php
Any idea?
Daniel
I finally found why the index.php file was not started automatically. It has to do with httpd.conf
By default on OpenBSD, we get:
paris# grep DirectoryIndex httpd.conf.org
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
DirectoryIndex index.html
It should be modified as follows:
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
DirectoryIndex index.html index.php
Daniel
I found the solution to the second problem:
In php.ini, session.save_path = /tmp
refers to /var/www/tmp, not /tmp ... This was tricky...
The directory does not exist by default. I had to create one...
Now everything works perfectly.