osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 02-03-2007, 01:44 AM
Lurker
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
badlou is on a distinguished road
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 01:49 AM. Reason: Coloring conventions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 02-03-2007, 04:50 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,062
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
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 Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 02-03-2007, 07:39 AM
Lurker
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
badlou is on a distinguished road
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 02-03-2007, 05:54 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 11,062
Thanks: 81
Thanked 348 Times in 327 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Fatal error

Glad you got it sorted out!
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 05-14-2007, 06:55 AM
Lurker
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
vforste is on a distinguished road
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 05-14-2007, 11:58 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,808
Thanks: 5
Thanked 105 Times in 91 Posts
Rep Power: 12
jpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to all
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 05-14-2007, 12:15 PM
Lurker
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
vforste is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 05-14-2007, 01:14 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,808
Thanks: 5
Thanked 105 Times in 91 Posts
Rep Power: 12
jpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to all
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 05-14-2007, 04:25 PM
Lurker
 
Join Date: May 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
vforste is on a distinguished road
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
Quote:
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 04:29 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 05-15-2007, 09:19 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,808
Thanks: 5
Thanked 105 Times in 91 Posts
Rep Power: 12
jpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to alljpf is a name known to all
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Fatal Error [wicked] osCMax v2 Installation issues 1 10-12-2005 02:37 PM
Fatal error!! newtothis osCMax v2 Installation issues 1 07-13-2005 05:48 PM
Fatal error uff osCommerce 2.2 Installation Help 4 07-13-2005 05:51 AM
Fatal error: kiokouk osCommerce 2.2 Modification Help 2 12-24-2004 03:38 AM
Fatal error...... depayva osCMax v1.7 Installation 2 12-05-2003 11:39 AM


All times are GMT -8. The time now is 12:29 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax