Ty44ler Posted July 24, 2009 Share Posted July 24, 2009 I'm setting up a store for our employees on our intranet on sharepoint. All my pages are php and work fine, but php include() does not work. I have taken the folder outside of the network and ran it and it works fine. Here's me code... <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>H.A. Sack Co., Inc. Store</title> <script type="text/javascript" src="iepngfix_tilebg.js"></script> <script type="text/javascript" src="scripts/jquery-1.2.1.min.js"></script> <script type="text/javascript" src="scripts/menu.js"></script> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <style type="text/css"> .ie6_png {behavior: url("iepngfix.htc") } .ie6_png img {behavior: url("iepngfix.htc") } .ie6_png input {behavior: url("iepngfix.htc") } .style1 { font-family: arial; font-weight: bold; font-size: 12px; color: #5A5353; text-transform: uppercase; } </style> </head> <body> <!-- header //--> <!-- start --> <table cellpadding="0" cellspacing="0" border="0" align="center" class="bg_main"> <tr><td class="bg2_main"> <table cellpadding="0" cellspacing="0" border="0" align="center" class="bg3_main"> <tr><td> <table cellpadding="0" cellspacing="0" border="0"> <tr><td class="head2"> </td></tr> <tr><td class="banner"> </td></tr> </table> </td></tr> <tr><td class="cont_padd"> <!-- end --> <!-- start --> <!-- end --><!-- header_eof //--> <!-- body //--> <table border="0" class="main_table" cellspacing="0" cellpadding="0"> <tr> <td class="box_width_td_left"><table border="0" class="box_width_left" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <!-- categories //--> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxHeading2_table"> <tr> <td class="infoBoxHeading2_l"> <img src="images/corner_top2_left.gif" border="0" alt="" width="5" height="5"></td> <td class="infoBoxHeading2_td">Categories</td> <td class="infoBoxHeading2_r"> <img src="images/corner_top2_right.gif" border="0" alt="" width="5" height="5"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox2_table"> <tr> <td class="infoBox2_td"><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContents2_table"> <tr> <td class="box_left2"> <img src="images/box_left2.gif" border="0" alt="" width="5" height="5"></td> <td class="boxText"> [color=yellow] [size=2]<?php include("storenav.php")?>[/size][/color] <td class="box_right2"> <img src="images/box_right2.gif" border="0" alt="" width="5" height="5"></td> </tr> </table> </td> </tr> </table> </td> </tr> <!-- categories_eof //--> <!-- specials //--> <tr> <td> </td> </tr> <!-- specials_eof //--> <!-- best_sellers //--> <tr> <td valign="top"> </td> </tr> <!-- best_sellers_eof //--> <!-- left_navigation_eof //--> </table></td> Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/ Share on other sites More sharing options...
ldougherty Posted July 24, 2009 Share Posted July 24, 2009 When you say it doesn't work what exactly does it do? Does it write the line as text? Does it write the PHP code as text? Does it do nothing at all? If it does nothing then try looking at your error logs or turning display errors on via your code so you can see what is happening. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882142 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 What's the error message? Is the file found or not? Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882143 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 I looked at the source code on the resulting page when on the intranet and the php line still reads: <?php include("storenav.php") ?> It doesn't place the code within storenav.php into the page. There is no error message or anything, nothing shows up where it should be. Nothing shows up within the resulting page where it should be. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882146 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 Have you saved the above file with a .php extension? What happens when you run the php file directly? Are you able to run other php files on the intranet? Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882157 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 Everything is saved as a php file. The main page works fine. It's all written in html except for the php include piece of code. I assume it is able to run php files as the main page is saved as .php and it shows up fine except for the php include(); Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882165 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 Have you saved the above file with a .php extension? What happens when you run the php file directly? Are you able to run other php files on the intranet? I ran the storenav.php file directly and it works fine. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882170 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 What are these things that surround the include? [color=yellow] [size=2] [/size][/color] Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882173 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 Oh, that's from when I put it on the forum. I thought I made it yellow and bigger to highlight it, but I guess the forum didnt read it right and left the code in there. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882174 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 Too quick, modified Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882175 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 Tried removing those? Those aren't in my actual code, the forum put those in there when I clicked on the font and color buttons when posting the actual code. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882176 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 Try running a php file with just the following: <?php include "storenav.php"; ?> and nothing else. Also, turn on all error reporting so that you can see what is going wrong. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882179 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 Try running a php file with just the following: <?php include "storenav.php"; ?> and nothing else. Also, turn on all error reporting so that you can see what is going wrong. Dialog box pops up and says what would you like to do with this file open or save? Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882184 Share on other sites More sharing options...
vineld Posted July 24, 2009 Share Posted July 24, 2009 It sounds as if php is not running or not running properly on your machine. Are you sure you are able to run other php files? Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882192 Share on other sites More sharing options...
kenrbnsn Posted July 24, 2009 Share Posted July 24, 2009 If you're getting a dialog box, then you didn't give the test file a ".php" extension. For PHP to work the files must have a ".php" extension or your web server has to be configured to pass all files through the php interpreter. Ken Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882194 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 I gave the test file a .php extension, the dialog box says what would you like to do with this php file... Now that you say it, the server may not be configured right. The only reason I say that php works is because because when I open up my index.php page on our intranet it shows up and runs fine. The only thing is that the phpinclude() doesnt work... Here's two screenshots. One is the index.php that is placed on the internet with phpinclude() working properly and the other is the one on the intranet without it working properly. Both files are named index.php. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882211 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 I'm not sure how much this means, but it's running through sharepoint. Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882215 Share on other sites More sharing options...
Ty44ler Posted July 24, 2009 Author Share Posted July 24, 2009 Also, the two are placed on different servers. After doing some research I have the feeling that php is not installed on our intranet server.... Anyone think the same thing? Link to comment https://forums.phpfreaks.com/topic/167304-phpinclude-works-on-internet-but-not-intranet/#findComment-882226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.