title: Where to put odbc.ini on OpenBSD for php served up with chrooted httpd?
body: <p>Where is the correct location to put the odbc.ini file which holds the DSNs when using OpenBSD 4.9 with their chrooted httpd?  I'm trying to use the DSN through php but I keep getting this error:</p>
  
  <p>[iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded, SQLSTATE=IM002</p>
  
  <p>Here's what I know:</p>
  
  <ul>
  <li>This is iodbc (www.iodbc.org) and not unixODBC.</li>
  <li>I have python and pyodbc installed and I can use the currently defined DSNs in /etc/iodbc/odbc.ini with a little python test script to hit tables in my sql server database so I know iodbc itself is configured and working.</li>
  <li>I have successfully tested the defined DSNs using the iodbcadm-gtk graphical client and the iodbctest utility.</li>
  <li>php is working because I can get phpinfo() to show in a browser and the usual config and build info renders properly. </li>
  <li>Usually when you use the chrooted stuff on OpenBSD you need to create versions of the normal files like /etc/hosts and put copies of them in /var/www/etc/ to make things work normally.  I've tried to put a copy of the odbc.ini there and no such luck.  I've tried pretty much everyplace else I could think of including setting ODBCINI as an environmental variable to point to it w/o success.</li>
  <li>There is also /var/www/conf/php5/odbc.ini which contains no DSN information and appears to be a php configuration file. I tried replacing this with /etc/iodbc/odbc.ini and this did not work.</li>
  </ul>
  
  <p>Everything seems to point to the chrooted setup needing a properly placed odbc.ini but I'm at a loss for where it goes or what I'm missing.</p>
  
  <p>Anyone happen to get php and iodbc working properly in a chrooted default OpenBSD 4.9 setup?  I'd be grateful for any info on where the odbc.ini goes or a push in the right direction for what to try next. </p>