Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This is the error I get when I do php version. Is there anyone that know what could be wrong?
[root@localhost htdocs]# php version
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.9
No input file specified.
php is installed, reinstalling php gave me this
[root@localhost ~]# rpm -Uvh php-4.3.9-3.22.5.i386.rpm
warning: php-4.3.9-3.22.5.i386.rpm: V3 DSA signature: NOKEY, key ID 9b3c94f4
Preparing... ########################################### [100%]
package php-4.3.9-3.22.5 is already installed
file /usr/bin/php from install of php-4.3.9-3.22.5 conflicts with file from package php-4.3.9-3.22.5
file /usr/lib/httpd/modules/libphp4.so from install of php-4.3.9-3.22.5 conflicts with file from package php-4.3.9-3.22.5
~$ php version
Could not open input file: version
~$ php -version
PHP 5.2.2 (cli) (built: May 6 2007 05:43:00)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
Do you have any php entries in your web server config? For example, I have the following for PHP 5 in my Apache 2.0.x httpd.conf file (the lines aren't together, I just grepped for php):
Do you have any php entries in your web server config? For example, I have the following for PHP 5 in my Apache 2.0.x httpd.conf file (the lines aren't together, I just grepped for php):
Yes it is - otherwise Apache won't recognise the .php files. I don't know if your first post indicates a problem with the rpm install but there should be a docs directory installed as well. In there, have a look for the INSTALL file. The following is from the instructions for installing PHP 5 under Apache 2.0:
Code:
14. Edit your httpd.conf to load the PHP module. The path on the right hand
side of the LoadModule statement must point to the path of the PHP
module on your system. The make install from above may have already
added this for you, but be sure to check.
For PHP 4:
LoadModule php4_module modules/libphp4.so
For PHP 5:
LoadModule php5_module modules/libphp5.so
15. Tell Apache to parse certain extensions as PHP. For example,
let's have Apache parse the .php extension as PHP. You could
have any extension(s) parse as PHP by simply adding more, with
each separated by a space. We'll add .phtml to demonstrate.
AddType application/x-httpd-php .php .phtml
It's also common to setup the .phps extension to show highlighted PHP
source, this can be done with:
AddType application/x-httpd-php-source .phps
I compiled mine from source and the make install put the module into the correct Apache directory for me. I'm assuming the rpm install you ran did the same.
Was /usr/lib/httpd/modules/libphp4.so installed even though there were rpm errors? If not, you may be able to force an uninstall of the php rpm and then install it again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.