Why [unixODBC][Driver Manager] doesn't see sqlanywhere12 library in /opt if path in php exists

33 views Asked by At

I do setting for odbcinst.ini in etc:

[Sybase12] 

Description=SQL Anywhere 12 

Driver=/opt/sqlanywhere12/lib64/libdbodbc12.so 

Setup=/opt/sqlanywhere12/lib64/libdbodbc12.so 

UsageCount=1 

TDS_Version = 5
I do setting for odbc.init in etc:

[asvioDB]

info for connect to DB

Driver=Sybase12

Download zip file with sqlanywhere and drug and drop to opt folder in WSL with chmod 777 and after this do chmod 777 for opt folder but fith flag -R.

Do default setting for apache with SetEnv:

`<VirtualHost *:80> ServerName projectName

DocumentRoot /var/www/html/projectName

SetEnv LD_LIBRARY_PATH /opt/sqlanywhere12/lib64:/opt/sqlanywhere12/lib32 SetEnv ODBCINI /etc/odbc.ini SetEnv SQLANY12 /opt/sqlanywhere12

<Directory /var/www/html/projectName>
    DirectoryIndex index.php
    Require all granted

</Directory>

ErrorLog ${APACHE_LOG_DIR}/project_error.log
CustomLog ${APACHE_LOG_DIR}/project_access.log combined

`

After this enable my config and disable default 000-congif and restart apache2. add to file some text for export in etc in apache 2 in envvars

export LD_LIBRARY_PATH=:/opt/sqlanywhere12/lib64:/opt/sqlanywhere12/lib32: 

export SQLANY12=/opt/sqlanywhere12 

export ODBCINI=/etc/odbc.ini

sudo nano /ect/apache2/apache2.conf in direction /var/www add permission AllowOverride All

sudo nano to etc to hosts and write 127.0.0.1 project name and change in yii2 project config files

0

There are 0 answers