Skip to main content

Posts

Showing posts with the label tool-server

Fixing Wordpress Database Collation for Foreign Fonts

I wanted to write Japanese in one of my wordpress blogs. The issue was that the encoding was in latin1. Here are the steps I used below. Keep in mind that this is a potentially dangerous modification where you could easily lose your data. Be careful and if you try this, you do it at your own risk! Make a complete backup of your site by whatever methods you normally use. Also make a backup of your wordpress site’s database. Login into CPanel and select phpMyAdmin. Click the SQL tab around the top of the page on the right panel. This is where you can execute SQL code. ALTER DATABASE dbname DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; (where dbname is the name of your database) That line fixes the existing database by changing the default encoding. In my case I had a latin1 variant. That step above is to avoid completely dropping and re-creating the database. Login into CPanel again and download a copy of the database using the backup wizard. This consists of a tar.gz (zip...

Securing Wordpress Continued...

I had written a basic securing wordpress article back in February of this year. Since then I’ve done a bit more research and came upon the idea of using Apache to help secure the administration directory and scripts, making it more difficult for intrusions to take place. It’s always a good idea to try and protect your sites as best you can. When dealing with open source software, the code is visible to the world, so any exploits that have been found can travel fast. Issues and security flaws get fixed on well known open source projects like WordPress, but it also leaves an un-upgraded system easily open to attack. One option to add a second layer of protection by using Apache server’s built-in directory password functionality. Thankfully, Askapache made a decent plug-in to save a good deal of time playing around with Apache .htaccess settings and researching the necessary code. While the plugin needs work, it functions with a bit finesse on your part. Download the Askapache Passw...

Clean URLs in PHP Yii Framework

Here is a quick tip to save some trouble. The goal here is to get clean urls like http://localhost/site/test/5 or http://localhost/site/contact without having a query string variable and also not having the filename index.php show up. My configuration: EasyPHP (apache/php/mysql combo for windows) Yii PHP framework In the Yii main.php configuration file you need: 'urlManager'=&gt;array( 'urlFormat'=&gt;'path', 'showScriptName'=&gt;false,), Inside the ‘components’ array area. In the primary directory where the index.php file is you need a .htaccess files with this in it: Options +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [L] If you have problems, check your httpd.conf file for these items: <directory c:\easyphp\www> Inside that directory section, make sure the rules don’t disallow the removal of index.php or the other rewrite rule...

EasyPHP, Wordpress, and Permalinks

I’m creating a website as a favor to a friend. To save effort, I’m just doing the development on my Windows computer. While doing that, I ran into a little issue with permalinks that seems to be unique to how EasyPHP is configured. While I won’t go into much detail on the subject, I re-affirmed the fact that WordPress is as close to as ideas as one can get when wanting to setup a basic website. I tried out probably 10 open source CMS systems and found them too complex (the admin back-ends) or too buggy to be used. Keep in mind that the website I am setting up requires only basic functionality (informational pages, a image gallery, good admin, stable code), which is what I am basing my opinion off of. What brings me to my post today is that I used EasyPHP  (a simple Apache, MySql installer and admin) to act as the local web server for testing. I was having issues with getting permalinks working. There was one gotcha that doesn’t apply to other webserver installers. What I did t...

PHP, IIS, and NetBeans

It’s been while since I have used the language, so I thought it would be fun to try making a few new ideas with it. I did a quick search to see what PHP IDEs were available.  I’ve used Eclipse quite a lot, but I’m not particularly fond of it, so I wanted to try something else. I plan on giving NetBeans a chance to see how it fairs. http://www.netbeans.org/features/php/ Seeing as I am currently using Vista Ultimate 64-bit, I decided to just use IIS. I had a few quips getting it working. I had modified IIS beforehand when I was doing some old VbScript coding, so needless to say when I tried installing PHP it didn’t work out of the box. In the IIS configuration program (use the start button search in vista on “InetMgr”): Install PHP as a ISAPI filter. In your selected application pool advances settings, make sure that “Managed Pipeline Mode” is set to “Classic” mode. In the list of global settings: Add a default document “index.php” In ISAPI Filters, add a new filter that points to (...

Getting ASP With JET Access Working On 64-bit vista

There are quite a few issues in getting classic asp scripts working on vista. I want to quickly go over what I did, so that when I need this information available in the future I have an easy place to find it. So to save time I am just trying to get this written as fast as possible and continue on with my work. Sorry for any typos. Install IIS through control panel -> programs and features -> (left panel) “turn windows features on or off” Once the feature listing window populates: expand the “internet information services” item check web management tools and world wide web services …really I went through the options and selected the majority of them. Key ASP related items to make sure you have selected: “world wide web services” -> “application development features” -> ASP I needed windows authentication, so I needed: “world wide web services” -> “sercurity” -> “windows authentication” After tha...

Getting a Symfony development enviroment running on windows

Nothing is ever easy… Anyways, to get a computer ready to start developing with the Symfony PHP framework you have a few options. You can take the long, long route and install apache, php, and a database server. With that you have to do a good deal of configuration to get everything working together. You could also download WAMP or XAMPP, which are just prepackaged versions. I haven’t used XAMPP, so I can’t say how you would get that working. The best reason for using WAMP is that it is self contained in c:\wamp folder by default. You can also start and stop all of the server processes (Apache & MySQL) anytime by just closing the tray icon. It’s great so you don’t have unnecessary processes running all of the time. The main problem is that WAMP and Symfony don’t work “out of the box.” No surprise there. This is the process I used to get WAMP working with Symfony: Download WAMP (1.6.6) and install: http://www.wampserver.com/en/ Open a browser to http://localhost/ WAMP should...