Page 1 of 1

oscommerce file including warning

Posted: Thu Oct 12, 2006 1:22 pm
by amir
i have a file in my root directory i.e. www\index.php
i have another file in www\catalog\includes\column_left.php ( of Oscommerce )

what i wanna do is to include www\catalog\includes\column_left.php into www\index.php, but when i do this, it gives me two warnings

i m including it as include "/catalog/includes/column_left.php";

Warning: include(/catalog/includes/column_left.php) [function.include]: failed to open stream: No such file or directory in D:\AppServ\www\index.php on line 677

Warning: include() [function.include]: Failed opening '/catalog/includes/column_left.php' for inclusion (include_path='.;C:\php5\pear') in D:\AppServ\www\index.php on line 677

any help would be greatly appreciated
thanks in advance

Posted: Thu Oct 12, 2006 1:46 pm
by miro_igov
try catalog/includes/column_left.php , without leading slash

Posted: Thu Oct 12, 2006 1:51 pm
by amir
thanks but
errors got change to

Warning: require(DIR_WS_BOXESshopping_cart.php) [function.require]: failed to open stream: No such file or directory in D:\AppServ\www\catalog\includes\column_right.php on line 13

Fatal error: require() [function.require]: Failed opening required 'DIR_WS_BOXESshopping_cart.php' (include_path='.;C:\php5\pear') in D:\AppServ\www\catalog\includes\column_right.php on line 13

Posted: Thu Oct 12, 2006 2:23 pm
by miro_igov
Did you defined the constant DIR_WS_BOXES ?

Or did you inclued the file in which this constant is defined ?

It should be defined in includes/configure.php and this file should be included into application_top.php, also application_top.php should be included in every page of your oscommerce :)

Posted: Thu Oct 12, 2006 2:30 pm
by miro_igov
Oh i see you should include the file catalog\includes\application_top.php into www\index.php


But this will change the look of your index.php so there is no way to include column_right.php directly into your index.php. So beter develop a custom script which does similar things like column_right.php, but designed to work on index.php

Posted: Thu Oct 12, 2006 2:45 pm
by amir
yes all the definitions are in configure.php and its included.

Posted: Thu Oct 12, 2006 3:21 pm
by amir
thanks for your kind assistance, now i am going for oscommerce index.php to customise.