#26 Fails to find options_display.php

closed-fixed
9
2001-12-23
2001-12-10
Anonymous
No

Squirrelmail 1.2.0 RC3

Selecting Options->Display causes a php error at
options.php:133, attempting
require_once("options_display.php")., because relative
path is not specified and php.ini not configured to
search any directory other than default.

Suggest replacing:
require_once($optpage_file);
With:
require_once('../src/' . $optpage_file);

For some reason this problem only showed itself on the
second machine I installed it on. I cannot explain
why it would work sometimes and not others, especially
since php.ini is the same for both.

gnorbury@bondcar.com

Discussion

  • Paul Thompson - OLD ACCOUNT

    • labels: 102907 -->
     
  • Paul Thompson - OLD ACCOUNT

    • assigned_to: nobody --> thomppj
    • priority: 5 --> 9
    • labels: --> Broken Functionality
     
  • Paul Thompson - OLD ACCOUNT

    • assigned_to: thomppj --> arkanghel
     
  • Allan Cacdac

    Allan Cacdac - 2001-12-11
    • status: open --> pending
     
  • Allan Cacdac

    Allan Cacdac - 2001-12-11

    Logged In: YES
    user_id=395707

    your suggestion is highly appreciated. however, we need to
    know how did u come up with the problem. does anybody
    experience this too? can you help me replicate the problem?
    thank you...

     
  • Nobody/Anonymous

    Logged In: NO

    Maybe the problem is related to setting php.ini
    include_path to a non-default value. The default is "",
    and on the broken system it is set to "/auto/www/lib/php".

    I cannot test my theory right now, but will endeavour to do
    so later if you are unable to replicate in your environment.

    System A (no problem)
    ---------------------
    Solaris 8 sparc
    Apache 1.3.22 installed in /opt/apache
    PHP 4.06 installed in /opt/apache
    php.ini: include_path =
    Squirrelmail installed in /opt/apache/htdocs/mail

    System B (where the problem ocurred)
    ------------------------------------
    Solaris 8 intel
    Apache 1.3.22 installed in /auto/www
    PHP 4.06 installed in /auto/www
    php.ini: include_path = /auto/www/lib/php
    Squirrelmail installed in /auto/www/htdocs/mail

    Graham

     
  • Allan Cacdac

    Allan Cacdac - 2001-12-13

    Logged In: YES
    user_id=395707

    i change php.ini on my machine and tried different settings
    but i haven't had the chance to replicate the error. it
    still works for me. if you can help me replicate the
    problem, then i can help you with this. til then. :)

     
  • Allan Cacdac

    Allan Cacdac - 2001-12-13
    • status: pending --> open
     
  • Nobody/Anonymous

    Logged In: NO

    According to the output of phpinfo(), the default php
    include_path is automatically set to "./:/auto/www/lib/php".

    However, by explicitly manually setting
    include_path="/auto/www/lib/php" in php.ini, there is no
    search carried out in the current directory, hence the call
    to require_once() fails.

    No other require_once() calls fail in Squirrelmail because
    every instance (that I could find) always include a
    relative path specifier. I would imagine this means php
    treats a relative path differently from no path.

    I still recommend explicitly appending the path in
    options.php because it is then more consistent with the
    remainder of the code.

    Thanks for looking into this problem with me.

    Graham

     
  • Paul Thompson - OLD ACCOUNT

    • assigned_to: arkanghel --> thomppj
    • status: open --> closed-fixed
     
  • Paul Thompson - OLD ACCOUNT

    Logged In: YES
    user_id=40435

    Fixed by changing values of $optpage_file to include path.

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks