Re: set environment Path variable



JRough <jlrough@xxxxxxxxx> wrote:
This question is from an earlier thread. I have a working php server
but it is not finding zend framework. I do not have a .profile in my
home directory it is missing. Can you tell me what to put in the Path
environment variable in .profile?

I think this is the location of the binary. The file name is
phpcups.so. The directory is:
/usr/lib/php/extensions/no-debug-non-zts-20060613/phpcups.so

That is probably a shared object (library) file, the error message:

/usr/bin/mypear/zend/zf.sh: line 44: php: command not found

indicates that the php command can't be found. Look for a file named
php under the directory in which you installed the php package. Once
you find the file, add the name of the directory containing it to your
path.

If the php command is found at /usr/lib/php/bin/php, the assignment
would look like this (at both the shell prompt and in ~/.profile):

PATH="$PATH:/usr/lib/php/bin" ; export PATH

I would really like zend framework to see php or php to see zend
framework. I looked up some examples of path variables on Macs
and put them below but I don't understand them. My home directory
is /Users/jlrough.
Thanks,
[...]
export PATH=/mightyq/bin:/opt/local/bin:/opt/local/sbin:$PATH
export PATH=/opt/local/bin:/mightyq/bin:/opt/local/sbin:$PATH
export PATH=/opt/local/bin:/opt/local/sbin:$PATH:/mightyq/bin

PATH contains a colon-separated list of directories. When the shell
encounters a command that doesn't contain any slashes it takes each
directory named in $PATH in turn and builds a filename from it by
appending a slash and the command name. If the result exists and is
executable, the shell stops searching and tries to run the file.

As an example, if the PATH is set like this:

PATH=/Users/jlrough/bin:/usr/local/bin:/usr/bin:/bin ; export PATH

and the command "php" is entered, either at a prompt or in a script,
the shell will try to run one of:

1) /Users/jlrough/bin/php
2) /usr/local/bin/php
3) /usr/bin/php
4) /bin/php

Subdirectories of the directories named in $PATH are not searched.
.



Relevant Pages

  • minor `cp -R` question
    ... I have a quick question about the cp command and recursively copying ... I get in my home directory a file called "file". ... My user shell is pdksh and the root shell is csh. ...
    (freebsd-questions)
  • RE: [PHP] exec from process (deamon) without shell
    ... Not 0 as when running it from command line. ... exec from process without shell ... PHP also uses a mini non-shell thingie to run exec. ... But the "shell less" deamon is giving the -1 exit code. ...
    (php.general)
  • Re: Error in exec function in php
    ... I am trying to execute linux command, ... This command is running in shell terminal prompt. ... This command in not running in php script. ...
    (comp.lang.php)
  • Re: php cli doesnt work on a Mac
    ... enter this command at the command line (you're using a Shell in Terminal, ... Copyright 1997-2008 The PHP Group ... Zend Engine v1.3.0, ...
    (comp.lang.php)
  • Execute extneral programs with interactivity?
    ... (I don't need my script to send input to the command). ... None of the PHP program-execution commands seem to work for me. ... which takes user input, but it seems to buffer the output until you ... exactly as it does from a shell. ...
    (comp.lang.php)