AJAX with OK status but still throwing error
Just a quick note to say AJAX can be tricky and difficult to debug on occasion.
Read the rest of this entry »

Just a quick note to say AJAX can be tricky and difficult to debug on occasion.
Read the rest of this entry »
So, one day I found a need to have free shipping “per product” for CRE Loaded/OSCommerce. First I search for it and found a couple candidates that seemed like they would do the job.
Read the rest of this entry »
So, what a day today has been! Usually when you think of installing SSL certificates (if you have installed them before) you think it will take you no more than an hour to set the whole thing up, right? Well, not when it involves CPanel/WHM and wildcard certificates!
Read the rest of this entry »
I really needed to get a list of files, recursively, from a rather large directory intensive web site sorted by the last modified date and I did not want to go through each directory searching for them by hand. The idea was to get the last modified file in hope that I would find a file that contained a critical update for another web site with the same program. After a couple hours of searching for and understanding the syntax involved, here is the Linux command that did the job.
find ./ -name “*.php” -type f -printf “%TY-%Tm-%Td %TT %h/%f \n” | sort -rb | head -5
So what we are doing is trying to find a file with a .php extension searching from the current directory we are in, recursively. We are telling the command that it is a file type and sorting it in reverse order to show 5 in the list of files returned. We would like to get the results in a formatted way, so we are displaying the date first then the file name. Example output:
2009-08-31 15:14:38 ./admin/functions/email.php
2009-06-07 13:08:20 ./admin/config.php
2009-03-07 09:28:03 ./admin/inc.php
That’s it. Hope someone finds this useful!
As you may have guessed, I am writing this because there is an issue with using SimpleXML and Session variables in conjunction with each other. Sessions apparently do not know how to handle object resource values that the SimpleXML engine generates. If you attempt to assign a Session variable to a SimpleXML object value you will get an error similar to this:
Warning: session_start() [function.session-start]: Node no longer exists
Here is an example of assigning the Session variable the “wrong way” (from Authorize.net CIM API):
$_SESSION['profileid'] = $this->results->customerProfileId;
And here is the correct way to assign the Session variable:
$_SESSION['profileid'] = (int)$this->results->customerProfileId;
If the expected data type of the object value is to be a string use (string)
That’s about it for now . . .
I have been using pages to hold content in Wordpress templates for some time now. The problem I have with it is that every time I need to perform such an action I cannot remember how to do it nor where I have done it before.
Read the rest of this entry »
Yep, I finally got around to adding a LinkedIn company profile. Check it out.
http://www.linkedin.com/companies/upwebdesign-llc
When setting a field in a MySQL database to be NULL by default you may run into NULL values in your dataset when querying the database. You cannot simply check if a variable is set using the isset() function in PHP because it returns false for NULL values. To remedy this issue you can use the array_key_exists(‘key’, $dataset) to check if the key exists in the array.
Good to know!
I have been thinking about adding a section to the site for designs and templates. In this section you will have free, exclusive, limited, and unlimited designs.
Free: meaning this can be downloaded at no cost as many times as users want with no premium.
Exclusive: meaning this can only be downloaded once for a premium. All rights will be transferred to the buyer.
Limited: meaning a design can be downloaded only 1-3 times before it is retired. Rights will not be transferred to the buyer.
Unlimited: meaning this can be downloaded as many times by users for a smaller premium.
Templates will include Photoshop/Illustrator files with optional HTML files. Request for HTML versions of the design can be requested.
If you are interested in learning more please contact us to fing out more.
Have you ever created a page that has hidden div containers that are activated by a link that has a slide down effect on it? In case you haven’t there is a slight problem when displaying content that needs to be shown and slid down when the trigger is at the bottom of the browser window. It is quite possible the visitor may never see the effect or the content.
The code below will help with this issue:
function slide_body(container, duration)
{
window.setTimeout( function() {
var p = $(container).position();
var h = $(container).height();
var s = p.top + h;
$('html,body').animate( { scrollTop:s }, 1000 );
}, duration);
}
container (block level element) – the container of the content that is being shown
examples: ‘#container’, ‘.container’, ‘p .container’…
duration (time in milliseconds) – the time it takes for the animation of the sliding content
Comments and questions welcome… video coming soon!