Category Archives: Blog

Testing php script on google app engine

On last post I’ve wrote about howto install the google app SDK for PHP . Today I want to continue with simple testing.

How to run php script using google app engine on my Ubuntu 13.04 desktop :

1. Setting PATH to google app engine by edit .profile

$ cd
$ nano .profile

add this line :

PATH=”$HOME/google_appengine:$PATH”

save.

2. Export the PATH for current operation

$ export PATH=”$HOME/google_appengine:$PATH”
$ echo $PATH

”/home/alamsyah/google_appengine:/home/alamsyah/android-sdk-linux/tools:/home/alamsyah/android-sdk-linux/platforms:/home/alamsyah/android-sdk-linux/platform-tools:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games”

3. Create testing directory

$ mkdir digitalfusi

4. Create php script

$ nano digitalfusi/index.php

put these lines :

<?php

echo “Hello world from rasyid.net <p>”;

phpinfo();

?>

save.

5. Create yaml file (configuration file).

$ nano digitalfusi/app.yaml

Put these lines :

application: digitalfusi
version: 1
runtime: php
api_version: 1

handlers:
– url: /.*
script: index.php

save. For full list of yaml option you can refer to this link.

6. Run the script

Google app engine need to know which php-cgi that work.

if you use php-cgi from ubuntu stock you can run the server using this command :

$ google_appengine/dev_appserver.py –php_executable_path=/usr/bin/php-cgi digitalfusi

INFO     2013-11-23 06:50:46,610 sdk_update_checker.py:245] Checking for updates to the SDK.
INFO     2013-11-23 06:50:59,891 sdk_update_checker.py:261] Update check failed: HTTP Error 404: Not Found
INFO     2013-11-23 06:50:59,927 api_server.py:138] Starting API server at: http://localhost:39378
INFO     2013-11-23 06:50:59,951 dispatcher.py:171] Starting module “default” running at: http://localhost:8080
INFO     2013-11-23 06:50:59,961 admin_server.py:117] Starting admin server at: http://localhost:8000

Selection_007

Using previous location of php-cgi :

$ google_appengine/dev_appserver.py –php_executable_path=$HOME/php-5.4.22/installdir/bin/php-cgi digitalfusi

INFO     2013-11-23 06:47:20,067 sdk_update_checker.py:245] Checking for updates to the SDK.
INFO     2013-11-23 06:47:27,422 sdk_update_checker.py:261] Update check failed: HTTP Error 404: Not Found
INFO     2013-11-23 06:47:27,452 api_server.py:138] Starting API server at: http://localhost:46100
INFO     2013-11-23 06:47:27,477 dispatcher.py:171] Starting module “default” running at: http://localhost:8080
INFO     2013-11-23 06:47:27,482 admin_server.py:117] Starting admin server at: http://localhost:8000

Selection_006

Install Laravel 4 on Windows 7

Working with laravel Shirt 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 it on project.

Laravel is my option after CodeIgniter . As usual, installation is big thing for me and my netbook run on Windos 7 starter.

Steps for Laravel installation on Windows 7 :

Download latest laravel version 

In time of writing I got 4.0.4 version.

Put it on Xampp htdocs directory.

I rename it to laravel after extract its content.

install_laravel_windows7_1

 

Install Git

Git work ‘distribution system control‘ . It will work together with composer.

Download latest version of Git for Windows from here.

Installation is straightforward. A few notes during installation :

– Make sure to choose “Run Git from the Windows Command Prompt” on adjusting your PATH environment section.

Checkout Window style,commit unix-style line endings on Configuring the line ending conversion section.

Install Composer for Windows

Get latest version from here. Install it as usual. Nothing serious here :-)

Configuration

In this section we just need to check if everything is work.

1. Check php version
C:\Users\pc>php -v

PHP 5.4.7 (cli) (built: Sep 12 2012 23:48:31)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

C:\Users\pc>

2. Check Git version

Continue reading

How to make money online with adfly : tips and tricks

Never thought never cross my mind if sharing link will give money, at least potential resource for make money online through link until I put into small action and here’s current result :

What is URL shortener?

URL shortener is web service that provide long URL address into short address.

Not big as others who actively promote their link with adfly,  what I do is maximize my blog potential traffic.

Continue reading

Upgrade Clamav for older FreeBSD box : This version of the ClamAV engine is outdated

One of my FreeBSD box that use version 6.3 stop working. Futher investigation lead me to old clamav version that forced to upgrade by clamav.net .

This version of the ClamAV engine is outdated

I think about upgrade the box to newer version like 7.3 or 8.0 release but final choice I pick is :

Let it as is :-)

Just focus on clamav because everything running well and I don’t want to risk anything that might happen ( ports conflict, new config etc)

My method :

1. Update ports to latest version.

2. Check clamav version

# portversion -v | grep clamav

clamav-0.94.2               <  needs updating (port has 0.96_1)

3. Downgrade ports file for clamav using portdowngrade ( I choose version 0.95.3)

4. Reinstall Clamav.

# portversion -v | grep clamav

clamav-0.95.3               <  needs updating (port has 0.96_1)

5. Restart clamav

# /usr/local/etc/rc.d/clamav-clamd restart

# /usr/local/etc/rc.d/clamav-freshclam restart

Email server back to business.

P.S : in case you want to skip portdowngrade section you can use my clamav ports.

clamav.tar