Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with require('./wp-blog-header.php');  The  ./  is throwing a 500 error message.

Posted on 2010-08-27
5
Medium Priority
?
611 Views
Last Modified: 2013-12-13
Problem with require('./wp-blog-header.php');  The  ./  is throwing a 500 error message.

I am running on a Windows 2008 server, 64 bit, with IIS7.

You can see my php info at    http://www.greatersba.org/php-info.php

I have a Wordpress installation, that I discovered this issue in.  But the problem doesn't seem to be a Wordpress issue, it seems to be more of a PHP on Windows issue.

For some reason, in the information I found (when looking around) the use of    ./   is supposed to tell PHP to look in the "currrent folder" for the file that is being called, as in require('./wp-blog-header.php');  

But, with the  ./  in front, I always get a 500 error.  Even if I put just a  /   I get a 500 error.

I would like to fix this if possible so it would work normally, but since I am on a Windows 2008 server with IIS7 .. I am not sure how to get this to work properly.  Most of what I see on the net refers to Linux servers.

Can someone explain why it's not working properly on my Windows server .. and what I might be able to do or change (somewhere) so this will work (without my having to remove the    ./   in front of the file name??

Thanks,
Gary
0
Comment
Question by:njcuwebsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 12

Accepted Solution

by:
Gary Dewrell earned 2000 total points
ID: 33543294
On a windows install I do not believe you need the ./ or the / just:

require('wp-blog-header.php');

I will have to connect and look at one of mine but I am out of the office right now. Give that a try though and let me know.

0
 

Author Comment

by:njcuwebsupport
ID: 33543939
I guess, what I'm trying to also figure out is .. can I do anything on my windows server, change something, etc., so if code is written this way, that it would just work (even though the Windows server "may not need it".  It took me forever to debug that this was the problem and I'd simply like to have my Windows server set up in a way that this type of coding in PHP wouldn't throw a 500 internal server error.

Let me know.
Gary
0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 33545422
There are a couple of possibilities in this thread that you should look into.  People with the same issue of relative paths work in subdirectory but not in root, and they are all using iis7 with php applications.

http://www.webmasterworld.com/php/3685216.htm

1. I'm not sure if this only applies to ASP/SSI, but IIS6 (not sure about 7) does have a "parent paths" option. If you select your websites and go to the Scripts Configuration menu, under the options tab "Enable Parent paths" is an option.
2.  I ran into this problem, too; giving the anonymous IIS user permissions to the parent directory fixed it.
0
 

Author Closing Comment

by:njcuwebsupport
ID: 33545465
Thanks again!
0
 

Author Comment

by:njcuwebsupport
ID: 33545493
jrm213jrm213

Please see the new posting I just put up.

Sorry, I clicked to fast and applied the points to the wrong person.

Just resubmit your answer again.

:(
Gary
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question