Reply to Re: Problem using Metabase

Your name:

Reply:


Posted by Manuel Lemos on 08/17/05 17:19

Hello,

on 08/16/2005 10:17 PM Pablo Gosse said the following:
> [snip]
> I suspect that the problem is with file permissions. I recall that since
>
> Metabase uses include to load class files, the script will not exit when
>
> it fails to include a PHP class file. Assuming that is the case, make
> sure that all Metabase class files are readable by your Web server user.
> [/snip]
>
> The permissions seem fine. However, I've discovered something else.
>
> I was able to use Metabase without any trouble on a linux server to
> access a Postgres database. I then removed the call to
> MetabaseSetDatabase and changed the drive to odbc-msaccess, and the
> errors returned. Changed it back to pgsql or mysql and the errors go
> away.
>
> I just now tried this on the IIS box and got the same results. If I
> specify postgres I get an error telling me that postgres is not enabled
> in that php implementation, and if I specify mysql it works fine. If I
> change it back to odbc-msaccess, the errors are there.
>
> So, the error message I get is only triggered when I specify Access as
> the database.
>
> Does this provide any further insight?

Not really but I looked again at your error message and sample script
and realized a few things that seem to be the problem.

Your error message said:

Fatal error: Class metabase_manager_odbc_class: Cannot inherit from
undefined class metabase_manager_database_class in
C:\Inetpub\wwwroot\etrakFE\classes\metabase\metabase_odbc.php on line 13

There is no class definition on line 13 of metabase_odbc.php . That
definition is in manager_odbc.php. So I wonder if you did not typed the
error message with inadverted changes.

In your example you call SetDatabase. That does not make Metabase load
the ODBC driver schema manager extension. I suspect that you meant
CreateDatabase. That would trigger the extension class loading and
eventual errors.

If you are sure permissions are ok, the only other possibility to make
the class loading include fail is incorrect include path. I suspect you
need to specify absolute path to make it work. What is your include path
in php.ini?

Anyway, I changed Metabase base class to make it gracefully fail (not
make PHP exit with a fatal error) if any of the extension include files
does not load properly for some reason.

Please try the updated version getting it from CVS or a current snapshot
that you can download from here:

http://www.meta-language.net/download.html#snapshots

Metabase is inside the archive:

http://www.meta-language.net/download/metal-cvs.zip

or

http://www.meta-language.net/download/metal-cvs.tar.gz

Once you use this version your script should no longer exit with a fatal
error. It should fail but a call to $db->Error() should return a
meaningful error message.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация