NinoSkopac / PhpTikaWrapper

Simple PHP Wrapper for Apache Tika
60 stars 25 forks source link

Class 'Enzim\Lib\TikaWrapper\TikaWrapper' not found #6

Closed pr3da70r closed 9 years ago

pr3da70r commented 9 years ago

Hi,

I've followed the install instructions but I'm getting the following error.

root@host [660 11:52:59 /usr/lib/tika/PhpTikaWrapper/example/with-composer]# php usage.php

Fatal error: Class 'Enzim\Lib\TikaWrapper\TikaWrapper' not found in /usr/lib/tika/PhpTikaWrapper/example/with-composer/usage.php on line 17

Any suggestions on what might be wrong here?

bellecp commented 9 years ago

Have you performed $ composer install ?

It seems that the classes are not loaded. I can't think of anything else.

pr3da70r commented 9 years ago

Thanks for the quick reply. Yes I followed all the steps outlined. It's at the last step that I get the error.

git clone git@github.com:pierroweb/PhpTikaWrapper.git cd PhpTikaWrapper

cd example/with-composer curl -s http://getcomposer.org/installer | php php composer.phar install php usage.php

Any help would be truly appreciated. I'd really like to use this class for a project.

uruca commented 9 years ago

Hi, I have the same problem. Do you have resolve it?

bellecp commented 9 years ago

It seems that https://github.com/pierroweb/PhpTikaWrapper/commit/54d60e0f91b6548e1616ebbb0725bd5d0e744bd0 fixed your problem. Please comment if it is not the case

uruca commented 9 years ago

Thanks for the reply. I have always the same problem. Moreover, i have fund an other fault in the code, in " composer.json", it's { "require": { "enzim/tika-wrapper": "dev-master" } }

not { "require": { "enzim/tika-wrapper": "*" } }

uruca commented 9 years ago

The fault is not from a wrong path? error = Enzim\Lib\TikaWrapper\TikaWrapper

In my project, the true path for TikaWrapper class is "\vendor\enzim\tika-wrapper\Enzim\Lib\TikaWrapper\src\TikaWrapper.php"

uruca commented 9 years ago

I have deleted your last package and it vendor then i have downladed your new package. use composer install. And then I have always it problem

bellecp commented 9 years ago

The problem is that packagist is stuck with the old version of the code, which does not include the latest commit with the fix.

https://packagist.org/packages/enzim/tika-wrapper references b9d79e8 which is not the latest commit

bellecp commented 9 years ago

I forced the update on packagist, it should work now.

uruca commented 9 years ago

Yes i did this update before but it should not work. (dev-master)

uruca commented 9 years ago

Do you know why it didn't work?

bellecp commented 9 years ago

Packagist had not updated the package version (github is crawled once a day). The following commands provide the correct output now:

git clone git@github.com:pierroweb/PhpTikaWrapper.git
cd PhpTikaWrapper

cd example/with-composer
curl -s http://getcomposer.org/installer | php 
php composer.phar install
php usage.php
uruca commented 9 years ago

it's not PhpTikaWrapper it's PhpTikaWrapper-master now ^^

uruca commented 9 years ago

Ho very nice. It's ok. Your tutorial on tika in php is avaible. All is good. I am very happy that it works correctly. Thank you a lot for all your help :)