Website Designers and Webmasters

Dedicated to all the tasks Webmasters, Website Developers and Website Designers find themselves facing.

By: Ashton Sanders

PHP Mail Fail on Windows IIS Server

Jun 28 2011

Over the years I’ve transferred a number (too many) PHP websites to Windows servers running PHP (or have had to install PHP apps on a windows server, etc.). One of the biggest problems I always run into when using PHP on a Windows IIS Server is that the PHP Mail Function doesn’t work.

The solution is to change from using the PHP Mail Function to using Authenticated SMTP delivery. In essence, you’ll set up your web app to act like Outlook or Thunderbird to connect to an emailbox directly. This app obviously won’t download any emails; just send them.

You can search for “PHP SMTP email” to get some good solutions to how to handle this with a Pear script.

If you’re using WordPress, though there’s a very simple WordPress Plugin called WP-Mail-SMTP that does all the hard work for you. All you need to do is enter your server information and select your settings.

I just used it, and it took 5 minutes to setup and test.

By: Ashton Sanders

mssql_connect(): unable to connect to server:

Aug 31 2008

Filed under: PHP,SQL

I have a PHP script that I run locally (on my Windows XP Machine) that accesses a MSSQL server using the mssql_connect() function. I used xampp to get PHP on my machine.

Today I finished getting this to work on my second computer. The first time I did this, I also ran into a million problem – but didn’t note any of them. So here I am rectifying my previous mistakes in the hope of not having to search for the same solution next time.

The error I was getting was:

mssql_connect(): unable to connect to server: ‘www.ashtonsanders.com’

(Domain changed for security purposes.)

I handled it by replacing ntwdblib.dll with this ntwdblib.dll.zip in these two folders:

xampp/php
xampp/apache/bin

Enjoy!
-Ashton Sanders
(Note: algorytmy.pl was the final website that helped me handle my problem.)

By: Ashton Sanders

Simple PHP Blog

Mar 16 2008

Filed under: Blogging,PHP,Review

I have already done a lot of ranting and raving about Blogger and WordPress.

Although I consider these two to be the leaders of the blogging pack (by a large margin), I did run across a blog using Simple PHP Blog, and was impressed. It doesn’t have all the crazy features like the other two, but it does have a feature which really attracted my attention. On the bottom of every post there are five dots, and you can rate the post 1 to 5. This way, people can interact with your posts and website without actually having to write a comment.

Don’t get me wrong, the comment function is still intact, but the percent of comments compared to visitors is tiny, while the percent of “ratings” to visitors is much higher.

Another note: Simple PHP Blog isn’t database driven. You can run it on a server without needing a database!

If anyone ends up using this system, please let me know how it goes.
-Ashton Sanders

By: Ashton Sanders

PHP – Finding the Width or Height of an Image

Dec 22 2007

Filed under: HTML,PHP,Website Design

Knowing the width, height, Image type or attributes of an image can be extremely useful.

I’ve used this once to make a line of images all line up on the bottom. I found out the height of the image and then added a margin to the top of the image to make the bottom of the image always be 300 px from the to. So if the height of the image was 140, I would make the margin on top of the image = 300-140.

Here’s the code to find the height or width of an Image:

<?php

list($width, $height, $type, $attr) = getimagesize(“image_name.jpg”);

echo “Image width ” .$width;
echo ”
“;
echo “Image height ” .$height;
echo ”
“;
echo “Image type ” .$type;
echo ”
“;
echo “Attribute ” .$attr;

?>

Enjoy,
Ashton Sanders

By: Ashton Sanders

Blogger vs WordPress – Remote Site

Nov 17 2007

Filed under: Blogging,PHP,Review

When I first started this blog, I did a little bit of research about blogs, and chose Blogger. Now that I’ve been using Blogger for almost a year, I’ve started another blog, about Mordheim, with WordPress, and here are my thoughts:

Blogger

Overview

Blogger is very simple and user-friendly. There is a reason they are the most popular: it’s extremely easy to set up a blog and write posts. They also have a lot of functionality.

WordPress

Overview

WordPress is a little more complicated, and it seems like you can do more with the additional complication. They also have a very user-friendly interface and simple layout. WordPress has a larger base of fans who have created many blog layouts that are free to download. Because of this, WordPress’s Free Layouts are much nicer, stylish, better.

Blogger

Remote Blog

Unfortunately, if you want to put your website on a remote server (any other website besides “*.blogspot.com”), you lose almost all of your functionality. You don’t even get a Category Roll. The Categories listed on the right side of this blog is done manually. (The post count is also done manually).

WordPress

Remote Blog

Fortunately, WordPress.org supplies you with a free download of WordPress, and easy installation instructions. In 5 minutes, you have a new, stylish and functional blog hosted on your PHP website. They have a lot of functionality, and each free blog layout has different amount of functionality. You could probably spend the rest of your life trying out different blog layouts. If you are a PHP programmer, it is very easy to sink into the code and make lots of changes to the functionality. From making the categories display alphabetically, by ID, etc.

I would definitely recommend WordPress over Blogger for advanced users who are looking to host their blog on their website.

Blogging For Life,
-Ashton Sanders

Older Posts »
RSS

Where Am I?

You have found the semi-coherent ramblings of Ashton Sanders: a website designer, developer and webmaster. This is primarily Ashton's place to save notes about techniques and things that he learns in his never-ending conquest of the internet. Hopefully it's coherent enough to be useful to you too.

Subscribe:

Enter your email to get automatic emails whenever Ashton posts on the blog.

Email:

Advertisers:

Email Marketing $19/Month! OIOpublisher Learn how to make Money from Blogging Hillarious, High-Quality Shirts for $6/each Great Book Keeping and Invoicing Software Advertiser Here

Tags and Categories

Links

Blog Roll