Archive for the ‘PHP’ category

PHP Date Timezone error ( date_default_timezone_set )

December 9th, 2011

I was experiencing an error regarding date() function on PHP 5 with error message like this :
Message: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Jakarta' for 'WIT/7.0/no DST' instead

For quick fix in PHP5, add this line

date_default_timezone_set("Asia/Jakarta")

What people search:

Access CPanel behind company proxy firewall

December 2nd, 2010

I was having problem accessing my web server from my company, my company network only open port 80 for internet access. So it would be impossible if someone trying to do to access CPanel behind this firewall.

But there’s a way for us to access CPanel via port 80 on our server, there’s no change at all both side our network or server. To access CPanel behind company firewall we can go to http://cpanel.domain.com, replace the domain.com with your own domain. For example http://cpanel.leoganda.net

By using this technique we are bypassing the port on our server, and accessing the port 80 over CPanel. So we gain access.

What people search:

Auto Post Using Javascript

December 5th, 2009

Hi there, a few weeks ago I was doing research about auto post from webpage to paypal payment page. The basic idea is the visitor fill the form, then when the visitor submit the form we will store visitor data input to database. Once data stored in database the page will be automatically redirected to paypal website. It’s pretty easy, we will use JavaScript to do auto post. I wanna make this article as simple as possible, I just wanna show how to do auto post with Javascript. » Read more: Auto Post Using Javascript

What people search:

Solving Zend Framework error “An Error Has Occurred A project profile was not found”

October 15th, 2009

Hi there, I had an error “An Error Has Occurred A project profile was not found” on Zend framework command line when I tried to generate an action for my project. I’m using Windows XP and for the web server I’m using XAMPP. The “An Error Has Occurred A project profile was not found” happened because we have wrong include path in our php.ini.

Open your php.ini and find the include_path line, insert your zend framework library path into the line before the PEAR path.

include_path = ".;E:\xampp\htdocs\ZendFramework\library;E:\xampp\php\PEAR"

Save the file and restart your Apache. Good luck :)

What people search:

How to enable XAMPP SSL socket transport

July 26th, 2009

Hi today I have an experiment with GData in Zend Framework PHP , and found an error that my XAMPP prevent SSL socket transport and return this error.

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Unable to Connect to ssl://www.google.com:443. Error #24: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?' » Read more: How to enable XAMPP SSL socket transport

What people search:

How to connect MySQL in Prado Framework

July 18th, 2009

Hello!

This is my first article tutorial in this blog, today my friend have a problem connecting SQL databases with PRaDO framework. I have used this framework several years ago, and it’s quite easy to make a website with Prado. This time I will write how to connect MySQL with Prado, insert data, and display it in the web page.

First, I’m using XAMPPLITE as webserver, XAMPPLITE is lite version of XAMPP, but if you are using XAMPP it’s ok. Download XAMPP.

After you finish the XAMPP download, continue with download Prado framework. Download Prado.

Install the XAMPP, and extract the prado framework in htdocs folder.

The optional prado-cli.php PHP script file in the framework directory provides command line tools to perform various tedious takes in Prado. The prado-cli.php can be used to create Prado project skeletons, create initial test fixtures, and access to an interactive PHP shell. We will use command line tool to generate our prado project. » Read more: How to connect MySQL in Prado Framework

What people search: