totenmaske Posted December 16, 2004 Share Posted December 16, 2004 I'm fairly new to PHP (don't shoot me!) and osCommerce especially. I'm in the process of setting up a website for my wife to retail some gift items using osCommerce. Normally I code in straight HTML (HomeSite 5.0) so a lot of the PHP include stuff is tripping me up. What I'm trying to do is use ARELIS to create a link partners page in a sub-directory. I've uploaded a test page (index.php) in a sub called "directory" but I'm getting all kinds of errors Warning: main(includes/configure.php): failed to open stream: No such file or directory in /home/domain/public_html/includes/application_top.php on line 29 Fatal error: main(): Failed opening required 'includes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/domain/public_html/includes/application_top.php on line 29 I want to mimic the look and feel of the rest of the osCommerce site...so how do I map the includes to work correctly from a sub? Stan Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 16, 2004 Share Posted December 16, 2004 I'm fairly new to PHP (don't shoot me!) and osCommerce especially. I'm in the process of setting up a website for my wife to retail some gift items using osCommerce. Normally I code in straight HTML (HomeSite 5.0) so a lot of the PHP include stuff is tripping me up. What I'm trying to do is use ARELIS to create a link partners page in a sub-directory. I've uploaded a test page (index.php) in a sub called "directory" but I'm getting all kinds of errorsI want to mimic the look and feel of the rest of the osCommerce site...so how do I map the includes to work correctly from a sub? Stan <{POST_SNAPBACK}> Since you are in a sub-directory, you the needed files cannot be seen. You will need to add a ../ to cause the code to look up one level. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
totenmaske Posted December 16, 2004 Author Share Posted December 16, 2004 Jack, Thanks for the reply. I thought of adding the ../ but I'm still getting errors. I'm going to try something simple first like seeing if I can get the header by itself to display on the page. But you agree it should be able to be done? Link to comment Share on other sites More sharing options...
totenmaske Posted December 16, 2004 Author Share Posted December 16, 2004 OK...tried something simple <link rel="stylesheet" type="text/css" href="../stylesheet.php"> <?php require('../includes/header.php'); ?> got this Fatal error: Call to a member function on a non-object in /home/enchant/public_html/includes/header.php on line 58 ...and I though this was going to be easy like SSI! Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 17, 2004 Share Posted December 17, 2004 Sorry, but on thinking about this I don't think you can do it, at least not easily. The problem is that when you include a file like application_top, it has other includes that don't inherit the relative path. You could go through all of the files that are called in your code and change any include/require to go up one level. There is also a contribution (quite a few actually) here that says it will allow you to do what you want. I don't have anymore ideas at the moment though. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
TCwho Posted December 17, 2004 Share Posted December 17, 2004 well... here is what I did to create a page that had the same look as the rest of the site... if I forget something please somone correct me: I used the same principle of creating a new info box.... I copied and renamed a clean page of privacy.php in /catalog and in language/english and catalog/includes/boxes ..before It was changed... I then adjusted the files ..... I took a look at the logical flow of the files and ....just got it to work with some trial and error :thumbsup: :::Edited::: and renamed the files to the new name of course :P Drop_Shadow How Did You Hear About Us Email HTML Order Link ---- GMT -5:00 Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 17, 2004 Share Posted December 17, 2004 Yes, there is nothing wrong with creating files like this in the root directory as you have done. But I though you wanted it in a sub-directory? Also, if you are using privacy.php as a guide to create a page, it doesn't have a reference in boxes/ so I'm not sure what you changed there but it was probably not needed. See my PageMaker contrtbution in my signature if you want a quick and easy way to generate new pages. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
TCwho Posted December 18, 2004 Share Posted December 18, 2004 Yes, there is nothing wrong with creating files like this in the root directory as you have done. But I though you wanted it in a sub-directory? OOOPS. :P Not me..but person who started this thread.... Also, if you are using privacy.php as a guide to create a page, it doesn't have a reference in boxes/ so I'm not sure what you changed there but it was probably not needed Hmm...I took a look at my backup copy of a fresh install of osC....and your right? I dont remember why???I know I got some error.....????????? ...... So out of curiosity...I took out the new page in boxes...and got this error: Warning: main(includes/boxes/scholars.php): failed to open stream: No such file or directory in /homepages/15/d113630270/htdocs/catalog/includes/column_left.php on line 18 Fatal error: main(): Failed opening required 'includes/boxes/scholars.php' (include_path='.:/usr/local/lib/php') in /homepages/15/d113630270/htdocs/catalog/includes/column_left.php on line 18 and as I was remember the whole thing..........I remember the error...but if it was privacy...where did I get the code from ..since there is not privacy.php in boxes.....and IT HIT ME....It wasnt privacy... it was " information.php " that I based everything on :blush: See my PageMaker contrtbution in my signature if you want a quick and easy way to generate new pages. Will do next time :thumbsup: But I did have fun doing it on my own!!! This is FUN! Drop_Shadow How Did You Hear About Us Email HTML Order Link ---- GMT -5:00 Link to comment Share on other sites More sharing options...
totenmaske Posted December 19, 2004 Author Share Posted December 19, 2004 Thank you everyone for the input...I think I'll just clone one of the "displayed" pages, edit out all the dynamic content (info boxes etc) and generate the links pages at straight HTML... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.