0

I am trying to integrate Phpgrid with laravel 4. I tried putting it in the vendor module and did composer dump-autload, but it is throwing errors. I also tried putting phpgrid folder in the library and then autoload it, but nothing seems to be working. I keep getting this PHP Fatal error: Could not convert the script from the detected encoding "UTF-8" to a compatible encoding in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php on line 118 error when i do composer dump-autoload. Can somebody let me know the steps. I browsed for resources, looks like not much resources are available about this kind of integration.

thanks in advance.

0

1 Answer 1

3

This help me: setting up phpChart in laravel phpGrid should work the same way. Basically you need to make sure the SERVER_ROOT path is set correctly.

If you are not sure, you can use the following script. It generates the correct corresponding SERVER_ROOT value based on your current executing script.

define('SERVER_ROOT', str_replace(str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT'])),'', str_replace('\\', '/',dirname(__FILE__))));
Sign up to request clarification or add additional context in comments.

1 Comment

There you go. Official from phpGrid: phpgrid.com/example/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.