Using multiple php inside one Ubuntu machine

Another challenge came. One of our application finally updated. The application development use php 5.3 + and already pass with php 5.5+ version. Time for migration schedule and the requirement is obvious : the machine able to run 2 different php (php 5.2.17 is a must and other php version is at least 5.3+). The …

More

Compile PHP 5.2.17 using phpfarm

In general phpfarm is working well in case you need multiple php environment in single machine. Special case is for PHP 5.2.17 (latest version of 5.2 generation), I got this error when compile : opt/phpfarm/src/php-5.2.17/ext/dom/node.c: In function ‘zim_domnode_getNodePath’: /opt/phpfarm/src/php-5.2.17/ext/dom/node.c:2002:8: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] value = xmlGetNodePath(nodep); ^ make: *** [ext/dom/node.lo] …

More

How to install Laravel on FreeBSD 9.2

As I have more machine that run FreeBSD 9 I decide to explore the installation process of PHP Framework. I want to start with Laravel as I feel this framework will be suitable with our team requirement. I already have working PHP 5.2.17 with Apache on my FreeBSD 9.2 box so I have to upgrade …

More

Install Varnish with Apache on FreeBSD 9.2

Today I want to try to install Varnish on FreeBSD. A few scenarios  on my mind. Install varnish with nginx, lighttpd or cherokee with different port under Apache as front end. Due to lack of experience with Varnish I’ll start with Varnish using Apache first. Others will follow Lets get started Check Apache installation # …

More

Deploy google app engine : appcfg.py

Deploy php script aka application to google app engine is interesting. I came from traditional ftp-ing (so 1999 hehehe), scp and cpanel. Google app engine provide 2 ways of deployment; through appcfg.py and via git. I’ll try to explore both options now. Preparation In this stage, application need to get register first to App Engine Administration …

More

install php sdk for google app engine on ubuntu 13.04

Another need for try php on google app engine make install all required stuff : Install python $ sudo apt-get install python Check version : $ python -V Python 2.7.4 Install PHP CGI Download latest php 5.4 from download page : $ wget -c http://au1.php.net/get/php-5.4.22.tar.gz/from/this/mirror -O php-5.4.22.tar.gz $ tar xvzf php-5.4.22.tar.gz $ cd php-5.4.22/ $ …

More

Install Laravel 4 on Windows 7

I want to learn new things and it seem a lot of changes already happened. Specially PHP. First time I learn about this lang I see 4.0 version. Today, I see PHP already reach 5.3, 5.4 and so on. I don’t know about OOP in PHP so I decide to learn about OOP by doing …

More

Downgrade php version from 5.3 to 5.2 on Ubuntu 10.10 x86

New Server has come and again I must downgrade php version to 5.2 due to some problem on web application. I use same method I use for Ubuntu 10.04 for Ubuntu 10.10 x86. Let start Download required files for PHP 5.2 from Ubuntu Karmic repository #cd /etc/apt/sources.list.d #wget http://randyfay.com/sites/default/files/karmic_0.list # cd /etc/apt/preferences.d/ #wget http://randyfay.com/sites/default/files/php_1. # …

More

Howto install Aptana studio with php support

I’m old fashion student who use phpcoder as tool for coding php until my friend suggest aptana editor with php support. When everything configured properly I’ll have php interpreter for immediate debug purpose and I think it’s suitable for new php user I decide to give this software a try and here it goes. Install …

More

undefined function imagecreatefromjpeg()

Call to undefined function imagecreatefromjpeg() in /home/materi/prog/cms_study/admin/pageuploadadd.php on line 88   Yes, that message show up when my friend try to access web based application. I think thats my fault Doing preliminary check : edp# pkg_info | grep php5-gd edit /etc/make.conf PERL_VER=5.8.8 PERL_VERSION=5.8.8 WITHOUT_X11=yes save. edp# whereis php5-gd php5-gd: /usr/ports/graphics/php5-gd edp# cd /usr/ports/graphics/php5-gd && make …

More

change wordpress password manually

Reset wordpress password using provided link not work, sadly no phpmyadmin available Fortunately I have shell access which is enough, using built in md5 function to generate and update the password, here’s the steps: 1. Creating md5 – Using shell Just type : md5 -s your chosen password – Make php script with this content …

More

$this and php

Little mistake on naming variable make me confuse for almost an hour. $this yes, $this is built-in variable that often use in OOP. By using $this, we refer to self referencing variable. More in php.net manual <?php class A { function foo() { if (isset($this)) { echo ‘$this is defined (‘; echo get_class($this); echo “)\n”; } else { echo “\$this is not defined.\n”; } } …

More

Install PHP6, easy install in windows

PHP6, I thought I already have latest one. 5.2.6 but I’m wrong Quick way to try PHP6 is by installing Appserv 2.6.0, click here to download php 6.0.0-dev Installation process is the same as other appserv series : 1. Double click installer