RRT Posted June 26, 2009 Share Posted June 26, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/ Share on other sites More sharing options...
trq Posted June 27, 2009 Share Posted June 27, 2009 Any particular reason your installing from source? Fedora has a perfectly capable package manager called YUM, that will sort dependencies, install and configure most required software. Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-864462 Share on other sites More sharing options...
RRT Posted June 29, 2009 Author Share Posted June 29, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-865723 Share on other sites More sharing options...
RRT Posted July 1, 2009 Author Share Posted July 1, 2009 This issue is still not solved. If I can't get Yum to work correctly, then that means that I will have to config and compile manually. Any suggestions on what I should try next? Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-867308 Share on other sites More sharing options...
trq Posted July 2, 2009 Share Posted July 2, 2009 Have you actually configured Apache to load the php module? Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-867652 Share on other sites More sharing options...
Jagand Posted November 21, 2009 Share Posted November 21, 2009 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 <?...?> Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-962449 Share on other sites More sharing options...
cags Posted November 21, 2009 Share Posted November 21, 2009 @Jagand You are using short open tags, which aren't recommended. Many servers will have short_open_tag set as Off. Changing all instances of <? to <?php should fix your problem. Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-962512 Share on other sites More sharing options...
Jagand Posted November 22, 2009 Share Posted November 22, 2009 It worked. Thank you. That was my first PHP code :-) Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-963235 Share on other sites More sharing options...
KevinM1 Posted December 16, 2009 Share Posted December 16, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-978729 Share on other sites More sharing options...
trq Posted December 16, 2009 Share Posted December 16, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/163811-php-529-installed-but-not-processing-php-commands-on-pages-hosted-on-machine/#findComment-978813 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.