Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP 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 March 24th, 2008, 07:17 PM
Registered User
 
Join Date: Mar 2008
Location: Dallas, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installation woes

I just completed the installation of php5 on a workstation IIS.

Tried the phpinfo.php which worked fine.

Then tried a simple script:

<http>
<body>
My name is
<? print "Harry";
?>
</body>
</http>

And got "My name is" only.

Any ideas?

Thanks,


Glenn Callaway
Reply With Quote
  #2 (permalink)  
Old March 25th, 2008, 03:29 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What is the file extension?????????? Must be .php

<http>should be <html> but that would not stop it working.


Reply With Quote
  #3 (permalink)  
Old March 25th, 2008, 11:00 AM
Registered User
 
Join Date: Mar 2008
Location: Dallas, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the shove in the right direction. Doh! Must have been looking at urls to much swapping "HTTP" and "HTML".

Got the .php working but I still can't get code islands inside of HTML to work.

Thanks again,

Glenn :D

Glenn Callaway
Reply With Quote
  #4 (permalink)  
Old March 25th, 2008, 11:05 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It works on my server. Are you sure you are running the page on your sever. Where have you saved the file to????????? This must be in the root of your server.

Reply With Quote
  #5 (permalink)  
Old March 26th, 2008, 11:38 AM
Registered User
 
Join Date: Mar 2008
Location: Dallas, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've got the file (example.html) in the wwwroot directory. My .php files work fine. But a code island such as:

<html>
<body>

<?php echo "Hello"; ?>

</body>
</html>

Shows a blank page.

Glenn Callaway
Reply With Quote
  #6 (permalink)  
Old March 26th, 2008, 11:45 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

example.html is this the name of the file with the code in?????????

Reply With Quote
  #7 (permalink)  
Old March 28th, 2008, 09:50 AM
Registered User
 
Join Date: Mar 2008
Location: Dallas, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, but I also tried renaming the extension to .php and got the same result.

Glenn Callaway
Reply With Quote
  #8 (permalink)  
Old March 28th, 2008, 10:02 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The file as to be .php in order to work: example.php

There is nothing wrong with the code.
make sure there is no spaces in the file name.

I have found IIS to be a pain with php, so i use XAMPP

http://www.apachefriends.org/en/xampp.html

I know you can set up PHP on windows server, but i have found it a lot better on Apache.

Reply With Quote
  #9 (permalink)  
Old March 31st, 2008, 06:59 PM
Registered User
 
Join Date: Mar 2008
Location: Dallas, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help. I'll keep plugging at it and will look to move to Apache. I've always had issues with Microsoft. You hate it and love it.

Glenn

Glenn Callaway
Reply With Quote
  #10 (permalink)  
Old March 31st, 2008, 07:05 PM
Registered User
 
Join Date: Mar 2008
Location: Dallas, OR, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just uploaded it to my website which is Apache and it works fine. Obviously, my local IIS server is the problem.

Thanks for your help. I know that if I'm going to use embedded code islands to test them on my website.

Thanks again,

Glenn

Glenn Callaway
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
onClick woes DennyLoi Javascript How-To 1 November 3rd, 2007 01:13 PM
Array woes hillbilly geek PHP How-To 2 January 8th, 2006 12:28 AM
Form woes komputatek Access 2 March 15th, 2005 11:47 AM
Installation woes mattm BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 June 26th, 2003 03:40 PM



All times are GMT -4. The time now is 03:57 AM.


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