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

Apache 2.2.4 & PHP 5.2.4

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Apache Log IP Via - Hi to all, i have an apache external and more apache internal. On external Apache I set more and with mod_proxy talk with all internal apache. For example: On ProxyPass / /..

Apache og ASP ? - Hello Can anyone here explain to me, if it is in Apache .conf file or somewhere in Sun One ASP I should configure the so my users cannot see anything but there own directory on the Apache server ? The situation is as

apache 2 and php on mac - what lines do i need in the httpd and what files or other do i need to get it in. macosx 10.3.5 and have switched to a fink so that may involve some heavy dancing. jimt

ASP.Net under Apache - Is there a module for Apache that allows the running of ASP.Net? Perhaps uses Mono?

apache not doing any PHP. - Hi I'm running Apache 1.3 with mod_php4 on a suse 9.0 box. However when a client tries to open a the file download dialog opens instead of showing the contents of the page. The PHP Module seems to be loaded my has the..
Next:  Security problems in non domain environment  
Author Message
Craig

External


Since: Sep 25, 2007
Posts: 2



(Msg. 1) Posted: Tue Sep 25, 2007 6:17 pm
Post subject: Apache 2.2.4 & PHP 5.2.4
Archived from groups: alt>apache>configuration (more info?)

I have been working on this for two days, and cannot figure it out. I have
read and tried suggestions from previous posts.

The phpinfo file comes up ok, put when I run a php page it only shows the
html, no PHP output.

I have installed Apache 2.2.4 and PHP 5.2.4 on Windows XP. Services show
"Apache/2.2.4 (Win32) PHP/5.2.4" running.

I have installed Apache in C:\Apache2.2, PHP is installed in
C:\Apache2.2\PHP524. php.ini and php5apache2_2.dll are both in
C:\Apache2.2\PHP524.

The Apache httpd.conf file has:
AddType application/x-httpd-php .php

and at the bottom

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/Apache2.2/PHP524/"
LoadModule php5_module "C:/Apache2.2/PHP524/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

The php.ini has:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\Apache2.2\PHP524\ext\"

In a book that I have, it mentions adding the LoadModule and AddType lines,
but also mentions to insert AddModule mod_php5.c. When I add AddModule
mod_php5.c, Apache will not start. It comes up with this error"

Services
Windows could not start the apache2 on Local Computer. For more information,
review the System Event Log. If this is a non-Microsoft service, contact the
service vendor, and refer to service-specific error code 1.

When I remove AddModule mod_php5.c Apache loads fine.

I've tried to explain with as much detail as I could.

Any help would be greatly appreciated.

Craig

PS - I also posted this in the php.install group, as I am not sure if this
is an Apache or PHP problem.

 >> Stay informed about: Apache 2.2.4 & PHP 5.2.4 
Back to top
Login to vote
shimmyshack

External


Since: Jun 07, 2007
Posts: 70



(Msg. 2) Posted: Wed Sep 26, 2007 8:00 pm
Post subject: Re: Apache 2.2.4 & PHP 5.2.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 26, 2:17 am, "Craig" <cabar....TakeThisOut@charter.net> wrote:
> I have been working on this for two days, and cannot figure it out. I have
> read and tried suggestions from previous posts.
>
> The phpinfo file comes up ok, put when I run a php page it only shows the
> html, no PHP output.
>
> I have installed Apache 2.2.4 and PHP 5.2.4 on Windows XP. Services show
> "Apache/2.2.4 (Win32) PHP/5.2.4" running.
>
> I have installed Apache in C:\Apache2.2, PHP is installed in
> C:\Apache2.2\PHP524. php.ini and php5apache2_2.dll are both in
> C:\Apache2.2\PHP524.
>
> The Apache httpd.conf file has:
> AddType application/x-httpd-php .php
>
> and at the bottom
>
> #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
> PHPIniDir "C:/Apache2.2/PHP524/"
> LoadModule php5_module "C:/Apache2.2/PHP524/php5apache2_2.dll"
> #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
>
> The php.ini has:
>
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "C:\Apache2.2\PHP524\ext\"
>
> In a book that I have, it mentions adding the LoadModule and AddType lines,
> but also mentions to insert AddModule mod_php5.c. When I add AddModule
> mod_php5.c, Apache will not start. It comes up with this error"
>
> Services
> Windows could not start the apache2 on Local Computer. For more information,
> review the System Event Log. If this is a non-Microsoft service, contact the
> service vendor, and refer to service-specific error code 1.
>
> When I remove AddModule mod_php5.c Apache loads fine.
>
> I've tried to explain with as much detail as I could.
>
> Any help would be greatly appreciated.
>
> Craig
>
> PS - I also posted this in the php.install group, as I am not sure if this
> is an Apache or PHP problem.

you say:

The phpinfo file comes up ok, put when I run a php page it only shows
the
html, no PHP output.

So how are you getting the phpinfo file to show?

file called test.php
<?php
phpinfo();
?>

if thats ok, then

file called html_and_php.php
<h1><?phpo echo 'hello wolrd'; ?></h2>
should be fine too.

 >> Stay informed about: Apache 2.2.4 & PHP 5.2.4 
Back to top
Login to vote
shimmyshack

External


Since: Jun 07, 2007
Posts: 70



