-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I must be doing something wrong. #39
Comments
Hi! It looks like you're running To use RecAnalyst in a real application, you'd put only your own files in a directory. Then you'd run Your project layout should end up looking something like this: ├── composer.json # This is where Composer saves that you want recanalyst/recanalyst
├── composer.lock # This is where Composer saves which dependencies it installed exactly
├── simple.php # This is your own PHP file...
└── vendor/
├── autoload.php # ...and this is the file you need to include.
├── composer/
├── guzzlehttp/
├── intervention/
├── psr/
└── recanalyst/ And // VERY stripped-down version of the simple.php example!
require 'vendor/autoload.php'; // ← different from how it's done in the example!
use RecAnalyst\RecordedGame;
// And the rest is your own code.
$rec = new RecordedGame('/path/to/a/game.mgx');
$rec->mapImage()
->resize(240, 120)
->save('minimap.png');
echo 'Minimap saved in minimap.png.' . "\n"; Hope that helps! |
Closing for now—feel free to reopen if you have more questions :) |
After your reply i tried that. It's on a php 5.6+ host so that's out of the question. The current code is as follows:
|
So after uploading the folder to my host, i proceeded to run
"php ../../../composer.phar require recanalyst/recanalyst"
from my SSH via PuTTY
I then tried to upload a file into this php file
Which is pretty much the basic example with a simple twist that it takes the uploaded file and puts it into the folder and then passes it to RecAnalyst.
After trying to upload a file, i came accross this error in the log files.
mod_fcgid: stderr: PHP Fatal error: Class 'RecAnalyst\RecordedGame' not found in ********/httpdocs/recanalyst/recanalyst.php on line 16
As i'm a complete newbie to Composer and stuff, i'm guessing there's something that went wrong when trying to load via autloader.php
The directory structure is something like this

Can i get some pointers in the right direction if you got the time?
Regards,
Ray.
The text was updated successfully, but these errors were encountered: