LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-25-2009, 06:54 AM   #1
anmol1986
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Question how to install php5.3.0 & run any php file in web browser in linux 5.0


hello,

I want to install php-5.3.0.tar.bz2 in linux5.0 and then want to run the saved php file in firefox web browser. please explain me all the detailed steps of installing & configuring and also about running php file.

also tell me if any another rpm or package we have to install to run the php
 
Old 10-25-2009, 07:28 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 249Reputation: 249Reputation: 249
Greetingz!

I think you'll find that most modern Linux distributions already have everything you seem to require.
Most refer to this as a "LAMP stack", where LAMP means Linux, Apache, MySQL, and PHP.

Feel free to grab any current version of any Linux distribution, such as Slackware, CentOS, or Red Hat Enterprise Linux.

You may find that you have to manually start the "Apache" (or "httpd") service on these distributions, which is covered in their documentation.
However, the Red Hat based distributions (CentOS and RHEL itself) typically just need the following commands run;
chkconfig --level 345 httpd on
service httpd start


Slackware is a bit more involved; there's an init.d script you may have to mark as executable, then run it;
chmod ug+x /etc/init.d/rc.httpd
/etc/init.d/rc.httpd start


There's also Debian, a popular Linux distribution that has been around almost as long as Slackware. However you strike me as someone that may benefit from Ubuntu Linux.

As for creating and accessing a PHP file, you'll have to have the following information (assuming you get a Linux distribution setup, and it's Apache started);

1. Master Linux Networking 101 to get your shiny new Linux server on a network.

2. Find out where Apache expects web files (like php files) to live.
(Hint: Check the httpd.conf file)

3. Learn, then write a PHP file.
(Hint: STFW)

4. Connect to the server with your web browser.

ProTIP: There is no "Linux5.0", "Linux" is a generic term, like "Windows". So when someone says "What Operating System are you trying to get that to work on?", and you reply "Windows" or "Linux", you're not being very helpful. Be specific, like "Windows XP SP3" or "Slackware 13.0". M'kay? Good.

Last edited by xeleema; 10-25-2009 at 07:30 AM.
 
Old 10-25-2009, 10:10 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,946

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Welcome to LQ.

Redhat Enterprise Linux 5 : Please use the name 'Redhat EL 5'
instead of ' Linux 5 '.

The default php5 for EL5 is 5.1.6 : # yum install php .
If you really want to build version 5.3.0, a new sqlite is
required ( >= 3.6 ) :
wget http://download.fedora.redhat.com/pu...3.fc11.src.rpm
# rpmbuild -bb sqlite
.. and then install the new sqlite-3.6.12-3.<arch>.rpm ,
sqlite-devel-3.6.12-3.<arch>.rpm

To get all the seventy ( 70 ! ) configure options right ,
the "Fedora 12" php source is the best choice :
wget http://download.fedora.redhat.com/pu...6.fc12.src.rpm
Code:
# yum install mysql-devel firebird-devel libicu-devel enchant-devel bzip2-devel curl-devel db4-devel gmp-devel httpd-devel pam-devel pcre-devel libc-client-devel cyrus-sasl-devel openldap-devel postgresql-devel unixODBC-devel libxml2-devel libxslt-devel libxml2-devel libXpm-devel libjpeg-devel libpng-devel freetype-devel t1lib-devel libmcrypt-devel mhash-devel libtidy-devel freetds-devel aspell-devel recode-devel
> > # rpmbuild -bb php.spec
.. provides the 29 packages in /usr/src/redhat/RPMS/<arch>/php-*
.....

Last edited by knudfl; 12-10-2009 at 04:18 AM. Reason: New valid URL, php-5.3.0-6.fc12.src.rpm
 
Old 11-07-2009, 04:04 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,462
Blog Entries: 54

Rep: Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899
Quote:
Originally Posted by knudfl View Post
Code:
> > # rpmbuild -bb php.spec
.. provides the 29 packages in /usr/src/redhat/RPMS/<arch>/php-*
.....
...nobody needs to build these packages as root account user: use an unprivileged account instead.
 
1 members found this post helpful.
Old 11-09-2009, 07:22 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,946

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Ref. post # 4 :

And please read # 10 here
http://www.linuxquestions.org/questi...6/highlight#13

.. for a "how to" set up ' an unprivileged account '.
.....

Last edited by knudfl; 11-27-2009 at 01:09 PM.
 
  


Reply

Tags
php5


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run as sudo from web browser? rejeep Linux - General 6 06-24-2008 02:07 AM
to run a html or php script with php5 command vincent_fr_60 Linux - Software 1 01-20-2006 06:41 AM
What must I do when I want to run PHP on Web browser ? manhcuong Linux - Software 1 12-06-2005 03:25 AM
php5 configure with different php.ini file dtra Linux - Software 2 01-19-2005 08:04 PM
delault web browser entry in linux file system siddharth1 Linux - General 4 03-15-2004 01:37 PM


All times are GMT -5. The time now is 11:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration