473,698 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get Apache to run PHP inside html from localhost - works fine from /var/ww/html

I had a look at the stantonfinley fedora core 5 instructions and robooted
but to no avail.
PHP scripts work fine from var/www/html whether the suffix is .php or .htm
but not from localhost.

I did what is suggested from this point and rebooted but no bloody luck.
If someone could throw an clue this way it'd be appreciated and thanked in
advance.

http://www.stanton-finley.net/fedora...ion_notes.html

<quote>
If you wish to enable support to serve web pages from user's home
directories as well comment (add a "#" in front of) "UserDir disable" so
that it reads "#UserDir disable" and uncomment "#UserDir public_html" so
that it reads "UserDir public_html". Then uncomment and edit the control
access stanza for user directories below it so that it looks something
like this: <Directory /home/*/public_html>
AllowOverride Options FileInfo AuthConfig Limit Options Indexes
Includes FollowSymLinks SymLinksifOwner Match ExecCGI MultiViews <Limit
GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Allow from all
</LimitExcept>
</Directory>
[..]
Sep 9 '06 #1
2 2763
Open your /etc/httpd/httpd.conf, grep for php, and uncomment the lines
LoadModule and AddModule for PHP. It sounds like this should fix it.
Also, make sure you are using http://localhost and not file://localhost
-- file:// URLs are not parsed.

Frel wrote:
I had a look at the stantonfinley fedora core 5 instructions and robooted
but to no avail.
PHP scripts work fine from var/www/html whether the suffix is .php or .htm
but not from localhost.

I did what is suggested from this point and rebooted but no bloody luck.
If someone could throw an clue this way it'd be appreciated and thanked in
advance.

http://www.stanton-finley.net/fedora...ion_notes.html

<quote>
If you wish to enable support to serve web pages from user's home
directories as well comment (add a "#" in front of) "UserDir disable" so
that it reads "#UserDir disable" and uncomment "#UserDir public_html" so
that it reads "UserDir public_html". Then uncomment and edit the control
access stanza for user directories below it so that it looks something
like this: <Directory /home/*/public_html>
AllowOverride Options FileInfo AuthConfig Limit Options Indexes
Includes FollowSymLinks SymLinksifOwner Match ExecCGI MultiViews <Limit
GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Allow from all
</LimitExcept>
</Directory>
[..]
Sep 9 '06 #2
On Sat, 09 Sep 2006 14:21:51 -0700, Joshie Surber wrote:
Open your /etc/httpd/httpd.conf, grep for php, and uncomment the lines
LoadModule and AddModule for PHP.
All LoadModule entries were already uncommented. No "AddModule" for PHP
found.

It sounds like this should fix it.
Also, make sure you are using http://localhost and not file://localhost
-- file:// URLs are not parsed.
This brings up what is in in var/www which I don't have a problem with.
Frel wrote:
>I had a look at the stantonfinley fedora core 5 instructions and
robooted but to no avail.
PHP scripts work fine from var/www/html whether the suffix is .php or
.htm but not from localhost.

I did what is suggested from this point and rebooted but no bloody
luck. If someone could throw an clue this way it'd be appreciated and
thanked in advance.

http://www.stanton-finley.net/fedora...ion_notes.html

<quote>
If you wish to enable support to serve web pages from user's home
directories as well comment (add a "#" in front of) "UserDir disable"
so that it reads "#UserDir disable" and uncomment "#UserDir
public_html" so that it reads "UserDir public_html". Then uncomment and
edit the control access stanza for user directories below it so that it
looks something like this: <Directory /home/*/public_html>
AllowOverride Options FileInfo AuthConfig Limit Options Indexes
Includes FollowSymLinks SymLinksifOwner Match ExecCGI MultiViews
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Allow from all
</LimitExcept>
</Directory>
[..]
Sep 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14165
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip Smarty-2.6.7.tar.gz on a system running WindowsXP SP2. Apache and PHP tested out fine. After adding Smarty, I ran the following http://localhost/testphp.php
7
6238
by: Alexandr Molochnikov | last post by:
Hello, I've spent a few days trying to get Apache and Tomcat work together via JK module. First I followed the following HOWTO link: http://www.johnturner.com/howto/winxp-howto.html and managed to get Tomcat static html page load from Apache server without specifying 8080 port, like this:
11
2916
by: gregsands | last post by:
Hi Im trying to install PHP 5.05 on Windows XP running Apache 2.0.54 Apache is running fine and ive made all the changes to the pnp.ini file and Apache config file, restarted Apache but all I get when trying to call my test.php file is a 404 error? http.config file: LoadModule php5_module "C:/php/php5apache2.dll" PHPIniDir "C:/php" AddType application/x-httpd-php .php
11
26608
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
10
8113
by: 7stud | last post by:
I'm trying to get Apache set up on my system so I can use mod_python. I installed Apache 2.2.4 according to the following instructions: http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/#comment-30704 and everything seemed to install correctly, but I can't start Apache. I typed in the following command: $ sudo /Library/Apache2/bin/apachectl start Password:
2
6762
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also definitely getting a hit when I use a browser to get to my hibye.cgi server (well, a blank page rather than a 404). However, when I run my hibye.pl client, I receive a 503 Service Unavailable at H:\scripts\hibye.pl line 25. It works when I...
0
6851
by: phil469 | last post by:
I'm having an issue when trying to read a file in a user's homedir from a cgi script. I have a virtual host section in my httpd.conf file which I'll include. The cgi script is a very basic script written in Perl just for testing. I believe I need to find the correct <Directory> entry or some other Directive in Apache to make this work, but I've had no luck for a week now. I've tried many different things, but w/ no luck. I even tried adding...
5
15585
by: Brian | last post by:
Hi I have a problem in opening url using 'file'. I searched many other discussion groups and tried suggestions, but could not resolve this problem. e.g <?php $myfile = file('http://google.com'); foreach ( $myfile as $vals){
8
2676
lifeisgreat20009
by: lifeisgreat20009 | last post by:
What might be the possible cause ? I have created a website using struts framework, jsp In my transaction page the money is not getting transferred.. When I hit the submit button in my Transaction.jsp page , no transaction happens .. Only the url changes from http://localhost:8080/bankfinalproject/jsp/transaction.jsp to this
0
8680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.