homepage Welcome to WebmasterWorld Guest from 54.161.191.254
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Included file shows in design view but not browser
Sorry if this is dumb - I'm new to this.
Patriot




msg:4435100
 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




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

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

Patriot




msg:4435229
 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




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

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

Patriot




msg:4435242
 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




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

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

Patriot




msg:4435263
 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




msg:4435274
 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




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

eelixduppy




msg:4435277
 2:52 pm on Mar 30, 2012 (gmt 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?

Leosghost




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

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




msg:4435315
 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




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved