LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 09-24-2006, 04:15 PM   #1
isretired
LQ Newbie
 
Registered: Sep 2006
Posts: 3

Rep: Reputation: 0
PHP not working in SUSE 10.1


Just did new install of SUSE 10.1. During the install I included Apache2 with PHP5.
In YaST, I enabled the HTTP sever and enabled PHP and opened it's ports in the firewall.
I can display a web page (both the default page and one of my own) from within linux and from another computer on the LAN.
The problem is that PHP code is not executed. It makes no difference if the PHP is within an HTML page or a file by itself.

Example 1, file index.html:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo phpinfo(); ?>
</body>
</html>

Example 2, file justphp.php:
<?php
phpinfo();
?>

Both examples produce a blank page. HTML code works if including in the first example.

Does anybody have an idea why PHP may not be working?
I have been all over the web and nothing I'v seen so far applies to SUSE 10.1.

Thanks for any help

PS
I'm somewhat new to Linux
 
Old 09-24-2006, 06:36 PM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
you need to a line to the httpd.conf,
AddType application/x-httpd-php .php
hopefully that should correct the problem.
 
Old 09-24-2006, 07:07 PM   #3
isretired
LQ Newbie
 
Registered: Sep 2006
Posts: 3

Original Poster
Rep: Reputation: 0
That did not work.
After making the change, I executed /etc/init.d/apache2 restart.
I hope that was correct.
Since this did not work I took it back out to keep the file clean.

Thanks anyway
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP not working in SUSE 10.1 isretired Linux - Server 2 09-24-2006 07:11 PM
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
Suse 9.3/apache2/php4 - Firefox tries to download index.php, other *php pages work stefanlasiewski SUSE / openSUSE 1 01-18-2006 06:12 PM
PhP not working correctly in Suse 9.3 webwolf70 SUSE / openSUSE 14 10-29-2005 09:33 AM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration