Skip to content
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

Please see my problem #5

Open
seee opened this issue Jan 11, 2014 · 6 comments
Open

Please see my problem #5

seee opened this issue Jan 11, 2014 · 6 comments

Comments

@seee
Copy link

seee commented Jan 11, 2014

http://www.newmediacampaigns.com/blog/add-text-to-an-image-with-php?cache=off#comment-ea2b8178874541329300ef05286581a6

@codeguy
Copy link

codeguy commented Jan 11, 2014

Thanks. You should request version "2.*" in your composer.json file. Also make sure you are using PHP 5.3.2 or newer with the GD image library installed. The "Forbidden" error is a web server configuration error and is beyond the scope of this repository. If you continue to have issues with Composer, make sure you are using the latest version of Composer by running composer self-update then try again. If it still fails, post the entire terminal output here for me to review. Thanks!

@seee
Copy link
Author

seee commented Jan 11, 2014

Here's the error I'm getting:
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package nmcteam/image-with-text 1.0.0 could not be found.

Already tried the composer self-update. I'll just copy-paste my entire composer.json file :

{
"name": "nmcteam/image-with-text",
"type": "library",
"description": "Create images with embedded text and advanced typography",
"keywords": ["text","typeset","typography","write","image","gd"],
"homepage": "http://github.com/nmcteam/image-with-text",
"license": "MIT",
"authors": [
{
"name": "Josh Lockhart",
"email": "[email protected]",
"homepage": "http://www.newmediacampaigns.com/about/team/josh-lockhart"
}
],
"require": {
"php": ">=5.3.0",
"intervention/image": "~1.0",
"nmcteam/image-with-text": "2.*"
},
"autoload": {
"psr-0": { "NMC": "src" }
}
}

@codeguy
Copy link

codeguy commented Jan 11, 2014

Your entire composer.json file should be only this:

{
    "require": {
         "nmcteam/image-with-text": "2.*"
    }
}

That's all you need.

@laminedev
Copy link

Work for me! That's all you need.

@shamsat
Copy link

shamsat commented Jul 21, 2017

I am new to php, i installed the library with the composer as described in your post everything was successful, now when run the php code from your example, get this error:
[Wed Jul 26 15:08:53.899238 2017] [:error] [pid 6058] [client 192.168.43.133:40768] PHP Warning: imagettftext(): Could not find/open font in /var/www/me.usa.cc/comp/vendor/intervention/image/src/Intervention/Image/Image.php on line 1300

@pranav0803
Copy link

there is a error fetal error ! in
$image = new \NMC\ImageWithText\Image('source.jpg');

Fatal error: Uncaught Error: Class 'NMC\ImageWithText\Image' not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants