Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Admin problem after upgrade to PHP 4.3.4


cold1too

Recommended Posts

I just installed oscommerce and had everything working (admin & catalog) except for the shopping cart. I'm running Win2k Pro & IIS and read a post that said to upgrade PHP 4.3.2 to 4.3.3 to fix the problem. I installed PHP 4.3.4 only to discover that not only does the shopping cart still not work but now I can't access the admin page. I get the following errors,

 

Parse error: parse error, unexpected T_STRING in admin\includes\configure.php on line 21

Warning: main(DIR_WS_INCLUDESfilenames.php): failed to open stream: No such file or directory in admin\includes\application_top.php on line 44

Fatal error: main(): Failed opening required 'DIR_WS_INCLUDESfilenames.php'  in admin\includes\application_top.php on line 44

 

I can't find any missing quotes or semi-colons in the configure.php file. Am I missing something here? This is the exact same config file I was using when everything was running fine

 

  define('HTTP_SERVER', 'http://thor/');
 define('HTTP_CATALOG_SERVER', 'http://thor/catalog/');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false');
 define('DIR_FS_DOCUMENT_ROOT', 'g:\inetpub\wwwroot\');
 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 . '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_DOCUMENT_ROOT . '\admin\backups');

// define our database connection
 define('DB_SERVER', 'localhost');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

Look in application_top for this:

 

} else {

define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);

}

 

// include the list of project filenames

require(DIR_WS_INCLUDES . 'filenames.php');

 

// include the list of project database tables

require(DIR_WS_INCLUDES . 'database_tables.php');

Link to comment
Share on other sites

Ok, folks I fixed it. The problem is I'm not really sure how I did it, but I'll run you through the steps I took! By the way, I'm running IIS on Win2k Pro.

 

I first upgraded from PHP 4.3.2 to PHP 4.3.4, although I tried this yesterday and it didn't solve the 'shopping cart is empty' problem in and of itself. I think the issue is correctly configuring the php.ini file.

 

Here are the changes I made to the php.ini file.

 

Under the "Paths and Directories" section of php.ini I made the following changes.

 

include_path = ".;c:\yourWebRoot\admin\includes"   
doc_root = "c:\yourWebRoot"
fastcgi.impersonate = 1     (IIS only)

 

Under "Data Handling" section

 

register_globals = On

 

Under "Language" Section

 

expose_php = Off

 

Under "Session" Section

 

session.cookie_domain = yourdomain

 

 

Conclusion

 

I realize that some of these changes probably have nothing to do with getting the shopping cart to work on windows machines, but since I'm not really sure what got it working, I thought I would just list every change I made no matter how unrelated. I will say this though, the doc_root and fastcgi.impersonate values were the only things I didn't set yesterday (I think) when the shopping cart wasn't working.

 

Hope it helps

Link to comment
Share on other sites

By the way, I got the admin page back up and running by making the following changes to the configure.php file in the admin directory. (compare to the first post of the configure.php file contents)

 

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

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

define('HTTPS_CATALOG_SERVER', '');

define('ENABLE_SSL_CATALOG', 'false');

define('DIR_FS_DOCUMENT_ROOT', 'c:\inetpub\wwwroot');

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 . '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', 'c:\inetpub\wwwroot\admin\backups');

 

// define our database connection

define('DB_SERVER', 'localhost');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...