(Msg. 3) Posted: Wed Sep 26, 2007 8:00 pm
Post subject: Re: Apache 2.2.4 & PHP 5.2.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 26, 2:17 am, "Craig" <cabar....DeleteThis@charter.net> wrote:
> I have been working on this for two days, and cannot figure it out. I have
> read and tried suggestions from previous posts.
>
> The phpinfo file comes up ok, put when I run a php page it only shows the
> html, no PHP output.
>
> I have installed Apache 2.2.4 and PHP 5.2.4 on Windows XP. Services show
> "Apache/2.2.4 (Win32) PHP/5.2.4" running.
>
> I have installed Apache in C:\Apache2.2, PHP is installed in
> C:\Apache2.2\PHP524. php.ini and php5apache2_2.dll are both in
> C:\Apache2.2\PHP524.
>
> The Apache httpd.conf file has:
> AddType application/x-httpd-php .php
>
> and at the bottom
>
> #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
> PHPIniDir "C:/Apache2.2/PHP524/"
> LoadModule php5_module "C:/Apache2.2/PHP524/php5apache2_2.dll"
> #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
>
> The php.ini has:
>
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "C:\Apache2.2\PHP524\ext\"
>
> In a book that I have, it mentions adding the LoadModule and AddType lines,
> but also mentions to insert AddModule mod_php5.c. When I add AddModule
> mod_php5.c, Apache will not start. It comes up with this error"
>
> Services
> Windows could not start the apache2 on Local Computer. For more information,
> review the System Event Log. If this is a non-Microsoft service, contact the
> service vendor, and refer to service-specific error code 1.
>
> When I remove AddModule mod_php5.c Apache loads fine.
>
> I've tried to explain with as much detail as I could.
>
> Any help would be greatly appreciated.
>
> Craig
>
> PS - I also posted this in the php.install group, as I am not sure if this
> is an Apache or PHP problem.

i meant <h1><?php echo 'hello world'; ?></h1>

of course
 >> Stay informed about: Apache 2.2.4 & PHP 5.2.4 
Back to top
Login to vote
David McKenzie

External


Since: Jul 18, 2007
Posts: 22



(Msg. 4) Posted: Thu Sep 27, 2007 7:02 am
Post subject: Re: Apache 2.2.4 & PHP 5.2.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Craig wrote:
> I have been working on this for two days, and cannot figure it out. I have
> read and tried suggestions from previous posts.
>
> The phpinfo file comes up ok, put when I run a php page it only shows the
> html, no PHP output.

What's the filename of the phpinfo file and the php page you're using?


--
DM davidm.TakeThisOut@cia.com.au

'It would go against respecting principles and truth if you have to
respect and accept anything just because it is the other side's view.'
- Kim Jung Ill
 >> Stay informed about: Apache 2.2.4 & PHP 5.2.4 
Back to top
Login to vote
"Crash" Dummy

External


Since: Jul 22, 2007
Posts: 12



(Msg. 5) Posted: Thu Sep 27, 2007 11:18 am
Post subject: Re: Apache 2.2.4 & PHP 5.2.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> The phpinfo file comes up ok, put when I run a php page it only shows the
> html, no PHP output.

On your troubled PHP page, are you using a short open tag (<?) instead of the
default full open tag (<?PHP)? The "short_open_tag" option in PHP.ini must be
set to "On" if you want to use the tag without "PHP."
--
Crash
 >> Stay informed about: Apache 2.2.4 & PHP 5.2.4 
Back to top
Login to vote
Craig

External


Since: Sep 25, 2007
Posts: 2



(Msg. 6) Posted: Fri Sep 28, 2007 9:02 am
Post subject: Re: Apache 2.2.4 & PHP 5.2.4 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

When I run this file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Hello!</title>
</head>

<body>
THIS LINE IS HTML - NOT PHP!
<br>
<?php
echo("Hello, World! If you see this line, you are successfully running PHP
5.2.4 an the Apache web server.");
?>

</body>

</html>

I get:

THIS LINE IS HTML - NOT PHP!
Hello, World! If you see this line, you are successfully running PHP 5.2.4
an the Apache web server.

When I run this file (tips.txt is in the htdocs directory):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><style type="text/css"><!-
a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: arial, helvetica, sans-serif; font-size: 18pt; fontweight:
bold;}
h2 { font-family: arial, helvetica, sans-serif; font-size: 14pt; fontweight:
bold;}
body, td { font-family: arial, helvetica, sans-serif; font-size: 10pt; }
th { font-family: arial, helvetica, sans-serif; font-size: 11pt;
font-weight:
bold; }
//-></style>
<title>Tip of the day</title>
</head>
<body>
<center>
TRICK
TRAP
TRICK
<h1>Tip of the day</h1>
<div style = "border-color:green; border-style:groove; border-width:2px">
<?php

readfile("tips.txt");

?>
</div>
</center>
</body>
</html>

I get:

TRICK TRAP TRICK
Tip of the day

Warning: readfile("tipstxt") [function.readfile]: failed to open stream: No
such file or directory in C:\Apache2.2\htdocs\tip.php on line 25


When I run this file:

<html>
<head>
<title>Hi Jacob</title>
</head>
<body>
<h1>Hi Jacob</h1>
<h3>Demonstrates using a variable</h3>
<?php
$userName = "Jacob";
print "Hi, $userName";
?>
</body>
</html>

I get:

Parse error: syntax error, unexpected ',' in C:\Apache2.2\htdocs\hijacob.php
on line 10

I remove the ',' in print "Hi, $userName", I get:

Parse error: syntax error, unexpected T_VARIABLE in
C:\Apache2.2\htdocs\hijacob.php on line 10


Craig
 >> Stay informed about: Apache 2.2.4 & PHP 5.2.4 
Back to top
Login to vote
Display posts from previous:   
   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 ]