p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 (http://p2p.wrox.com/forumdisplay.php?f=123)
-   -   Need help with Apache and PHP (http://p2p.wrox.com/showthread.php?t=14868)

yaluyahee June 30th, 2004 03:19 PM

Need help with Apache and PHP
 
I am new to Apache and PHP. I completely installed both Apache and PHP into my win XP. I followed the look wrote a test program to do the test. It worked fine. But the problem started when i wrote second PHP page, when i tried to test the second PHP page, the output of the page is blank.( I am sure the syntax is correct).

 Problem 2. I modified the content of the first test program.( Let say the content of the first test program is " it works fine", then I modified the content to " I modified the content") When i opened the test program, the content of the page is still "it works fine".
  Problem 3. I deleted all the files in the localhost folder, when I typed in http://localhost/firsttest.php in the browser, the " it works fine" text display on the web page. Is it supposed not to be displayed on the web page? because i deleted it already.
  Please help me findout what went wrong. Thanks



richard.york June 30th, 2004 04:59 PM

What does your test code for the second page look like? Post a snip of it here.

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::

yaluyahee July 3rd, 2004 12:18 PM

The Test Code looks like it:

<html>
<head>
<title>testing</title>
</head>
<body>
<?php
  echo " I wish this times works ";
?>
</body>
</html>

Why the ouput is blank?


BuzzLY July 3rd, 2004 01:29 PM

Your page is probably just cached. Hit refresh in your browser and the page should reload with the current contents.

If your page is still blank when you load it and refresh it, then perhaps Apache does not recognize .php files as PHP. You'll need to open httpd.conf and make sure this line contains ".php":

Code:

AddType application/x-httpd-php .php .php3 .phtml .php4
Michael K. Glass
Author, Beginning PHP, Apache, MySQL Web Development

Chudz July 9th, 2004 10:30 AM

Hi I'm having problem with Apache I install it and set these settings:

 DomainName = leap2.co.uk
 ServerName = www.leap2.co.uk
 ServerAdmin = webmaster@leap2.co.uk
 ServerPort = 80
 ServerRoot = C:/Program Files/Apache Group/Apache2

Once i had installed it there was an error i got a DOS Window popup!

http://www.chudz.plus.com/error1.JPG
http://www.chudz.plus.com/error2.JPG

When i try to do a test "http://localhost/" it says Done in the status bar but there is know successful message, also I have downloaded this version of Apache apache_2.0.50-win32-x86-no_ss

Thank you for the help in advance!
Chudz

http://www.uggle.com
http://www.leap2.co.uk
webmaster@leap2.co.uk
andrewjones702@hotmail.com

redcell184 July 9th, 2004 10:31 AM

i ahve the same exact problem and for some odd reason when i load the module:

LoadModule php4_module c:/php/sapi/php4apache.dll

it either freezes or doesn't load at all an i have seen the test coding still in texteditor format rather than php

????


redcell184 July 11th, 2004 05:33 PM

Problem fixed and i don't have a clue probably needed to restart it.


saross July 30th, 2004 03:18 PM

I am new to PHP and am following the "Beginning PHP, etc..." book. I have followed the directions on pps 15-16, and in Appendix I regarding the Apache install.
I get the success page when entering 127.0.0.1, but that is all I get. I have added the test/index, and still the success page, not the index.html page. When I installed Apache I accepted the defaults for server and domain name info (which were correct). When I attempt to monitor the server I cannot, but do get an error message when I restart the server which states, "Cannot load D:/php/sapi/php4apache2.dll; specified module cannot be found." I have two hard drives and I have installed apache on D.
Any clues as to what I have done wrong?


saross July 30th, 2004 10:59 PM

Almost forgot to mention...
I read the above posts, and wanted to add that when I customized the installation per page 15 I entered:
AddType application/x-httpd-php .php .php3
(and added .phtml .php4 to the end of the above per BuzzLY's post. Of course I have made sure to add LoadModule php4_module D:/php/sapi/php4apache.dll. I have also used the refresh to no avail. The HTML looks like Yaluyahee's. Hope that the additional info helps because I am baffled.



saross July 30th, 2004 11:05 PM

LoadModule php4_module D:/php/sapi/php4apache2.dll (I double checked...I did added the php4_module like this, not LoadModule php4_module D:/php/sapi/php4apache.dll. Sorry.



All times are GMT -4. The time now is 10:40 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.