Hi Steve,

It looks like this is a problem related to the ODBC configuration because __virt_internal_dsn() is also failing to connect for a Drupal install. I'm wondering if I need to compile virtuoso with the --with-iodbc=/usr/local/iODBC flag? I thought having the iODBC environment variable ODBCINI pointing at an odbc.ini with a [Local Virtuoso] DSN would be enough.

You do not need to compile VOS with --with-iodbc since the connect problem you get is in the php hosting code, so as long as you build PHP with iodbc (or any other odbc compliant driver manager) you should be ok.

Yes, if you need an odbc.ini and have a ODBCINI environment variable that points to it, or in case you have iODBC you can can check what system odbc.ini it is configured with:

        $ iodbc-config --odbcini
        /etc/odbc.ini

        
The default DSN should look something like this:

        [Local Virtuoso]
        Driver  = /full/path/to/lib/virtodbc_r.so
        Address = localhost:1111

or if you have registered your driver in odbcinst.ini you can use something like:

        [Local Virtuoso]
        Driver  = Openlink Virtuoso
        Address = localhost:1111

You can also enable tracing by adding the following lines to your odbc.ini:

        [ODBC]
        TraceFile       = /tmp/iodbc-$u-$t.log
        Trace           = 1

If you are logged in as guest, this will create files like:

        /tmp/iodbc-guest-20090324-134352.log

so each ODBC interaction your PHP application does, will be logged in a separate file.


You can use the iodbctest program to verify this DSN:

        $ iodbctest "DSN=Local Virtuoso;UID=dba;PWD=dba"
        iODBC Demonstration program
        This program shows an interactive SQL processor
        Driver Manager: 03.52.0607.1008
        Driver: 05.08.3034 OpenLink Virtuoso ODBC Driver (virtodbc.so)

        SQL>

You can use the "tables" command (without quotes) to get a list of tables, or any other valid sql statement.



Perhaps someone can clarify how odbc should be configured for __virt_internal_dsn() to work? I'm mostly going off the iodbc.org <http://iodbc.org> docs and realizing there is nothing definitive about this in the VOS docs.

I am currently working on getting this part of the documentation updated.

Basically there are a couple of entries you can add to your php.ini file which add some extra functionality to the hosting_php.so code:

        [Virtuoso]
        virtuoso.logging = On
        virtuoso.local_dsn = Local Virtuoso
        virtuoso.allow_dba = 0

The virtuoso.logging setting controls passing log messages from php code into the virtuoso.log file.

The virtuoso.local_dsn setting allows you to use another DSN name for local connections. The value should correspond to a section in the odbc.ini file.

When an application uses __virt_internal_dsn, it will try to use the UID and PWD from the user that owns the /XXX virtual dir. In case of WordPress, the installation creates a user called "wordpress" that owns all the tables, indexes etc including the /WordPress virtual directory. The __virt_internal_connect will return the following DSN to the PHP code which can subsequently be fed into the odbc_connect function:

        DSN=Local Virtuoso;UID=wordpress;PWD=XXXXX

Finally, the virtuoso.allow_dba disables the use of the DBA (or DAV) user to be used in __virt_internal_connect resulting in the error message you got:

        Security settings prohibit internal connections as Virtuoso
        user 'dba' in ........

There are other error messags in case the user does not have SQL capabilities etc.

        
So back to your installation. Did you change your dba password to something else. In that case you may need to edit a file before you can install the package as outlined in

http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/OdsIntegrationWordPress

   Configuration:

   1. In case you want to change the dba password, you need to locate
      the file below in your FS and change the $wgDBpassword value:


      vsp/vad/vsp/wordpress/wp-config.php


You also may want to add the [virtuoso] section as explained above into your own php.ini.


You can also create a little php script in your vsp directory:

info.php

        <?php  phpinfo(); ?>


This allows you do browse to:

        http://localhost:8890/info.php

and get a full overview of all the settings that php currently has.


If this does not resolve your problems, please email your php.ini, odbc.ini and virtuoso.ini to vos.ad...@openlinksw.com so i can assist you privately.


Best regards,

Patrick
On Sat, Mar 21, 2009 at 8:00 PM, Steve Judkins <steve.judk...@gmail.com <mailto:steve.judk...@gmail.com>> wrote:

    ok, last question for the weekend.  I went ahead and downloaded the
    Wordpress package from:
    http://download.openlinksw.com/packages/5.0/virtuoso/
Because of a number of errors installing, I'm wondering if there is
    a newer version?

    Following these instructions:
    
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/OdsIntegrationWordPress
    The errors start when running the WordPress_rdf_views_script.sql
    file.  This file refers to a number of tables that aren't created
    yet (e.g. wp_users, wp_options, etc.).  A quick look at the
{virtuoso}/var/lib/virtuoso/vsp/vad//vsp/wordpress/sql/vadinstall.sql shows that this isn't part of the VAD package setup.

    Also, viewing http://host:port/wordpress <http://host/wordpress>,
    shows that Wordpress has a problem connecting to the database with
define('DSN', __virt_internal_dsn());.
     >From the log:
    19:16:17 PHP Warning: __virt_internal_dsn() [<a
    href='function.--virt-internal-dsn'>function.--virt-internal-dsn</a>]:
    Sc
    
/usr/local/virtuoso-opensource/var/lib/virtuoso/vsp/vad/vsp/wordpress/wp-config.php
    on line 9

    If I switch this over to define('DSN', 'Local Virtuso'), the log
errors go away but Wordpress still can't make the connection. Note: I've confirmed that PHP is running.





------------------------------------------------------------------------

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com


------------------------------------------------------------------------

_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Reply via email to