Prendstah.com got A+ grade from ssllabs.com

Administration, Info.Tech, PHP, Web Development Comments Off on Prendstah.com got A+ grade from ssllabs.com

I was curious how Sid Bachtiar got the high grade of his SSL Report. It challenge me and give me interest how to do it. So I did. Oh Yeah! Got the A+ SSL Report grade.

prendstah_Aplus_on_ssllabs

SSL Test: https://www.ssllabs.com/ssltest/analyze.html?d=prendstah.com

 

skype_a-ssl

Selwyn District Council Consents

Info.Tech, PHP, Web Development Comments Off on Selwyn District Council Consents

Wohooo… It is really good hearing this news. TRIAD { sid, michael, camilo3rd } is behind this online tool.

Online Building Consent System is powered by: Alpha 77 Limited (www.abcs.co.nz)

Legacy of Adam Jones of QCIT Ltd (www.qcit.co.nz)

PHP Deployment Tool: Mage

Info.Tech, PHP, Web Development Comments Off on PHP Deployment Tool: Mage

I’ve been using this php deployment tool called magallanes or mage php. It is pretty cool. For more details of this tool, visit http://magephp.com

I did a fork because its not working well on windows. My Fork: https://github.com/camilord/Magallanes

My fixes are issues on tarballing the the project and the rsync to the server.

mage

Code Igniter: Cannot get POST values

Administration, Code Igniter, Info.Tech, PHP, Web Development Comments Off on Code Igniter: Cannot get POST values

I encountered this issue in Code Igniter that I cannot get the POST values. Some says its the .htaccess issue. I used same .htaccess with all my application and works fine. I was working on my new environment, Kali Linux, and realised that its the mod_rewrite module wasn’t loaded and partly affects the .htaccess.

# cd /etc/apache2/mods-enabled/
# locate mod_rewrite
/usr/lib/apache2/modules/mod_rewrite.so
# touch rewrite.load
# nano rewrite.load

At the file:

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

Save the changes and restart apache.

Hope this will help you… Pee coding!

Allow postfix to send email with different sender from SMTP account

Administration, Info.Tech, Linux System Administration, PHP, Web Development Comments Off on Allow postfix to send email with different sender from SMTP account

Allow postfix  to send email with different sender from SMTP account…

Error:

postfix/smtpd[27402]: NOQUEUE: reject: RCPT from unknown[125.123.123.100]: 553 5.7.1 <user@xxx.co.nz>: Sender address rejected: not owned by user user@xxx.co.nz; from=<xxx@xxx.co.nz> to=<xxx@gmail.com> proto=ESMTP helo=<localhost>

Edit postfix configuration:

[root@mail ~]# nano /etc/postfix/main.cf

Change from:

smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated

To:

smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated

Then restart postfix…

[root@mail ~]# postfix stop
postfix/postfix-script: stopping the Postfix mail system
postfix/postfix-script: waiting for the Postfix mail system to terminate
[root@mail ~]# postfix start
postfix/postfix-script: starting the Postfix mail system
[root@mail ~]#

That’s it.. You can now change your from or reply-to in your PHPMailer. 🙂

Hope this helps…

Top PHP Frameworks

Info.Tech, PHP, Web Development Comments Off on Top PHP Frameworks
Top 5 PHP Frameworks Infographic
From: www.zfort.com

[Solution] JpGraph Error: 25128 The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.

Info.Tech, PHP, Web Development Comments Off on [Solution] JpGraph Error: 25128 The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.

JPGRAPH

I always stumble down with this error for couple of projects now.

JpGraph Error: 25128 The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.

Two solutions as I know:

  1. install the required library
  2. or simply comment certain line

 

For solution #1, simply cast yum install php-gd.

For solution #2, as of version 3.5.0b1 — comment line 110 (function SetAntiAliasing) at file gd_image.inc.php

and that’s it… problem solved.

Another issue will be fonts:

JpGraph Error: 25049 Font file "/usr/share/fonts/truetype/arialbd.ttf" is not readable or does not exist.

Look for jpg-config.inc.php and add these lines:

define('CACHE_DIR','cache/');
define('TTF_DIR','includes/jpgraph/fonts/');

Note: Just place the right path where you setup your jpgraph folder

Download required JpGraph Fonts: JpGraph Fonts (1261)

And that should solve the problems… 🙂

Samples:

progression_graph_1386128392 progression_graph_1386188039

IDE: NetBeans vs phpStorm

Info.Tech, PHP, Web Development Comments Off on IDE: NetBeans vs phpStorm

Before back in college, I used UltraEdit, then Notepad++ as my HTML JS, CSS and PHP editor. I even tried Dreamweaver and it sucks for me. I also tried Ecplise and its way heavy application, too slow to load.

I’ve been using NetBeans IDE for a while now. I met a PHP programmer and mention about phpStorm and got curious. So I downloaded phpStorm 7.0 and tested it out myself. I still find NetBeans as the Best IDE. Though I like the UI of phpStorm, I find it so COOL (see screenshot below) but (geeezz!) its too pricy will cost you $99 for personal license. Loading performance, I still voted for NetBeans. Features like FTP, SSH, Git, SVN etc — most likely they have both NetBeans and phpStorm.

netbeans_vs_phpstorm

 I guess, I felt the same with other PHP developers about NetBeans, phpStorm, Eclipse and other IDEs. See: http://www.warriorforum.com/programming-talk/637270-eclipse-vs-netbeans-vs-phpstorm.html

PHP and MySQL TimeZone Synchronization

Info.Tech, PHP, SQL: Structured Query Language, Web Development Comments Off on PHP and MySQL TimeZone Synchronization

We all know the PHP and MySQL holds different timezone… what if we want both PHP and MySQL sync together by adjusting your PHP code only…

Here’s the solution:

<?php

define('TIMEZONE', 'Australia/Brisbane');

@date_default_timezone_set(TIMEZONE);

$dt = new DateTime();

// get time offset
$offset = $dt->format("P"); 

// update mysql timezone
mysql_query("SET time_zone='$offset';");

?>

 

Thanks to Craig Buckler…

Reference: http://www.sitepoint.com/synchronize-php-mysql-timezone-configuration/

PHP + Firebird SQL Installation

Info.Tech, PHP, SQL: Structured Query Language, Web Development Comments Off on PHP + Firebird SQL Installation

Download the following: (In my case, it’s 64bit)

  1. PHP
  2. Apache
  3. Firebird (http://www.firebirdsql.org/en/firebird-2-5-2-upd1/)

After installation of PHP, edit the php.ini and uncomment:

  • php_interbase.dll
  • php_pdo_firebird.dll

At command prompt, cast php -v and you will have an error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\php\ext\php_interbase.dll' - The specified module could not be found.
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\php\ext\php_pdo_firebird.dll' - The specified module could not be found.
 in Unknown on line 0
PHP 5.4.9 (cli) (built: Nov 21 2012 19:54:46)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Install the Firebird…

Try again casting a command php -v

C:\Workspace\localhost\vshbdata>php -v
PHP 5.4.9 (cli) (built: Nov 21 2012 19:54:46)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Meaning, the firebird is successfully installed.

Second test is create a php script:

<?php

foreach(PDO::getAvailableDrivers() as $driver) {
  echo $driver.'<br />';
}

?>

You should see firebird in the list…

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in