PHP installation help needed.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PHP installation help needed.
# 1  
Old 03-11-2010
PHP installation help needed.

Hi guys,
This is my first post in this forum.
Recently i come across one interesting advantage of PHP that it is the simplest yet powerful language to communicate with linux .

However my knowledge of PHP is very weak.

Can u please guide me about following queries.
1)which version of PHP should i install on my linux machine.
2)I heard sometime php get installed while installing web server(correct me if i m wrong).
If it is already install how do i check the version of PHP?
3)How do i check web server version(Most probably i will be working on Apache web server).
4)How do i check MySql version installed in my machine?
If it is not installed in my machine which version will be best suited to communicate with PHP.

My linux machine specification is as follows.
uname -o
GNU/Linux
lsb_release -a
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: EnterpriseEnterpriseAS
Description: Enterprise Linux Enterprise Linux AS release 4 (October Update 7)
Release: 4
Codename: OctoberUpdate7
Thanks in advance.
# 2  
Old 03-11-2010
php -v will give you the PHP version.
mysql -e status|grep 'Server version' will give you mysql version.
httpd -v will give you Apache version.

Which PHP/MySQL version to install is up to your need and requirement. I will always install the latest versions.

To install all the three... check out www.lamphowto.com/
# 3  
Old 03-11-2010
Quote:
Originally Posted by dahlia84
php -v will give you the PHP version.
mysql -e status|grep 'Server version' will give you mysql version.
httpd -v will give you Apache version.

Which PHP/MySQL version to install is up to your need and requirement. I will always install the latest versions.

To install all the three... check out www.lamphowto.com/
Thanks you very much for your information.

Please find the output of the given command.

I think the reason why i m getting error to find my sql version is because my application is using oracle xe as database .Is there any way i can connect php to oracle xe? I think i can achieve this using jsp or asp.net but i m more concern about running command through web browser.

httpd -v
Server version: Apache/2.0.52
Server built: Jun 11 2008 19:01:13

mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

php -v
PHP 4.3.9 (cgi) (built: Sep 20 2007 06:44:48)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

---------- Post updated at 01:42 AM ---------- Previous update was at 01:41 AM ----------

Please find the output of the given command.

I think the reason why i m getting error to find my sql version is because my application is using oracle xe as database .Is there any way i can connect php to oracle xe? I think i can achieve this using jsp or asp.net but i m more concern about running command through web browser.

httpd -v
Server version: Apache/2.0.52
Server built: Jun 11 2008 19:01:13

mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

php -v
PHP 4.3.9 (cgi) (built: Sep 20 2007 06:44:48)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

---------- Post updated at 02:02 AM ---------- Previous update was at 01:42 AM ----------

I m running following Apache web server version.
Quote:
httpd -v
Server version: Apache/2.0.52
Server built: Jun 11 2008 19:01:13
How would i find the root directory of Apache server to put my web pages.
Please help.
# 4  
Old 03-11-2010
You want to find Oracle version?

Loginto SQL PLUS and then issue this command

SQL> select banner from v$version

OR

SQL> SELECT * FROM sys.SM_$VERSION;

Also this will give you apache document root

# grep -i 'DocumentRoot' httpd.conf
# 5  
Old 03-11-2010
Quote:
Originally Posted by dahlia84
You want to find Oracle version?

Loginto SQL PLUS and then issue this command

SQL> select banner from v$version

OR

SQL> SELECT * FROM sys.SM_$VERSION;

Also this will give you apache document root

# grep -i 'DocumentRoot' httpd.conf
Quote:
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"
# This should be changed to whatever you set DocumentRoot to.
# DocumentRoot /www/docs/dummy-host.example.com
Thanks .
There are no files in /var/www/html directive.
However i would like create a simple php page and host it on my machine.
Correct me if i m wrong.
1) create a php file say abc.php.
2) Copy it to /var/www/html directory.
3) restart the web server(tomcat).(kindly provide the command if any).
4) access it through url (my machine ip)localhost:8080/abc.ph
# 6  
Old 03-11-2010
I have no experience with tomcat however, you need to set the environment variables. Try this command
export SERVLET_CLASSPATH=$TOMCAT_HOME/lib/servlet-api.jar.

/usr/local/www/apache22/data is default document root for your website.

