Minecraft Player Face Rendering problem

Ask about a PHP problem here.
Post Reply
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Minecraft Player Face Rendering problem

Post by olliekb »

I should be able to copy and paste the code and it work right. I understand most of the stuff in the code. I copied and pasted the code into php tags and it wouldnt work.
Last edited by Helx on Sat Jun 29, 2013 1:31 pm, edited 1 time in total.
Reason: This topic was split from http://betterphp.co.uk/board/viewtopic.php?f=5&t=1698
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Minecraft Player Face Rendering

Post by Helx »

olliekb wrote:I should be able to copy and paste the code and it work right. I understand most of the stuff in the code. I copied and pasted the code into php tags and it wouldnt work.
It could be your host or server software.

Some hosts don't like people connecting outside of their network through PHP.
Some software doesn't support/won't allow outside connections (maybe it's a free version?).

If you can't determine the problem, please create a new thread in this subforum: http://betterphp.co.uk/board/viewforum.php?f=4
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering

Post by olliekb »

Thanks for the advice all the other PHP works just not these rendering ones.
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Minecraft Player Face Rendering

Post by Helx »

Sorry - just had to split this topic.

I think I know what your problem is.
You don't have GD or ImageMagick installed.

If you use a professional host, you're going to need to ask them to install 'GD' for you.
If you're on a VPS, you'll have to do it yourself, just Google 'how to install GD on <insert OS name here>'.
Or, if you're using locally hosted software, you're going to need to find some kind of plugin for GD.
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

I can do that now I have full access to the whole server XD
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

Thanks that sorta worked now it doesn't display the skin. Not actually downloading. ive checked in the directory and there is nothing in there.!!!
http://oliverbell.co.uk/mcrendering.php
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Minecraft Player Face Rendering problem

Post by Helx »

What have you set the username to?
Remember that case matters.

Eg:
http://skins.minecraft.net/MinecraftSkins/abcedea.png
Is not the same as
http://skins.minecraft.net/MinecraftSkins/Abcedea.png
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

Tested the the variable by putting Blacksmith95 and I also type the address in a browser to test it worked.
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Minecraft Player Face Rendering problem

Post by Helx »

Alright.

Take a look at line 7 of the code. You need to create folders like that in the same directory as the script.
Have you done that?

Script.php
cache
-player_skins
--faces

Also be sure to CHMOD the folder to 777 (it's not normally an issue with this script, but I guess it's still possible).
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

chmod the cache file right?
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Minecraft Player Face Rendering problem

Post by Helx »

Yes, CHMOD the folder 'cache' recursively to 777.
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

right did that now ive got a black square XD
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: Minecraft Player Face Rendering problem

Post by Helx »

Alright, that's odd.

Remove the header thing on line one, and put the following code just below the PHP opening tags:
error_reporting(E_ALL);
ini_set('display_errors', '1');
Paste any errors :)
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

‰PNG IHDRÈÈ":9ÉŠIDATxœíÁ‚ ÿ¯nH@ð`Õ—½¬¡IEND®B`‚
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

any idea ?
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

Re: Minecraft Player Face Rendering problem

Post by FrederickGeek8 »

Thats PNG code :lol:

Try removing the cache file. If you got a bad copy due to some error or something, it would remain in your cache and output the same each time.
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: Minecraft Player Face Rendering problem

Post by olliekb »

Right I got it working somehow : http://oliverbell.co.uk/mcrendering.php ... acksmith95
added an include statment to pull the code onto another php page and it stops working again!!!
chmod is done gd is installed cache files are there. But no picture just a little icon.
see : http://eternitypvp.co.uk/profile.php?ign=Blacksmith95
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

Re: Minecraft Player Face Rendering problem

Post by FrederickGeek8 »

olliekb wrote:Right I got it working somehow : http://oliverbell.co.uk/mcrendering.php ... acksmith95
added an include statment to pull the code onto another php page and it stops working again!!!
chmod is done gd is installed cache files are there. But no picture just a little icon.
see : http://eternitypvp.co.uk/profile.php?ign=Blacksmith95
You could just use a img tag to like to the mcrendering page or use file_get_contents. There is really no need for including imo.
Post Reply