Tag Archives for " php "

PHP Warning: PHP Startup: apc: Unable to initialize module Module compiled with module API=20060613 PHP compiled with module API=20090626

Did you see that?

PHP Warning:  PHP Startup: apc: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0

It may happen with other pecl modules because those mostly was compiled for php 5.2.

My configuration DirectAdmin, Debian 5

Solution?Continue reading

Imagick install error: “configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.”

Simple solution:

aptitude install php-pear imagemagick php5-dev libmagick9-dev

libmagick9-dev – this remove all trouble from “configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.”.Continue reading

Symfony – send HTML mail from task with view partial

Do you need send mail from symfony task? No problem!Continue reading

Solution for sfForkedDoctrineApplyPlugin Unknown record property / related component “fullname” on “sfGuardUserProfile”

When I use sfForkedDoctrineApplyPluginon my page, after try create new account I got:

Unknown record property / related component “fullname” on “sfGuardUserProfile”

Solutions is easy… of course if you know it 😉Continue reading

How to change form input size in symfony forms?

Sometimes you need to change size (length) in html form elements input. In symfony you can do this in form configure function by using:Continue reading

How to remove form element label in symfony forms?

Sometimes you need remove label from forms in symfony. How to do this? Continue reading

How to set original filename in symfony file upload

When you upload files in symfony, then save filename will be random. If you want set to original filename add to model class (where you want to upload files):

public function generateYourColumnNameForStoreFileFileName($file)
{
return $file->getOriginalName();
}

where YourColumnNameForStoreFile it`s your column name.

If you want your uploaded files to stay with the original file name (which is not randomly generated by symfony), just add following lines to the model class you want to upload files:

public function generateXxxFileName($file)
{
  return $file->getOriginalName();
}

where Xxx is the name of the column that stores the filename in the database model related table.

How to resolve: This build of “eAccelerator” was compiled for PHP version 5.2.14-0.dotdeb.0.

System: Debian Lenny 5.0, DirectAdmin, after successfully update php to 5.2.14 after download and comile from source eaccelerator and test by php -v I got:

This build of “eAccelerator” was compiled for PHP version 5.2.14-0.dotdeb.0. Rebuild it for your PHP version (5.2.14) or download precompiled binaries.

Bad news because actually I`ve PHP in version 5.2.14! After some research I have solutions.

UPDATE:

/usr/local/php5/bin/phpize

./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php5/bin/php-config

make

make install

in my case I must move compiled eaccelerator file from  /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so to php extension dir /usr/lib/php5/20060613+lfs/. (update: easier and more logical it is change extension_dir in php.ini)

Have a nice day 🙂

How to update WordPress without FTP?

So… I wanted to check new version of WordPress 3.0, I clicked update and… ftp login/password? For what? As I remember some time ago I updated some instance of WordPress without ftp account… Little research and this is solutions:

Continue reading

How to logging in Symfony 1.x in Model, View and Controller

Sometimes you need to send something to symfony webdebug. there are three ways depended on  where you are going to log from.

Continue reading