Jump to content

ecartz

♥Ambassador
  • Content count

    3,760
  • Joined

  • Last visited

  • Days Won

    64

Reputation Activity

  1. Like
    ecartz got a reaction from bodhizatfa in SMTP with authentication on Phoenix 1.0.5.0   
    What change is that?
  2. Like
    ecartz got a reaction from valquiria23 in Error al cambiar el idioma   
  3. Thanks
    ecartz got a reaction from ejsolutions in SMTP with authentication on Phoenix 1.0.5.0   
    I'm not sure why you would have needed to modify general.php with that class.  Presumably application_top.php was to load the class but Phoenix should do that automatically. 
    <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2020 osCommerce Released under the GNU General Public License email is a class to assist with PHPmailer sendmail, SMTP and gmail compatibility */ require_once DIR_FS_CATALOG . 'includes/apps/PHPMailer/PHPMailerAutoload.php'; class email { private $lf, $mailer; private $debug = 0; private $debug_output = 'error_log'; const LINEFEEDS = ["\r\n", "\n", "\r"]; public function __construct($headers = '') { $this->mailer = new PHPMailer(); $this->mailer->XMailer = 'osCommerce ' . tep_get_version(); $this->mailer->SMTPDebug = $this->debug; $this->mailer->Debugoutput = $this->debug_output; $this->mailer->CharSet = CHARSET; $this->mailer->WordWrap = 998; if (EMAIL_TRANSPORT == 'smtp' || EMAIL_TRANSPORT == 'gmail') { $this->mailer->IsSMTP(); $this->mailer->Port = EMAIL_SMTP_PORT; if (EMAIL_SMTP_SECURE !== 'no') { $this->mailer->SMTPSecure = EMAIL_SMTP_SECURE; } $this->mailer->Host = EMAIL_SMTP_HOSTS; $this->mailer->SMTPAuth = EMAIL_SMTP_AUTHENTICATION; $this->mailer->Username = EMAIL_SMTP_USER; $this->mailer->Password = EMAIL_SMTP_PASSWORD; } else { $this->mailer->isSendmail(); } if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "\r\n"; } else { $this->lf = "\n"; } } public function add_text($text = '') { $this->mailer->IsHTML(false); $this->mailer->Body = str_replace(static::LINEFEEDS, $this->lf, $text); } public function add_html($html, $text = NULL, $images_dir = NULL) { $this->mailer->IsHTML(true); $this->mailer->Body = str_replace(static::LINEFEEDS, '<br />', $html); $this->mailer->AltBody = str_replace(static::LINEFEEDS, $this->lf, $text); if (isset($images_dir)) { $this->mailer->Body = $this->mailer->msgHTML($this->mailer->Body, $images_dir); } } public function add_message($email_text) { // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == 'true') { $this->add_html($email_text, $text); } else { $this->add_text($text); } } function add_attachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') { $this->mailer->AddAttachment($path, $name, $encoding, $type, $disposition); } public function build_message() { // do nothing; needed for compatibility } public function send($to_name, $to_addr, $from_name, $from_addr, $subject = '') { // No need to check for "\r\n" separately as will match the other two foreach (["\n", "\r"] as $line_ending) { foreach ([$to_name, $to_addr, $subject, $from_name, $from_addr] as $header_value) { if (false !== strstr($header_value, $line_ending)) { return false; } } } $this->mailer->From = $from_addr; $this->mailer->FromName = $from_name; $this->mailer->AddAddress($to_addr, $to_name); if (defined('EMAIL_FROM')) { $this->mailer->From = EMAIL_FROM; $this->mailer->FromName = STORE_NAME; $this->mailer->AddReplyTo($from_addr, $from_name); } else { $this->mailer->From = $from_addr; $this->mailer->FromName = $from_name; } $this->mailer->Subject = $subject; $result = $this->mailer->Send(); $this->mailer->clearAddresses(); $this->mailer->clearAttachments(); return $result; } } Save this email.php file in a directory named includes/system/override (which you will probably have to create) and see if it starts working. 
    Note that you may have to do some configuration somewhere.  And of course you need to upload the PHPMailer files.  I don't think that ext is the right place.  I'd put them in includes/apps/ or similar.  If you change that, change the require line. 
    I replaced the EMAIL_SMTP_REPLYTO with the Phoenix equivalent along with other changes. 
  4. Like
    ecartz got a reaction from ejsolutions in Edge VS Frozen   
    Yes.  Or to be more precise, Phoenix is the new Community Edition and Edge was an older Community Edition. 
  5. Thanks
    ecartz got a reaction from ejsolutions in Purchase without account for 2.3.4 and BS2334   
    Is this a brand new install?  Or an update of an older database?  In an update, I would check that you are using the newer version of the address_format table. 
  6. Like
    ecartz got a reaction from burt in I can't log in to the admin panel   
    You could try it with
    define('HTTP_COOKIE_DOMAIN', 'avto-focus.com'); define('HTTPS_COOKIE_DOMAIN', 'avto-focus.com'); But otherwise you may need to wait until someone other than me has a chance to offer suggestions. 
  7. Thanks
    ecartz got a reaction from ce7 in pass categories and product inforamtion to new page   
    Change
    echo tep_draw_form('quote', tep_href_link('quote.php', 'action=send'), 'post', '', true); to
    echo tep_draw_form('quote', tep_href_link('quote.php', tep_get_all_get_params(['action']) . 'action=send'), 'post', '', true);  
  8. Thanks
    ecartz got a reaction from ce7 in pass categories and product inforamtion to new page   
    Perhaps post the code where you say tep_draw_form ?  E.g. for adding to cart: 
    <?php echo tep_draw_form('cart_quantity', tep_href_link('product_info.php', tep_get_all_get_params(['action']). 'action=add_product', 'NONSSL'), 'post', 'role="form"'); ?> I suspect that you need, but are not using, tep_get_all_get_params. 
  9. Thanks
    ecartz got a reaction from zefeena in website gone funny!   
    Two quick guesses: 
    1.  The disk partition containing /var/tmp is full.  Fix by deleting some older files.
    2.  The directory /var/tmp had its file permissions change.  Either change the permissions back or change to a new directory. 
    In either case, /var/tmp is outside the osCommerce directory structure, so you would probably need help from your host.  This seems more of a system administration thing than an osCommerce thing. 
    If you administer this server yourself, on the Linux command line, try running
    df -k ls -ld /var/tmp The results of one of those two commands might be informative. 
    Your error_log and access_ssl_log.processed are huge.  Consider downloading and truncating them.  If you have log rotation set up, perhaps run it manually. 
  10. Thanks
    ecartz got a reaction from ce7 in no stock button in product_info   
    Note that the buy button can be shown either by a content module or by a PI module.  First check that you are editing the right one.  If you can't make any text appear when editing the template, you are probably editing the wrong one.  So either switch the location where you change the code or change which shows the buy button. 
  11. Thanks
    ecartz got a reaction from ArtcoInc in Is there a limit to the number of Global declarations?   
    In your module, leave off the global $any_out_of_stock and replace all occurrences of $any_out_of_stock with $GLOBALS['any_out_of_stock']
    If that doesn't help, please post every line where you use any_out_of_stock. 
    The reason why it doesn't allow you to add/edit/delete is that all of those do redirects.  You can't emit any HTML until after you do redirects. 
    It's acting like something is causing it to emit output early -- see if you can figure out what is doing that.  It would probably be something gated by any_out_of_stock. 
  12. Thanks
    ecartz got a reaction from zefeena in website gone funny!   
    Two quick guesses: 
    1.  The disk partition containing /var/tmp is full.  Fix by deleting some older files.
    2.  The directory /var/tmp had its file permissions change.  Either change the permissions back or change to a new directory. 
    In either case, /var/tmp is outside the osCommerce directory structure, so you would probably need help from your host.  This seems more of a system administration thing than an osCommerce thing. 
    If you administer this server yourself, on the Linux command line, try running
    df -k ls -ld /var/tmp The results of one of those two commands might be informative. 
    Your error_log and access_ssl_log.processed are huge.  Consider downloading and truncating them.  If you have log rotation set up, perhaps run it manually. 
  13. Thanks
    ecartz got a reaction from ce7 in foreach error   
    It's telling you that that function is not returning an array.  It would need to consistently return an array to be used that way. 
  14. Thanks
    ecartz got a reaction from ce7 in Insert / Update / Delete Categories Images   
    No, the DB update would stay the same.  The only change you'd need to make is " . TABLE_CATEGORIES . " to categories.  Otherwise , the code that you posted should be correct.  Except that it's missing the confirmation step.  You have the button and you have the code that processes the confirmation.  But I don't see the actual step for confirming the deletion. 
  15. Thanks
    ecartz got a reaction from domiosc in problem with .mx files generated as copies of all .php files   
    If you can run executable code in .ico files, that is a security hole. 
    Similarly, X-Frame-Options is generally set by Apache, not by individual applications.  https://geekflare.com/secure-apache-from-clickjacking-with-x-frame-options/
    Allowing image uploads should only be available to the admin, which should be secured by Apache's Basic Authentication (htpasswd).  Writing image files to anywhere other than images/ admin/backups and a few more locations should be blocked by directory file permissions. 
    You can disable osCommerce from allowing .ico uploads.  Look for set_extensions or I seem to recall that older versions had a default set somewhere. 
    Only the last of those is settable in application.  Some of the third is configuring for use by the application.  Some is host configuration (who owns the site files and directories; what are the permissions).  The first two are purely host configuration.  Although perhaps the .ico file is being included by something else (what?). 
    In general, clickjacking only works if you use the same browser instance to both log into your osCommerce admin and view other pages.  If you only ever use the browser instance for looking at the osCommerce admin, clickjacking won't work.  Keep one browser only for osCommerce.  This could be Chrome, Edge, Firefox, Safari, Opera, etc.  And use a different browser for regular web browsing.  Chrome and Firefox also support multiple profiles (Chrome will let you have multiple profiles open at the same time). 
  16. Thanks
    ecartz got a reaction from ce7 in Insert / Update / Delete Categories Images   
    The image URLs are made by appending the image name to the image directory URL.  So you only want the portion of the path after the images directory.  In your example, that would be cat2/cat-test-01.jpg
  17. Thanks
    ecartz got a reaction from ce7 in Insert / Update / Delete Categories Images   
    The image URLs are made by appending the image name to the image directory URL.  So you only want the portion of the path after the images directory.  In your example, that would be cat2/cat-test-01.jpg
  18. Thanks
    ecartz got a reaction from ralgiere in Phoenix easy populate addon v1.0.6.0   
    I realize that the Apps Marketplace search often sucks.  But https://apps.oscommerce.com/v=cephoenix10&amp;q=Easy Populate shows three things claiming to be Easy Populate for Phoenix. 
  19. Like
    ecartz got a reaction from Demitry in problem with .mx files generated as copies of all .php files   
    Perhaps to lull you into a false sense of security.  Or because they didn't need it.  Corrupt the 2.2 site directly.  And use those permissions to try to corrupt the Edge site.  This works if both subdomains use the same user behind the scenes.  So corrupting the 2.2 site allows them to make changes to the Edge site.  Or almost make changes.  Perhaps they were unable to complete the hack.  Perhaps adding the .mx files was only the first step.  If they had completed the hack, you might never have known because they would have cleaned up after themselves. 
  20. Thanks
    ecartz got a reaction from ralgiere in Google is not indexing my website   
    admin > Modules > Header tags > Robot NoIndex
    Note though that that is only on specific pages by default and there are reasons why you might not want to have those particular pages indexed.  So rather than turning it off, just make sure that it does not have either All or the specific page that you want indexed checked. 
  21. Thanks
    ecartz got a reaction from ralgiere in Google is not indexing my website   
    Have you signed up for Google Search Console?  https://www.google.com/webmasters/tools/submit-url?pli=1
    https://support.google.com/webmasters/answer/6065812
  22. Like
    ecartz got a reaction from DivebombInc in Installation issues   
    My guess would be that something went wrong with the FTP upload.  Try it again. 
    You could also upload just the install.php file.  But usually it's not just one file that goes missing.  So either do the whole thing or at least the install directory (and all contents). 
    You might check that you aren't out of filesystem quota.  Some hosts have limits. 
  23. Like
    ecartz got a reaction from DivebombInc in Installation issues   
    Download page:  yellow button. 
  24. Like
    ecartz got a reaction from DivebombInc in Installation issues   
    What is the part of the the URL after the catalog directory?  E.g. if I go to https://template.me.uk/phoenix/index.php , then the catalog directory is https://template.me.uk/phoenix/ and the part of the URL after it is index.php
    When you click Start, to what URL does it try to go, relative to the catalog directory? 
  25. Like
    ecartz got a reaction from peterpil19 in Free Shipping Per Product for v2.3   
    I made a mistake in the second line. 
    public function listen_injectRedirects() { $products_ship_free = false; if (!GLOBALS['free_shipping']) { define('TEXT_CHOOSE_SHIPPING_METHOD', TEXT_CHOOSE_SHIPPING_METHOD_NO_PFS); define('TEXT_ENTER_SHIPPING_INFORMATION', TEXT_ENTER_SHIPPING_INFORMATION_NO_PFS); return; } foreach ($_SESSION['cart']->get_products() as $product) { if (1 == $product['ship_free']) { $ship_free_count += $product['quantity']; } } if (($GLOBALS['total_weight'] == 0) && ($GLOBALS['total_count'] == 0)) { $products_ship_free = true; $GLOBALS['free_shipping'] = true; if (!defined('FREE_SHIPPING_TITLE')) { include 'includes/languages/' . $_SESSION['language'] . '/modules/order_total/ot_shipping.php'; } } define('TEXT_CHOOSE_SHIPPING_METHOD', ($products_ship_free ? sprintf(PRODUCTS_SHIP_FREE_COUNT, $ship_free_count); : TEXT_CHOOSE_SHIPPING_METHOD_NO_PFS)); define('TEXT_ENTER_SHIPPING_INFORMATION', ((!$products_ship_free && ($ship_free_count > 0)) ? sprintf(PRODUCTS_SHIP_FREE_COUNT_ONLY, $ship_free_count) : TEXT_ENTER_SHIPPING_INFORMATION_NO_PFS)); } Note that this assumes that you've modified the shoppingCart->get_products method to return the 'ship_free' column. 
×