This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

PHP Newbie question @PEAR-DIR@ ???

Installation and environment issues, mainly on 1.x but there's some 2.x here too.

PHP Newbie question @PEAR-DIR@ ???

by spascoe » Sun Nov 13, 2005 6:48 am

Hi,

I've spent about an hour searching for answers to what @PEAR-DIR@ means in the lib/symfony/symfony/pear.php file.

I can't find any PHP documentation of this construct. I assume that it is supposed to be getting the value of some variable, environment or something else.

Where does it get set, and how?

Thanks for any assistance to a PHP newbie, but I'm learning quickly.

Scott
spascoe
Member
 
Posts: 52
Joined: Sat Nov 12, 2005 7:50 am
Location: Indianapolis

Re: PHP Newbie question @PEAR-DIR@ ???

by fabien » Sun Nov 13, 2005 11:05 am

I suppose you downloaded the symfony .tgz. If you want to be able to use the symfony command line, you can install the PEAR package, it's far simplier:

Code: Select all
pear install symfony/symfony-beta


The @PEAR-DIR@ is a placeholder for PEAR directory. It's changed by PEAR when you install symfony.

If you don't want to install symfony with PEAR, you can read the installing symfony documentation (http://www.symfony-project.com/content/book/page/installatio n.html) that explains how do it or read this wiki page (http://www.symfony-project.com/trac/wiki/InstallingSymfonyWi thoutPear).
fabien
Faithful Member
 
Posts: 487
Joined: Sat Oct 22, 2005 9:01 am

Re: PHP Newbie question @PEAR-DIR@ ???

by spascoe » Sun Nov 13, 2005 3:44 pm

Fabien,

Yes, I've tried the pear install. That failed for me, as noted in my previous topic.

So, I've installed using a co from SVN. I've been following the directions by 'cerad' in your wiki. They worked mostly, but I'm down to where the suggestions are to edit the config.php and set hard paths there.

Until I understand a little more about where the @PEAR-DIR@ value is set, I'm unwilling to modify the originals for upgrade purposes.

Let me try again with my question. In lib/symfony/symfony/pear.php
<pre>
define('SF_SYMFONY_LIB_DIR', [url=mailto:'@PEAR-DIR]'@PEAR-DIR[/url]@/symfony');
define('SF_SYMFONY_DATA_DIR', [url=mailto:'@DATA-DIR]'@DATA-DIR</a<a href="mailto:>@'" target="_blank">>@'[/url]);
</pre>

I'm looking to find out where these @PEAR-DIR@ AND @DATA-DIR@ items are defined, and how they are defined. Are they constants? Is this how you use a constant in PHP?

Would I use, for example, [url=mailto:'@SF]'@SF[/url]_SYMFONY_LIB_DIR@/blah...' somewhere in the code somewhere?

Thanks for your help and patience with me.
Scott
spascoe
Member
 
Posts: 52
Joined: Sat Nov 12, 2005 7:50 am
Location: Indianapolis

Re: PHP Newbie question @PEAR-DIR@ ???

by RoVeRT » Sun Nov 13, 2005 11:34 pm

During a PEAR install @PEAR-DIR@ and @DATA-DIR@ are replaced with the
php_dir and data_dir variables respectively, that can be found from typing pear config-show
RoVeRT
Senior Member
 
Posts: 146
Joined: Thu Oct 27, 2005 8:56 pm