Showing posts with label Symfony. Show all posts
Showing posts with label Symfony. Show all posts

Friday, September 16, 2011

Err: Major problems have been detected and must be fixed before continuing while installing Symfony 2

While:

     During the installation of Symfony2 in Linux systems (for myself, Ubuntu 11.04).
     This will throws the error while try to run the url, http://localhost/symfony2/web/config.php
     This occurs for me, when i renamed the folder after once i ran the page from different folder name.

Err:

2 Major problems
Major problems have been detected and must be fixed before continuing :
    Change the permissions of the "app/cache/" directory so that the web server can write into it.
    Change the permissions of the "app/logs/" directory so that the web server can write into it.

Solution:
    For instance,
           Restart or force-reload the Apache server once to get the rid of this problem.

    Still searching for another valid solution.

Err: Call to a member function get_cellmap() on a non-object by sfDomPDFPlugin in Symfony


Error:
PHP Fatal error:  Call to a member function get_cellmap() on a non-object in /var/www/pdftest/plugins/sfDomPDFPlugin/lib/dompdf/include/table_cell_frame_reflower.cls.php on line 64, referer: http://localhost/pdftest/dc/printlist

Reason:
DomPDF throws this error when any HTML tag error found in the content supplied. (ie. Any  unclosed tag or closed tag without open tag).

Solution:
Make sure the HTML content to be supplied that not contains any missing or unwanted tags.

For example, in the following code, error parts which are all highlighted will throws this errors mentioned.

<html>
<table>
 <tr>
   <td>
        </table>
   </td>
 </tr>
<tr>
   <td>...</td>

</table>
</html>


Thursday, September 15, 2011

CentOS: PHP PEAR and Symfony installation using source package

Follow the steps to install PHP and PHP-PEAR and Symfony in CentOS using source.

    #prerequisites

    $ yum install httpd-devel libxml2-devel zlib zlib-devel mysql-devel openssl-devel
    $ yum install libjpeg libjpeg-devel
    $ yum install libpng libpng-devel

    #php installation

    $ ./configure  --with-apxs--with-pear=../PEAR-1.9.--with-pgsql=/var/lib/pgsql/postgresql903/bin --with-gd --with-xmlrpc --with-jpeg-dir --with-png-dir
    $ make
    $ make install
    $ cp php.ini-development /usr/local/lib/php.ini
    $ cd /etc/httpd/conf
    $ vim httpd.conf
and paste the 'Load_module line from INSTALL file'. Let it be if it is already done by installer.
    $ ls -al  /usr/lib64/httpd/modules/libphp5.so
    $ /etc/init.d/httpd restart
    $ cd /etc/httpd/conf.d/
    $ vim php.conf
 
Add these lines,
        AddHandler php5-script .php        AddType text/html .php

    $ /etc/init.d/httpd restart

    #PHP PEAR installation

    $ mkdir /home/phppear
    $ cd phppear/
    $ wget http://pear.php.net/go-pear.phar
    $ php -q go-pear.phar

Older version of PHP PEAR also available in http://pear.php.net/go-pear. But it is suitable for PHP version 5.3.x.

    #symfony installation

    $ pear channel-discover pear.symfony-project.com
    $ pear install symfony/symfony-1.4.13
    $ symfony --version

Note: This procedure has been tested under centOS 5.x



Monday, March 22, 2010

Err: [notice] child pid 7587 exit signal Segmentation fault (11)...

Apache will throws error like "child pid ... exit signal Segmentation fault" in such scenarios like PHP-APC package conflicts with some other package(s).

The conflict packages may varied to each with respect to the installed packages. Here are some suggestions to get rid of it:
  • Remove php-xdebug package
  • Remove php-apc
  • For temporary purpose restart Apache sever once to get the rid of it for a while to run other pages which is not throwing the error while executing.

Note: This is tested under Ubuntu 10.10.

Friday, August 1, 2008

Err: Error on executing Symfoclipse Commands

Error:

            !ENTRY org.eclipse.ui 4 0 2008-06-17 19:12:57.943
            !MESSAGE Unhandled event loop exception
            !STACK 0
            java.lang.NumberFormatException: For input string: "(C:"
                at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
                at java.lang.Double.valueOf(Unknown Source)
                at cc.noy.eclipse.symfony.popup.actions.SymfonyAction.is1_1(SymfonyAction.java:89)
                at cc.noy.eclipse.symfony.popup.actions.SymfonyClearCacheAction.run(SymfonyClearCacheAction.java:14)
                at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)....... etc


Reason:

 
            Symfoclispe uses the symfony command “symfony -V” to find out the current version of the symfony all the times. But the command return the version with the installed path. So while trying to get the version no from the string could not give the correct version no.

            In that time no command is executed and nothing will be shown in output pane.

Solution:

            Simply edit the file usr/shar/php/symfony/command/sfSymfonyCommandApplication.class.php and change the line

            return sprintf('%s version %s (%s)', $this->getName(), $this->formatter->format($this->getVersion(), 'INFO'), sfConfig::get('sf_symfony_lib_dir'))."\n";

            to

            return sprintf('%s version %s', $this->getName(), $this->formatter->format($this->getVersion(), 'INFO'))."\n";