470,833 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

How to definded which version php should using

RC
I have two versions of PHP in UNIX/LINUX system

/usr/bin/php (4.3.2)
/usr/local/bin/php (5.0.4)

In a shell script file I can define first line as

#!/usr/local/bin/php

or I can type full path on command line.

My question is how to defind the path in
PHP web page?

I mean when I have codes

<?php

my codes are here

?>

How does the web server know which version to run?
How can I do the similar thing like PERL/CGI script
put #!/path/php in my php web page file?

Thank Q very much in advance!

P.S.
Now, I set the PATH /usr/local/bin:/usr/bin
On command line will run /usr/local/bin/php,
unless you type full path /usr/bin/php
May 8 '06 #1
1 1190
RC wrote:
I have two versions of PHP in UNIX/LINUX system

/usr/bin/php (4.3.2)
/usr/local/bin/php (5.0.4)

In a shell script file I can define first line as

#!/usr/local/bin/php

or I can type full path on command line.

My question is how to defind the path in
PHP web page?

I mean when I have codes

<?php

my codes are here

?>

How does the web server know which version to run?
How can I do the similar thing like PERL/CGI script
put #!/path/php in my php web page file?

Thank Q very much in advance!

P.S.
Now, I set the PATH /usr/local/bin:/usr/bin
On command line will run /usr/local/bin/php,
unless you type full path /usr/bin/php


It's determined by the LoadModule statement in your httpd.conf file.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Manlio Perillo | last post: by
1 post views Thread by Ian | last post: by
6 posts views Thread by D. Yates | last post: by
4 posts views Thread by Paolo Pantaleo | last post: by
8 posts views Thread by schaf | last post: by
14 posts views Thread by Phil | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.