Results 1 to 5 of 5
  1. #1
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    PHP include not working in WP (all of a sudden)
    (Wasn't sure whether to put this in blogging or programming).

    This is really strange. I moved a site not long ago, and all of a sudden an include() is not working, but ONLY on Wordpress templates. This same include, that was not changed during the move, worked just fine beforehand. And every other include in the same template works just fine.

    The site has 3 static pages as well, the include still works on those 3 pages. I know it's not the file, and it's not the include path because it matches the same path on the static pages, and the same relative path as the other includes that work (save for the directory).

    Any reason it would just randomly stop working?

    Shawn Kerr (.com) | Disney World | SEC Football

  2. #2
    Moderator BurgerBoy's Avatar
    Join Date
    January 18th, 2005
    Location
    jacked by sylon www.sylonddos.weebly.com
    Posts
    9,618
    Did you check the include code on the page and made sure nothing changed in it?

    Vietnam Veteran 1966-1970 USASA
    ABW Forum Rules - Advertise At ABW

  3. #3
    Member
    Join Date
    January 13th, 2007
    Posts
    118
    Hi Shawn,

    Hard to know for sure without seeing, but here's a few things to look at:
    - When you moved the site, are your php.ini settings the same as at the previous host? Some standard culprits to check would be register globals and magic quotes. Depending on what the php does in the include file, these setting might be tripping you up if they are different from your last host.
    - Did you upgrade wordpress at all? I have heard of some conflicts with 3.2.x and some code.

    Unfortunately, without knowing more or seeing the site - that's all I can think of generically. My guess is going to be that if everything else remained the same, it's probably a setting in the php.ini that's different. I'm having the same problem with a snippet of php code that handles my search, and on one site it deals with apostrophe's and the other it doesn't. The only thing that is different would be the server config - so I'm going through a php.ini audit as well :-)

  4. Thanks From:

  5. #4
    Newbie
    Join Date
    August 25th, 2011
    Posts
    4
    Thread: PHP include not working in WP
    Admin files -- including wp-login.php -- suddenly "Not Found" in 2.6.2 (10 posts) ... This problem occurred as of this afternoon and I have found no other thread ... Blog is working, I can access the admin area of the sit If that file is not found, it will instead include wp-includes/theme-compa

  6. #5
    ABW Ambassador
    Join Date
    January 4th, 2006
    Location
    USA
    Posts
    2,477
    I'll check with my host. If nothing changes on your end, most likely your host has done some updates which could cause the problem.

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. PHP question - include(file.php) with variables
    By teezone in forum Programming / Datafeeds / Tools
    Replies: 8
    Last Post: September 4th, 2009, 04:54 PM
  2. PHP include bug?
    By ercole in forum GoldenCAN
    Replies: 10
    Last Post: April 27th, 2009, 03:28 PM
  3. what php include code do you use and...why?
    By Adrian in forum Programming / Datafeeds / Tools
    Replies: 23
    Last Post: February 28th, 2007, 01:03 PM
  4. php include with calendars script
    By jaynaud in forum Cusimano.com Scripts
    Replies: 1
    Last Post: April 8th, 2006, 12:27 PM
  5. How do I Include Ads in PHP
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: April 20th, 2004, 08:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •