Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can I replace admin/includes with cat/includes?


warrenp

Recommended Posts

The only way I have been able to get php files to run from the admin directory is to replace the whole includes folder there with the one from catalog.

 

I have tried to isolate which file is necessary (alone) but to no avail.

 

Every time I change a single file back to the original admin/includes version, nothing works all of a sudden... (php pages from within admin directory come up blank)

 

My question is, does it effect anything (I.e. the running of oscommerce) if I just replace the folder with the one from Catalog? Can I still use easypopulate to populate my database?

 

By the way, security is not an issue at all for me as I am only processing orders offline. No credit card details (or any details other than member number and order details) will be taken from users. (I have a small dedicated group of members in a food coop to serve, nothing else.)

 

For the above reason I have not installed any SSL. Could this be part of the reason admin php's won't work?

 

Any reply would be very much appreciated!

Link to comment
Share on other sites

The files are not the same. You need to reload all of your admin files with the original ones. I suspect you just didn't have the admin/includes/configure.php file setup correctly. Your admin side will not function properly like that.

 

The lack of a certificate won't break your shop the way you describe.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks Jack,

 

For what it's worth, here's my admin/include/confugure.php.

 

I've only made very minor alterations from the original (just in the define database connection part and the localhost directory (replaced $DOCUMENT ROOT with the actual location)). I've also tried a few alterations on these and retried it to no avail...

 

I renamed admin to radmin because I read somewhere that you have to rename it, but it wasn't working before I did this anyway.

 

Any ideas? (anyone?)

 

 

 

<?php

/*

$Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

// define our webserver variables

// FS = Filesystem (physical)

// WS = Webserver (virtual)

define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', 'http://localhost');

define('HTTPS_CATALOG_SERVER', 'http://localhost');

define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', 'G:\server\Apache Group\Apache2\htdocs\'); // 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', '/radmin/');

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 our database connection

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', 'root');

define('DB_SERVER_PASSWORD', 'password');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

Link to comment
Share on other sites

Might sound silly but are you sure you are uploading the files to the correct folders? Pages will come up blank if you upload the language files to the main folders.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Where do you have this installed? The configure file appears to be one used on a personal computer but you mentioned taking credit cards so I'm confused.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Might sound silly but are you sure you are uploading the files to the correct folders? Pages will come up blank if you upload the language files to the main folders.

 

Thanks for the suggestion!

 

I have simply copy/pasted the folders into the server directory from the unzipped oscommerce 2.2 ms2 admin folder (from the download), so I can't see how any files could have gotton into the wrong places...

 

In the admin directory, there are only 2 folders; images and includes.

 

In the includes directory there are 8 folders; locals, modules, languages, boxes, classes, function, javascript and graphs.

 

All the files are in these as they were in the download.

 

The only thing I have adjusted anywhere is the configure.php in the includes folder.

 

I hoping someone has a suggestion I could try (anything however silly).

 

Just checking. The admin folder can be renamed to anything yes? and it doesn't have to sit right inside the catalog folder does it? (I have tried both in and out)

Link to comment
Share on other sites

Where do you have this installed? The configure file appears to be one used on a personal computer but you mentioned taking credit cards so I'm confused.

 

Jack

 

Hi Jack,

Rigth now it's installed on my windows xp pc at home. When I've got the website up and running (on my pc) then I'll see about either serving it from my home pc or uploading it to a server.

Link to comment
Share on other sites

define('DIR_FS_DOCUMENT_ROOT', 'G:\server\Apache Group\Apache2\htdocs\');

to

define('DIR_FS_DOCUMENT_ROOT', 'G:\server\Apache Group\Apache2\htdocs');

Link to comment
Share on other sites

define('DIR_FS_DOCUMENT_ROOT', 'G:\server\Apache Group\Apache2\htdocs\');

to

define('DIR_FS_DOCUMENT_ROOT', 'G:\server\Apache Group\Apache2\htdocs');

 

Thanks John,

 

That may have fixed one problem. Unfortunately not all of them (blank screens still coming up).

 

I also changed back slashes to forward slashes, not sure if that is important

 

Will keep plugging away...

Link to comment
Share on other sites

I think this might be a clue!

 

Here is the message I get in my Apache error log after trying to execute a php file from within the admin folder:

 

[Mon Apr 25 11:18:31 2005] [error] [client 127.0.0.1] PHP Warning: main(includes/languages/english/) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in G:\\server\\apache group\\Apache2\\htdocs\\radmin\\includes\\application_top.php on line 133, referer: http://localhost/radmin/

[Mon Apr 25 11:18:31 2005] [error] [client 127.0.0.1] PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening 'includes/languages/english/' for inclusion (include_path='.;C:\\php5\\pear') in G:\\server\\apache group\\Apache2\\htdocs\\radmin\\includes\\application_top.php on line 133, referer: http://localhost/radmin/

[Mon Apr 25 11:18:31 2005] [error] [client 127.0.0.1] PHP Fatal error: Cannot re-assign $this in G:\\server\\apache group\\Apache2\\htdocs\\radmin\\includes\\classes\\upload.php on line 31, referer: http://localhost/radmin/

 

Any ideas??

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...