bobbykeziah Posted April 16, 2004 Posted April 16, 2004 I Have Tried To Install The Print Catalog Contribution And I Can Not Get It Right. I Keep Getting A Pars Error. this Is My file <?php /* $Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_INFORMATION ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> And I Need to Add '<a href="' . tep_href_link(FILENAME_PRINT_CATALOG, '', 'NONSSL') . '" target="_BLANK">' . BOX_INFORMATION_PRINT_CATALOG . '</a>'); Be sure the line above the new line has a break, a single quote, a space, and a period at the end. I.E. ..... NTACT . '</a><br>' . Can Anyone Show Me what this means And How to Fix it Please. Quote
Chris Dunning Posted April 16, 2004 Posted April 16, 2004 First Off, Don't Capitalize Every Word You Type. Now then - it would help us all very much if you would copy and paste the error you're getting so we know where to look. Quote Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
dasaro Posted April 16, 2004 Posted April 16, 2004 I am also having problems adding this and any other contribution. I have uploaded all of the necessary files (4 of them) into the corresponding folders and added the .sql file to my database with no errors. By the way, I'm using the catalog_products_with_images_3.0_MS2 contrib. When I try to edit my first file, catalog/includes/filenames.php, my website creates a couple of warning messages that appear on every page. Please see at TooManyTools.com. I'm only adding the following to the file: // CATALOG_PRODUCTS_WITH_IMAGES_mod define('FILENAME_CATALOG_PRODUCTS_WITH_IMAGES', 'catalog_products_with_images.php'); I was playing around with this last night and ended up restoring every thing. This morning, I've taken it one step at a time and looked at my site after each to see which causes the errors. I have deleted the three lines I added, yet still get the error messages. I tried adding the latest news box a week ago and really messed somethings up, resulting in another restoration of my backup. It seems that I can upload files all day long, but the first time I try to edit ANYTHING, I get errors everywhere. Please HELP!!!! Quote
Chris Dunning Posted April 16, 2004 Posted April 16, 2004 (edited) Your error message says this: Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/toomany/public_html/includes/filenames.php:100) in /home/toomany/public_html/includes/functions/sessions.php on line 67 At the top right of the screen is a link that says "collaborative documentation effort." Click that link and search for "headers sent." I'm sure you'll find your answer. Edited April 16, 2004 by BlueNoteMKVI Quote Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
bobbykeziah Posted April 16, 2004 Author Posted April 16, 2004 I am not sure what you mean about the capitalizing each word cause all i did was cut copy and past. The Error I am getting Says Parse error: parse error in /home/housepla/public_html/plantstore/includes/boxes/information.php on line 32 This is the current file that gives the error <?php /* $Id: information.php,v 1.5 2002/01/11 22:04:06 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2001 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_INFORMATION ); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<a href="' . tep_href_link(FILENAME_SHIPPING, '', 'NONSSL') . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRINT_CATALOG, '', 'NONSSL') . '" target="_BLANK">' . BOX_INFORMATION_PRINT_CATALOG . '</a>'); '<a href="' . tep_href_link(FILENAME_PRIVACY, '', 'NONSSL') . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL') . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . '">' . BOX_INFORMATION_CONTACT . '</a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Please help Quote
dasaro Posted April 16, 2004 Posted April 16, 2004 Thanks, Blue. That fixed everything and I've even been able to add the latest news contrib. However, I am having a slight problem with that one now. I have ZERO error codes, but 'Latest News' does not show up under catalog in admin, or anywhere for that matter. I have no way of changing the news items. My admin/includes/boxes/catalog.php has the following: // '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_LATEST_NEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_LATEST_NEWS . '</a>' ); which is exactly as it is given in the installation instructions, save the // in front of the latest news stuff. Leaving that out gives a parse error. Anywho, at the bottom of the file, I've added the following: tep_admin_files_boxes(FILENAME_LATEST_NEWS, BOX_CATALOG_LATEST_NEWS)); thinking that it was needed. Well, this addition did nothing. No errors, no results. So, if you think you might know, give me a holler. Let me know if you would like the entire file. Regards!!! Quote
dasaro Posted April 16, 2004 Posted April 16, 2004 bobby, I'm new to php, so don't take my advice as gospel. But I do see what I think is a formatting mistake. Try replacing: '<a href="' . tep_href_link(FILENAME_PRINT_CATALOG, '', 'NONSSL') . '" target="_BLANK">' . BOX_INFORMATION_PRINT_CATALOG . '</a>'); with '<a href="' . tep_href_link(FILENAME_PRINT_CATALOG, '', 'NONSSL') . '" target="_BLANK">' . BOX_INFORMATION_PRINT_CATALOG . '</a><br>' . Regards!! Quote
bobbykeziah Posted April 16, 2004 Author Posted April 16, 2004 Thanks So Much as That was it. it now works like A Champ. Quote
Chris Dunning Posted April 16, 2004 Posted April 16, 2004 Dasaro - Putting a // in front of a line tells php not to read that line - to ignore it. That's why you have no link to your latest news, you told php not to read the line that creates the link. I dont' know why you're getting an error from that line, nothing jumps out at me. I'm not sure what tep_admin_files_boxes() does...can you enlighten me? Bobby - It's Not Proper English To Capitalize Every Word In A Sentence. That's What I'm Talking About. Most Of Us Just Capitalize The First Word In A Sentence, As Well As Any Proper Nouns. For example, in this sentence, I have capitalized Bobby because that's your name, a proper noun. I also capitalize "I" because it's always capitalized. Quote Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
dasaro Posted April 16, 2004 Posted April 16, 2004 I've gathered that from what I've seen. But, I added the // because that is what all of the other links start with. See the code below. <?php /* $Id: catalog.php,v 1.21 2003/07/09 01:18:53 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ ?> <!-- catalog //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_CATALOG, 'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog')); if ($selected_box == 'catalog') { $contents[] = array('text' => //Admin begin // '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_NEW_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_NEW_ATTRIBUTES . '</a><br>' . // '<a href="' . tep_href_link('easypopulate.php', '', 'NONSSL') . '" class="menuBoxContentLink">Easy Populate</a><br>'. // '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_SALEMAKER, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SALEMAKER . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_FEATURED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_FEATURED . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' . // '<a href="' . tep_href_link(FILENAME_LATEST_NEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_LATEST_NEWS . '</a>' ); tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS) . tep_admin_files_boxes(FILENAME_NEW_ATTRIBUTES, BOX_CATALOG_NEW_ATTRIBUTES) . tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES) . tep_admin_files_boxes(FILENAME_EASY_POPULATE, BOX_CATALOG_EASY_POPULATE) . tep_admin_files_boxes(FILENAME_MANUFACTURERS, BOX_CATALOG_MANUFACTURERS) . tep_admin_files_boxes(FILENAME_REVIEWS, BOX_CATALOG_REVIEWS) . tep_admin_files_boxes(FILENAME_SPECIALS, BOX_CATALOG_SPECIALS) . tep_admin_files_boxes(FILENAME_SALEMAKER, BOX_CATALOG_SALEMAKER) . tep_admin_files_boxes(FILENAME_FEATURED, BOX_CATALOG_FEATURED) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXPECTED, BOX_CATALOG_PRODUCTS_EXPECTED) . tep_admin_files_boxes(FILENAME_LATEST_NEWS, BOX_CATALOG_LATEST_NEWS)); //Admin end } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- catalog_eof //--> All of the '<a href=... lines start with the //. So I figured that my addition would need it as well. Turns out it does because without it I get a parse error in admin. If I remove all of these, I get the same thing. Here is the error code: Parse error: parse error in /home/toomany/public_html/admin/includes/boxes/catalog.php on line 47 I don't understand what line 47 has to do with an error, because I didn't change it. I take it that "parse error" means incorrect coding? Or wrong formatting? I added the tep_admin_files_boxes() just because it seemed that it needed to be there. Again, all of the other links had this, so I thought it might be the problem. It wasn't and I still don't know what is. Thanks! Quote
Guest Posted April 16, 2004 Posted April 16, 2004 parse error means something is missing somewhere, it could even be in line 46 causing it to appear as 47 just post 45 thru 49 here Quote
dasaro Posted April 16, 2004 Posted April 16, 2004 Well, I don't think that will work because I have done some rearranging and those lines are no longer relevant. I moved the link declaration up to right before 'manufacturers' as an attempt to alphabetize the list (sort of). Still nothing. So I went ahead and removed the // in front and, voila, it now appears in the admin/catalog section, though it is not in the correct order. It is at the very top. Ideas on how to change this? However, this only solves part of the problem. Now, when I click on the newly-appearing 'Latest News,' I get a window that says the following: No Right Permission Access Please contact your Web Administrator to request more access or if you found any problem. What?!? I AM the web administrator. What permission(s) do I need to alter/delete/add and where to allow me to do what I want to do? Also, I curiously began removing the // in front of the other links and now they begin to appear twice in the catalog menu. I'll put those back, but why does this happen? I removed the tep_... thing I added. No need for it (I think). Regards! Quote
Chris Dunning Posted April 18, 2004 Posted April 18, 2004 It appears that you've added a contribution that made major alterations to your box. Are you using a "loaded" release from somewhere? There are many links in that box that are not stock osCommerce. Any line with a // at the front of it will not be read by PHP. I would guess that it was left there so you could see what the original code was compared to the new code. If you add a line and put // at the front of it, it's not going to make any difference to php. You might as well put it in and then delete it again. If a line "needs" a // to keep from getting a parse error...then the line is written incorrectly. So, when you removed the // from the front of that link, it caused a parse error because that line was written to be a part of a larger command - that's all the code that's commented out (which is another way of saying "has a // at the front of it"). There's no end to that line - when the next line starts, php doesn't know what to do. Thus a parse error. This line: tep_admin_files_boxes(FILENAME_LATEST_NEWS, BOX_CATALOG_LATEST_NEWS)); is probably what's creating the link that you see. No Right Permission Access Please contact your Web Administrator to request more access or if you found any problem. That doesn't look like anything I've seen. I would guess that you're using some sort of admin access contribution as well, and you need to modify that contribution to allow you to view this file. Quote Chris Dunning osCommerce, Contributions Moderator Team Please do not send me PM! I do not read or answer these often. Use the email button instead! I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.