Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

I got a problem with Apache & PHP.

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Write permissions, apache on win32  
Author Message
what

External


Since: Jul 17, 2003
Posts: 1



(Msg. 1) Posted: Thu Jul 17, 2003 3:50 pm
Post subject: I got a problem with Apache & PHP.
Archived from groups: alt>apache>configuration (more info?)

First off, I'm trying to get PHP working with Apache.
I added this line to my httpd.conf: AddType application/x-httpd-php .php
and I have set index.php to the default index page.

When I go to my test page (index.php) with a little <? print(Date("l F d,
Y")); ?> on it,
both Opera and Explorer try to open it as an application and ask me where I
want to save it.
They doesn't seem to recognize it well.

Any hints? Thank's for reading.

- Louis S.

 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Thu Jul 17, 2003 8:07 pm
Post subject: Re: I got a problem with Apache & PHP. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Louis <what RemoveThis @ever.ca> wrote:
 > I added this line to my httpd.conf: AddType application/x-httpd-php .php
 > and I have set index.php to the default index page.

Yes, yes... but did you also added the required php modules?

Davide<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
nospam173

External


Since: Jul 02, 2003
Posts: 52



(Msg. 3) Posted: Thu Jul 17, 2003 8:11 pm
Post subject: Re: I got a problem with Apache & PHP. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 17 Jul 2003 12:50:53 -0400, The Other Guy responded to a post
from "Louis" <what.DeleteThis@ever.ca> who wrote in alt.apache.configuration:

 >First off, I'm trying to get PHP working with Apache.
 >I added this line to my httpd.conf: AddType application/x-httpd-php .php
 >and I have set index.php to the default index page.
 >
 >When I go to my test page (index.php) with a little <? print(Date("l F d,
 >Y")); ?> on it,
 >both Opera and Explorer try to open it as an application and ask me where I
 >want to save it.
 >They doesn't seem to recognize it well.
 >
 >Any hints? Thank's for reading.
 >
 >- Louis S.
 >

You haven't configured something properly. What O/S are you using?
Which version of Apache? Which version of PHP? All of these bits of
info would be useful to help as each version of Apache, and PHP
versions, as well as the O/S have their own set up and config.


--
../configure --prefix=~/zyterion
Not this guy or that guy, The Other Guy.

This spot may contain a satirical comment or comedic source,
and is meant to be funny. If you are easily offended, gullible
or don't have a sense of humour we suggest you read elsewhere.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
mastercara

External


Since: Jul 17, 2003
Posts: 1



(Msg. 4) Posted: Thu Jul 17, 2003 11:48 pm
Post subject: Re: I got a problem with Apache & PHP. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Louis wrote:
 > First off, I'm trying to get PHP working with Apache.
 > I added this line to my httpd.conf: AddType application/x-httpd-php .php
 > and I have set index.php to the default index page.
 >
 > When I go to my test page (index.php) with a little <? print(Date("l F d,
 > Y")); ?> on it,
 > both Opera and Explorer try to open it as an application and ask me where I
 > want to save it.
 > They doesn't seem to recognize it well.
 >
 > Any hints? Thank's for reading.
 >
 > - Louis S.
 >
 >
You also need to add a .htaccess file in your base directory, containing

DirectoryIndex index.shtml index.php

in order to advise Apache that if index.shtml (or .html) is not existing
the index.php would become the entry file of your website<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
spam3

External


Since: Jul 01, 2003
Posts: 411



(Msg. 5) Posted: Thu Jul 17, 2003 11:48 pm
Post subject: Re: I got a problem with Apache & PHP. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dave wrote:

 > Louis wrote:
 >
  >> and I have set index.php to the default index page.
  >>
 > You also need to add a .htaccess file in your base directory, containing
 >
 > DirectoryIndex index.shtml index.php
 >
 > in order to advise Apache that if index.shtml (or .html) is not existing
 > the index.php would become the entry file of your website
 >

Isn't that what he said he did?

--
Justin Koivisto - spam.DeleteThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
ajv3

External


Since: Jul 18, 2003
Posts: 2



(Msg. 6) Posted: Sat Jul 19, 2003 9:42 am
Post subject: Re: I got a problem with Apache & PHP. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Louis wrote:
 > First off, I'm trying to get PHP working with Apache.
 > I added this line to my httpd.conf: AddType application/x-httpd-php .php
 > and I have set index.php to the default index page.
 >
 > When I go to my test page (index.php) with a little <? print(Date("l F d,
 > Y")); ?> on it,
 > both Opera and Explorer try to open it as an application and ask me where I
 > want to save it.
 > They doesn't seem to recognize it well.
 >
 > Any hints? Thank's for reading.
 >
 > - Louis S.
 >
 >
I just went through this myself. You also need to add this line to your

httpd.conf AddHandler application/x-httpd-php .php .phtml

The handler line is omitted from the Apache documentation for some
reason, but it's somewhere in the PHP documentation. That should fix
it. Keep us informed on how you're doing.

-A.V.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
towerofpower

External


Since: Jan 06, 2004
Posts: 23



(Msg. 7) Posted: Sun Jul 20, 2003 3:42 pm
Post subject: Re: I got a problem with Apache & PHP. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
jgerland

External


Since: Jul 21, 2003
Posts: 1



(Msg. 8) Posted: Mon Jul 21, 2003 3:39 pm
Post subject: Confiure Apache & PHP on an AS400? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm trying to configure Apache on an IBM iSeries 270 running OS400 V5R1 with
PHP 4.3 and I can't get it to recognize .php (or .pl for perl files either).
Here is the relavent part of my apache httpd.conf file:

AddHandler application/x-httpd-perl .cgi .pl
AddHandler application/x-httpd-php .php .phtml
ScriptAlias /perl-bin /QOpenSys/perl/bin/
AddType application/x-httpd-perl .pl
AddType application/x-httpd-perl .cgi
Action application/x-httpd-perl /perl-bin/perl
<Directory /QOpenSys/perl/bin>
Options +ExecCGI +FollowSymLinks +MultiViews +Indexes
Order Allow,Deny
allow from all
</Directory>
ScriptAlias /php-bin /QOpenSys/php/bin/
AddType application/x-httpd-php .php
Action application/x-httpd-php /php-bin/php
<Directory /QOpenSys/php/bin>
Options +ExecCGI +FollowSymLinks +MultiViews +Indexes
Order Allow,Deny
allow from all
</Directory>

Any ideas or pointer to how to configure apache on an AS400 would be greatly
appreciated.
Thanks,
Jim....
 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
nospam173

External


Since: Jul 02, 2003
Posts: 52



(Msg. 9) Posted: Mon Jul 21, 2003 9:36 pm
Post subject: Re: Confiure Apache & PHP on an AS400? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 21 Jul 2003 12:39:31 -0400, The Other Guy responded to a post
from "Jim Gerland" <jgerland.RemoveThis@willcare.com> who wrote in
alt.apache.configuration:

 >I'm trying to configure Apache on an IBM iSeries 270 running OS400 V5R1 with
 >PHP 4.3 and I can't get it to recognize .php (or .pl for perl files either).
 >Here is the relavent part of my apache httpd.conf file:
 >
 >AddHandler application/x-httpd-perl .cgi .pl
 >AddHandler application/x-httpd-php .php .phtml
 >ScriptAlias /perl-bin /QOpenSys/perl/bin/

s/b ScriptAlias /perl-bin/ /QOpenSys/perl/bin/
note trailing slash at the end of the nickname -- if one ends with a
trailing slash, the other should as well.


Technically, the AddHandlers here are irrelevant because you are
using ScriptAlias


 >AddType application/x-httpd-perl .pl
 >AddType application/x-httpd-perl .cgi

Could use one line:
AddType application/x-httpd-perl .pl .cgi

 >Action application/x-httpd-perl /perl-bin/perl
 ><Directory /QOpenSys/perl/bin>
 > Options +ExecCGI +FollowSymLinks +MultiViews +Indexes
 > Order Allow,Deny
 > allow from all
 ></Directory>

s/b Options +FollowSymLinks +MultiViews +Indexes
don't need +ExecCGI because it is redundant -- ScriptAlias makes all
files in the named directory executable by default.

 >ScriptAlias /php-bin /QOpenSys/php/bin/

add trailing slash -- see above.

 >AddType application/x-httpd-php .php

Try adding:
AddType application/x-httpd-php-source .phps
but can't say that will be effective.

With the above AddType, only files with the extension .php with be
processed by the PHP interpreter.

 >Action application/x-httpd-php /php-bin/php
 ><Directory /QOpenSys/php/bin>
 > Options +ExecCGI +FollowSymLinks +MultiViews +Indexes
 > Order Allow,Deny
 > allow from all
 ></Directory>

s/b Options +FollowSymLinks +MultiViews +Indexes
see notes above.

 >Any ideas or pointer to how to configure apache on an AS400 would be greatly
 >appreciated.
 >Thanks,
 >Jim....

I can give you the above advice only. It has been literally several
years since I did any work at all with an AS400. Have you tried to
implement them as modules as opposed to CGI?

Make sure that there are no AllowOverrides being inherited from parent
directories.

Try making the changes I suggested to see if that helps any.

Regards,
TOG

--
../configure --prefix=~/zyterion
Not this guy or that guy, The Other Guy.

"If you're not thoroughly confused by now, then you just
don't understand the situation."<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: I got a problem with Apache & PHP. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
problem with apache - Hi I have installed apache with mysql and php and I have the follow problem: [Fri Jul 11 10:21:31 2003] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Fri Jul 11 10:21:31 2003] [crit]..

Apache 2 + openssl + prngd compilation problem - Hi, I cannot get my Apache 2 + mod_ssl to compile on Solaris 7. I use prngd-0.9.27 server with /var/run/egd-pool socket. and openssl-0.9.7b I first trid : --enable-mods-shared=all configure failed : "You need APR random support to use mod_auth_dig...

cgi problem - Background: 1. Program works on real world paid hosting (linux server). 2. Program works on Windows home testing server.(Omnihttpd) Just Installed Red Hat 8.0 . Created cgi-bin for main site using.. ScriptAlias /cgi-bin/ "/path/to/my/site/" an...

Mod http_proxy problem - Hi all, I include the mod_proxy_http in my Apache configuration file (Apache 2.0.43 on Red Hat Linux 7.3): LoadModule proxy_http_module modules/mod_proxy_http.so and at the restart I got the following message: [root@n3l5wAM2j8avSc modules]# service..

mod_rewrite problem - Hello everyone! I'm confused about the following. This works as it's supposed to: RewriteCond %{REQUEST_URI} abc([0-9]{4,4})\.html$ RewriteRule abc([0-9]{4,4})\.html$ /abc/showissue.php?id=$1 The following however makes the CPU go up to 100% hence..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]