Tag: PHP

P4A 3.6.1 available now!

The first bugfix spin after the 3.6 rollout, let’s take a look at the changelog

- P4A_DB_Source::load() now returns an object also when setQuery() is used
- P4A_DB_Source::load()’s autosequence creation now checks that the field
exists before calling the setSequence()
- a bug with P4A_Redirect_To_Url and P4A_Redirect_To_File was solved
(bug #3039449)
- better focus management for P4A_Grid
- a bug with AJAX javascript returning and html entities was solved

Download P4A 3.6.1

P4A 3.6.0 is finally out!

It’s time for a big P4A release before the summer vacation :)

The changelog is really long as usual but there are no explosive changes or new features, the main focus was porting from the old FCKEditor to the new CKEditor 3.3 (that now has come to a complete and stable feature set).

I also worked on updating all various softwares we embed (Zend Framework and jQuery plugins), fixing some bugs and reworking the AJAX stack.

After CreaLabs (the company I previously own) closure don’t worry, I’ll still continue to work and support P4A, I’ll keep using it for all my jobs and I also have some big plan for the future releases :)

So here you’ve the full changelog:

- Zend Framework was updated to 1.10.3
- FCKEditor was dropped and CKEditor 3.3 was added
- all AJAX stack was rewritten to use JSON instead of XML
- in full AJAX environment external javascripts are loaded only if
they were not loaded before
- in full AJAX environment widgets can now execute javascript code before
or after the HTML substitution
- focus internal management was rewritten
- P4A_Mask::setLeftSidebarWidth(), setRightSidebarWidth(),
getLeftSidebarWidth() and getRightSidebarWidth() methods were added
- jQuery::form was updated to 2.43
- jQuery was updated to 1.4.2
- jQuery UI was updated to 1.8.1
- jQuery::autocomplete plugin was replaced by jQuery UI autocomplete
- mask’s right sidebar is now shown correctly
- P4A_Data_Source::exportToCSV() deprecated method was removed
- P4A::isPopupOpened() deprecated method was removed
- P4A_Mask::unsetFocus() deprecated method was removed
- P4A_Mask::displayText() deprecated method was removed
- P4A_Table::setHeader() deprecated method was removed
- P4A_Box::setValue() and getValue() deprecated methods ware removed
- P4A_DB::getAll(), queryAll(), getRow(), queryRow(), getCol(), queryCol(),
getOne() and queryOne() deprecated methods ware removed
- P4A_Output_File now supports the “new window” param
- P4A_DB_Source::rowByPk() method now returns the retrieved row
- pt_BR translation was added to products_catalogue sample application
(thanks to Cassiano Faria)
- es_MX translation was added to products_catalogue sample application
(thanks to Edgar Joel)
- Yahoo CSS reset was updated to 3.1.0
- P4A_I18N::normalize() $num_of_decimals params now has a default value
- P4A_Table_Rows’ onformat event now passes a 5th parameter to the interceptor
method, this param is the complete row
- P4A_DB_Navigator::setRootLabel() and getRootLabel() methods were added
- P4A_DB_Navigator::allowMovementToRoot() method now supports a 2nd param
(root element label)
- P4A_DB_Source::getRowPosition() now adds “GROUP BY” clause
- default CSS font is now “Verdana,Arial,sans-serif” to match
jQuery::UI settings

Download P4A 3.6.0
Have fun!

P4A 3.4.4 is out!

Changelog:

- Zend Framework was updated to 1.10.1
- P4A_Data_Source::exportToCSV() method was marked as deprecated
- P4A_Data_Source::exportAsCSV() now can be called directly from an event handler
- translations were updated

Download P4A 3.4.4

P4A 3.4.3 is out!

Changelog:

- Zend Framework was updated to 1.9.5
- jQuery::form was updated to 2.36
- tooltip javascript was enhanced to make it location aware (bug #1908495)
- setTooltip() methods were moved to P4A_Widget
- tooltip support was added to P4A_Tab_Pane
- PEAR::Net_Useragent_Detect was updated to 2.5.1
- tooltips hiding methods now have a timeout to allow clicking links inside the
tooltip itself
- new_window parameter was added to P4A_Redirect_To_File() and P4A_Redirect_To_Url()
global functions
- P4A_DB_Source::_composePkString() was fixed handling multiple primary keys
(bug #2833159)
- onautocomplete event was added, it can be used to create a custom search for
fields instead of using P4A’s default one
- P4A_DB_Source::setTable() now supports a second parameter “alias”
- P4A_DB_Source::setTableAlias() and getTableAlias() methods were added
- P4A_DB_Source::addJoin*() methods now support alias on table (see code reference)
- P4A_Table elements/page user selector was added (disabled by default)
- P4A_Table::showElementsOnPageBar() and P4A_Table::hideElementsOnPageBar() were added

Download P4A 3.4.3

P4A 3.4.2 is out!

Changelog:

- a bug with backslashes stripping was solved (bug #2853694)
- a typo was fixed in P4A_DB (profiler activation)
- P4A_Tab_Pane now correctly handles disabled pages
- a bug with P4A_Table’s ordering with P4A_DB_Source having a group clause was solved
- Zend Framework was updated to 1.9.4
- P4A_Thumbnail_Generator won’t generate a thumb bigger than the original image
- P4A_Data_Source::exportAsCSV() was reworked allowing field ordering and field descriptions

Download P4A 3.4.2

How to install PHP PDO_OCI on Ubuntu Jaunty

This is a revamped guide, previously wrote for gutsy, enjoy!

1) prerequisites

First of all we’ll install the php5-dev package which contains some utilities we’ll need for the build process:

sudo apt-get install php5-dev

then you’ve to find out your ORACLE_HOME environment variable, try executing:

env | grep ORACLE_HOME=

If this command outputs something like:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

then you can jump to section “2) Getting and compiling PDO_OCI” otherwise go on thru this section.

If this guide we’ll just see how to find out which is your ORACLE_HOME directory if you’ve installed the oracle-xe server package. If you’ve installed instantclient or anything else please refer to the product documentation. So you’ve an installed and configured oracle-xe instance on your machine, now type:

cat /etc/init.d/oracle-xe |grep ORACLE_HOME=

the command should print something like:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

now we’ve to export this variable to the current terminal session, we’ll do that with this command:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

and the environment variable will be configured.

2) Getting and compiling PDO_OCI

