FrancescoBorzi / TC-JSON-API

Mock example of a TrinityCore RESTful API
GNU Affero General Public License v3.0
42 stars 32 forks source link

Error accessing #7

Closed KaraLegal closed 9 years ago

KaraLegal commented 9 years ago

when I type the address in the browser the following error appears:

Parse error: syntax error, unexpected '[' in /home/u748536103/public_html/truice/TC-JSON-API/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 49

Could you help me with this?

FrancescoBorzi commented 9 years ago

Did you install the latest stable version (0.5) or downloaded it from sources? which resource were you trying to retrieve?

Helias commented 9 years ago

Did you install the project with "composer" ?

Try to re-download the project, check if php mcrypt is installed set the permission of the directory "storage" and subdirectory to 755

KaraLegal commented 9 years ago

Hello friends

I'm back here by trying to run the Keria but every time I try I get the following error:

Remembering'm using:

Ubuntu Server 4.14 32-bit Apache2, PHP5 and MySQL Last correction Keria

My mistake and that:

ERROR: API not found, please edit your config.js file and Set the path of your TrinityCore JSON API istance.

Already configured the .env and also the database manually

Helias commented 9 years ago

It seems that Keira can't find the API directory, try to set the right permissions (755) to the directory TC-JSON-API and the right path in Keira2/config.js

KaraLegal commented 9 years ago

Friend looking at the error log show me this

[2015-09-04 21:17:20] production.ERROR: exception 'ErrorException' with message 'Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128'' in /var/www/Keria2/TC-JSON-API/vendor/compiled.php:6621 Stack trace:

0 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(6621): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Use of undefine...', '/var/www/Keria2...', 6621, Array)

1 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1027): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption{closure}(Object(Illuminate\Foundation\Application), Array)

2 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(980): Illuminate\Container\Container->build(Object(Closure), Array)

3 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1501): Illuminate\Container\Container->make('encrypter', Array)

4 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1072): Illuminate\Foundation\Application->make('Illuminate\Cont...')

5 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1056): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))

6 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1042): Illuminate\Container\Container->getDependencies(Array, Array)

7 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(980): Illuminate\Container\Container->build('Illuminate\Cook...', Array)

8 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1501): Illuminate\Container\Container->make('Illuminate\Cook...', Array)

9 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(9045): Illuminate\Foundation\Application->make('Illuminate\Cook...')

10 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(2532): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

11 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(9045): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))

12 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

13 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(9036): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

14 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1945): Illuminate\Pipeline\Pipeline->then(Object(Closure))

15 /var/www/Keria2/TC-JSON-API/vendor/compiled.php(1932): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

16 /var/www/Keria2/TC-JSON-API/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

17 {main}

[2015-09-04 21:17:20] production.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined function Illuminate\Encryption\mcrypt_get_iv_size()' in /var/www/Keria2/TC-JSON-API/vendor/compiled.php:12030 Stack trace:

0 {main}

FrancescoBorzi commented 9 years ago

You are missing MCRYPT which is required, install and enable MCRYPT in your system and try again

KaraLegal commented 9 years ago

Friend followed a tip I found on the internet and it seems q worked here

https://laracasts.com/discuss/channels/general-discussion/laravel5-new-install-mcrypt-rijndael-128-notice

FrancescoBorzi commented 9 years ago

As I said, you were missing the mcrypt library :)

Did you resolve then?

KaraLegal commented 9 years ago

Yes friend decided and thank you for your attention.

KaraLegal commented 9 years ago

Sorry my English and I'm using google translator

FrancescoBorzi commented 9 years ago

Don't worry, feel free to ask if you need something ;)

leolion84 commented 7 years ago

Hi guys, I install TC_JSON_API on xampp and get this error on log. I'm newbie, someone help me please.

[2017-07-14 05:19:07] production.ERROR: ErrorException: Function mcrypt_get_iv_size() is deprecated in C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php:12241 Stack trace:

0 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(12241): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8192, 'Function mcrypt...', 'C:\xampp\htdocs...', 12241, Array)

1 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(12232): Illuminate\Encryption\Encrypter->updateBlockSize()

2 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(6796): Illuminate\Encryption\Encrypter->setCipher('rijndael-128')

3 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1066): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption{closure}(Object(Illuminate\Foundation\Application), Array)

4 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1019): Illuminate\Container\Container->build(Object(Closure), Array)

5 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1543): Illuminate\Container\Container->make('encrypter', Array)

6 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1111): Illuminate\Foundation\Application->make('encrypter')

7 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1095): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))

8 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1081): Illuminate\Container\Container->getDependencies(Array, Array)

9 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1019): Illuminate\Container\Container->build('Illuminate\Cook...', Array)

10 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(1543): Illuminate\Container\Container->make('Illuminate\Cook...', Array)

11 C:\xampp\htdocs\TC-JSON-API\vendor\compiled.php(2002): Illuminate\Foundation\Application->make('Illuminate\Cook...')

12 C:\xampp\htdocs\TC-JSON-API\public\index.php(60): Illuminate\Foundation\Http\Kernel->terminate(Object(Illuminate\Http\Request), Object(Symfony\Component\HttpFoundation\Response))

13 {main}