Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > I hear you.

I hear you.
Thread Tools
Mac Enthusiast
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 29, 2005, 07:56 PM
 
I think I have pinpointed the problem to a php conflict of some sort. My html file works fine until I try to apply the protection scheme to it (which uses php). When I do that, my included files are no longer there.

I'll post some snippets of code- and if it helps, I'll give you access to the site so you can help me diagnose- I'd really appreciate it. Here's some code for starters:

Here's some code from my main file:

Beginning: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/kjoc_maincontent.dwt.php" codeOutsideHTMLIsLocked="false" --><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>

Middle (where the first include resides: </head>

<body>
<p><br>
</p>
<center><?php include("kjoc_navbar.inc.php"); ?></center><br>
<table width="852" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="664" scope="row"></th>
<td width="108" height="30" valign="top"><div align="center" class="style3">Home</div></td>
<td width="108" valign="top"><div align="center" class="style3"><a href="http://www.podopedia.com/chat/">Forum</a></div></td>
<td width="80" valign="top"><div align="center" class="style3"><a href="http://www.podopedia.com/chat/" class="style4">Logout</a></div></td>
</tr>
</table>

Here is some code from my included file, from the very beginning:
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.len gth) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.l ength;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;

and here is some code from the php file that applies protection to this directory:

<?php
/*
SPECIAL NOTE: If you are viewing this through a 3rd party editor
and not through ftp, you might not be able to see the corresponding
.htaccess file in this directory (viewable through ftp)

The require and protect code below will properly load the
PHP Guard Dog protection on a fictional website with the
directory structure below. Please visit the help section to
get your actual protection code.

The directory structure containing these two pre-made files:
special_login.php
.htaccess
will protect ALL files within this directory.

If you want to disable all possible redirects, uncomment the line below (take out
the //). This will disable all user and group redirects.
*/
//$guard_noredirect="NOREDIRECT";
$guard_actionoverwrite=$_GET['thefile'];

/*
Edit the require code below to contain your specific connection code. Do not
re-include the <?php and ?> in the output, as we already have them at the top
and bottom of this file for you.
*/

require_once('/home/podopedi/public_html/phpgdv30/guard.php');
protect("","kjoc");


Sorry for all the code above. I hope it helps- I certainly appreciate any time you put into this.

Again, I'd be happy to provide you access with the actual pages.

Thanks again.
     
Mac Enthusiast
Join Date: Jul 2003
Status: Offline
Reply With Quote
Aug 29, 2005, 11:03 PM
 
sorry, this belongs in the php craziness thread
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:27 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2