Php Path Error

Discussion in 'Installation' started by stelly, Apr 29, 2003.

  1. stelly

    stelly Guest

    I've gone through the setup process and was told to check out signup.php, etc. However, I'm getting errors like:
    Warning: Failed opening '//smarty/Smarty.class.php' for inclusion (include_path='.:/usr/local/lib/php') in //config.inc.php on line 55

    My php is in /usr/bin/php

    How and where do I fix this problem?

    Stelly
  2. stelly

    stelly Guest

    Apparently, finding the right path is not the issue. The issue seems to be that the include files are not being read properly because the paths are not set correctly.

    In config.inc.php, $config['root_dir'] = dirname(__FILE__); returns / and it's causing the subsequent include file paths to be wrong. What I modified to was:

    $config['root_dir'] = str_repeat("../", substr_count(dirname($_SERVER["SCRIPT_NAME"]), "/")-2) . ".";

    That seems to work for only files in the /amember directory. Subdirectories, such as /admin/index.php was having some other issues:

    Warning: Cannot send session cookie - headers already sent by (output started at //config.inc.php:36) in /login.inc.php on line 88

    Warning: Cannot send session cache limiter - headers already sent (output started at //config.inc.php:36) in /login.inc.php on line 88

    Fatal error: Failed opening required './/smarty/Smarty_Compiler.class.php' (include_path='') in //smarty/Smarty.class.php on line 1026

    It looks like the SMARTY_DIR in /smarty/Smarty.class.php is not right...

    I'm quite confused as to how to get this to work...
  3. alex-adm

    alex-adm Guest

    Hi Stelly,
    just set
    $config['root_dir'] = '/actual/path/to/amember/dir';

    it is related with your PHP installation (seems your hosting changed PHP sources)
  4. stelly

    stelly Guest

    Thanks for your response. However, the account I have doesn't even give me the "pwd" command priv. So, I can only guess what the absolute path is. I'm actually running into a bunch of other issues...

    1. I had to turn off smarty's template stuff. I was getting a bunch of errors says:
    Warning: unable to create file ./templates_c/541/541269446/0.php because No such file or directory in /smarty/Smarty.class.php on line 1575

    However, I've got templates_c set to rwx for all, so I don't see or get why it's doing that. I ended up commenting out that line of code to get around the wraning messages.

    2. I'm also getting a fatal error:
    Fatal error: Smarty error: [in member.html line 66]: [plugin] unknown tag - 'lookup' (Smarty.class.php, line 2543) in /smarty/Smarty.class.php on line 2652

    This stops me in my tracks because it's at members.php

    3. I went through setup.php to setup the account and created a password for admin so that I can create a product. However, I can't login as admin using the password I setup. I ended up creating the products by going through mysql directly.

    4. On some occasions, I'm also getting errors like this:
    Warning: Cannot send session cookie - headers already sent by (output started at /login.inc.php:27) in /login.inc.php on line 95

    Warning: Cannot send session cache limiter - headers already sent (output started at /login.inc.php:27) in /login.inc.php on line 95

    What can I do to resolve these issues? I really appreciate your help!

    Stelly
  5. alex-adm

    alex-adm Guest

    Stelly, something is totally incorrect with your installation (not with the script).
    If you send me FTP info, I will have a look.
  6. stelly

    stelly Guest

    Hi,

    I've ended up commented out all the trouble makers so now it's working just fine. The only concern I have is security. Am I creating a hole?

    Stelly
  7. alex-adm

    alex-adm Guest

    1. You should set tpl_cache_level to 0 instead of commenting code.
    BTW, It is default setting!

    2. You changed tempalte, right? Just put back original templates and try to make changes
    step by step. Something has been corrupted (I guess by your HTML editor).

    3. It is strange - edit admin password in config.inc.php

    4. there shouldn't be any output (spaces, newlines) before and after <? and ?> in the file login.inc.php

Share This Page