LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to install php5.3.0 & run any php file in web browser in linux 5.0 (https://www.linuxquestions.org/questions/linux-general-1/how-to-install-php5-3-0-and-run-any-php-file-in-web-browser-in-linux-5-0-a-764323/)

anmol1986 10-25-2009 06:54 AM

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

xeleema 10-25-2009 07:28 AM

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.

knudfl 10-25-2009 10:10 AM

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-*
.....

unSpawn 11-07-2009 04:04 PM

Quote:

Originally Posted by knudfl (Post 3731863)
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.

knudfl 11-09-2009 07:22 AM

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 '.
.....


All times are GMT -5. The time now is 09:16 PM.