Jump to content

install highchartsphp in cakephp windows


jagguy

Recommended Posts

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"
    }
    
    
}
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by jagguy
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.