Welcome to WebmasterWorld Guest from 54.167.111.180

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Included file shows in design view but not browser

Sorry if this is dumb - I'm new to this.

     
3:49 am on Mar 30, 2012 (gmt 0)

New User

joined:Mar 30, 2012
posts: 6
votes: 0


I have a php page that includes another php file.
The included file (which consists of a form that people can fill out) shows in the main file in Expression Web 4 design view, but does not show in the IE9 preview. (I mean, the main file shows in IE9, but not the form that should be included.) I have both the php files in the root directory, so they're at the same level. I have tried using "require" rather than "include" with the same result. My "include" language is <?php include("quoteform") ?>

Does anyone see something wrong off the bat? I have the newest php which I uploaded just yesterday. And I have EW4.
5:50 am on Mar 30, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:12999
votes: 289


Is this on a live site-- or local equivalent-- or on your own computer?
1:25 pm on Mar 30, 2012 (gmt 0)

New User

joined:Mar 30, 2012
posts: 6
votes: 0


Site is running only on my own machine so far, using xammp from Apache. I did have to switch to Port 91 from Port 80 to get Apache to run, but both Apache and MySql are running. Thank you.
1:43 pm on Mar 30, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 15, 2004
posts:941
votes: 0


<?php include("quoteform") ?> OR <?php include("quoteform.php") ?>?
1:59 pm on Mar 30, 2012 (gmt 0)

New User

joined:Mar 30, 2012
posts: 6
votes: 0


Sorry, my code is <?php include("quoteform.php") ?>

It finds the file, but only in design view. Generally, this should work in browser preview (local host) too, shouldn't it?
2:12 pm on Mar 30, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Do you have PHP installed correctly? How have you verified this?
2:30 pm on Mar 30, 2012 (gmt 0)

New User

joined:Mar 30, 2012
posts: 6
votes: 0


Well, I guess I haven't verified that PHP is installed correctly, since I thought that Apache running and MySql running on the xampp control panel were the proof. If there's another check I should run, perhaps you could direct me to a site that describes it.

I did have to change to port 91 (from port 80) to get Apache to run. I have Windows 7 64-bit, which I think can be problematic for xampp. Thank you for your thoughts.
2:48 pm on Mar 30, 2012 (gmt 0)

New User

joined:Mar 30, 2012
posts: 6
votes: 0


OK, I created a new php page containing only <?php phpinfo(); ?>

When I look at it in the browser, it just shows me what I typed in. So it seems not to be working. Any suggestions would be appreciated!
2:51 pm on Mar 30, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


hmm, try including the following at the top of the main script:


error_reporting(E_ALL);


This should give you errors if there are any. Take note if you are seeing any php code as text in the browser (a sign that php isn't being processed correctly.)

Also, make sure you are including the port number when browser from the web browser (e.g, [localhost:91...]
2:52 pm on Mar 30, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Just read your new post:

Check your Apache configuration file for the following line (or something very similar):


AddType application/x-httpd-php .php


Additionally, are you giving these files a ".php" extension?
3:13 pm on Mar 30, 2012 (gmt 0)

Senior Member from FR 

WebmasterWorld Senior Member leosghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Feb 15, 2004
posts:6717
votes: 230


I run xampp on a win7 64 ulti config on a dev machine ( I don't let win "anything" connect to the outside except for "testing" ) ..never had any problems ..never had to reconfig away from port 80.
4:50 pm on Mar 30, 2012 (gmt 0)

New User

joined:Mar 30, 2012
posts: 6
votes: 0


Thanks, all, I have resolved this. The php-cgi file wasn't figured correctly but now it is. Thank you!
6:20 pm on Mar 30, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Great, glad you were able to resolve it! :)
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members