Also there are a lot of things we need to do when installing php. Please see google for tutorials on installing php. I hope that helps.
# 7  
Old 03-11-2010
Quote:
Originally Posted by dahlia84
I have no experience with tomcat however, you need to set the environment variables. Try this command
export SERVLET_CLASSPATH=$TOMCAT_HOME/lib/servlet-api.jar.

/usr/local/www/apache22/data is default document root for your website.

Also there are a lot of things we need to do when installing php. Please see google for tutorials on installing php. I hope that helps.
Thanks for you reply.
In my environment Tomcat server is already running .I just want to build a small php page and host it in tomcat server.

I just want simple steps to follow.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

PHP installation on Ubuntu 12.04

Dear all I am new to php, I have already running tomcat web server on port 80, following are the details of tomcat /usr/local/www/html/TOMCAT_DEMO/tomcat whether it is possible to install and configure php without using sudo apt-get install php5 ??? please someone guide me to start php (1 Reply)
Discussion started by: Akshay Hegde
1 Replies

2. Solaris

problem in php installation..

hi am senthil, am trying to install PHP in my solaris 10 x86 ... i installed oracle,apache,tomcat,mysql .. the only thing am missing is PHP.. i tried to install php using ./configure .. my ./configure command.. ./configure \ --with-apxs=/usr/apache/bin/apxs \... (4 Replies)
Discussion started by: senkerth
4 Replies

3. Solaris

php installation problem..

hi am senthil, i want to install php 5 in my solaris 10 x86server.. i already enabled apache and my mysql 5 is woking fine.. i want to know the procedure to install php.. i googled it and got some info .. i have doubt in the following thing /configure -with-apache2=/opt/httpd-2.0.49... (1 Reply)
Discussion started by: senkerth
1 Replies

4. Solaris

php installation steps..

hi .. i need procedure to install php on my solaris server.. i spent more than two weeks for this installation procedure.. but still couldn find a proper solution.. i have successfully enabled apache,tomcat,mysql,oracle .. this is the only issue am having rite now and its bothering me a lot.. ... (3 Replies)
Discussion started by: senkerth
3 Replies

5. Solaris

php installation procedure..

hi.. i need to install or enable php on my solaris server.. i have successfully enabled my apache .. guide me to enable php .. (3 Replies)
Discussion started by: senkerth
3 Replies

6. Solaris

php installation ..

hi.. i need to install or enable php on solaris 10 x86.. can u guide me .. tell me as soon as possible.. thanks... ---------- Post updated at 12:17 PM ---------- Previous update was at 10:38 AM ---------- tell me as soon as possible... (1 Reply)
Discussion started by: senkerth
1 Replies

7. UNIX for Advanced & Expert Users

PHP installation problem

Hey Linux experts, I am very new to Linux and PHP. I am trying to install php-5.3.2 on Linux(Centos), but I am getting an error as given below: cc1: out of memory allocating 2036 bytes after a total of 63528960 bytes make: *** Error 1 What is exactly meant by this error?Can someone guide... (5 Replies)
Discussion started by: mahesh_raghu
5 Replies

8. Solaris

Help needed...solaris 10 crashing after installation

I installed solaris 10 in my amd based system with 512 mb ram. After installation it booted poping up the grub menu...after that... It showed something like....rougly syncing file systems.... ................ done (not all i/o completed) dumping kernel compreesion ratio 2:1 succeded... (1 Reply)
Discussion started by: aji1729
1 Replies

9. Shell Programming and Scripting

perl module installation problems... experts advice needed,...

---------- This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) ----------in win 2000 advanced server,.. i am somewhat comfortable with perl but i am new to perl modules.. when i tried to install xml::simple and xml::parser there... (4 Replies)
Discussion started by: sekar sundaram
4 Replies

10. UNIX for Dummies Questions & Answers

php-5.0.4 installation: What am I missing?

THE GOAL: To use xsl(t) functions with php. Server info: I'm on dreamhost shared hosting (everybody loves dreamhost) but they don't have php with xsl. What's the deal: I tried to get xsl working using this guide, but then noticed that they were using php4, and so I was like "Ok screw that"... (4 Replies)
Discussion started by: Lambyte
4 Replies
Login or Register to Ask a Question