Jump to content



Photo
- - - - -

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


This topic has been archived. This means that you cannot reply to this topic.
29 replies to this topic

#1   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 13 January 2011 - 20:45

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

#2   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 13 January 2011 - 21:42

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?

#3   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 13 January 2011 - 21:44

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.

#4   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 13 January 2011 - 21:54

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/');

Edited by FWR Media, 13 January 2011 - 21:59.


#5   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 19:39

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

#6   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 19:50

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.

#7   Xpajun

Xpajun
  • Members
  • 1,306 posts

Posted 14 January 2011 - 19:51

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"?

#8   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 19:52

all i had to do was hard code the $DOCUMENT_ROOT and the admin area came back to life. It all seems to working now.

#9   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 14 January 2011 - 20:02

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.

#10   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 20:14

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.

Edited by VonShavingCream, 14 January 2011 - 20:15.


#11   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 14 January 2011 - 20:29

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 /smile.gif' class='bbc_emoticon' alt=':)' />

Edited by FWR Media, 14 January 2011 - 20:29.


#12   Xpajun

Xpajun
  • Members
  • 1,306 posts

Posted 14 January 2011 - 20:37

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 /smile.gif' class='bbc_emoticon' alt=':)' />



I suppose 2.3 must be pretty old now Robert /whistling.gif' class='bbc_emoticon' alt=':-"' /> /whistling.gif' class='bbc_emoticon' alt=':-"' />


<?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!

#13   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 20:41

Thanks Xpajun .. you beat me to it.

#14   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 14 January 2011 - 21:01

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?

#15   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 21:03

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

Version Checker
Installed Version: osCommerce Online Merchant v2.3.1

You are running the latest version of osCommerce Online Merchant.



#16   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 14 January 2011 - 21:15

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.

Edited by FWR Media, 14 January 2011 - 21:16.


#17   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 21:21

screen shot of my version checker page...why would I lie about it?

[IMG]http://i203.photobucket.com/albums/aa178/cheshire191/version.jpg[/IMG]

#18   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 21:42

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

#19   FWR Media

FWR Media
  • Members
  • 6,839 posts

Posted 14 January 2011 - 21:44

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.


#20   VonShavingCream

VonShavingCream
  • Members
  • 15 posts

Posted 14 January 2011 - 21:46

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.