Posts Tagged ‘php’

ERROR: Date_Calc is not installed – Dreamhost

September 2, 2008

ERROR: Date_Calc is not installed. You must install the date library. (with Dreamhost shared hosting)

ssh into ~

pear config-create $HOME .pearrc

install pear:

pear install -o PEAR

then install the date module

pear install pear/date

update the paths (can never get this part to work, so using the other method below)

export PHP_PEAR_PHP_BIN=/usr/local/php5/bin/php
export PATH=/home/*****/pear:/usr/local/php5/bin:$PATH

or include it this way: (index.php)

ini_set(
  'include_path',
  ini_get( 'include_path' ) . PATH_SEPARATOR . "/home/*****/pear/php"
);

Symfony: sfAssetsLibraryPlugin – troubleshooting

July 28, 2008

Right, so I have this scenario:

I exclude propel.ini from my sync’s with our web server. So after installing a few things i forgot to make the corresponding change online:

* Enable Propel behavior support in propel.ini:

propel.builder.AddBehaviors = true

So when running this (while installing sfAssetsLibraryPlugin):

symfony sfassetlibrary-create-root backend

I would get the following bastard of an error:

Creating root node at media…
PHP Fatal error:  Call to undefined method sfAssetFolder::makeRoot() in /var/www/xxxx/plugins/sfAssetsLibraryPlugin/lib/model/sfAssetFolderPeer.php on line 36

Fatal error: Call to undefined method sfAssetFolder::makeRoot() in /var/www/xxxx/plugins/sfAssetsLibraryPlugin/lib/model/sfAssetFolderPeer.php on line 36

EXTRA NOTE: I also had to add this line at the end of the create function in sfAsset.php:

chmod($this->getFolderPath().”/”. $this->getFilename(), 0604);

This has something to do with the way dreamhost has permission setup and the above create root line.

(The error here was that you could not see the images once uploaded)