Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

require(/includes/classes/action_recorder.php): failed to open stream


Guest

Recommended Posts

I was testing some order processing. I logged out of the admin area and when I tried to log back in i get this following error

 

Warning: require(/includes/classes/action_recorder.php): failed to open stream: No such file or directory in /hsphere/local/home/c318704/demostore.mysite.com/adminarea/includes/classes/action_recorder.php on line 13 Fatal error: require(): Failed opening required '/includes/classes/action_recorder.php' (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/c318704/demostore.mysite.com/adminarea/includes/classes/action_recorder.php on line 13 

 

can anyone help?

 

I have double, triple checked and the file in question does exist. I tried giving it 755 and 777 permissions with no success.

 

Currently the store front works fine. I just cannot access the admin area.

 

Thanks,

Chris

Link to comment
Share on other sites

I was testing some order processing. I logged out of the admin area and when I tried to log back in i get this following error

 

Warning: require(/includes/classes/action_recorder.php): failed to open stream: No such file or directory in /hsphere/local/home/c318704/demostore.mysite.com/adminarea/includes/classes/action_recorder.php on line 13 Fatal error: require(): Failed opening required '/includes/classes/action_recorder.php' (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/c318704/demostore.mysite.com/adminarea/includes/classes/action_recorder.php on line 13 

 

can anyone help?

 

I have double, triple checked and the file in question does exist. I tried giving it 755 and 777 permissions with no success.

 

Currently the store front works fine. I just cannot access the admin area.

 

Thanks,

Chris

 

0664 should be fine for files in most cases, no need for 0755 or 0777 ( in fact this is a bad idea ).

 

The error doesn't lie .. the file isn't there, have you checked the path carefully?

Link to comment
Share on other sites

the error is lying .. I even did a find / -name "action_recorder.php" and it returned the correct location for the file.

 

I ended up restoring from a backup earlier today. I have no idea why this happen.

Link to comment
Share on other sites

the error is lying .. I even did a find / -name "action_recorder.php" and it returned the correct location for the file.

 

I ended up restoring from a backup earlier today. I have no idea why this happen.

 

Then you probably have incorrectly edited settings in your configuration file.

 

The error should I think read ..

 

 

Warning: require(includes/classes/action_recorder.php): failed to open stream:

 

not ..

 

Warning: require(/includes/classes/action_recorder.php): failed to open stream:

 

This may suggest that in admin/includes/configure.php

 

  define('DIR_WS_INCLUDES', 'includes/');

 

Has been set as ..

 define('DIR_WS_INCLUDES', '/includes/');

Link to comment
Share on other sites

so I tried to login today and got the same message as before.

 

here are my config settings

define('DIR_WS_CATALOG', '/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');

 

the only way I can think of to get rid of this would be to change

define('DIR_WS_CATALOG', '/');

 

to

 

 
define('DIR_WS_CATALOG', '');

 

when I do that.. i get the following error.

 

Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 30720 bytes) in /hsphere/local/home/c318704/demostore.mysite.com/adminarea/includes/classes/action_recorder.php on line 25

 

 

any suggestions?

 

C

Link to comment
Share on other sites

I believe I got it sorted again.

define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT);

 

needed to be change to a hard code of the document root

 

define('DIR_FS_DOCUMENT_ROOT', '/hsphere/local/home/c318704/mysite.com/');

 

hopefully this fixes it.

Link to comment
Share on other sites

Warning: require(/includes/classes/action_recorder.php):

 

there is no action_recorder.php in includes it is in "admin"/includes

 

check your "admin"/includes/configure.php for a missing "admin" define - or do you have the catalog configure.php in your "admin"?

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

 

any suggestions?

 

Yes, whoever is manually doctoring these files should stop as they don't know what they are doing.

 

  define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 

Is obviously wrong even without seeing DIR_FS_DOCUMENT_ROOT which I'll assume ends with a /

 

The DIR_FS_CATALOG constant should contain the full path to the shop root as created when it was installed.

 

