♥JcMagpie Posted December 28, 2017 Share Posted December 28, 2017 I have been sorting out a few issued with my bootstrap Gold installed sites and have managed sort these out now thanks to much help from the forum. Now I know Gold is already out of date and people are recommending using Edge to avoid problem in the future. So having a new site to set up I down loaded Edge and installed it. The server side install was fine and admin works untill you go to add modules then this!. The shop side is another story altogether as nothing works! Just get this error! http://www.medchill.com/xxxx/modules_content.php Parse error: syntax error, unexpected T_CONST in /home/xxxxx/public_html/includes/languages/english/modules/content/index_nested/cm_in_new_products.php on line 13 The shop side just get this error! Fatal error: Call to undefined function tep_get_languages() in /home/xxxxx/public_html/index.php on line 15 on checking i found the index.php file that the instalation plased on server side was only a fraction of the size that was in the original un ziped pakage? so silply FTP larger file over and shop front now showing but new error on screen! syntax error, unexpected T_CONST in /home/xxxxx/public_html/includes/languages/english/modules/content/index/cm_i_customer_greeting.php FTP of new file did not fis this! Looks like Modules for products is broken. Trying to add product or edit product results in this error, Parse error: syntax error, unexpected T_CONST in /home/xxxxx/public_html/admin/includes/languages/english/categories.php on line 112 Wow instalation has never been this painfull in the past. Going to stop untill I get some feedback. Link to comment Share on other sites More sharing options...
ArtcoInc Posted December 28, 2017 Share Posted December 28, 2017 @justcatering Already asked and answered ... Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 28, 2017 Author Share Posted December 28, 2017 Yes sorry took me a bit of time to realise but found it was the same issue as with Gold. I just assumed it would have been fixed in Edge so went looking elsewhere just goes to show never assume! Thanks. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 28, 2017 Author Share Posted December 28, 2017 Not as simple as I first thought. Applied all the changes as done in Gold to Front page module and category on front page module and got most of it working but stuck on a few problems both on admin and front end. On admin got most of it working. Keep getting these 43errors which I stuck on, Parse error: syntax error, unexpected T_CONST in /home/medchill/public_html/xx/includes/languages/english/categories.php on line 112 Parse error: syntax error, unexpected T_CONST in /home/medchill/public_html/xx/includes/languages/english/manufacturers.php on line 51 Parse error: syntax error, unexpected T_CONST in /home/medchill/public_html/xx/includes/languages/english/reviews.php on line 48 And this one in the Tools section. Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /home/medchill/public_html/xx/newsletters.php on line 33 On the shop front its all working except fro the fact nothing shows as far as actual category images and names just a long list of error codes. Even with the supplied test index.php Warning: include(DIR_WS_MODULEScontent/front_page/templates/cm_fp_categories_images.php) [function.include]: failed to open stream: No such file or directory in /home/medchill/public_html/includes/modules/content/front_page/cm_fp_categories_images.php on line 41Warning: include(DIR_WS_MODULEScontent/front_page/templates/cm_fp_categories_images.php) [function.include]: failed to open stream: No such file or directory in /home/medchill/public_html/includes/modules/content/front_page/cm_fp_categories_images.php on line 41Warning: include() [function.include]: Failed opening 'DIR_WS_MODULEScontent/front_page/templates/cm_fp_categories_images.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/medchill/public_html/includes/modules/content/front_page/cm_fp_categories_images.php on line 41Warning: include(DIR_WS_MODULEScontent/front_page/templates/cm_fp_text_main.php) [function.include]: failed to open stream: No such file or directory in /home/medchill/public_html/includes/modules/content/front_page/cm_fp_text_main.php on line 41Warning: include(DIR_WS_MODULEScontent/front_page/templates/cm_fp_text_main.php) [function.include]: failed to open stream: No such file or directory in /home/medchill/public_html/includes/modules/content/front_page/cm_fp_text_main.php on line 41Warning: include() [function.include]: Failed opening 'DIR_WS_MODULEScontent/front_page/templates/cm_fp_text_main.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/medchill/public_html/includes/modules/content/front_page/cm_fp_text_main.php on line 41 It could be me being stupid but the index.php is as supplied for test. It' late and I'm not sure I'm thinking stright so going to stop and as for imput before I get more confused! Hopfully someone will know what silly mistake I have made. Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 29, 2017 Share Posted December 29, 2017 If you are using one of the later versions of Edge, definitions for some things, like DIR_WS_MODULES, are not allowed. You need to change any occurrence of them to the actual location, like 'includes/modules/' (shown apostrophes required). There is an addon that can be installed to still use them if prefer that method. I don't recall its name but search the addons for compatibility and you should be able to find it, or someone may post a link here. 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...
Dan Cole Posted December 29, 2017 Share Posted December 29, 2017 I think Jack is referring to this add on.... https://apps.oscommerce.com/RNywS&add-on-compatibility-for-2-3-4-edge Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 @justcatering please be a little bit careful about posting links. I have just removed your Admin URL !! Please tell us what version of PHP your hosting is ? Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 Wow ok just been a bad day! PHP is 5.2.17 Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 1 minute ago, justcatering said: Wow ok just been a bad day! PHP is 5.2.17 5.2 is too old... Can you update to at least 5.4 ? Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 Not sure on a shared server and hosting people very reluctent to update as other sites may have conflict. I will ask agian just to be sure. Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 It might help them to make a decision if you state that EOL (end of life) on the 5.2 series was almost exactly 7 years ago). http://php.net/eol.php If they say "no" to an upgrade, you would be well advised to find a new host, but of course only you can make that decision and there might be other reasons why this host is ok for you. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 A number of my working site ( ie my income) have been running for over 15 years with this host and there all based on 2.2a with a lot of mods. Will this imapct there running? I know I need to update hence the work with Edge but untill I get one site running as required i dont want to risk crashing the 2.2a sites as then i'll be Pennyless!! Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 5 minutes ago, justcatering said: A number of my working site ( ie my income) have been running for over 15 years with this host and there all based on 2.2a with a lot of mods. Will this imapct there running? I know I need to update hence the work with Edge but untill I get one site running as required i dont want to risk crashing the 2.2a sites as then i'll be Pennyless!! It's not possible to say. I would suggest moving the new site to a different server at the same host, or get it it's own hosting account at another host. You need to be at 5.4 minimum for the Community Version, I'm pretty sure Paypal modules etc require 5.4. What we did in the Bootstrap changes is easy enough to solve (change const to define, that's about it IIRC)...but you will have problems in other areas, which are not easily solvable! Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 Actually it may be better for me to start again from scratch just in case I’m missing something simple. I want to use edge so that I don’t need to have to change yet again in any large way for the next few years. I have a test site that I have 95% of the way I want it using Gold you can see it here www.justcooking.co.uk Now this site is used as a catalogue for my customers so they have the ability to check products on their phone and many have stated this is a help as they can then buy of the main site later. www.justcatering.com The main feature on all my sites is the ability to have the categories show on the front page. Don’t ask why, just works for me and my customers. As you can see I my Gold site is just about done, just want to do the same with Edge, I saw that in the installation it says many modules have been included in Edge but on installing it I could not find any way of doing the same as Gold with the addons hence me adding them to Edge? Sorry the test site beeing used for Edge is www.medchill.com . Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 OK did a total wipe of site and new fress install of Edge only new database and all no mods. Site is up but gives error and admin is up but gives error on store you get Parse error: syntax error, unexpected T_CONST in includes/languages/english/modules/content/index/cm_i_customer_greeting.php on line 13 on admin when you try to go to Categories/Products Parse error: syntax error, unexpected T_CONST in includes/languages/english/categories.php on line 112 Content going to content in modules gives Parse error: syntax error, unexpected T_CONST in includes/languages/english/modules/content/index_nested/cm_in_new_products.php on line 13 So looks like I'm going to have to use Gold for now. Link to comment Share on other sites More sharing options...
Dan Cole Posted December 29, 2017 Share Posted December 29, 2017 This is back to Gary's point....get a hosting package with at least php 5.4 so you can develop a site to move forward with. Otherwise you're going to have a site that is behind right from the get go. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 1 hour ago, justcatering said: Parse error: syntax error, unexpected T_CONST Let's try again... ;) If you are wanting to use Edge, you need to be on 5.4 minimum. OR... you change all consts to defines Here is a list of consts; https://github.com/gburton/Responsive-osCommerce/search?utf8=✓&q=const And here is an example of how to change to a define; FROM: const MODULE_CONTENT_NEW_PRODUCTS_TITLE = 'New Products'; TO: define('MODULE_CONTENT_NEW_PRODUCTS_TITLE', 'New Products'); After these consts are changed... you should be OK. But then, of course, the next time you want to upgrade you cannot simply overwrite a file as you have changed core code to suit your particular circumstances. I cannot stress enough...the following (which are meant helpfully); A host stuck on php5.2 is not a host I would want to deal with If you want to use Edge, the README states a minimum PHP version, if you are on an older version...things might not work If things don't work, you need to change core code appropriately (and then remember forever more what you changed!) Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 Thanks I am going to try and make it work as once i haave made the changes to one and made a list of them then doing to other sites should be ok. Will just keep at it and see how far i get. Thanks for all the help. Link to comment Share on other sites More sharing options...
MrPhil Posted December 29, 2017 Share Posted December 29, 2017 Changing to PHP 5.6 (the earliest currently supported PHP release) will likely break an osC 2.2 RC2a store (which is quite ancient). You should not stay at earlier PHP releases, such as 5.2, except where your site will break. Even then, you should be making plans to upgrade to the current osC (Edge) on a proper server (PHP 5.6 or better, 7.x)), just to get caught up with the current PHP and osC releases, and not have to worry so much over whether your current store is going to suddenly drop dead when your host upgrades something. You should talk with your host about whether it's possible to select different PHP releases (via .htaccess or php.ini file entries) for the different directories containing osC 2.2 and Edge shops. Many hosts have multiple levels of PHP installed, making one the default, and allowing you to select others on a per-directory basis. If they can't or won't do that, can you get your new work (Edge shop) on a different server which is up to date (at least, PHP 5.6), preferably without having to pay for a new account? If not, look for a better host for your new work (the Edge shop). You don't want to be forced to stay at PHP 5.2 (which is totally unsupported and easy to hack), and can't even run Edge on that, so if your host thinks it's fine to stay at PHP 5.2, it's time to move on. On the other hand, if they're bending over backwards to let you run 5.2 for your existing store, see if you can easily run 5.6 for Edge. Eventually, you should end up with a current osC store (Edge) on a current PHP release (5.6, or better, 7.x), and your 2.2 store's data has been migrated over and that store closed. You'll be so much better off! Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 Ok well done most of it, only one error now on the admin side for news letter! Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /newsletters.php on line 33 line 33 is, $allowed = array_map(function($v) {return basename($v, '.php');}, glob('includes/modules/newsletters/*.php')); must be something i'm missing! Link to comment Share on other sites More sharing options...
greasemonkey Posted December 29, 2017 Share Posted December 29, 2017 newsletters/*.php' is wrong. Try newsletters.php' Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 4 minutes ago, MrPhil said: Changing to PHP 5.6 (the earliest currently supported PHP release) will likely break an osC 2.2 RC2a store (which is quite ancient). You should not stay at earlier PHP releases, such as 5.2, except where your site will break. Even then, you should be making plans to upgrade to the current osC (Edge) on a proper server (PHP 5.6 or better, 7.x)), just to get caught up with the current PHP and osC releases, and not have to worry so much over whether your current store is going to suddenly drop dead when your host upgrades something. You should talk with your host about whether it's possible to select different PHP releases (via .htaccess or php.ini file entries) for the different directories containing osC 2.2 and Edge shops. Many hosts have multiple levels of PHP installed, making one the default, and allowing you to select others on a per-directory basis. If they can't or won't do that, can you get your new work (Edge shop) on a different server which is up to date (at least, PHP 5.6), preferably without having to pay for a new account? If not, look for a better host for your new work (the Edge shop). You don't want to be forced to stay at PHP 5.2 (which is totally unsupported and easy to hack), and can't even run Edge on that, so if your host thinks it's fine to stay at PHP 5.2, it's time to move on. On the other hand, if they're bending over backwards to let you run 5.2 for your existing store, see if you can easily run 5.6 for Edge. Eventually, you should end up with a current osC store (Edge) on a current PHP release (5.6, or better, 7.x), and your 2.2 store's data has been migrated over and that store closed. You'll be so much better off! Well have been looking at it for a while now but no simple route. All my sites are stabel and working currently (touch wood) This work now is to slowly move to Edge which will work with updated PHP, so looking for the simple solution of geting one site working ans stable so when i do move can have confidence in not beeing down! Hosts are allways problamatic, if cost was no option would go for dedicated server! but its not so have to work within budgets. Never had a problem on the hosting front untill now, for the last 15 years its just worked. It was like this when I started out with 2.2 spent time geting one site rock solid and then just used as requred and t worked for last 15 years. Hopefully Edge will go the same way with some more work. Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 No that just gave the same error code but with /newsletters.php on line 33 Link to comment Share on other sites More sharing options...
burt Posted December 29, 2017 Share Posted December 29, 2017 36 minutes ago, justcatering said: line 33 is, $allowed = array_map(function($v) {return basename($v, '.php');}, glob('includes/modules/newsletters/*.php')); That is correct code, and is an "anonymous function" which is for php5.3 onwards. You'll need to work around that, or just not use the newsletter page. must be something i'm missing! The advice to use a host capable of hosting osCommerce, ie one that is not on 7 years out of date php! Link to comment Share on other sites More sharing options...
♥JcMagpie Posted December 29, 2017 Author Share Posted December 29, 2017 Thats fine I can live without that. Have never used that function anyway. OK so ingnoring this no other errors on back end or front have been over every option all work with out error. Ok so to my original wish to get the catogory images to show on the front page? not founf that function anywere in the modules sectoin am i missing some thing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.