PEAR problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eoin
Forum Newbie
Posts: 6
Joined: Mon May 12, 2003 3:39 am

PEAR problem

Post by eoin »

I've intalled PEAR on my NetBSD user account - I can't use the pear command because 'register_argc_argv' is Off. I can't change php.ini so I put a .htaccess file with 'php_value register_argc_argv On' in the bin directory but still no luck. Any ideas?

Thanks in advance,
Eoin.
User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post by cactus »

Try:

php_flag register_argc_argv On

In your .htaccess

Regards,
eoin
Forum Newbie
Posts: 6
Joined: Mon May 12, 2003 3:39 am

Post by eoin »

No change. Can I confirm that the .htaccess file should be in the bin directory with the pear script executed with sh (not in the directory with PEAR.php), and that the file doesn't need to contain anything else. How can I confirm that the .htaccess file is being processed?

Thanks,
Eoin.
User avatar
cactus
Forum Regular
Posts: 343
Joined: Tue Jun 10, 2003 4:16 am
Location: UK

Post by cactus »

The .htaccess file needs to be in the same directory as your script (.php), depending on where you are serving pages from (htdocs ?) the .htaccess file needs to be in there.

.htaccess files are a way of implmenting per-directory options, so you can have an .htaccess in the root of your web tree so that affects all the directories in the root.

Ref : http://httpd.apache.org/docs/howto/htaccess.html

Regards,

EDIT>
Are you using PHP from the command line ?

Have a read of : http://uk.php.net/features.commandline

If not, ignore this edit.
<END
eoin
Forum Newbie
Posts: 6
Joined: Mon May 12, 2003 3:39 am

Post by eoin »

Stupid me. PEAR is CLI - command line - so .htaccess has no bearing on it's behaviour. So is there a web frontend for PEAR - instead of going through the CLI? Or is there a way of getting argc and argv into the script?
sdibb
Forum Newbie
Posts: 5
Joined: Mon Sep 08, 2003 12:34 pm
Location: Orem, Utah, USA

Post by sdibb »

I dunno if this will help with your PEAR problem, but you can specify your own php.ini running PHP on CLI.

Code: Select all

php -c /home/me/php.ini
Post Reply