Re: [gnome-db] libgda + apache problem



On Tue, 2003-06-03 at 16:50, Carlos Perelló Marín wrote:
> > 
> > I am using libgda  and gnu cgicc to create a CGI in C++.
> > 
> >  
> > 
> > I have a DSN created via
> > 
> > “
> > 
> >   gda_config_save_data_source ("mycmsdb", "PostgreSQL",
> > "DATABASE=webdb",
> > 
> >                                   "CMS System Database", "root",
> > NULL);
> > 
> > “
> > 
> > I can see this DSN under Root’s Home directory. ( ~/.libgda/config
> > file)
> >  
> > 
> > When I call this CGI on command prompt, It can access the database &
> > everything works fine!
> > 
> > But when I call it (CGI) from Apache, it can’t access the same
> > database!
> 
> 
> Because the apache user (www-data or nobody) does not have the
> ~/.libgda/config remember that libgda looks for the file inside the HOME
> of the user that executes the application.
> 
exactly. You could create the data source in the www-data's $HOME, or,
even better, use the $prefix/etc/libgda/config file to create a
system-wide data source, as the "Default" one is.

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]