title: PHP __atuoload function not working on Linux (developed on Windows)
body: <p>I have a small database application which uses a custom class to connect to a database using <code>PDO</code>.</p>
  
  <p>This application was developed on xampp, then I loaded it up to a Linux server where it worked fine. I then made a local Windows copy and reworked some things.</p>
  
  <p>Now the database isn't connecting and I think it is because the autoload fucntion in php is not working.</p>
  
  <p>The function changed from loading a few php files to loading a directory full of classes. I don't have the original functions, but it currently looks like this:</p>
  
  <pre><code>function __autoload($class_name) {
      $filename = 'classes/' . str_replace('_', DIRECTORY_SEPARATOR, strtolower($class_name)).'.php';
      include $filename;
  };
  </code></pre>
  
  <p>Everything works fine until I loaded it into my Ubuntu server. I can no longer access the class to connect to the database. I assume it has something to do with directory names but I am inexperienced on Linux. Is this not pointing to anything?</p>