sir
I am new to centos and linux. I installed apache webserver with php and mysql in centos ver5.8. then hosted a php web page. I created a sample php site.
I created a test.php in /var/www/html folder with the content as $many = 2 $many_2 = 3 $few = $many + $many_2 printf = (.$many + $many_2 = $few<br>.);. after reloading apache. I accessed the page from internet explorer. but instead of result only the same code i denoted above is displayed by internet explorer. I addedd mime type for php in httpd.conf file, but the problem remains. please help me on this issue. waiting for your response
kernel release is
2.6.18-371.el5
apache with Lamp server
Re: apache with Lamp server
Post the output of `rpm -qa php\*`. I suspect you don't have the php packges installed, use e.g. `yum install php php-cli php-mysql` to get some of the many available and `yum list php\*` to get a full list.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: apache with Lamp server
This is the CentOS 6 forum, and 5.8 should be upgraded to 5.10 with a 'yum update'.
[Moderator: correct, thanks. Moved to CentOS 5 General Support]
[Moderator: correct, thanks. Moved to CentOS 5 General Support]
-
- Posts: 7
- Joined: 2014/04/15 10:25:57
Re: apache with Lamp server
sir
Thanks for reply. I attach the output of rpm -qa \php* and yum list php\*. please check .
[edit/avij: converted attachments to 'code' blocks for easier reading]
Thanks for reply. I attach the output of rpm -qa \php* and yum list php\*. please check .
[edit/avij: converted attachments to 'code' blocks for easier reading]
Code: Select all
php-dba-5.1.6-40.el5_9
php-pear-1.4.9-8.el5
php-5.1.6-40.el5_9
php-odbc-5.1.6-40.el5_9
php-bcmath-5.1.6-40.el5_9
php-common-5.1.6-40.el5_9
php-imap-5.1.6-40.el5_9
php-xmlrpc-5.1.6-40.el5_9
php-soap-5.1.6-40.el5_9
php-xml-5.1.6-40.el5_9
php-pdo-5.1.6-40.el5_9
php-mysql-5.1.6-40.el5_9
php-ldap-5.1.6-40.el5_9
php-mbstring-5.1.6-40.el5_9
php-devel-5.1.6-40.el5_9
php-cli-5.1.6-40.el5_9
php-pgsql-5.1.6-40.el5_9
php-ncurses-5.1.6-40.el5_9
php-snmp-5.1.6-40.el5_9
php-gd-5.1.6-40.el5_9
Code: Select all
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Installed Packages
php.i386 5.1.6-40.el5_9 installed
php-bcmath.i386 5.1.6-40.el5_9 installed
php-cli.i386 5.1.6-40.el5_9 installed
php-common.i386 5.1.6-40.el5_9 installed
php-dba.i386 5.1.6-40.el5_9 installed
php-devel.i386 5.1.6-40.el5_9 installed
php-gd.i386 5.1.6-40.el5_9 installed
php-imap.i386 5.1.6-40.el5_9 installed
php-ldap.i386 5.1.6-40.el5_9 installed
php-mbstring.i386 5.1.6-40.el5_9 installed
php-mysql.i386 5.1.6-40.el5_9 installed
php-ncurses.i386 5.1.6-40.el5_9 installed
php-odbc.i386 5.1.6-40.el5_9 installed
php-pdo.i386 5.1.6-40.el5_9 installed
php-pear.noarch 1:1.4.9-8.el5 installed
php-pgsql.i386 5.1.6-40.el5_9 installed
php-snmp.i386 5.1.6-40.el5_9 installed
php-soap.i386 5.1.6-40.el5_9 installed
php-xml.i386 5.1.6-40.el5_9 installed
php-xmlrpc.i386 5.1.6-40.el5_9 installed
Available Packages
php53.i386 5.3.3-21.el5 repo1.repo
php53-bcmath.i386 5.3.3-21.el5 repo1.repo
php53-cli.i386 5.3.3-21.el5 repo1.repo
php53-common.i386 5.3.3-21.el5 repo1.repo
php53-dba.i386 5.3.3-21.el5 repo1.repo
php53-devel.i386 5.3.3-21.el5 repo1.repo
php53-gd.i386 5.3.3-21.el5 repo1.repo
php53-imap.i386 5.3.3-21.el5 repo1.repo
php53-intl.i386 5.3.3-21.el5 repo1.repo
php53-ldap.i386 5.3.3-21.el5 repo1.repo
php53-mbstring.i386 5.3.3-21.el5 repo1.repo
php53-mysql.i386 5.3.3-21.el5 repo1.repo
php53-odbc.i386 5.3.3-21.el5 repo1.repo
php53-odbc64.i386 5.3.3-2.el5 repo1.repo
php53-pdo.i386 5.3.3-21.el5 repo1.repo
php53-pgsql.i386 5.3.3-21.el5 repo1.repo
php53-process.i386 5.3.3-21.el5 repo1.repo
php53-pspell.i386 5.3.3-21.el5 repo1.repo
php53-snmp.i386 5.3.3-21.el5 repo1.repo
php53-soap.i386 5.3.3-21.el5 repo1.repo
php53-xml.i386 5.3.3-21.el5 repo1.repo
php53-xmlrpc.i386 5.3.3-21.el5 repo1.repo
Re: apache with Lamp server
That doesn't look like a valid PHP file. See http://www.php.net/manual/en/tutorial.firstpage.php for an example of a basic PHP page. Your PHP code must be inside "<?php" and "?>" tags and you should include normal HTML tags as well.satheeshkmrnair wrote: I created a test.php in /var/www/html folder with the content as $many = 2 $many_2 = 3 $few = $many + $many_2 printf = (.$many + $many_2 = $few<br>.);.
-
- Posts: 7
- Joined: 2014/04/15 10:25:57
Re: apache with Lamp server
sir
Thanks for reply. I created the test php file which was in the link you provided in apache web server as per the syntax described there.But when I accessed that link internet explorer didnt show anything, the page was blank. please help me.
Thanks for reply. I created the test php file which was in the link you provided in apache web server as per the syntax described there.But when I accessed that link internet explorer didnt show anything, the page was blank. please help me.