XAMPP & PHP (php not working)

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Postby Izzy » 30. October 2007 07:55

I did spot a few problems in the header of the above code snippet that may be contributing to your problem, that if you add the piece of php code in a reply above, to the very top of the page and above all else and rename the file with a .php extension and call it in your browser (http://localhost/whatever.php) it might confirm or not these problems are causing your issue.
<?php die('I\'m here!'); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
http://www.w3.org/TR/html4/loose.dtd">

<!-- saved from url=(0014)about:internet -->

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

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="description" content="Cecil's Fine Jewelry">
<meta name="keywords" content="Cecil's, Cecils, Cecil's Fine Jewelry, Cecils Fine Jewelry, Cecil's Jewelry, Cecils Jewelry,
Cecil's Little Rock, Cecil's Arkansas, Jewelry, Little Rock, Little Rock Jewelry, Arkansas Jewelry,
Diamond, Diamonds, Ruby, Rubies, Rubys, Saphire, Saphires, Emerald, Emeralds, gemstones,
colored gemstones, birthstones, repair, jewelry repair">

<title>Jim Dickerson's Registration Form Edit</title>

<!-- <base target="new"/> -->
</head>

<body>

<p>Email Message to Jim Successfully Sent!</p>
<br>
<br>
<span class="scripttext2">
" Thank You !!!"
</span>

<br>

<h4>

<a href="#" onclick="window.opener=null; window.close(); return false">Close Window</a>
</h4>

</body>
</html>

If it displays the I'm here! statement in your browser then php is working fine.

Then you need to make these two changes to the header tags and try the page again minus the added php code snippet.
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
http://www.w3.org/TR/html4/loose.dtd">

To this - Just a missing quotation mark "
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Also, you may want to edit this tag <html xmlns="http://www.w3.org/1999/xhtml"> to just <html> - it is not need in your code and the html won't W3C validate if you use it.

You would need to rectify these errors in all your sites pages that are faulty.

You may, if you wish use this method to test your other php pages that won't load properly also.

In your first code snippet posted above this is not a good idea to have in the head section and should be deleted
Code: Select all
*************************************************


These links describe the comment tag which is wrapped around the similar looking entry below it in the body section:
http://www.w3schools.com/tags/tag_comment.asp
http://htmlhelp.com/reference/wilbur/misc/comment.html

This at the end of the same code snippet is also incorrect but should not impact on your original issue:
Code: Select all
</body>
<div>
</html>
Should have a closing /div tag
Code: Select all
</body>
</div>
</html>


Good luck, I have my fingers crossed :)


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Make Richer Ajax Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Wiedmann

Postby Summerjamn » 01. November 2007 22:18

I have gone to http://validator.w3.org at Izzy's instruction and have debugged the code except for onClick and onLoad (in the body tag). Otherwise it is error free.

Any ideas on why it "only" the PHP files won't run? All the XHTML works fine. PHPinfo work and all other aspect of XAMPP as far as I can tell.

Thanks
Summerjamn
 
Posts: 12
Joined: 25. October 2007 21:27
Location: Little Rock, Arkansas

Re: Wiedmann

Postby Izzy » 03. November 2007 13:23

Summerjamn wrote:...Any ideas on why it "only" the PHP files won't run? All the XHTML works fine. PHPinfo work and all other aspect of XAMPP as far as I can tell...

Do any of the links that you are using to call the php files contain any AJAX code - a server side scripting language?

On a local machine using XAMPP you can get the links containing AJAX code to work by using the server through:
http://localhost/yourwebsite/yourcallingpage.html
or where ever you have your web site files located.

And any PHP also needs to go through the server to be parsed:
http://localhost/yourwebsite/yourphp.php

They won't work if called by double clicking on the files - they must go through the server.
HTH


===========================================
1. The new DeskTopXampp launch control for XAMPP / XAMPPlite
Posted by Ridgewood available from Ridgewood'sDTX web site

2. Build Richer AJAX Applications - Faster
TIBCO General Interface Pro Edition but FREE and Open Source
Fully working with NO donations required to get a user/password
===========================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby Summerjamn » 03. November 2007 19:27

Izzy,
As you know since our communications began, all the code runs on our server using ISS to serve the pages. There is a small amount of AJAX code used to implement the slide show. Other than that, just some php on a drop down box for calendar days and some php files to capture data throuh forms. The php form files will not run on a standalone running Apache as the web server....but then again, I have not tried it since running all the code through the validator site you pointed me to...planned to today, but work is intefering...
Summerjamn
 
Posts: 12
Joined: 25. October 2007 21:27
Location: Little Rock, Arkansas

Postby Summerjamn » 12. November 2007 20:22

Thanks to a very kind forum member this problem has been resolved through some very good advice on a combination of events that may have been preventing me from running a stand alone Apache server. Here are things that were suggested to me that I will employ in the future.

1. Valadate all of your code at http://validator.we.org
2. Work the forum
3. Install XAMPP as instructed. I actually did not have to modify anything.
4. Start Apache and MySQL
5. Test the functions on the left pannel of XAMPP. (PHInfo, etc.)
6. Be sure you put your web site under htdocs/yourfoldername.
7. Start your site as http://localhost/yourfoldername

I can't put my finger on a specific thing that solved this issue for me but a very generous person stuck with me and solved this problem and gave me a multitude of other pointers.

Great forum.
Summerjamn
 
Posts: 12
Joined: 25. October 2007 21:27
Location: Little Rock, Arkansas

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 63 guests