Welcome to WebmasterWorld Guest from 54.160.163.163

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.

     

Patriot

3:49 am on Mar 30, 2012 (gmt 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.

lucy24

5:50 am on Mar 30, 2012 (gmt 0)

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



Is this on a live site-- or local equivalent-- or on your own computer?

Patriot

1:25 pm on Mar 30, 2012 (gmt 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.

omoutop

1:43 pm on Mar 30, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<?php include("quoteform") ?> OR <?php include("quoteform.php") ?>?

Patriot

1:59 pm on Mar 30, 2012 (gmt 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?

eelixduppy

2:12 pm on Mar 30, 2012 (gmt 0)

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



Do you have PHP installed correctly? How have you verified this?

Patriot

2:30 pm on Mar 30, 2012 (gmt 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.

Patriot

2:48 pm on Mar 30, 2012 (gmt 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!

eelixduppy

2:51 pm on Mar 30, 2012 (gmt 0)

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



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...]

eelixduppy

2:52 pm on Mar 30, 2012 (gmt 0)

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



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?

Leosghost

3:13 pm on Mar 30, 2012 (gmt 0)

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



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.

Patriot

4:50 pm on Mar 30, 2012 (gmt 0)



Thanks, all, I have resolved this. The php-cgi file wasn't figured correctly but now it is. Thank you!

eelixduppy

6:20 pm on Mar 30, 2012 (gmt 0)

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



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

Featured Threads

Hot Threads This Week

Hot Threads This Month