In the absense of knowing the paths I would hazard a guess that just DIR_FS_DOCUMENT_ROOT will suffice, so long as that one has been entered correctly.

 

alternatively you could use ..

 

define( 'DIR_FS_CATALOG', realpath( dirname( __FILE__ ) . '/../../' ) . '/' );

 

Which is better than the hardcoded path.

Link to comment
Share on other sites

ok .. well .. it is fixed but I will respond to your post anyway.

 

DIR_FS_CATALOG .. DOES contain the FULL PATH to the shop root. the shop is installed in the main directory. In this case there is no CATALOG folder.

the store resides on a subdomain called store.mysite.com

 

to top it all off. NO ONE MANUALLY CHANGED ANYTHING

 

the only thing that was changed was the name of the admin directory. and after that change was made it was all working fine. after a few hours, the admin side of the site just stopped working.

 

I contacted the hosting company and they told me to get support from the application because all the files are where they are supposed to be.

 

Yes, whoever is manually doctoring these files should stop as they don't know what they are doing.

 

define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);

 

 

 

Is obviously wrong even without seeing DIR_FS_DOCUMENT_ROOT which I'll assume ends with a /

 

that is how the file was written by osCommerce

 

i will repeat that again .. that is how the file was written by osCommerce

 

and just to show you that i am not going insane .. here is the code copy and pasted from the configure.php that is included with the osCommerce download.

 

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', '');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', '');
 define('DB_SERVER_USERNAME', 'mysql');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
?>

 

hey look at that 24 lines down is the exact line you are referring to .. and it was PROVIDED that way!!!!!!!!!!!

 

Now .. I will admit that I personally feel that is a SERVER configuration problem and has NOTHING to do with osCommerce. so the way around it was to hard code the document root into config file.

Link to comment
Share on other sites

Ah well . .must be an extremely old version of osCommerce .. before even the RC1/2, wonder why the hosts offer such an old and insecure version?

 

Glad you got it going anyway.

 

 

At least we know that PHP wasn't lying :)

Link to comment
Share on other sites

Ah well . .must be an extremely old version of osCommerce .. before even the RC1/2, wonder why the hosts offer such an old and insecure version?

 

Glad you got it going anyway.

 

 

At least we know that PHP wasn't lying :)

 

 

I suppose 2.3 must be pretty old now Robert :-" :-"

 

 

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', '');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', '');
 define('DB_SERVER_USERNAME', 'mysql');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
?>

 

straight from my 2.3 download!

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Where are you two getting all this?

 

osCommerce 2.3.1/2.3.0/RC1/RC2 looks nothing like that and the installer doesn't create it like that.

 

Are these versions doctored by a hosting company perchance?

Link to comment
Share on other sites

no .. i downloaded this from the oscommerce website.

 

http://www.oscommerce.com/solutions/oscommerce

 

first link on the top

 

[Download osCommerce Online Merchant v2.3.1] oscommerce-2.3.1.zip (5,267,948 bytes; md5: ee581335954f64dc33167fbf949bf0c3)

 

also when i do a version check in my admin i get the following message

 

Version Checker

Installed Version: osCommerce Online Merchant v2.3.1

 

You are running the latest version of osCommerce Online Merchant.

Link to comment
Share on other sites

no .. i downloaded this from the oscommerce website.

 

http://www.oscommerc...ions/oscommerce

 

first link on the top

 

[Download osCommerce Online Merchant v2.3.1] oscommerce-2.3.1.zip (5,267,948 bytes; md5: ee581335954f64dc33167fbf949bf0c3)

 

also when i do a version check in my admin i get the following message

 

 

 

Rubbish!

 

