jagguy Posted June 25, 2014 Share Posted June 25, 2014 Hi,I am having an awful time creating a composer.json file to install highchartsPHP for windows cakephp.I dont know how exactly to create a file.The examples I have for cakephp composer is for linux.I download the highchartsphp and I place it where?I have composer installed and I do what as version 3 doesnt require composer .https://github.com/ghunti/HighchartsPHP I place the highcharts dir where ? where I should place files to install?How do I install this EXACTLY and does this require mean I have dir called ghunti?I really need some decent how to install as this really isnt good enough . It has been 2 days since I tried to install this highchartsPHP for cakePHP. { "require": { "ghunti/highcharts-php": "~3.0" } } Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/ Share on other sites More sharing options...
trq Posted June 25, 2014 Share Posted June 25, 2014 Composer is the same on Windows as it is on Linux. Just cd into the root of your project and execute: composer require 'ghunti/highcharts-php:~3.0' Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483200 Share on other sites More sharing options...
jagguy Posted June 25, 2014 Author Share Posted June 25, 2014 Hi, No that isnt it. I just get an error as there is no name anywhere on my computer 'ghunti/highcharts-php:~3.0' composer require 'ghunti/highcharts-php:~3.0' gives an error of 'could not parse version constraint ~3.0, UnexpectedValueException I have been to 3 other forums and no one can tell me what to do yet but thanks anyway for trying. 1)I have the download called highcharts3 (dir) 2)I have the cakephp project.called cakephp5 I place the download 1) where?and how do I install it with composer Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483212 Share on other sites More sharing options...
gizmola Posted June 25, 2014 Share Posted June 25, 2014 Ummm...... go into shell. cd to the project directory. Run: composer update Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483215 Share on other sites More sharing options...
jagguy Posted June 26, 2014 Author Share Posted June 26, 2014 (edited) OK I got the json file to run in cakephp dir and now I have a few dir in a vendor dir. I got no error. . what has happened here and I have a whole lot of files I need to place where. I am am sorry but I really need a bit more explanation because I just get more bits and pieces. I place the highcharts dir in vendor? I still get a an Class 'Highchart' not found in my code so it hast worked Edited June 26, 2014 by jagguy Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483218 Share on other sites More sharing options...
trq Posted June 26, 2014 Share Posted June 26, 2014 You don't need to place anything anywhere. You need to understand what composer is. Start here: https://getcomposer.org/doc/00-intro.md, its not rocket science. composer installs any and all dependencies into the vendor directory. So whatever highcharts thing you have downloaded, you don't need it if you have just installed it via composer. Your tone suggests that it is somehow our fault that you are not understanding any of this, and frankly, I don't like it. Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483220 Share on other sites More sharing options...
jagguy Posted June 26, 2014 Author Share Posted June 26, 2014 Well I am certainly not blaming anyone here for highcharts not working. The issue is that the complete instructions to this setup doesnt exist so i am asking many forums for an answer. I have had posts that this is a simple thing to setup but that doesnt appear to be the case. If I run a cakephp script 'in a controller' with highcharts I just get a "highcharts not found error." In vendors I have the highchartsphp dir with src files and I place these files as well in highcharts. I have the files and they seem in the right dir but I cant get this to work. eg I have the correct names I am referencing App::import('Vendor', 'HighchartsPHP/Highchart');class ChartsController extends AppController{ public function index() { $chart = new Highchart(); /////////////error not found Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483223 Share on other sites More sharing options...
gizmola Posted June 26, 2014 Share Posted June 26, 2014 Now that you have the library working with composer, whatever instructions they provide for cakephp is the one that you should be following to use the wrapper library. Composer has downloaded the dependencies and generated an autoloader, but how that autoloader is used from cakephp is something I can't speak to. I see no reason that you would need to do this however: App::import('Vendor', 'HighchartsPHP/Highchart');The autoloader should already have taken care of that. I found these references that look like they provide the needed information: http://book.cakephp.org/2.0/en/installation/advanced-installation.html https://learntech.imsu.ox.ac.uk/blog/?p=926 There are some javascript framework dependencies described here: https://github.com/ghunti/HighchartsPHP -- however, that would be something you would expect to see generate a problem after the page is running ok from the php side. Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483244 Share on other sites More sharing options...
jagguy Posted June 27, 2014 Author Share Posted June 27, 2014 Hi, Thanks for the replies. There are no instructions for cakephp and windows for highcharts. To be honest I have given up on the project as this is just to complicated. I am a strong believer in KISS . The documentation isnt there. Unless someone has actually setup this themselves on windows with cakephp/highcharts we are kind of guessing? Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483263 Share on other sites More sharing options...
jagguy Posted June 27, 2014 Author Share Posted June 27, 2014 BTW thanks for the replies and all the links which I had a good look at. Quote Link to comment https://forums.phpfreaks.com/topic/289282-install-highchartsphp-in-cakephp-windows/#findComment-1483265 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.