BibUtils Manual Install File() errors

Help
Pat Gehrke
2008-11-29
2013-05-28
  • Pat Gehrke

    Pat Gehrke - 2008-11-29

    Ok, so thanks to Matthias I have RefBase working pretty well, but the exports dependent on BibUtils are not working.  This isn't a big deal for us, as I mostly disabled the exports and we don't need them, but I thought I would see if it's an easy(ish) fix like the last oversight/error I made.

    Refbase was installed manually and is functional.  It will save citations in pdf/rtf/etc, and the exports for Atom, Mods, and ODF XML format work fine.  The other exports return errors. 

    I unzipped and ftp'd the bibutils materials into a subdir under the RefBase directory titled /bibutils/.  The install.php auto-recognizes the proper directory for the bibutils (though I had to manual install due to other errors) and I added the refbase directory to the open_basedir list.  I cannot seem to disable open_basedir on my server, but I can add directories and have been doing so with something of a blunt-instrument approach, as I really have no idea what I am doing.  (This is the very first manual install of any mysql/php stuff I have ever tried.)

    I then went into the MySQL PHP administration tool and ran the two command lines from the bibutils manual install directions.  I double-checked the table and it contains the following values:
    depends_id = 2
    depends_external = bibutils
    depends_enables = true
    depends_path = /home/ginas5/public_html/commethics/refbase/bibutils/

    Ok, so here are the actual error lines returned:

    Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/:/home/ginas5/:/home/ginas5/public_html/commethics/refbase/:/home/ginas5/public_html/:/var/lib/mysql:/bin:/usr:/opt:) in /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php on line 157

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php on line 159

    Warning: fclose(): supplied argument is not a valid stream resource in /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php on line 160

    Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/:/home/ginas5/:/home/ginas5/public_html/commethics/refbase/:/home/ginas5/public_html/:/var/lib/mysql:/bin:/usr:/opt:) in /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php on line 115

    Warning: unlink() [function.unlink]: open_basedir restriction in effect. File() is not within the allowed path(s): (.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/:/home/ginas5/:/home/ginas5/public_html/commethics/refbase/:/home/ginas5/public_html/:/var/lib/mysql:/bin:/usr:/opt:) in /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php on line 99

    Warning: unlink() [function.unlink]: open_basedir restriction in effect. File() is not within the allowed path(s): (.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/:/home/ginas5/:/home/ginas5/public_html/commethics/refbase/:/home/ginas5/public_html/:/var/lib/mysql:/bin:/usr:/opt:) in /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php on line 103

    Warning: Cannot modify header information - headers already sent by (output started at /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php:157) in /home/ginas5/public_html/commethics/refbase/includes/include.inc.php on line 5150

    Warning: Cannot modify header information - headers already sent by (output started at /home/ginas5/public_html/commethics/refbase/includes/execute.inc.php:157) in /home/ginas5/public_html/commethics/refbase/search.php on line 1818

     
    • Matthias Steffens

      Hi Pat,

      sorry for the late reply.

      Your bibutils entry in table 'depends' looks fine.

      Do you have PHP 'safe_mode' enabled on your server? If so, then the bibutils programs must be located in the directory that's specified in the PHP configuration directive 'safe_mode_exec_dir'. Also, the session directory (which refbase uses to write & read temporary files for use with bibutils) must be correctly set in the refbase variable '$sessionTempDir' (in file 'initialize/ini.inc.php'). More info is given at:

      http://www.refbase.net/index.php/Installation-Troubleshooting#Export_of_records_results_in_a_blank_page

      I just had a similar problem with refbase.org where I got basically the same error as you. In my case, the path that I had specified for variable '$sessionTempDir' did not end with a slash which seemed to cause problems with 'open_basedir' (where the temp dir path was given *with* the trailing slash).

      Since, in your error message:

      Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s)

      the file spec is empty ("File()"), this maybe means that the value of your current setting for variable '$sessionTempDir' resolves to an empty string?

      If you still have this setting in file 'initialize/ini.inc.php':

      $sessionTempDir = session_save_path();

      try setting the variable to an explicit path, e.g.:

      $sessionTempDir = "/home/ginas5/phptmp/";

      Note that the above example assumes that you have a PHP session directory (named 'phptmp') within the root folder of your account. Your 'open_basedir' mentions '/tmp' so you could try this as well. If you don't know the path to your account's session directory, please contact your provider, they should be able to tell you the correct path.

      So, in summary, I believe there are (at least) two issues here:
      1) If 'safe_mode' is enabled on your server, you'll need to put the bibutils programs into the directory given in 'safe_mode_exec_dir'.
      2) You'll need to set the path to your session directory correctly in variable '$sessionTempDir'.

      Hope this helps, let us know if not.

      Matthias

       
    • Pat Gehrke

      Pat Gehrke - 2008-12-04

      Hey thanks again for the help.

      It turns out all I had to do was set that sessiontempdir variable to the temp directory as you specified (actually dir name is diff, but same idea) and that looks to have fixed it.

      Most awesome.  You rock.  With your permission I'd like to thank you by name in the acknowledgments for this project and we'll toss a few bucks into the donation tray in January when we go live and I can squeeze the coin out of our bank account.

      Thanks again.  I was looking forever for a good implementation that would serve our purposes and this is exactly what we needed.

      Thanks again.  You have been a godsend to our little nonprofit project!  I'll post once we go live so you can see the final implementation also.

      -Pat

       
    • Matthias Steffens

      Hi Pat,

      > It turns out all I had to do was set that sessiontempdir
      > variable to the temp directory as you specified

      I'm glad that this solved your problems!

      And many thanks for the kind words, I appreciate it. Your acknowledgements and/or donations are of course welcome.

      Best, Matthias

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks