Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Friday, March 14

Mengurus fail Aplikasi PHP Slim

Jika dirujuk pada laman rasmi tentang bagaimana mengurus aplikasi Slim apabila skop dan saiznya mulai berkembang, tiada pula diterangkan mengenai contoh kod terperinci yang terlibat dalam fail yang berasingan. Cuma diterangkan kelebihan penggunaan sintaks require dapat memudahkan pembacaan kod dan keteraturan fail-fail PHP.


Persoalan akan timbul bilamana ralat (teks quote dibawah) muncul ketika fail-fail tersebut mencuba menggunakan instance Slim (rujuk gambar di atas).
PHP Fatal error: Class 'Slim' not found

Sampel kod di atas adalah contoh penggunaan instance Slim. Bagi atasi masalah ini berlaku, sintaks yang akan digunakan dalam kesemua fail yang berasingan dari fail utama (index) adalah 

use Slim\Slim;

Selamat mengoding!

Thursday, July 3

Fatal error: Call to undefined function ldap_connect()

I configured wordpress with LDAP to enable my user to login to wordpress with their exchange Id. But fail to enable it at first.

Solution
add php_ldap.dll to your php.ini file.

Saturday, June 21

The Creator of PHP

Just now i visit the Rasmus Lerdorf website whose working with Yahoo Inc as Infrastructure Architecture. He is the creator of PHP programming language and now actively improve the web technology. Nice work Lerdorf. I love PHP!

Related Site: littletutorials

Wednesday, March 5

phpThumb

phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD v2.0+ is available, otherwise paletted-color and nearest-neighbour resizing is used

Licence: pTCL (phpThumb Commercial License)
Download: http://sourceforge.net/project/showfiles.php?group_id=106407&package_id=114543

Friday, February 15

Trellis Desk: Free User-friendly help desk system

Trellis Desk is a powerful, robust help desk solution for your business. Improve your company's service by allowing your customers to quickly and easily submit support tickets to your team. Trellis Desk sports a range of advanced features to revitalize the way your business handles customer support. Even better, it's completely free; you don't have to pay any license fees to use Trellis Desk.

Thursday, January 24

Open Source Job Board for Commercial Applications

jobberBase is an open source job board software extracted from the successful Romanian IT job board jobber.ro. The design of jobberBase is very clean, simple and easy to use. It has some popular features of modern job boards which includes Post jobs without an account, Search for jobs, Apply to jobs, RSS feeds of latest jobs and Site-widget which can be places on other websites for displaying current jobs.

Most importantly, You can use jobberBase free of charge, for anything you like (including commercial applications). You only need to keep the copyright and license remarks.

But I figured out that there is one drawback. User have to post the job under specied category as display on tab. So if you to post other jobs too, the solution would be if you specified "Other" category to let user to post other kind of job. I'm still looking company who have implemented this software for their needs. Am hoping the documentation team will guide the developer to extend the functionality of this software.

Monday, December 31

Zend Framework for Nice and Clean PHP Programming

Before this I use swift mailer as frame work for sending mail using php. I really love swift mailer in terms of stability and the code. Today I found Zend Framework which does more jobs than swift mailer. Not only it capable to send email securely but it provide us the API for GData, Flickr, Del.icio.us, Amazon, etc. Other than these, it also handles various common tasks. This is new level of programming to me.

I really hope that zend framework would be able to get data from facebook and Microsoft Exchange. It really mean to me. If any of you know how to link php with Microsoft Exchange data, please welcome to give the tutorial, or link.

Wednesday, December 26

Eventum: Bug Tracking System

Eventum is a user-friendly and flexible issue tracking system that can be used by a support department to track incoming technical support requests, or by a software development team to quickly organize tasks and bugs. Eventum is used by the MySQL AB Technical Support team, and has allowed us to dramatically improve our response times.


System Requirements

  1. PHP 4.1.0 or newer versions
  2. PCRE Extension (usually enabled by default with newer PHP versions)
  3. Session Extension (usually enabled by default with newer PHP versions)
  4. MySQL Extension (built-in support with most PHP distributions)
  5. GD Extension
  6. MySQL Database Server
  7. Email Integration - The email integration module requires PHP's IMAP extension and also a POP3/IMAP server that allows connections to their appropriate ports.

Feature List

  1. Email Integration
  2. SCM Integration
  3. Project Management
  4. Issue Listing
  5. Reporting Issues
  6. Command Line Interface

Saturday, October 20

Minishowcase: The PHP Photo Gallery

minishowcase is a small and simple php/javascript online photo gallery, powered by AJAX that allows you to easily show your images online, without complex databases or coding, allowing to have an up-and-running gallery in a few minutes. Here the demo

Features:
  1. New interface
  2. Simple galleries
  3. Lightbox view
  4. Languages
  5. Permanent URLs
  6. Automatic thumbnails
  7. Added viewing features
  8. Private galleries
  9. Plug-in interface
Requirement
at least php v4.2.0
GD or GD2 extension
FTP account and client.
browser must be JavaScript Enabled
minishowcase is licensed under a Creative Commons Attribution-Share Alike 2.5 License. And was released on Sep. 29, 2007. There's also explanation for configure the theme and intergrate the gallery with another application.

Note: This gallery is not compatible with IE 5.x Mac

Thursday, October 11

phpESP for Administrate survey processing

phpESP is a set of PHP scripts to let non-technical users create surveys, administer surveys, gather results, and view statistics, all managed online after database initialization.

But I found it's was uneasy for me to install and configure. This software require the application to be run on apache (recommended) but I dare to put it on IIS. Beside, it also need gettext to be install together with your PHP.

However it is listed as the 50 best open source for business even I found it still unstable.

Wednesday, September 26

MD5 equal to hash function in ColdFusion

I have an application and it requires login to enter the application. Due to all the passwords were hash in coldfusion, I can't see how to read/compare a password sent in php to match with the database value.

Luckily, MD5 of PHP can cater this job. MD5 also hash the password and the value is the same as coldfusion's hash.

Monday, September 24

PHP DIRECTOR - Your Open Source Video Gallery

I stumbled upon this open source video gallery while looking for php video upload script. But can't find one and found this. If you plan to start your own youtube, you may want to try this.

PHP Director does not allow user to upload video, but it lets user to paste the URL of video clips from youtube. After submit the video to PHP Director, the application will retrieve all the thumbnail available from youtube. And user can start to name it and give some description of the video.

Tuesday, August 28

Using 12CropImage 2

It's a sigh for me to have this tool because no more support provided for this plugin since December of 2006. This plugin supports for image upload, resize as well as crop. No big issue during the installation of this plugin. But still manage to tweak to suit to my concept and theme.

Wednesday, August 8

Create phpSiteMap and send it to gooooogle

After publish several websites, I need something that can automate the creation of sitemap.

phpSitemapNG let you create sitemap files in different formats as e.g. the xml-based Google Sitemaps format, RSS, txt or html-based. It will spider your website and also your filesystem (of course, as you prefer). You can download and use it for free, the licence is GPL.

This tool will crawl the specified directory and later will tell google to read the sitemap to genarate sitelink on google search result

Friday, July 13

Call to undefined function: html_entity_decode

If you are using php version below than 4.3, html_entity_decode it's not available for this version. Then you should employ this lines of codes to make it works

function html_entity_decode ($string, $opt = ENT_COMPAT) {

$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);

if (
$opt & 1) { // Translating single quotes

// Add single quote to translation table;
// doesn't appear to be there by default
$trans_tbl["'"] = "'";
}

if (!(
$opt & 2)) { // Not translating double quotes

// Remove double quote from translation table
unset($trans_tbl["""]);
}

return
strtr ($string, $trans_tbl);
}
}

// Just to be safe ;o)
if (!defined("ENT_COMPAT")) define("ENT_COMPAT", 2);
if (!
defined("ENT_NOQUOTES")) define("ENT_NOQUOTES", 0);
if (!
defined("ENT_QUOTES")) define("ENT_QUOTES", 3);

This will saves your time

Call to undefined function: mssql_connect() on IIS

I check my php.ini setting but the mssql function doesn't appear. So follow this step to make it working
  1. Edit your php.ini file and uncomment (remove the semicolon from) the following line of code. If this line is missing in your php.ini, you must manually add it in:
    extension=php_mssql.dll

  2. The php_mssql.dll file can be obtained in the PHP downloads for Win32. You must make sure that you place the dll in both the /extensions and /WINNT/system32 folder.

  3. Restart the Web server.

But I still can't make my application sucessfully connect to MSSQL 7.0. I configured SQL Server Client Network Utility and enable the TCP/IP.

And I test

Test SQL Server's connections: You can verify that SQL Server is accepting
connections using telnet. In a command window, type the following:telnet 1433If you get an error message such as "Could not open a connection to host on port 1433: Connect Failed…" then you should open the SQL Server Enterprise Manager and check the server and port setting. This problem can also be caused by a firewall or if the SQL Server service has been stopped unexpectedly. If you get a blank screen, it means that SQL Server is accepting incoming connections.

Ok...I get the blank screen and that's mean the connection is ready on port 1433

Monday, July 9

Using Swift Mailer for Effective PHP mailing

Many newbie in PHP programming when starting to send email from php using php native email function may find it hard to configure to send a simple email. But I have found another way by using classes from swift mailer. Luckily it's free.

It has all the basic function including attachment, send batch email, send mass email, HTML email, and HTML/plain email. Yet, I haven't fully explored all the other features.

Another interesting is, Swift mailer handle basic email checking. That means, when you send out using batch send, it can check every email address provided and you'll be able to list those email.

Swift supports event-driven plugins which offer you the opportunity to really take control of the library and set this mailer apart from everything else that's out there. Over time, and from previous versions, the library has been steadily refactored and is now usable for more than just the blind sending of emails. It can compose RFC 2822 compliant messages for use elsewhere too. I'm looking at offering the reverse and parsing real emails into the message object format used in the library.
This one is another features I haven't yet explored and maximise the potential of this classes. I'm hoping if someone out there could share with me what can be done and achieve this Swift Mailer