Tag Archives: Web

Enable userdir Apache module on Ubuntu Linux and other Debian based distributions

Apache logoLately I've spent a lot of time on web programming using open source based technologies like PHP, MySQL and PostgreSQL. This works really great on Linux because every tool you need for web programing is right there a few keystrokes away using your favorite distribution and package manager. One essential thing you need to setup for web programming is localhost web server serving files inside your home directory. I've wrote about one method of making Apache web server work this way in my following article:

LAMP development in your home directory with suPHP module

In this article I will show you how to do the same thing in another way by enabling Apache module called userdir on Debian based distributions like Ubuntu. The official definition of userdir is that "this module allows user-specific directories to be accessed using the http://example.com/~user/ syntax". So lets get started...

Continue reading

Enable Apache mod_rewrite on Ubuntu Linux system

Apache Logo

Any LAMP (Linux Apache MySQL PHP) web development effort requires fully functional Linux web server. You can also develop using LAMP installation on other operating systems but that just isn't the real thing. The way I develop is by using Ubuntu LAMP local server I can play with without fear of cutting off hundreds of people from any public site just because I've typed colon instead semicolon somewhere in some php file. If you want to know how to setup Ubuntu Linux for your development work here's one of my earlier articles on that topic:

Ubuntu Netbeans and LAMP server with Xdebug as non-root user

In this article I will show you how to enable Apache mod_rewrite engine on your Ubuntu LAMP installation. This module is used by web administrators to "mask" their site URLs into the form they want users to see. This is done because it is not necessary or secure to expose your site innerworkings like GET parametars or scripts paths on your server.

Continue reading

Remote CLI access to Ubuntu Linux PC using web browser through authenticated HTTPS

Shellinabox

Lets say you need to access your Ubuntu Linux PC at your home from the other PC behind very restrictive firewall. Lets also say that all you have access to is port 80 (http) and port 443 (https). Lets unlock this situation. Ill show you how to setup Shell In A Box with additional layer of security with Apache2 SSL. Prerequisite for the following guide is that you have fully working Apache 2 installation on you Ubuntu system. If you need instructions for this, you can find them on one of my older posts:

Ubuntu Netbeans and LAMP server with Xdebug as non-root user

In this post I'll mostly give you CLI commands without to much explanation so it is up to you to go trough the procedure and adjust it according to your own setup. Reason for this approach is that the procedure is a bit longer and there could be 10 pages explanation for all of this. Of course I'll give basic explanation for most important commands. So lets get down to business...

Continue reading

PHP Savant templating engine pagination class and plugins

I don't use Smarty templating engine for my PHP web projects. Why? I hate it. Why? I' familiar with PHP and I don't need to learn another markup language that takes away the power from PHP and imposes restrictions all the way. I'm not saying that without spending (non)quality time using Smarty (and loosing valuable time to learn it's unintuitive syntax).

For my web projects I mostly use PHP Savant customized to fulfill needs of the project at hand. What is PHP Savant? It's authors say that PHP Savant is a powerful but lightweight object-oriented template system for PHP. Savant does not compile your templates into PHP like Smarty, instead, it uses PHP itself as its template language. With PHP Savant you can write your page templates in pure PHP and you don't need to learn a new markup system. PHP Savant is great for developers because it is "complex" enough to be extremely useful, but at the same time simple enough to be easily modified without any special knowledge.

SavantPaginate

When it comes to PHP pagination, things can get quite messy. Pagination without templating engine is a nightmare and that's something to avoid at all costs. Even when you're using templating engine like PHP Savant things can get quite complicated without encapsulation of pagination logic in some kind of PHP class. Recently I made PHP Savant pagination class together with PHP Savant plugins for pagination, all for one of my recent projects for college. Today I'm my bringing PHP Savant pagination class and PHP Savant pagination plugins to you, all in a hope that you'll find it useful in your own web projects.

Instructions and download

You'll find instructions and download links by clicking on "SavantPaginate" at the top of TechyTalk.info or by clicking on the following link:

http://www.techytalk.info/other-projects/savantpaginate/

Ubuntu Netbeans and LAMP server with Xdebug as non-root user

In this article I'll show you how to setup Linux Apache Mysql PHP (LAMP) web development environment on Ubuntu Linux with your web site files in your home directory. This way you can easily develop for web as non-root user. If you are trying to install Linux Apache Mysql PHP on Windows, I'll point you to one of my previous articles where I have explained just that:

Apache, MySQL, PHP server on Windows

My goals for this session are to install Apache, MySQL and PHP with Xdebug module for PHP development debugging. We will setup Xdebug and use it with Netbeans, but once Xdebug is properly installed, you can debug your applications with any other application like Eclipse. The most important thing for a web developer or web programmer is to be able to easily modify his web development files without becoming root for everything he is working on. I will show you how to instruct Apache to make virtual host in your home directory. At the end of it all I will install Netbeans and create sample project to work with our new development environment. So lets get started...

Continue reading