Guys, Web/php stuff is outta my area to say the least. I need to setup a php class called Advanced Graphing Class. It has php, font and js files that need to be made available.
How and where do I set this up to be available to any virtual host that uses it?
A link to where this is documented would be great, I have been searching obviuolsy using the wrong lingo...
Thanks! jlc
Joseph L. Casale wrote:
Guys, Web/php stuff is outta my area to say the least. I need to setup a php class called Advanced Graphing Class. It has php, font and js files that need to be made available.
How and where do I set this up to be available to any virtual host that uses it?
A link to where this is documented would be great, I have been searching obviuolsy using the wrong lingo...
Err.. software without installation documentation :/. Anyway, looks like you only need to drop files to php lib directory (look from php.ini) and then follow example..
-- Eero
Err.. software without installation documentation :/. Anyway, looks like you only need to drop files to php lib directory (look from php.ini) and then follow example..
Well that was my first try, so I tried to lookup if that lib path was recursive anyway, is it important that all files be in one directory in this path?
Thanks everyone! jlc
Well that was my first try, so I tried to lookup if that lib path was recursive anyway, is it important that all files be in one directory in this path?
That won't work because, assuming we're talking about the same class (see my prev email), the files need to be put somewhere in your website's directory structure so they can be pulled in by the calling script. I do something similar, without classes, on a website I've written. I'll have a require("./framework/helpers.php"); somewhere at the top that calls in the needed functions. The same would apply to pulling in classes.
That won't work because, assuming we're talking about the same class (see my prev email), the files need to be put somewhere in your website's directory structure so they can be pulled in by the calling script. I do something similar, without classes, on a website I've written. I'll have a require("./framework/helpers.php"); somewhere at the top that calls in the needed functions. The same would apply to pulling in classes.
Ok, now I get you:) Ultimately I am trying to get the AGC from Zack Bloom working with embedded php code in dokuwiki.
Looking at the example code:
<?php include "graph.oo.php"; $graph = new graph(); $graph->addPoint(1); $graph->addPoint(4); $graph->addPoint(5); $graph->addPoint(2); $graph->addPoint(3); $graph->graph(); $graph->showGraph("test.png"); ?> <img src="test.png">
This doesn't work, all the files are in the root of a test site. The png doesn't seem to be delivered to the browser, logs are empty. What am I missing?
Thanks! jlc
This doesn't work, all the files are in the root of a test site. The png doesn't seem to be delivered to the browser, logs are empty. What am I missing?
Arghh, wrong log file:) It looks like it wants to write in the root of the virtual hosts dir, so apache needs write access? Any php gurus know how to force it to write those rendered images somewhere else?
Thanks! jlc
Joseph L. Casale wrote on Tue, 17 Nov 2009 18:48:05 +0000:
Arghh, wrong log file:) It looks like it wants to write in the root of the virtual hosts dir, so apache needs write access? Any php gurus know how to force it to write those rendered images somewhere else?
Maybe here: $graph->showGraph("test.png"); -> $graph->showGraph("./directory/test.png"); ..
And, yes, Apache needs write access to that dir. Joseph, as you have got it going now, any further questions are really not only PHP-specific, but specific to this class, not CentOS. Just to remind.
Kai