0

I get an internal server error with the following:
It is not printing anything to my PHP error log?
Not using any frameworks. I have the following document structure

DEV  
 - controllers  
    |-> user  
        -> check_email.php  
 - public_html 
    |-> routes
        |-> user
            -> check_email.php
    |-> views  
        |-> user  
            -> create.php  

base_url is set to my domain (public_html) in the head.
set_include_path is set to my document structure (DEV)

public_html/views/user/create.php

xmlhttp.open("POST","/routes/user/check_email.php",true);

public_html/routes/user/check_email.php

require_once(get_include_path()."/controllers/user/check_email.php");

If I put the controller for check_email.php in the same file folder as create.php (and modify the XMLhttp request) then it references the controller. How do I route the POST to the controller?

Kirk Powell
  • 908
  • 9
  • 14

1 Answers1

1

Is this what you're saying?

  1. POST data is being sent to /routes/user/check_email.php
  2. /routes/user/check_email.php requires /controllers/user/check_email.php
  3. You want to access the POST data from the controller.

That's probably not what you're saying, because if it is, the answer seems too simple (the required file has access to the $_POST superglobal).

Edit to reflect edited question: to diagnose 500 internal server errors, follow: https://stackoverflow.com/a/20511956/897059

Community
  • 1
  • 1
Richard EB
  • 967
  • 10
  • 24
  • 2
    Then the question you're actually asking is, "why am I getting an internal server error?". Which is answered by looking at the php error log or the web server error log. – Richard EB Apr 28 '16 at 15:40
  • Good point. I updated my question. The php error log doesn't get a message. – Kirk Powell Apr 28 '16 at 15:51
  • Awesome! It was in the Apache logs. A duplicate function name ... grr. If you want to "answer" the question I'll mark it for the points. Thanks for helping me!! – Kirk Powell Apr 29 '16 at 17:19