Skip to main content

Lithium first glimpse

I decided to review my PHP and now I’m interested with the Lithium project. I wanted to get my hands on it just to see what it can do and what are the good stuff in it. Lithium by the way is a PHP web framework, it’s RAD. If you don’t know what a PHP web framework is, I don’t think I can help you. But a Google with the topic can result to many useful resources.

I almost forgot most of my PHP background because it’s been 2 years since I coded it. And it was with 4.3 and Oracle. I’m not too sure about what to do next. Instead of installing everything from scratch, I decided to install XAMPP. It’s easy and good stuff (I think). Unlike before, installing PHP and Apache, make Apache recorgnized PHP, add a module to it, install MySQL… You know what I mean. It’s a hassle. But with XAMPP, it’s just a single install and everything is in there. Of course, this doesn’t help if you’re a geek and pretend to know everything and installing everything by hand makes you happy. But for me, it’s fine. For now.

When I got Lithium source, I just pasted it in the htdocs directory and there it goes. It’s slick. It also has some good tutorial in their site. Everything is good. Until I decided to check on Contribution. Not that I can contribute but who knows. I bumped into an error with the coverage. I never knew PHP has coverage. That’s interesting. So I Google a bit and read a few statements in lithium’s wiki about xdebug. There it is. XDebug is actually and extension for PHP and has good stuff. It has code coverage and everything useful for developing PHP applications. God, I never knew this is coming. The more I surf the net, the more I know things I don't know.

So back with the error, it has something to do with xdebug_start_code_coverage method not found. I ran into xdebug installation and it’s just adding the extension to the Apache. That’s simple, I think I can do that. But when I look into the XAMPP’s PHP installation, I noticed php.ini has the extension but commented. Ha! That’s even simpler. I uncommented it and voila. When running lithium test cases it fetched off the call stack with information I found some useful. Although I’m not too sure I’m too familiar with it. :)

Comments

Popular posts from this blog

Restoring .dat data to MSSQL

This is just a document in case I forgot to restore data files to MSSQL. I had this problem before when a colleague gave me a .dat files to be restored to SQL server. I had a 2008 version of the server and had no trouble restoring it. The problem is, I forgot how I did it when I had a new PC and I upgraded it to 2012 SQL server. But this is a simple task (although I had a full day remembering how I did it and I had no luck finding the solution from google). First off, click restore, like so I had trouble with the database whether or not to add a new database and restore the file to it, or not. Simple answer is no need. With the next image you can see that the configuration is very simple. Just set it to device as the source and find the .mdf file. It automatically displays a suggestion for the database name and you're done. Click OK and wait a couple of minutes for SQL server to restore the data. [EDIT] In case you are restoring a backup file without an extension. You c...

Python Hydrology

Recently I'm learning Python and encountered the Hydrology book. Had to upgrade some of python packages and some libraries needed to get working with the book. There is an instruction though about mostly using pip install packages need for the book. The problem is I can't get it work. It's missing some things so I did a little google and hopefully this is a compilation of the things I need to work with the examples of the book. First off, I updated the apt-get $ sudo apt-get update Next is I installed the pip package manager. I'm not too sure but I have Ubuntu 10 and it doesn't have the pip installed. So I installed using the command below. $ sudo apt-get install python-pip Now the development packages for python. $ sudo apt-get install python-dev Most of the examples uses the scientific number packages so I installed numpy and other packages I'm not quite aware of. It's just that some of the examples probably in the later part of the book use...

Setting Up IIS on a Local Network: A Developer's Journey

Today, I embarked on a mission to set up an IIS server on our local network. The primary objective? To create local network versions of our applications for testing and development purposes. Additionally, we're in the process of setting up a CI/CD server to automate our workflows. However, like many journeys, this one had its share of hurdles. The initial hiccup arose when I realized that .NET was installed before IIS, leading to compatibility issues. Despite attempting to install IIS through the control panel and tweaking .NET components, the problem persisted. "Nada." After some trial and error, a breakthrough emerged. The solution? Executing dism as an Administrator in the C:\Windows\Microsoft.NET\Framework\v4.0.30319 directory: \> dism /online /enable-feature /featurename:IIS-ASPNET45 /all And just like that, the clouds parted, and the path forward became clear. With IIS up and running seamlessly, our developers rejoiced, and testing commenced with renewed vigor. H...