Page 1 of 1

PEAR problem

Posted: Tue Jul 08, 2003 7:02 am
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.

Posted: Tue Jul 08, 2003 7:14 am
by cactus
Try:

php_flag register_argc_argv On

In your .htaccess

Regards,

Posted: Tue Jul 08, 2003 7:50 am
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.

Posted: Tue Jul 08, 2003 8:11 am
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

Posted: Tue Jul 08, 2003 6:09 pm
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?

Posted: Mon Sep 08, 2003 12:46 pm
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