Jump to content

sKunKbad

Members
  • Posts

    1,832
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by sKunKbad

  1. QOC, thanks for the response. Unfortunately, because the website isn't on sophisticated hardware, we really can't use your advice. Perhaps it's time to think about moving the website.
  2. I think you just use PHPINIDir in your virtual host config <VirtualHost 1.2.3.4:80> [...] PHPINIDir /var/www/web1 [...] </VirtualHost> See this: https://www.howtoforge.com/how-to-specify-a-custom-php.ini-for-a-website-apache2-with-mod_php
  3. I browsed around a little and have seen some solutions, but wondering what the appropriate way to handle a hosting related issue is. The problem is that the host that we have is not from the land of unicorns and rainbows. I really do like the host, and think they are as good as can be expected, but everyone once in a while the site will go down for a few hours because of X, Y, or Z. This is just a glorified or "premium" shared hosting. What I was thinking about doing was to use rsync on host #2 to pull in file changes from host #1 a few times a day. I would also use mysqldump and recreate the database on host #2 a few times a day. If there was a big problem with host #1, we could switch nameservers manually and perhaps the experience would be better than not doing any of this. Does this idea blow? How would you do it?
  4. Try something like this, maybe: // Attempt charging the card try { // Load Stripe! require_once APPPATH . 'libraries/stripe/stripe-php/lib/Stripe.php'; // Set the private key $mode = config_item('stripe_payments_mode'); Stripe::setApiKey( config_item( $mode . '_secret_key') ); // Make sure the amount if pre-formatted $cart_data = $this->cart_manager->get_all_cart_data(); $amount = number_format( $cart_data['total'], 2, '.', '' ); // Create the order description for Stripe $description = ''; foreach( $cart_data['products'] as $ID => $product ) { $description .= 'Qty.' . $product['cart_product_qty'] . ' of ' . $product['cart_product_model'] . ' by ' . $product['cart_product_brand'] . ' @ $' . number_format( $product['cart_product_price'], 2, '.', '' ) . ' USD each.' . ' (PN:' . $product['cart_product_part_number'] . '|ID:' . $ID . ') '; } // Charge the order: $charge = Stripe_Charge::create([ 'amount' => preg_replace( '/[^0-9]/', '', $amount ), 'currency' => "usd", 'card' => $post['stripe_token'], 'description' => $description, 'capture' => FALSE ]); // Charge was paid ! if( $charge->paid == TRUE ) { $order_id = $this->_create_order( $post, $charge, $cart_data ); } // Charge was not paid! else { $errors[] = 'Payment System Error: Your payment could NOT be processed (i.e., you have not been charged) because the payment system rejected the transaction. You can try again or use another card.'; } } catch( Stripe_CardError $e ) { // Card was declined. $e_json = $e->getJsonBody(); $err = $e_json['error']; $errors[] = $err['message']; } catch( Stripe_ApiConnectionError $e ) { // Network connection error $errors[] = 'Network problem. Please reload the page and try again.'; } catch( Stripe_InvalidRequestError $e ) { // You screwed up in your programming. Shouldn't happen! $errors[] = 'Invalid Request. Please reload the page and try again. If problems persist, please contact us.'; } catch( Stripe_ApiError $e ) { // Stripe's servers are down! $errors[] = 'Payment server not available. Please wait, then reload the page and try again.'; } catch( Stripe_CardError $e ) { // Something else that's not the customer's fault. $errors[] = 'Card processing error. Please reload the page and try again.'; }
  5. Glad to see the site back up and running. I've never heard of such problems. How did it happen?
  6. That's a good question. I'll look into it.
  7. Honestly, I don't know the exact updates I apply to my Ubuntu machines. I just install them when Ubuntu tells me they are ready. As for my boss, his server is CentOs. I don't even have access to it, so I don't know what's going on there. It's just kind of funny that both machines start to have errors on the same day. Also, thanks for the advice regarding CURLOPT_SSL_VERIFYHOST.
  8. Today my boss called me and told me that a php script I had written for him wasn't working. It had been working for over a year, and no changes had been made (at least not for many months). The problem was that he just has a self signed cert, and I had not set CURLOPT_SSL_VERIFYHOST to FALSE. Did something in Linux change in the last day? I wonder because his server and my computer (Ubuntu) both started in with the same problem on the same day. I set CURLOPT_SSL_VERIFYHOST to FALSE and everything started working again.
  9. I was kind of wondering how trustworthy it is to buy from a reseller. For instance, I have been looking at this cert: https://www.thesslstore.com/comodo/comodo-ev-ssl.aspx?gclid=CNK4nKiK9MMCFU9efgodcmcAQw
  10. My retail business will finally have a website with ecommerce, and I am considering the EV type multi-subdomain SSL certificate from Comodo. I only chose this cert for the green bar, and the price of the cert is low. If I purchase it through a re-seller, it looks like I can get it for as low as $135.00 a year. Since I've only purchased one cert before (for an unrelated business), I'm wondering about things like speed. I was reading something yesterday where a guy was saying that the speed of his page loads was much slower with SSL. I realize that some encryption/decryption takes place, and that encrypted data is larger than non-encrypted. I'm also wondering if the green bar is really worth it. Does anyone here have an ecommerce site where a green bar made a difference? For instance, sales before and after green bar went from X to Z. Lastly, I'm wondering if purchasing the SSL cert from a re-seller is just as good as purchasing it directly. I don't really want to give somebody a few hundred dollars to find out that there is a difference, and that I screwed up. Any other pitfalls, considerations, or tips?
  11. I have made a custom post type for products, and am using a custom taxonomy for the product categories. The thing that I am wondering about is that sometimes a product category is a parent, and sometimes a child, but sometimes both. For instance, if you have a top level category named shoes, then you might have a sub category named Nike. However, Nike also has shirts, so you could say that shoes and shirts were both subcategories of Nike. Do you know what I'm saying? It's like there is no real parent to child relationship, but they are both parents and both children of each other. How do you handle this type of situation?
  12. One thing that could be beneficial would be to review how some of the PHP frameworks are handling file uploads. Code comments will often reveal what and why things are being done.
  13. So you will need to use AJAX. First, all you need to do is populate the first dropdown when the page loads. Use javascript to detect when a change is made in the first dropdown. When the chance is made, use AJAX to send the values to the server with a response of the values for the second dropdown.
  14. Well that's good to hear. Glad you got it working.
  15. I'd be willing to play with it, but I'd need access. I know these things are sensitive in nature, as the contract I signed with CRMLS was like 20 pages long. If you PM a username and password I'll give it a shot. If you don't feel comfortable doing that, I totally understand.
  16. If you are sure that Status is actually something you can use as a condition, and that A is an acceptable value, then your next step would be to contact the technical department of the organization that your contract for access is through. Be sure to post the solution when you figure it out. The internet has very little information about RETS, so it's up to us to create it.
  17. So, for debugging purposes, what happens when you remove all of the conditions? For instance, if all you use for the DMQL is (Status=A), and you remove the limit, count, format, and perhaps even the select options. If you can reduce the call down to the bare minimum and it works (retrieves data) then you would want to reintroduce your options one by one until you find where the hickup is. I recently created a rets class that extends phrets. You can see how I used it here: https://gist.github.com/anonymous/8e678847d4bdfe75a650
  18. You might want to play around with the following methods, just to make sure you are calling the correct class name, and searching for values that are "searchable": * Show the resources and classes */ public function show_resources_and_classes() { if( $this->_connect() ) { return $this->GetMetadataTypes(); } return NULL; } // ----------------------------------------------------------------------- /** * Get the fields in a class */ public function show_class_fields( $resource_name, $class_name ) { if( $this->_connect() ) { return $this->GetMetadataTable( $resource_name, $class_name ); } return NULL; } // ----------------------------------------------------------------------- /** * Show the values that are acceptable to search a specific field by */ public function show_accepted_search_values( $resource_name, $field_name ) { if( $this->_connect() ) { return $this->GetLookupValues( $resource_name, $field_name ); } return NULL; } // -----------------------------------------------------------------------
  19. The real problem is that although RETS tries to establish a standard, each MLS server can be configured differently. Also, if you query for something in the DMQL that doesn't belong, you'll get no feedback from the server. It's really a system designed by idiots. If you query for your resources and classes, and you've got those all mapped out, you might also be restricted by the server as to what you have access to. So, that said, all you can really do is keep trying to get some feedback until something works. I'd suggest first trying to access your listing agent's properties, because I've seen where access was restricted like that.
  20. In your first code your function name is getUserEmail, but that function is never called in the second code. We might need more info to help you solve this. Have you tried debugging the code, looking at the values of the variables at certain places? You might try FirePHP for Firefox or FirePHP for Chrome. (or perhaps ChromePHP). These tools will help you debug and make your job super easy.
  21. How many downloadable products will you be selling?
  22. Easy: https://developers.google.com/analytics/devguides/reporting/embed/v1/
  23. If mint uses apt, you might consider this: https://launchpad.net/ppa-purge/
  24. KevinM1, what distro are you running to have PHP 5.6.2? I think Ubuntu comes with 5.5.9. I agree, the package management is a bit over my head. The other day I reinstalled samba on one of my computers, and it uninstalled nautilus-share, which I had no idea it was doing. Later, when the context option to create a local share was missing, I had to search for a while to find what I was missing, and I only found that because of the right Google search. Really though, I find my overall experience on Ubuntu to be really nice. It's a perfect development environment for me. The one thing that bugs me about developing on Windows is that I don't get to test code that takes unix type permissions into account. That can be a big deal when working with files.
  25. Things have come a long ways in the last few years. I think you might be surprised how complete the Ubuntu experience is now. Issues that I had a few years ago no longer exist. 1) Mouse configuration of extra buttons is really easy. 2) Any printer I have connected is instantly recognized and just works. 3) Dual monitor support is built in. 4) Setup of all my programs was easy: a) Chrome b) Sublime Text 2 c) Dropbox d) Filezilla e) Virtualbox f) Apache, MySQL, and PHP g) node, Grunt, composer, sass, and ruby With all of that, I'm set. I don't need anything else really, and if I do I can just fire up Windows VM. Lovin' it really. I ended up setting up all three of my main computers with identical everything. So far so good.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.