Jump to content

Recommended Posts

System specs:

OS: Linux, Fedora v.2.6.11-1.1369_FC4

HTTPD: Apache v.2.2.11

PHP v.5.2.9

DBMS: PostgreSQL v. 8.3.7

 

I have PHP v. 5.2.9 installed on my web server running Apache v.2.2.11, but

it is not processing PHP commands on web pages hosted on that same machine.

For example, I have a page that I created named phpinfo.php, which solely

runs the phpinfo() command.  It works on my other web server, but not this

one.  Here is the code for that entire phpinfo.php:

 

<?php phpinfo() ?>

 

When I try to access the phpinfo.php web page from a browser on another

desktop computer, it treats it like its trying to download a file, asking me

whether I want to Save or Open the file, not execute the code within the

browser as it should be doing.  However, if I try to browse to the

phpinfo.php file hosted on my other web server, it processes the phpinfo()

command as it is supposed to and displays the results of the function.

 

When I installed PHP on the problematic server, I ran these commands as

root:

 

./configure --with-pgsql=/usr/local/pgsql/bin --with-apxs2=/usr/local/apache2/bin/apxs

make

make install

 

There were no errors, everything installed fine.

 

Whenever you install a newer version of PHP, are you supposed to re-run the

Apache installation for it to successfully be able to "talk" to PHP?  I'm

fairly new to this...  Thanks.

 

RRT

 

 

 

YUM always fails when I try to run it.  I get these messages back:

 

===

 

[root@server1 ~]# yum check-update

Setting up repositories

Cannot find a valid baseurl for repo: updates-released

 

===

 

What does this error mean?

 

Plus, I don't know YUM that well, so I figured installing it manually was the most direct path, instead of getting diverted trying to fix another issue that I could try to tackle later... especially since I am trying to get the PHP fixed first.

 

  • 4 months later...

You still have the problem???? I got similar problem and my code is probably much simpler.

<?

//set variables

$site_title="PHP webpage";

$bg_color="White";

$user_name="xxx";

?>

 

<html>

<head>

<title><? print $site_title; ?></title>

</head>

<body bgcolor="<? print $bg_color ?>">

<?

// Display Introduction Message

print "Hi! Greetings!!! $user_name." .date("F d, Y)";

?>

</body>

</html>

 

and the response doesn't identify anything that's inside <?...?>  :(

 

 

  • 4 weeks later...

I'm actually having a similar problem on my Mint machine.

 

Apache 2 is running fine, as HTML works normally.  I downloaded and installed both Apache and PHP 5.3.1 through the package program.  I can see both php.conf and php.load in my modules-enabled folder.

 

It looks like my httpd.conf is completely empty.  At least, nothing shows up  in gedit when I try to edit it as root.

It looks like my httpd.conf is completely empty.  At least, nothing shows up  in gedit when I try to edit it as root.

 

Mint is Debian based yeah? Your apache configurations will be within /etc/apache2/apache.conf

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.