"administration" link doesn't work

BASE-user
Sameer
2008-07-17
2013-06-03
  • Sameer
    Sameer
    2008-07-17

    i just got an openbsd 4.3 system up and running with snort/mysql/base based (no pun intended) on the following howto: http://parvinderbhasin.blogspot.com/. 

    while the instructions weren't complete, i did some tinkering and got the system to produce a screen for BASE.  i was poking around the different links and all the links i navigated worked except for one - the administration link.

    this is the error i get:

    ----------
    Error loading the DB Abstraction library:  from "../adodb/adodb.inc.php"

    Check the DB abstraction library variable $DBlib_path in base_conf.php

    The underlying database library currently used is ADODB, that can be downloaded at http://adodb.sourceforge.net/
    ----------

    $DBlib_path points to the proper place.  i assume nothing else would work if it didn't, but either way, that's exactly where the file sits.

    any suggestions on a solution?

     
    • Hello Sameer,

      please try an absolute path rather than a relative path in base_conf.php.

      Something like /var/www/html/adodb rather than ../adodb

      Bye, bye

      Juergen

       
    • Sameer
      Sameer
      2008-07-20

      hi,

      thank you for your response.  i should have mentioned this earlier, so i apologize in advance.

      i did try the absolute path vs. the relative path.  i tried this potential solution after googling this error.

      unfortunately, this doesn't work.  worse, it seems to cause more problems.  when i use the absolute path name, NOTHING works.  at least with the relative path name, everything except for the administration link works.

       
      • Micah Gersten
        Micah Gersten
        2008-07-20

        You need to make sure that the web user has read permissions for the adodb directory.

        Micah

         
    • drwxr-xr-x  13 root  daemon   1024 Jul 17 05:29 adodb4990
      drwxr-xr-x  13 root  daemon   1536 Jul 17 23:13 adodb505

      "other" has read permissions.  these permissions outta' be good enough right?

       
      • Micah Gersten
        Micah Gersten
        2008-07-21

        Those permissions should be fine.  But according to your first post, you are looking in a
        directory names adodb.  If you make sure you have the proper directory name, it should work.

        Micah

        -----------
        RE: "administration" link doesn't work (New)
        By: xyyz twothousand (xyyz2000) - 2008-07-21 13:02
        drwxr-xr-x 13 root daemon 1024 Jul 17 05:29 adodb4990
        drwxr-xr-x 13 root daemon 1536 Jul 17 23:13 adodb505

        "other" has read permissions. these permissions outta' be good enough right?

         
    • thanks for the response.

      sorry for the inconsistencies.  i'm trying different options while waiting for these responses, and i don't always reflect/update the post with what i tried.

      as to why there are two versions of adodb, i thought it might be an issue with the adodb505, so i downloaded adodb4990 to see if the same problems existed; unfortunately, they did.

      i'm redirecting to the adodb505 directory.  here's what the error looks like right now:

      -------
      Error loading the DB Abstraction library:  from "../adodb505/adodb.inc.php"

      Check the DB abstraction library variable $DBlib_path in base_conf.php

      The underlying database library currently used is ADODB, that can be downloaded at http://adodb.sourceforge.net/
      -------

      here's the line in base_conf.php:

      ------
      $DBlib_path = '../adodb505';
      ------

      remember, the absolute path seems to break everything, which is why i used the relative path.

      and again, here are the permissions:

      ------
      drwxr-xr-x  13 root  daemon   1024 Jul 17 05:29 adodb4990
      drwxr-xr-x  13 root  daemon   1536 Jul 17 23:13 adodb505
      ------

      any suggestions on what i outta' do now?

       
    • Kevin Johnson
      Kevin Johnson
      2008-07-22

      We need to troubleshoot the absolute path.  The relative will not work as the page you are going to is one deeper in the tree.

      Can you reset the path to an absolute and report the error you get?

      Thanks
      Kevin

       
    • thanks for the help.

      alright, i'm going to change the relative path to the absolute path.  everything else, permissions, etc. will remain unchanged.

      the current base_conf.php: $DBlib_path = '../adodb505';

      is now changed to: $DBlib_path = '/var/www/htdocs/base/adodb505';

      here is the first error when i go to the default webpage: http://192.168.100.229/base/base_main.php

      -------
      Error loading the DB Abstraction library:  from "/var/www/htdocs/base/adodb505/adodb.inc.php"

      Check the DB abstraction library variable $DBlib_path in base_conf.php

      The underlying database library currently used is ADODB, that can be downloaded at http://adodb.sourceforge.net/
      -------

      another error when navigating to: http://192.168.100.229/base/admin/index.php

      -------
      Error loading the DB Abstraction library:  from "/var/www/htdocs/base/adodb505/adodb.inc.php"

      Check the DB abstraction library variable $DBlib_path in base_conf.php

      The underlying database library currently used is ADODB, that can be downloaded at http://adodb.sourceforge.net/
      -------

      it's the same error message no matter where i navigate.

      i don't know if the following will help, but below are permissions in certain directories.

      here are the permissions of the base/ contents:

      # ls -la
      total 2836
      drwxr-xrwx  14 root  daemon    1536 Jul 18 00:01 .
      drwxr-xr-x   7 root  daemon     512 Jul 18 00:06 ..
      -rw-r--r--   1 root  daemon   13352 Jul 17 22:12 1
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:51 admin
      -rw-r--r--   1 root  daemon    3593 Apr 25 15:51 base_ag_common.php
      -rw-r--r--   1 root  daemon   13446 Apr 25 15:51 base_ag_main.php
      -rw-r--r--   1 root  daemon   33625 Apr 25 15:51 base_common.php
      -rw-r--r--   1 root  daemon   13373 Jul 22 17:53 base_conf.php
      -rw-r--r--   1 root  daemon   13344 Apr 25 15:51 base_conf.php.dist
      -rw-r--r--   1 root  daemon    6662 Apr 25 15:51 base_db_common.php
      -rw-r--r--   1 root  daemon    2893 Apr 25 15:51 base_db_setup.php
      -rw-r--r--   1 root  daemon    1574 Apr 25 15:51 base_denied.php
      -rw-r--r--   1 root  daemon    1870 Apr 25 15:51 base_footer.php
      -rw-r--r--   1 root  daemon   29421 Apr 25 15:51 base_graph_common.php
      -rw-r--r--   1 root  daemon   23407 Apr 25 15:51 base_graph_display.php
      -rw-r--r--   1 root  daemon   14801 Apr 25 15:51 base_graph_form.php
      -rw-r--r--   1 root  daemon   20263 Apr 25 15:51 base_graph_main.php
      -rw-r--r--   1 root  daemon     119 Apr 25 15:51 base_hdr1.php
      -rw-r--r--   1 root  daemon     596 Apr 25 15:51 base_hdr2.php
      -rw-r--r--   1 root  daemon     973 Apr 25 15:51 base_logout.php
      -rw-r--r--   1 root  daemon  264782 Apr 25 15:51 base_mac_prefixes.map
      -rw-r--r--   1 root  daemon   14830 Apr 25 15:51 base_main.php
      -rw-r--r--   1 root  daemon    9572 Apr 25 15:51 base_maintenance.php
      -rw-r--r--   1 root  daemon   16323 Apr 25 15:51 base_payload.php
      -rw-r--r--   1 root  daemon   36567 Apr 25 15:51 base_qry_alert.php
      -rw-r--r--   1 root  daemon   31713 Apr 25 15:51 base_qry_common.php
      -rw-r--r--   1 root  daemon    9676 Apr 25 15:51 base_qry_form.php
      -rw-r--r--   1 root  daemon    8505 Apr 25 15:51 base_qry_main.php
      -rw-r--r--   1 root  daemon   11084 Apr 25 15:51 base_qry_sqlcalls.php
      -rw-r--r--   1 root  daemon   13201 Apr 25 15:51 base_stat_alerts.php
      -rw-r--r--   1 root  daemon    8490 Apr 25 15:51 base_stat_class.php
      -rw-r--r--   1 root  daemon   17538 Apr 25 15:51 base_stat_common.php
      -rw-r--r--   1 root  daemon   12453 Apr 25 15:51 base_stat_ipaddr.php
      -rw-r--r--   1 root  daemon    7854 Apr 25 15:51 base_stat_iplink.php
      -rw-r--r--   1 root  daemon   11179 Apr 25 15:51 base_stat_ports.php
      -rw-r--r--   1 root  daemon    7086 Apr 25 15:51 base_stat_sensor.php
      -rw-r--r--   1 root  daemon   14674 Apr 25 15:51 base_stat_time.php
      -rw-r--r--   1 root  daemon    9463 Apr 25 15:51 base_stat_uaddr.php
      -rw-r--r--   1 root  daemon    4752 Apr 25 15:51 base_user.php
      drwxr-xr-x   3 root  daemon     512 Apr 25 15:51 contrib
      drwxr-xr-x   3 root  daemon     512 Apr 25 15:51 docs
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:52 help
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:52 images
      drwxr-xr-x   2 root  daemon    1024 Apr 25 15:52 includes
      -rw-r--r--   1 root  daemon    3239 Apr 25 15:51 index.php
      drwxr-xr-x   2 root  daemon    1024 Apr 25 15:54 languages
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:54 scripts
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:54 setup
      drwxr-xr-x   2 root  daemon  269824 Jul 17 05:57 signatures
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:54 sql
      drwxr-xr-x   2 root  daemon     512 Apr 25 15:55 styles
      -rw-r--r--   1 root  daemon  313941 Apr 25 15:51 world_map6.png
      -rw-r--r--   1 root  daemon   11659 Apr 25 15:51 world_map6.txt

      and here are the permissions of the htdocs/ contents:

      # ls -la
      total 340
      drwxr-xr-x   7 root  daemon    512 Jul 18 00:06 .
      drwxr-xr-x  14 root  daemon    512 Jul 17 05:31 ..
      drwxr-xr-x  13 root  daemon   1024 Jul 17 05:29 adodb4990
      drwxr-xr-x  13 root  daemon   1536 Jul 17 23:13 adodb505
      -r--r--r--   1 root  bin      2326 Mar 12 09:28 apache_pb.gif
      drwxr-xrwx  14 root  daemon   1536 Jul 18 00:01 base
      drwxr-xr-x   2 root  wheel     512 Mar 12 09:28 bgplg
      -r--r--r--   1 root  bin     41318 Mar 12 09:28 blowfish.jpg
      -r--r--r--   1 root  bin      4090 Mar 12 09:28 bsd_small.gif
      -r--r--r--   1 root  bin      2216 Mar 12 09:28 index.html
      -r--r--r--   1 root  bin      5417 Mar 12 09:28 lock.gif
      -r--r--r--   1 root  bin     46246 Mar 12 09:28 logo23.jpg
      -r--r--r--   1 root  bin     35570 Mar 12 09:28 logo24.jpg
      drwxr-xr-x   9 root  daemon   1024 Jul 13 10:29 manual
      -r--r--r--   1 root  bin      3361 Mar 12 09:28 openbsd_pb.gif
      -r--r--r--   1 root  bin      3334 Mar 12 09:28 openbsdpower.gif
      -rw-r--r--   1 root  daemon      2 Jul 17 05:04 phpinfo.php
      -r--r--r--   1 root  bin      2220 Mar 12 09:28 smalltitle.gif

      and here's the permissions of the adodb505/ contents:

      # ls -la
      total 1988
      drwxr-xr-x  13 root  daemon    1536 Jul 17 23:13 .
      drwxr-xr-x   7 root  daemon     512 Jul 18 00:06 ..
      -rw-r--r--   1 root  daemon   17208 Jul 11 01:07 adodb-active-record.inc.php
      -rw-r--r--   1 root  daemon    8443 Jul 11 01:07 adodb-csvlib.inc.php
      -rw-r--r--   1 root  daemon   27270 Jul 11 01:07 adodb-datadict.inc.php
      -rw-r--r--   1 root  daemon    8549 Jul 11 01:07 adodb-error.inc.php
      -rw-r--r--   1 root  daemon    2748 Jul 11 01:07 adodb-errorhandler.inc.php
      -rw-r--r--   1 root  daemon    2274 Jul 11 01:07 adodb-errorpear.inc.php
      -rw-r--r--   1 root  daemon    2214 Jul 11 01:07 adodb-exceptions.inc.php
      -rw-r--r--   1 root  daemon     701 Jul 11 01:07 adodb-iterator.inc.php
      -rw-r--r--   1 root  daemon   35435 Jul 11 01:07 adodb-lib.inc.php
      -rw-r--r--   1 root  daemon   35393 Jan 29 23:09 adodb-lib.inc.php.bak
      -rw-r--r--   1 root  daemon    4216 Jul 11 01:07 adodb-memcache.lib.inc.php
      -rw-r--r--   1 root  daemon    8114 Jul 11 01:07 adodb-pager.inc.php
      -rw-r--r--   1 root  daemon    9568 Jul 11 01:07 adodb-pear.inc.php
      -rw-r--r--   1 root  daemon   31836 Jul 11 01:07 adodb-perf.inc.php
      -rw-r--r--   1 root  daemon     319 Jul 11 01:07 adodb-php4.inc.php
      -rw-r--r--   1 root  daemon   42265 Feb 10 17:20 adodb-time.inc.php
      -rw-r--r--   1 root  daemon   42201 Jan 31 18:39 adodb-time.inc.php.bak
      -rw-r--r--   1 root  daemon   57541 Feb  4  2007 adodb-xmlschema.inc.php
      -rw-r--r--   1 root  daemon   65058 Feb  4  2007 adodb-xmlschema03.inc.php
      -rw-r--r--   1 root  daemon  122080 Jul 11 01:07 adodb.inc.php
      -rw-r--r--   1 root  daemon  122231 May 14 19:26 adodb.inc.php.bak
      drwxr-xr-x   2 root  daemon     512 Jul 17 23:13 contrib
      drwxr-xr-x   2 root  daemon     512 Jul 17 23:13 cute_icons_for_site
      drwxr-xr-x   2 root  daemon     512 Jul 17 23:13 datadict
      drwxr-xr-x   2 root  daemon     512 Jul 17 23:13 docs
      -rw-r--r--   1 root  daemon  239699 Feb 13  2007 docs-adodb.htm.bak
      drwxr-xr-x   2 root  daemon    2048 Jul 17 23:13 drivers
      drwxr-xr-x   2 root  daemon    1024 Jul 17 23:13 lang
      -rw-r--r--   1 root  daemon   26079 Feb  4  2007 license.txt
      drwxr-xr-x   3 root  daemon     512 Jul 17 23:13 pear
      drwxr-xr-x   2 root  daemon     512 Jul 17 23:13 perf
      -rw-r--r--   1 root  daemon    6272 Mar  7 02:45 pivottable.inc.php
      -rw-r--r--   1 root  daemon    1731 Feb  4  2007 readme.txt
      -rw-r--r--   1 root  daemon    1510 Mar  7 02:45 rsfilter.inc.php
      -rw-r--r--   1 root  daemon    2296 Mar  7 02:45 server.php
      drwxr-xr-x   3 root  daemon    1024 Jul 17 23:13 session
      drwxr-xr-x   2 root  daemon    1024 Jul 17 23:13 tests
      -rw-r--r--   1 root  daemon    3372 Jul 11 01:07 toexport.inc.php
      -rw-r--r--   1 root  daemon    5526 Mar  7 02:45 tohtml.inc.php
      -rw-r--r--   1 root  daemon    1453 Feb  4  2007 xmlschema.dtd
      -rw-r--r--   1 root  daemon    1719 Feb  4  2007 xmlschema03.dtd
      drwxr-xr-x   2 root  daemon     512 Jul 17 23:13 xsl

      adodb.inc.php.bak is simply a copy of the original install file.  i tend to make copies of the original configuration file for reference.

       
    • Hello Sameer,

      you have tried a wrong absolute path. Try in base_conf.php this one instead:

      $DBlib_path = '/var/www/htdocs/adodb505';

      And for all of your further tries: Whatever you use as
      an absolute path, please check it before you try and
      load the BASE page, as follows:

      ls -ld /var/www/htdocs/adodb505

      -l is long output format (ell as in Lima, not i as in India),
      -d means just show the directory name (check whether
      this option has the same meaning on openbsd)

      Whenever a message like "No such file or directory" appears,
      then you know, that you have chosen a wrong path and
      you must try something else.

      Bye, bye

      Juergen

       
    • thanks for the reply.  i was getting ready to beat myself with a cane for putting the wrong path in place.

      i entered the RIGHT absolute path (thank you!) and thought the problem solved; unfortunately, that didn't fix the problem either.

      i still get the same error with the absolute path, $DBlib_path = '/var/www/htdocs/adodb505':

      ----------
      Error loading the DB Abstraction library:  from "/var/www/htdocs/adodb505/adodb.inc.php"

      Check the DB abstraction library variable $DBlib_path in base_conf.php

      The underlying database library currently used is ADODB, that can be downloaded at http://adodb.sourceforge.net/
      ----------

      any ideas?

       
    • Hmmm. Could you tell us the output of

      ls -al /var/www/htdocs/adodb505/adodb.inc.php

      If you use SELinux (don't know whether this is available for OpenBSD, though):

      ls -alZ /var/www/htdocs/adodb505/adodb.inc.php

      Or is there a security system like AppArmor running? Or any
      other ACL based system?

      Is "safe_mode" enabled in /etc/php.ini, or whereever php.ini is
      located on your system?

      Which php version do you use?

      And are there any further error messages in the error log of your webserver?

      For example, in /var/log/httpd/error_log

      Bye, bye

      Juergen

       
    • thanks for the reply.

      here's the information you requested:

      ------
      # ls -al /var/www/htdocs/adodb505/adodb.inc.php
      -rw-r--r--  1 root  daemon  122080 Jul 11 01:07 /var/www/htdocs/adodb505/adodb.inc.php
      ------

      i don't know about the -Z option.  google didn't reveal anything either.  if you can tell me what the -Z does, i can try and figure out a comparable OpenBSD option.

      this system has a default OpenBSD 4.3 install.  i didn't do anything to lock the system down or tweak anything.

      these are all packages, including the php ones, installed on the system:

      --------
      # pkg_info
      arc-5.21op0         create & extract files from DOS .ARC files
      autoconf-2.59p1     automatically configure source code on many Un*x platforms
      bash-3.2.33         GNU Bourne Again Shell
      bzip2-1.0.4         block-sorting file compressor, unencumbered
      clamav-0.92.1       virus scanner
      curl-7.17.1         get files from FTP, Gopher, HTTP or HTTPS servers
      gettext-0.16.1      GNU gettext
      gmp-4.2.2           library for arbitrary precision arithmetic
      help2man-1.29p0     GNU help2man
      iodbc-3.52.4p2      ODBC 3.x driver manager
      jpeg-6bp3           IJG's JPEG compression utilities
      lha-1.14i.ac20050924.1 archive files using LZW compression (.lzh files)
      libiconv-1.9.2p5    character set conversion library
      libidn-1.1          internationalized string handling
      libltdl-1.5.22p3    GNU libtool system independent dlopen wrapper
      libtool-1.5.22p14   generic shared library support script
      libxml-2.6.30       XML parsing library
      metaauto-0.7        wrapper for gnu auto*
      mysql-client-5.0.51a multithreaded SQL database (client)
      mysql-server-5.0.51a multithreaded SQL database (server)
      nagios-2.10p0-chroot host and service monitor
      nagios-plugins-1.4.11 nagios base plugins
      nagios-web-2.10-chroot cgis and webpages for nagios
      no-ip-2.1.7         No-IP.com Dynamic DNS client
      p5-DBD-mysql-4.005  MySQL drivers for the Perl DBI
      p5-DBI-1.59         unified perl interface for database access
      p5-Net-Daemon-0.43  extension for portable daemons
      p5-PlRPC-0.2018p0   module for writing rpc servers and clients
      pcre-7.6            perl-compatible regular expression library
      pear-1.5.0p1        base classes for common PHP tasks
      pear-utils-1.5.0p0  utilities for managing pear extensions
      php5-core-5.2.5p2   server-side HTML-embedded scripting language
      php5-gd-5.2.5       image manipulation extensions for php5
      php5-mysql-5.2.5    mysql database access extensions for php5
      php5-odbc-5.2.5     odbc database access extensions for php5
      png-1.2.22          library for manipulating PNG images
      snort-2.8.0.1-mysql highly flexible sniffer/NIDS
      squid-2.6.STABLE18p0-transparent-snmp WWW and FTP proxy cache and accelerator
      t1lib-5.1.0p1       Type 1 rasterizer library for UNIX/X11
      unarj-2.43          extract files from ARJ archives
      unrar-3.78p0        extract, list, and test RAR archives
      unzip-5.52          extract, list & test files in a ZIP archive
      wget-1.10.2p1       retrieve files from the web via HTTP, HTTPS and FTP
      zoo-2.10.1p1        handle the old .ZOO archive format
      -------------

      the safe mode is off in the php.ini file.  (the location btw, /var/www/conf/php.ini)

      ----------
      ;
      ; Safe Mode
      ;
      safe_mode = Off
      ----------

      as for the error_log file(/var/www/logs/error_log), it's full of errors.  here are some of the common ones:

      -----------
      [Wed Jul 23 12:35:54 2008] [error] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: open(/tmp//sess_rps22u6l4jb1uegpr4tcqe4kh2, O_
      RDWR) failed: No such file or directory (2) in /htdocs/base/base_conf.php on line 21
      [Wed Jul 23 12:35:54 2008] [error] PHP Warning:  Unknown: open(/tmp//sess_rps22u6l4jb1uegpr4tcqe4kh2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
      [Wed Jul 23 12:35:54 2008] [error] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in U
      nknown on line 0
      ...
      [Thu Jul 17 06:24:16 2008] [error] PHP Notice:  Uninitialized string offset:  0 in /htdocs/base/includes/base_state_citems.inc.php on line 917
      [Thu Jul 17 06:24:16 2008] [error] PHP Notice:  Uninitialized string offset:  0 in /htdocs/base/includes/base_state_citems.inc.php on line xxx
      [Thu Jul 17 06:24:16 2008] [error] PHP Notice:  Undefined offset:  0 in /htdocs/base/includes/base_state_citems.inc.php on line 243
      [Thu Jul 17 06:24:16 2008] [error] PHP Notice:  Undefined offset:  0 in /htdocs/base/includes/base_state_citems.inc.php on line xxx
      ...
      [Thu Jul 17 06:24:16 2008] [error] PHP Notice:  Uninitialized string offset:  0 in /htdocs/base/includes/base_state_citems.inc.php on line 1471
      ...
      [Thu Jul 17 22:06:19 2008] [error] [client 192.168.100.247] File does not exist: /htdocs/favicon.ico
      ...
      [Thu Jul 17 23:16:20 2008] [notice] SIGHUP received.  Attempting to restart
      Syntax error on line 218 of /conf/httpd.conf:
      Cannot load /usr/local/lib/php/libphp5.so into server: File not found
      [Thu Jul 17 23:16:43 2008] [warn] module php5_module is already loaded, skipping
      [Thu Jul 17 23:16:44 2008] [notice] Initializing etag from /var/www/logs/etag-state
      [Thu Jul 17 23:16:44 2008] [notice] chrooted in /var/www
      [Thu Jul 17 23:16:44 2008] [notice] changed to uid 67, gid 67
      [Thu Jul 17 23:16:44 2008] [notice] Apache configured -- resuming normal operations
      [Thu Jul 17 23:16:44 2008] [notice] Accept mutex: sysvsem (Default: sysvsem)

       
    • btw... i noticed something in the error log about not being able to find /usr/local/lib/php/libphp5.so

      that file is exactly where it says it can't find it:

      -------
      # ls -la /usr/local/lib/php/libphp5.so
      -r--r--r--  1 root  bin  3936681 Mar 11 12:09 /usr/local/lib/php/libphp5.so
      -------

       
    • Hello Sameer,

      the "PHP Notice:" messages can safely be ignored.

      From the message

      "Please verify that the current setting of session.save_path is correct "

      I would conclude that you do have safe_mode enabled in /etc/php.ini.

      This is not really an obstacle for running BASE, but if so, then you must add all of the paths that the webserver is to access to the save_dir.

      Make also sure, that /etc/php.ini contains

      session.use_cookies = 1

      and your browser accepts at least
      session cookies.

      In any chase, check whether your apache is configured properly:

      apachectl configtest

      If you have changed anything, then

      apachectl configtest
      apachectl restart

      Bye, bye

      Juergen

       
    • scastle
      scastle
      2008-08-05

      I think perhaps the OpenBSD default setup might be causing a problem.  OpenBSD will chroot to the base directory for the web pages, so the path you put it might need to be started from there, which means the chrooted home should be removed from the absolute path.

      From the OpenBSD httpd(8) man page:

           By default, httpd will chroot(2) to the ``ServerRoot'' path, serving doc-
           uments from the ``DocumentRoot'' path.  As a result of the default secure
           behaviour, httpd cannot access any objects outside ``ServerRoot'' - this
           security measure is taken in case httpd is compromised.  This is not
           without drawbacks, though:

           CGI programs may fail due to the limited environment available inside
           this chroot space.  ``UserDir'', of course, cannot access files outside
           the directory space.  Other modules will also have issues.
           ``DocumentRoot'' directories or any other files needed must be inside
           ``ServerRoot''.  For this to work, pathnames inside the configuration
           file do not need adjustment relative to ``ServerRoot''.  For this option
           to remain secure, it is important that no files or directories writable
           by user www or group www are created inside the ``ServerRoot''.

       
    • >I would conclude that you do have safe_mode enabled in /etc/php.ini. 
       
      >Make also sure, that /etc/php.ini contains

      >session.use_cookies = 1 "

      i don't have safe mode enabled.

      ----------
      ;
      ; Safe Mode
      ;
      safe_mode = Off
      ----------

      and the session cookies are set to 1

      -----------
      ; Whether to use cookies.
      session.use_cookies = 1
      -----------

      as for the openbsd comment, it makes sense.  unfortunately, i don't know how to fix the problem.

      how do i go about removing the chrooted home from the absolute path?

       
      • john rocks
        john rocks
        2009-07-08

        <p>hello,i have the work experience on .net and php with mysql and linux. please about the job discription.<br>
        <a href="http://administrationjobsuk.com/administration-work">administration job</a></p>
        <p>Johnrocks
        </p>

         
    • alright.  i did a bit of poking around in the man page, and this is what i found:

      ------------
      -d serverroot
                   Set the initial value for the ``ServerRoot'' directive to
                   serverroot.  This can be overridden by the ``ServerRoot'' command
                   in the configuration file.  The default is /var/www.
      ------------

      as you can see, the default is /var/www, which is the root location under which the other files/directories reside.
      (Error loading the DB Abstraction library: from "/var/www/htdocs/adodb505/adodb.inc.php")

      so it outta work right?  it's not pointing to anything outside of the "ServerRoot".

      any other suggestions?

       
    • Well, but what about this file:

      > Cannot load /usr/local/lib/php/libphp5.so into
      > server:

      And the files in /tmp, for the php session?

      Can they be accessed? If not, then all of this
      will hardly work...

      Bye, bye

      Juergen

       
    • good observation.  unfortunately, my openbsd/httpd knowledge lacks the level to solve this problem.

      if /tmp or anything else can't be accessed why does BASE (except for the admin screen/interface) work perfectly fine when i use the relative path?  if chroot does isolate httpd then shouldn't it prevent anything from working regardless of the relative or absolute path?

      does the function of /usr/local/lib/php/libphp5.so have only to do with the admininstration screen/interface?  if not, if you can't access this file, nothing outta work right? 

      i'll try anything though.  anyone have any ideas how to resolve this issue and have chroot span multiple locations?

       
    • alright.  i did some investigation and tried fixing the problem.  unfortunately, the problem still remains.

      this is what i did.

      i changed session.save_path to "/var/www/tmp" in the php.ini file.  i created a corresponding /var/www/tmp

      i copied /usr/local/lib/php/libphp5.so to /var/www/lib/php/modules/libphp5.so and pointed to the new location in /var/www/conf/httpd.conf (LoadModule php5_module /var/www/lib/php/modules/libphp5.so)

      i shutdown and restarted apache while keeping the fingers crossed. 

      unfortunately, i still get:

      ---------
      Error loading the DB Abstraction library:  from "/var/www/htdocs/adodb505/adodb.inc.php"

      Check the DB abstraction library variable $DBlib_path in base_conf.php

      The underlying database library currently used is ADODB, that can be downloaded at http://adodb.sourceforge.net/
      ---------

       
    • I GOT IT!!!!!!!!!!!!!!!!!!!

      it was SOOO simple that it was overlooked!

      you guys had it right on about chroot.  and then i hit the point with the excerpt from the chroot/httpd man page.

      now, chroot made put ServerRoot under /var/www.  which means, that the httpd daemon refers to /var/www as the root directory (ie /).

      since $DBlib_path = /var/www/htdocs/adodb505 the system was looking under /var/www/var/www/htdocs/adodb505, not /var/www/htdocs/adodb505.

      i simply took out the obvious, and changed $DBlib_path = /htdocs/adodb505, and VIOLA everything works!!!

      now only if i can get the sensor working.  i guess that's the next step. :)

      thanks so much for all the help in getting me to this point.

      just one last thing.  the variables i changed, they're not going to break things are they?