This is the code that produces the admin configure.php

 

  $file_contents = '<?php' . "\n" .
          		'  define(\'HTTP_SERVER\', \'' . $http_server . '\');' . "\n" .
          		'  define(\'HTTP_CATALOG_SERVER\', \'' . $http_server . '\');' . "\n" .
          		'  define(\'HTTPS_CATALOG_SERVER\', \'' . $http_server . '\');' . "\n" .
          		'  define(\'ENABLE_SSL_CATALOG\', \'false\');' . "\n" .
          		'  define(\'DIR_FS_DOCUMENT_ROOT\', \'' . $dir_fs_document_root . '\');' . "\n" .
          		'  define(\'DIR_WS_ADMIN\', \'' . $http_catalog .  $admin_folder . '/\');' . "\n" .
          		'  define(\'DIR_FS_ADMIN\', \'' . $dir_fs_document_root .  $admin_folder . '/\');' . "\n" .
          		'  define(\'DIR_WS_CATALOG\', \'' . $http_catalog . '\');' . "\n" .
          		'  define(\'DIR_FS_CATALOG\', \'' . $dir_fs_document_root . '\');' . "\n" .
          		'  define(\'DIR_WS_IMAGES\', \'images/\');' . "\n" .
          		'  define(\'DIR_WS_ICONS\', DIR_WS_IMAGES . \'icons/\');' . "\n" .
          		'  define(\'DIR_WS_CATALOG_IMAGES\', DIR_WS_CATALOG . \'images/\');' . "\n" .
          		'  define(\'DIR_WS_INCLUDES\', \'includes/\');' . "\n" .
          		'  define(\'DIR_WS_BOXES\', DIR_WS_INCLUDES . \'boxes/\');' . "\n" .
          		'  define(\'DIR_WS_FUNCTIONS\', DIR_WS_INCLUDES . \'functions/\');' . "\n" .
          		'  define(\'DIR_WS_CLASSES\', DIR_WS_INCLUDES . \'classes/\');' . "\n" .
          		'  define(\'DIR_WS_MODULES\', DIR_WS_INCLUDES . \'modules/\');' . "\n" .
          		'  define(\'DIR_WS_LANGUAGES\', DIR_WS_INCLUDES . \'languages/\');' . "\n" .
          		'  define(\'DIR_WS_CATALOG_LANGUAGES\', DIR_WS_CATALOG . \'includes/languages/\');' . "\n" .
          		'  define(\'DIR_FS_CATALOG_LANGUAGES\', DIR_FS_CATALOG . \'includes/languages/\');' . "\n" .
          		'  define(\'DIR_FS_CATALOG_IMAGES\', DIR_FS_CATALOG . \'images/\');' . "\n" .
          		'  define(\'DIR_FS_CATALOG_MODULES\', DIR_FS_CATALOG . \'includes/modules/\');' . "\n" .
          		'  define(\'DIR_FS_BACKUP\', DIR_FS_ADMIN . \'backups/\');' . "\n" .
          		'  define(\'DIR_FS_DOWNLOAD\', DIR_FS_CATALOG . \'download/\');' . "\n" .
          		'  define(\'DIR_FS_DOWNLOAD_PUBLIC\', DIR_FS_CATALOG . \'pub/\');' . "\n\n" .
          		'  define(\'DB_SERVER\', \'' . trim($HTTP_POST_VARS['DB_SERVER']) . '\');' . "\n" .
          		'  define(\'DB_SERVER_USERNAME\', \'' . trim($HTTP_POST_VARS['DB_SERVER_USERNAME']) . '\');' . "\n" .
          		'  define(\'DB_SERVER_PASSWORD\', \'' . trim($HTTP_POST_VARS['DB_SERVER_PASSWORD']) . '\');' . "\n" .
          		'  define(\'DB_DATABASE\', \'' . trim($HTTP_POST_VARS['DB_DATABASE']) . '\');' . "\n" .
          		'  define(\'USE_PCONNECT\', \'false\');' . "\n" .
          		'  define(\'STORE_SESSIONS\', \'mysql\');' . "\n" .
          		'?>';

 

See any ..

 

// eg, http://localhost or - https://localhost should not be NULL for productive servers

 

Or ...

 

// secure webserver for catalog module

 

 

Or ..

 

// where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

 

 

No you don't, and I'll tell you why you don't, because it wasn't created by the osC 2.3.X installer.

 

Now, enough of this, I tried to help and I've not found it a pleasure helping so I'll be off.

Link to comment
Share on other sites

