health medication

February 2008


Programming and Technology06 Feb 2008 04:22 pm

Many times you need a quick encryption solution in a database but do not want the overhead of coding something more complex. mySQL provides you with a simple encryption solution directly in the sql query.

TO ENCRYPT:
INSERT INTO users (user, pass) VALUES (‘$username’, AES_ENCRYPT(‘$pass’, ‘secret encryption key’));

TO DECRYPT:
SELECT user, AES_DECRYPT(pass, ‘secret encryption key’) FROM users

del.icio.us:Encrypt and Decrypt Strings in mySQL sql Queries digg:Encrypt and Decrypt Strings in mySQL sql Queries spurl:Encrypt and Decrypt Strings in mySQL sql Queries wists:Encrypt and Decrypt Strings in mySQL sql Queries simpy:Encrypt and Decrypt Strings in mySQL sql Queries newsvine:Encrypt and Decrypt Strings in mySQL sql Queries blinklist:Encrypt and Decrypt Strings in mySQL sql Queries furl:Encrypt and Decrypt Strings in mySQL sql Queries reddit:Encrypt and Decrypt Strings in mySQL sql Queries fark:Encrypt and Decrypt Strings in mySQL sql Queries blogmarks:Encrypt and Decrypt Strings in mySQL sql Queries Y!:Encrypt and Decrypt Strings in mySQL sql Queries smarking:Encrypt and Decrypt Strings in mySQL sql Queries magnolia:Encrypt and Decrypt Strings in mySQL sql Queries segnalo:Encrypt and Decrypt Strings in mySQL sql Queries
Uncategorized06 Feb 2008 04:17 pm

After installing osCommerce most users will get the following warning on the top of their newly created store main page:

Warning: I am able to write to the configuration file: /[SERVER_FILE_LOCATION]/catalog/includes/configure.php. This is a potential security risk – please set the right user permissions on this file.

It is a pretty specific error with an obtuse solution in the warning message. Upon searching many recommendations are to chmod the file to 666 but sadly this still provides write access to the file and the error remains.

The solution to the write to configure.php warning
Set the file to permissions of 444 which is the equivalent of RRR or Owner-Read ; Group-Read ; Others-Read using your favorite FTP program.

For those of you on a MAC using a FTP program such as FETCH you will need to Command Click (Right Click if you have a right mouse button) and then select Get Info. From there you can set the check boxes or type in 444 and change the file permissions.

Technorati Tags: ,

del.icio.us:Fix osCommerce Write to Configuration File Warning digg:Fix osCommerce Write to Configuration File Warning spurl:Fix osCommerce Write to Configuration File Warning wists:Fix osCommerce Write to Configuration File Warning simpy:Fix osCommerce Write to Configuration File Warning newsvine:Fix osCommerce Write to Configuration File Warning blinklist:Fix osCommerce Write to Configuration File Warning furl:Fix osCommerce Write to Configuration File Warning reddit:Fix osCommerce Write to Configuration File Warning fark:Fix osCommerce Write to Configuration File Warning blogmarks:Fix osCommerce Write to Configuration File Warning Y!:Fix osCommerce Write to Configuration File Warning smarking:Fix osCommerce Write to Configuration File Warning magnolia:Fix osCommerce Write to Configuration File Warning segnalo:Fix osCommerce Write to Configuration File Warning
Programming and Technology05 Feb 2008 04:04 pm

I recently had all kinds of problems installing the UPS XML Shipping Module on my osCommerce shopping cart. I (thought I) followed the setup instructions correctly but every time I actually tried to checkout a shopping cart the shipping checkout page would hang and then I would get a mySQL timeout error. This error made no sense because the mySQL database was mostly empty and the shipping query is not that intensive.

After much debugging and hair pulling I found the solution. Since the website is set up on a GoDaddy Shared Hosting plan, the curl call to the UPS XML api was failing. GoDaddy Shared Hosting uses a curl proxy and you must configure any CURL requests to go through that proxy.

Below is the solution, which I am sad to say I found at the very end of the readme.txt document included with the UPS XML package AFTER I figured it out the HARD WAY! DOH and DOH. I am embarrassed to say I stopped reading the instructions when I thought I got to the end but the last last step is how to make it work with GoDaddy Hosting. Hopefully this post will save someone similar frustrations by being able to quickly find the solution with a google search!

From the readme.txt file …

----------------------------

STEP 12 ** FOR GODADDY HOSTING ONLY **

----------------------------

A number of people using GoDaddy for their hosting have found that the UPSXML module times out when getting rate quotes. This is due to the fact that GoDaddy uses a special setup for the https connections, namely a proxy server.

In that case (haven't tested this, but this is a compilation from the postings and uploads) change a part of the code in catalog/includes/modules/shipping/upsxml.php

Line 662-670

**REPLACE**

// uncomment the next line if you get curl error 60: error setting certificate verify locations
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
// uncommenting the next line is most likely not necessary in case of error 60
// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest);
curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);

**WITH**

// BOF GODADDY STUFF
// uncomment the next line if you get curl error 60: error setting certificate verify locations
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
// uncommenting the next line is most likely not necessary in case of error 60
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest);
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY, "http://proxy.shr.secureserver.net:3128");

// EOF GODADDY STUFF

Technorati Tags: , ,

del.icio.us:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting digg:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting spurl:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting wists:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting simpy:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting newsvine:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting blinklist:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting furl:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting reddit:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting fark:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting blogmarks:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting Y!:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting smarking:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting magnolia:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting segnalo:Setting Up osCommerce UPS XML Module w/ GoDaddy Shared Hosting