Just cut and paste these simple commands to download PDO_OCI from the web and prepare it for the build phase:

cd /tmp
pecl download pdo_oci
tar xvfz PDO_OCI-1.0.tgz
cd PDO_OCI-1.0
phpize
mkdir include
ln -s /usr/include/php5/ include/php
./configure

now everything should be setup and we can build the driver and install it with:

make && make install

If everything is fine you can continue

3) Configuring PHP and Apache

if everything is fine you can go on editing your php.ini file and adding this line:

extension=pdo_oci.so

now create a phpinfo.php file under your apache’s document root, containing this line:

<?php phpinfo();

point your browser to:

http://localhost/phpinfo.php

and search for the “environment” section, it should look like the one in the next screenshot:
environment variables
if you see the ORACLE_HOME line everything it’s ok, jump to the “4) Closure” section otherwise edit /etc/apache2/envvars file and add the ORACLE_HOME configuration, it will be something like this (on a single line):

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

4) Closure

Restart your apache and you’re done:

sudo /etc/init.d/apache2 restart

P4A 3.0.1 released

Changelog:

- a bug about session name was solved
- FCKEditor was updated to 2.6.2
- a bug with shadows CSS was solved (unused shadow.png file is not linked by screen.css anymore so we’ve no “file not found” in web server’s logs)
- P4A_Error_Handler() global function now uses the P4A::messageWarning() wrapper for P4A::message() solving a bug with the warning icon name that was changed in 3.0.0-rc5
- jQuery UI was updated to 1.5.1

For the first time p4a is also available as .deb package. We encourage all users of Debian based distros to test this new package and give us feedback.

Download P4A 3.0.1

P4A 3.0 is out!

It was a long long journey started on December 17th, 2007, with more than 800 commits it has really been an hard work but we’re proud to tell everybody that P4A 3.0 is finally released!

Thank you everybody contributed to this wonderful release!

I suggest you to check the official release notes, they’re full of useful info and… For who was waiting… commercial license is available too.

Note: the image at the top is just a humorous revisitation of P4A logo with some “300 the movie” effect :-) hope you enjoyed.

How to install PHP PDO_OCI on Ubuntu Gutsy

1) prerequisites

First of all we’ll install the php5-dev package which contains some utilities we’ll need for the build process:

sudo apt-get install php5-dev

then you’ve to find out your ORACLE_HOME environment variable, try executing:

env | grep ORACLE_HOME=

If this command outputs something like:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

then you can jump to section “2) Getting and compiling PDO_OCI” otherwise go on thru this section.

If this guide we’ll just see how to find out which is your ORACLE_HOME directory if you’ve installed the oracle-xe server package. If you’ve installed instantclient or anything else please refer to the product documentation. So you’ve an installed and configured oracle-xe instance on your machine, now type:

cat /etc/init.d/oracle-xe |grep ORACLE_HOME=

the command should print something like:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

now we’ve to export this variable to the current terminal session, we’ll do that with this command:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

and the environment variable will be configured.

2) Getting and compiling PDO_OCI

Just cut and paste these simple commands to download PDO_OCI from the web and prepare it for the build phase:

cd /tmp
pecl download pdo_oci
tar xvfz PDO_OCI-1.0.tgz
cd PDO_OCI-1.0
phpize
mkdir include
ln -s /usr/include/php5/ include/php

now everything should be setup and we can build the driver and install it with:

make && make install

If everything is fine you can continue

3) Configuring PHP and Apache

if everything is fine you can go on editing your php.ini file and adding this line:

extension=pdo_oci.so

now create a phpinfo.php file under your apache’s document root, containing this line:

<?php phpinfo();

point your browser to:

http://localhost/phpinfo.php

and search for the “environment” section, it should look like the one in the next screenshot:
environment variables
if you see the ORACLE_HOME line everything it’s ok, jump to the “4) Closure” section otherwise edit /etc/apache2/envvars file and add the ORACLE_HOME configuration, it will be something like this (on a single line):

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

4) Closure

Restart your apache and you’re done:

sudo /etc/init.d/apache2 restart

Zend_Calendar, when?

Zend Framework has a quite impressive Zend_Date and Zend_Locale modules which finally do things we needed 4 years ago with MerlinWork and then P4A, like normalizing localized dates and parsing the Unicode’s Common Locale Data Repository but I think we still need a good calendar module that would do the things that Pear::Calendar does now. I’ll post an issue to Zend ASAP.