what happens if you try to go directly to that URL via your browser?

http://directory.local.test/director...ame=testuser

    It works, however I just get a blank page.

      I wonder if it timing out. Is this your test env.?

      Can you give the following a try:

      
      // in place of
      // $str = file_get_contents($url);  
      // use the code below $opts = array('http'=>array('header' => "User-Agent:Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1\r\n")); $context = stream_context_create($opts); $str = file_get_contents($url,false,$context);

        Yes this is in the test env, just tried that code and got the same error.

          I don't know if this will get you any further but you might want to try and urlencode() your URL. I'm not sure if that's the full path or not your showing here but it could be possible that you have spaces or special character in the path.

          
          $str = file_get_contents(urlencode($url));   
          
          

          Has anything else changed in your test env. or did you this just stop working?

            Nothing changed, it was working perfectly and then it just stopped. I have this in a test env and in production, code is the same and they both do the same thing... makes no sense. Everything else works fine, it pulls up the info in AD if I comment out that line, it just does not do the group permissions lookup. I have tested LDAP and that works fine as well. Not sure if there is another way around this, but like I said I am not a dev so would have no idea on where to start.

              At this point I can only think of trying cURL in place of file_get_contents(), make sure permissions are in fact correct and check to see if there is an .htaccess file that is possibly causing an issue. If there is an .htaccess file in the directory try naming it test.htaccess and see what happens.

              The fact that you can access the page w/o apache crashing via the browser window is what makes me think there is a permissions error.

              Sorry I couldn't help resolve the issue - seems odd that it would just fail w/o any changes.

              Hopefully someone else on here will offer some insight.

                gavinr98 wrote:

                It works, however I just get a blank page.

                Well, keep in mind that it's the REQUESTED resource, not the REQUESTING resource, that's creating the 500 error. Does the log show anything different for any other pages?

                Do you have a CLI environment you can use? Try "php -l $file" where $file is the name of every file named by a require(), or an include(), on your start.php script PLUS any that are included or required ... and any that are included and/or required from those ... etc.

                  I ran that command from the CLI and it says that there are no syntax errors detected, I ran the command for all the files mentioned above.

                    gavinr98 wrote:

                    The code was working fine and then all of a sudden it stopped and keeps crashing the Apache web server every time someone tries to login to the site.

                    Well, that never happens in isolation. Something on the system was changed between its working and its failing - most likely on the server hosting "directory.local.test" because that's the one that's now failing to serve what it had been serving before.

                      I have it running on 2 different servers, one in a test env and one in production. Both of them broke at the same time, this is why I am so confused. I have checked the Active Directory permissions and they are fine and I do not have any problems updating a users profile through the site (we can add a picture to the users profile and that updates fine) the site will work if I remove the line that is throwing the error, the only problem is we lose all the security on the site and have to manually change the code to allow us to make any changes to the directory. It makes no sense at all... that's why I reached out to this forum, I am at a loss. The strange thing is I have tried this on both Apache and IIS and have the same problem so I know its not Apache. I thought that it may have been Active Directory permissions but I can modify AD and the AD plugin through wordpress authenticates fine..its just the group membership lookup that seems to have broken.

                        Did you check for an .htaccess file?

                          yes I do have one, when I renamed it the site would not work. This is what is in the file.

                          BEGIN WordPress

                          <IfModule mod_rewrite.c>
                          RewriteEngine On
                          RewriteBase /
                          RewriteRule index.php$ - [L]
                          RewriteCond %{REQUEST_FILENAME} !-f
                          RewriteCond %{REQUEST_FILENAME} !-d
                          RewriteRule . /index.php [L]
                          </IfModule>

                          END WordPress

                            gavinr98;11020887 wrote:

                            yes I do have one, when I renamed it the site would not work.

                            Yes, do not do that, otherwise pages in a WordPress installation will no longer load, unless you set the permalinks to the default setting.

                            That .htaccess file is standard for any WordPress installation, just FYI.

                              Write a Reply...