Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help! php crash


freecool

Recommended Posts

I am new to os Commerce..so forgive me for any simple questions.

Pls note that I am hosting my website on my PC.

 

I installed oscommerce with no problem, except that I didn't modify the permission setting on include/configuration.php file --as I don't know how under Windows XP --I have no idea what the article was talking about "'Set the permissions on:

/catalog/includes/configure.php

/catalog/admin/includes/configure.php to 706 or 777"

 

So I simply set these two files as "readonly" in windows explorer..

 

The problem is whenever I try to access the localhost/catalog , my site address, it always crashes, checked the record in apache log files and it shows "

[sun Nov 02 20:16:16 2003] [error] [client 127.0.0.1] Premature end of script headers: c:/apache/php/php.exe

[sun Nov 02 20:17:56 2003] [error] [client 127.0.0.1] Premature end of script headers: c:/apache/php/php.exe"

 

 

1) What does the erro mean?

Can some one help me with this?

 

2) Sometimes, depite php crash, i am still able to enter catalog/admin and view the contro panel of oscommerce, but i can't click any links on it, as it alway says "Forbidden

You don't have permission to access /catalog/admin/://192.169.0.100/admin/configuration.php on this server.

Apache/1.3.23 Server at localhost Port 80"

can some one tell me why?

 

 

I am running windows xp, apache, mysql, phpMyAdmin (bundled version from phptriad)

Your help is greatly appreciated!!!

 

Best ,

yours,

saddly coolnewbie

:(

Link to comment
Share on other sites

So I simply set these two files as "readonly" in windows explorer..
That is the correct thing to do.

 

It looks like your configure.php settings are incorrect. Here are some examples of how some should look:

  define('HTTP_SERVER', 'http://localhost'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://localhost'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'localhost');
 define('HTTPS_COOKIE_DOMAIN', 'localhost');

Hth,

Matt

Link to comment
Share on other sites

Thank you so much for your quick reply..and confirming the setting on permission under win xp..

As for the configuration.php files, i dont know whats wrong, it was just downloaded with os commerce and was never modified..i am pasting it below..hope it can help pin down the problem.

I am guessing maybe the problem is with myphdadmin program itself?

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

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

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'localhost');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '192.169.0.100/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

define('DIR_FS_CATALOG', 'c:/apache/htdocs/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', '192.168.0.100'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'XXX');

define('DB_SERVER_PASSWORD', XXX'');

define('DB_DATABASE', 'commerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

<?php

/*

? osCommerce, Open Source E-Commerce Solutions

? http://www.oscommerce.com

 

? Copyright ? 2003 osCommerce

 

? Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

? define('HTTP_SERVER', 'http://192.168.0.100'); // eg, http://localhost - should not be empty for productive servers

? define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

? define('ENABLE_SSL', false); // secure webserver for checkout procedure?

? define('HTTP_COOKIE_DOMAIN', 'localhost');

? define('HTTPS_COOKIE_DOMAIN', '');

? define('HTTP_COOKIE_PATH', '/catalog/');

? define('HTTPS_COOKIE_PATH', '');

? define('DIR_WS_HTTP_CATALOG', '/catalog/');

? define('DIR_WS_HTTPS_CATALOG', '');

? define('DIR_WS_IMAGES', 'images/');

? define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

? 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_DOWNLOAD_PUBLIC', 'pub/');

? define('DIR_FS_CATALOG', 'c:/apache/htdocs/catalog/');

? define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

? define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

? define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

? define('DB_SERVER_USERNAME', 'XXX');

? define('DB_SERVER_PASSWORD', XXX'');

? define('DB_DATABASE', 'commerce');

? define('USE_PCONNECT', 'false'); // use persistent connections?

? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Try using this for your configure.php

 

Mainly (at a quick glance anyways), you need to define your http server(http://192.168.0.100), define the catalog dir to the virtual directory (/catalog/), and set the DB server to "localhost".

 

Good luck

Link to comment
Share on other sites

Thanks a lot, CJAndT, for your help!

I tried your files--password changed of course-, but it doenst seem to work and display the below error.

 

Odd thing is when I looked at my original config. file. the user name and password it used was the second user I created, who has limited permission, but not the first user created with myphadmin, which has full authority..

could this be the problem? but i tried to use both of the two users and same error returns..

Sorry,I am a total newbie and dont know much about coding,other than simple html to build a simple site without database.. I've tried hard to learn a little bit but this is just way over my head : )

 

....MANY thanks!!

best,

 

 

 

Parse error: parse error in c:\apache\htdocs\catalog\includes\configure.php on line 40

 

Fatal error: Failed opening required 'DIR_WS_INCLUDESfilenames.php' (include_path='.;c:\apache\php\pear') in c:\apache\htdocs\catalog\includes\application_top.php on line 53

Link to comment
Share on other sites

Thanks a lot, CJAndT, for your help!

I tried your files--password changed of course-, but it doenst seem to work and display the below error.

 

Odd thing is when I looked at my original config. file. the user name and password it used was the second user I created, who has limited permission, but not the first user created with myphadmin, which has full authority..

could this be the problem? but i tried to use both of the two users and same error returns..

Sorry,I am a total newbie and dont know much about coding,other than simple html to build a simple site without database.. I've tried hard to learn a little bit but this is just way over my head : )

 

....MANY thanks!!

best,

 

 

 

Parse error: parse error in c:\apache\htdocs\catalog\includes\configure.php on line 40

 

Fatal error: Failed opening required 'DIR_WS_INCLUDESfilenames.php' (include_path='.;c:\apache\php\pear') in c:\apache\htdocs\catalog\includes\application_top.php on line 53

well, i found that when i copy and pasted, there was an error in line 40,which is passwork section where i mistakenly had an extra quote mark there.

 

.but even after this corrected, the error message turns to below pasted.

Again this username is the second one i created..not the first one that has full permission..But neither username works anyway..

Also during the install process, I entered "192.168.0.100 as database server, instead of "LOCALHOST'--i dont know y it just didn't work when i use "localhost"

anyidea how to fix this? im totally beat!

 

---

Warning: Access denied for user: 'freexxx@localhost' (Using password: YES) in c:\apache\htdocs\catalog\includes\functions\database.php on line 19

 

Warning: MySQL Connection Failed: Access denied for user: 'freexxx@localhost' (Using password: YES) in c:\apache\htdocs\catalog\includes\functions\database.php on line 19

Unable to connect to database server!

Link to comment
Share on other sites

  define('DB_SERVER_PASSWORD', 'XXX');

The password should be between the ''. I would use localhost rather than the IP. The IP shown is non-routeable, so it won't allow other computers to see it anyway.

 

NEW: Sorry, I guess we were posting at the same time. Try replacing localhost with 192. whatever, if it worked during the install. Note: check database privileges to make sure that username@192... has privileges on the database through that password (may have to change password).

 

Hth,

Matt

Link to comment
Share on other sites

thanks so much..I changed back to 192.168.0.100 and it worked.!

but now I had the same problem as I first posted ..php.exe will crash...

message"error signature

szAppName : php.exe szAppVer : 0.0.0.0 szModName : php4ts.dll

szModVer : 0.0.0.0 offset : 000a956c :

 

hmm...first time to load php and oscommerce...so really dont know what's wrong...

I have tried to reinstall oscommerce over (didnt delete) with catalog/install, and re-import database. unfortunately that doesnt solve the problem..

 

maybe it's the php program that 's at fault?

 

oh, the user does have privileges, well, i actually upgraded its privileges to full , allowing delete, insert...etc.

 

I really appreciate your help!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...