Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 30th, 2004, 03:19 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


Reply With Quote
  #2 (permalink)  
Old June 30th, 2004, 04:59 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

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
::::::::::::::::::::::::::::::::::::::::::
Reply With Quote
  #3 (permalink)  
Old July 3rd, 2004, 12:18 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

Reply With Quote
  #4 (permalink)  
Old July 3rd, 2004, 01:29 PM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #5 (permalink)  
Old July 9th, 2004, 10:30 AM
Authorized User
 
Join Date: Jul 2004
Location: Connah\'s Quay, , United Kingdom.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Chudz
Default

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
Reply With Quote
  #6 (permalink)  
Old July 9th, 2004, 10:31 AM
Authorized User
 
Join Date: Jun 2004
Location: New York, New York, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to redcell184
Default

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

????

Reply With Quote
  #7 (permalink)  
Old July 11th, 2004, 05:33 PM
Authorized User
 
Join Date: Jun 2004
Location: New York, New York, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to redcell184
Default

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

Reply With Quote
  #8 (permalink)  
Old July 30th, 2004, 03:18 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?

Reply With Quote
  #9 (permalink)  
Old July 30th, 2004, 10:59 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.


Reply With Quote
  #10 (permalink)  
Old July 30th, 2004, 11:05 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Php/Apache blackout PHP How-To 1 August 22nd, 2006 08:16 AM
PHP 5.0 and Apache SeniorNSU BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 January 4th, 2006 10:26 PM
which is best :php with iis or php with apache? fromheavenz Beginning PHP 4 September 7th, 2005 01:47 AM
Getting PHP and Apache to work together. russell_lacy BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 4 June 7th, 2004 03:00 PM
Apache - PHP conflict dpchambe BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 April 23rd, 2004 10:36 AM



All times are GMT -4. The time now is 04:24 AM.


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