@FWR

I Just re-read you post ... we are not talking about the CREATING of the admin config file .. we are talking about the config file itself.

Link to comment
Share on other sites

Chris what you are or are not lying about I'm not interested.

 

The clear facts to sumarise this horrible experience of free support.

 

You seem to be on some sort of mission to prove there was zero fault at your end.

 

1) It was nothing to do with the osCommerce script, fact.

 

2) the PHP error was of course accurate, it was a user error related to paths, the path being wrong the file did not exist at that location.

 

3) The configure files had been incorrectly doctored/or just plain old and this is why you had an error in the first place.

 

4) Fact, it's a very old configure.php file and NOT of version 2.3.1.

 

In fact this is the file header from the ( old now ) RC2a

 

/*
 $Id: configure.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 

See the 2003?

 

Yours ..

 

/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 

Go figure.

 

Link to comment
Share on other sites

ok .. so why does osCommerce have this file for download on their site? I just downloaded it again to check.

 

also, where can I get this version you speak of since, mine is so outdated?

 

 

i'm not trying to be a prick .. i appreciate help .. i just don't like it when people point fingers at me.

Link to comment
Share on other sites

ok .. so why does osCommerce have this file for download on their site? I just downloaded it again to check.

 

also, where can I get this version you speak of since, mine is so outdated?

 

 

i'm not trying to be a prick .. i appreciate help .. i just don't like it when people point fingers at me.

 

Chris I owe you an apology.

 

You were talking about the blank file prior to installation which looks as you have stated.

 

The installed file however looks entirely different.

 

The confusion was that your "blank file" seems not to have been populated with the data as expected.

 

Oh well .. guess I take the "dork award " for this evening.

 

The file should still have been populated by the install script, wonder why it wasn't, did you perhaps take the raw file and just add in some bits? that would explain it.

Link to comment
Share on other sites

hey it's cool man .. i know how forum support works. I've been on both sides of it.

 

I really just want to make sure that I have the most recent / stable version of the cart.

 

so .. where do I go from here?

 

A complete re-install?

 

or is there a way to rewrite the config file... may be it was a crummy permission thing or something.

 

Thanks,

C

Link to comment
Share on other sites

hey it's cool man .. i know how forum support works. I've been on both sides of it.

 

I really just want to make sure that I have the most recent / stable version of the cart.

 

so .. where do I go from here?

 

A complete re-install?

 

or is there a way to rewrite the config file... may be it was a crummy permission thing or something.

 

Thanks,

C

 

Is the install in root?

 

can you reinstall or would you lose data?

Link to comment
Share on other sites

Ok .. it looks like it was a permissions problem... I just ran an install in a different directory and chmod -R 777 the entire dir to test it.

 

when that install ran .. it created the configure.php file as you specified.

 

weird that osc didn't give all kinds of errors when it couldn't write to the file.

 

anyway .. fortunately this is a new store with no data in it, yet. just some heavy front end customizations.

 

I am going to try and re-install but before running the install i am going to force 777 permission on the config file.

 

hopefully that will do the trick ... well at least I have something to do this weekend.

 

Thanks,

C

Link to comment
Share on other sites

Ok .. it looks like it was a permissions problem... I just ran an install in a different directory and chmod -R 777 the entire dir to test it.

 

when that install ran .. it created the configure.php file as you specified.

 

weird that osc didn't give all kinds of errors when it couldn't write to the file.

 

anyway .. fortunately this is a new store with no data in it, yet. just some heavy front end customizations.

 

I am going to try and re-install but before running the install i am going to force 777 permission on the config file.

 

hopefully that will do the trick ... well at least I have something to do this weekend.

 

Thanks,

C

 

osCommerce suppresses errors

 

In a dev environment

 

in catalog/includes/application_top.php line 17

 

Change ..

 

  error_reporting(E_ALL & ~E_NOTICE);

 

To ..

 

  //error_reporting(E_ALL & ~E_NOTICE);
 error_reporting( E_ALL | E_STRICT );

 

Same for the admin application_top.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...