Quantcast

Archive for: php

CSS Crush: CSS Pre-Processor: No Specific Properties, Rules or Functions Required

CSS Crush is an awesome new PHP based CSS Pre-processor. Basically CSS Crush minimizes many of the hacks and workarounds used in CSS development. CSS Crush means there is no need to use any browser specific properties, rules, functions, etc.

And, there is support for minification and caching for serving them as fast as possible.

 

 

How to Setup Ubuntu 11.04 LAMP Server

I have been setting up Linux servers a lot lately and I came across this great step by step guide that outlines how to install an Ubuntu Server as a LAMP Server. LAMP stands for Linux, Apache, MySQL and PHP. This step by step process helps to make the process as easy as possible and even if you dont have Linux Server experience Im sure you will be able to follow the process.

This tutorial is for Ubuntu 11.04. Click here to check out the full article.

How to Fix the BuddyPress bp-loader.php Issue: Blank Site

I was recently installing BuddyPress on one of our other sites and I continually kept getting the same issue, the bp-loader.php fatal error and then the site would just go blank. It was so annoying! I tried so many different things to fix it.

Firstly, I found this hack that fixed the issues for one of the sites:

1. Create a new file, e.g. bp-loader-fix.php
2. Move the contents of bp-loader.php over except the first comment block
3. Make sure the new file has starting and ending tags, same with bp-loader.php
4. In bp-loader.php, add the following as the last (and now only) php statement

require_once(‘bp-loader-fix.php’);

However, with one of our sites this didnt fix the issues. Finally I came across the fact that the PHP memory limit needed to be higher on a Buddypress site compared to a basic WordPress site.

In an .htaccess file in the same directory as the script, include this line:

php_value memory_limit ?M

Replace “?” with the with the value you need to replace it with. Our default size is set to 32MB and a successful modification of the memory limit will show in your PHP info file. See How can I view configuration information for my PHP sites?

phpSysInfo: Get All the Information About your Hosting Server

Have you ever been curious about your hosting service? Have you ever wondered “what kind of machine is holding up my website”? Well, you are going to love this one: phpSysInfo retrieves an incredible amount of information from the hosting server.

And when I say incredible, I mean INCREDIBLE. Running this PHP it will automatically bring the following information from the server:

  • Processor model, type and speed.
  • RAM and the amount currently used.
  • Operating system.
  • Number of hard drives and present RAID configurations.
  • Partitions and mounted filesystem free space.
  • Number of process running and their status.
  • Hardware temperature and voltage.
  • Network usage.
  • And even more!

This script runs on any site where PHP is enable, it only requires PHP 5.2 version or higher. And the output options are: static content, XML or update it dynamically. Plus, you can get different themes to use it.

The phpSysInfo site have ready a demonstration of their script running on their server. Check it out here.

Did I mention it’s completely free to download?

Enjoy!

Add your Twitter timeline to your site with Ptwix

ptwix01There are dozens and dozens of these applications, scripts and widgets available, but one of my favorites it is definitely is Ptwix. Simple script that you can use it on your website or blog, that shows your Twitter timeline with a very cool design.

The installation process it’s quite simple, just uploaded to your current server and modify the configuration files with your Twitter account. Since the code is based in PHP and AJAX you will be able to use it in almost any platform, including WordPress of course.

ptwix02

The configuration file is named PtwiX_reader.php and you’ll only need to edit these lines:

$username=”yourtwitterusername”;
$password=”yourtwitterpassword”;
$url_path=”http://www.mysite.com/ptwix/”;
$cache_folder=”/var/www/examplesite/ptwix/cache/”;

You also have three different themes to choose or even design one of your own. Here’s a demo of the script working and a simple procedure about how to install it.