osCmax v2.5 User Manual
Results 1 to 10 of 10

Fatal error

This is a discussion on Fatal error within the osCmax v2 Installation issues forums, part of the osCmax v2.0 Forums category; Hi, I would really appreciate a good reply for help on the following error, my post is a bit long ...

      
  1. #1
    Lurker
    Join Date
    Feb 2007
    Posts
    2
    Rep Power
    0


    Default Fatal error

    Hi,
    I would really appreciate a good reply for help on the following error, my post is a bit long to help make better understanding of the nature of the problem.

    My environment: Suse 10, Apache 2, PHP 4.x.x, mysql

    Error Example1.1:
    Warning: main(includes/configure.php): failed to open stream: No such file or directory in /srv/www/htdocs/catalog/includes/application_top.php on line 34

    Fatal error: main(): Failed opening required 'includes/configure.php' (include_path='/usr/share/php') in /srv/www/htdocs/catalog/includes/application_top.php on line 34


    My solution that helped the script get past installing the database lies in editing lines with "require" directive in the following manner:

    Solution Example1.2
    Extract from line 34 in application_top.php:
    require('includes/configure.php'); //by default triggers the above error in example 1.1
    My Solution: altering the relative path to become absolute path in the specified line:
    require('/srv/www/htdocs/catalog/incdlues/configure.php'); // Problem solved but the modification process is painstaking and time-consuming.


    I'd be thankful for any help to solve the scripts' nagging need for an absolute path rather than the relative one by default?
    (I've followed all the installation requirements and procedures word by word but in vain)

    Regards
    Last edited by badlou; 02-03-2007 at 12:49 AM. Reason: Coloring conventions

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Fatal error

    Where do you get this error?

    Also, there should be no need to change the path notation. If you correctly define your paths in the configure.php file, there will be no problems.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Lurker
    Join Date
    Feb 2007
    Posts
    2
    Rep Power
    0


    Default Re: Fatal error

    I had this problem when I pointed my browser with root privileges to http://localhost/catalog/install/. But now, the package is installed and running perfectly.

    It turned out that php.ini (php configuration file) needs a little tweaking by commenting out the following line: ;include_path = "/usr/share/php" Then I restarted httpd and accessed the above URL and proceeded with no single error.

    Thanks anyways!

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: Fatal error

    Glad you got it sorted out!
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    Lurker
    Join Date
    May 2007
    Posts
    3
    Rep Power
    0


    Default Re: Fatal error

    Signed up for the same issue... Thought maybe I was missing something.

    After following the code ... I do not see how this can be correct out of the box.
    The require statement is in the include path and yet the code includes a path... require uses relative paths so in turn the meaning of this code to me means configure.php should be in a sub directory of includes, called includes, because application_top is already in the relative includes path.

    require('includes/configure.php');

    this line should quite simple read.

    require('configure.php');

    or am I missing something ? since it is the 7th line of code being executed it sound likes theres no way it can work. But I have been wrong before...

  6. #6
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Fatal error

    Quote Originally Posted by badlou View Post

    require('/srv/www/htdocs/catalog/incdlues/configure.php');
    Question - is this a typo? incdlues?

    Make sure your PATHS are properly entered into your configure.php files (do you see /srv/www/htdocs/ in there?).

    Double check all your paths.

  7. #7
    Lurker
    Join Date
    May 2007
    Posts
    3
    Rep Power
    0


    Default Re: Fatal error

    See but there lies the problem. This is the require of the configure.php that is causing the fatal error and why it fails. I'm going out on a fence here but, it does not matter what is defined in configure.php if it cannot even open it.

  8. #8
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Fatal error

    Quote Originally Posted by vforste View Post
    See but there lies the problem. This is the require of the configure.php that is causing the fatal error and why it fails. I'm going out on a fence here but, it does not matter what is defined in configure.php if it cannot even open it.
    configure.php is in the sub directory of includes - and is NOT in the main (web accessable root) of your page - thus "includes/configure.php" is correct and "configure.php" is wrong as it not nessarly being exisitng in ALL directories.

    If you remove it then it would be looking for the file in www.yoursite.com/catalog/configure.php or /var/your/server/path/www or public or html etc.../catalog/configure.php which should not exist.

    When you run the index.php in /catalog/ your telling it to look for it in the path from current directory call includes/configure.php (ie: /catalog/includes/configure.php).

    You should NOT be admending or hardcoding the path for any files in osC or osCMax except for in both of your configure.php files.

  9. #9
    Lurker
    Join Date
    May 2007
    Posts
    3
    Rep Power
    0


    Default Re: Fatal error

    I understand thouroughly ... However

    Just to clip the manual require looks in the current working directory then the included files path. I was alway under the impression it was only relative path. Looks like I am mistaken on that one...
    From php.net
    Files for including are first looked in include_path relative to the current working directory and then in include_path relative to the directory of current script. E.g. if your include_path is ., current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in include_path relative to the current working directory.

    So after looking at the php manual it should work as is...
    PHP Code:
      require('includes/configure.php'); 
    But it does not... It only works in this format.
    PHP Code:
      require('configure.php'); 
    Meaning to me I must have something screwed up in my php.ini file or somewhere, because it does not find it using the path and yet it does if I remove the path and the slash, which would be the includes directory either way according to the manual. I do see some notes about problems with this that I will have to read up on though.

    So what else can make this happen ? I'm in the process of tweaking the php.ini to see if there maybe something incorrect there. I was going to give up but now I am intrigued as to why this is happening. I will post the results for future reference.

    BTW I am not the originator of this post. Hardcoding a path is a definate no no in my book. Fear not I am only looking for a proper resolution.
    Last edited by vforste; 05-14-2007 at 03:29 PM.

  10. #10
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,699
    Rep Power
    22


    Default Re: Fatal error

    In you PHP.INI file - undo your editing. Restore your backup php.ini.

    Not sure what you changed in php.ini but check/change to:
    safe_mode_include_dir =

    and (exact path may differ a bit)

    ; UNIX: "/path1:/path2"
    include_path = ".:/php5/includes"

    or

    ; Windows: "\path1;\path2"
    include_path = ".;${path}\php5\pear\"



    No need to INCLUDE a directory for anything as there are many OTHER includes that is not in the include directory (but in sub directories).

    The only thing you may have to edit in php.ini is: register_globals=On (and maybe register_long_arrays = On)

Similar Threads

  1. Fatal Error
    By [wicked] in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 10-12-2005, 01:37 PM
  2. Fatal error!!
    By newtothis in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 07-13-2005, 04:48 PM
  3. Fatal error
    By uff in forum osCommerce 2.2 Installation Help
    Replies: 4
    Last Post: 07-13-2005, 04:51 AM
  4. Fatal error:
    By kiokouk in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 12-24-2004, 02:38 AM
  5. Fatal error......
    By depayva in forum osCMax v1.7 Installation
    Replies: 2
    Last Post: 12-05-2003, 10:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •