var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
That is the file source, but it always say
$im = @ ImageCreate ( 150 , 100 )
or die ( "Cannot create a new GD image." );
$background_color = ImageColorAllocate ( $im , 255 , 255 , 255 );
$text_color = ImageColorAllocate ( $im , 233 , 14 , 91 );
ImageString ( $im , 1 , 5 , 5 , "A Simple Text String" , $text_color );
header ( "Content-type: image/png" );
ImagePng ( $im );
But on my local Windows Apache, it works just fine. Please help! Thank you!
The image “http://dedicatedot.no-ip.info/sig/sig.png” cannot be displayed, because it contains errors.
Remove the @ - it might be you don't have gd installed, or some other reason it's failing, but you'll never know because the @ operator is squelching the error log.
I used to run the oldest commercial
I changed to that now, and still same problem.
<?php header ( "Content-type: image/png" ); $im = ImageCreate ( 150 , 100 ); $background_color = ImageColorAllocate ( $im , 255 , 255 , 255 ); $text_color = ImageColorAllocate ( $im , 233 , 14 , 91 ); ImageString ( $im , 1 , 5 , 5 , "A Simple Text String" , $text_color ); ImagePng ( $im ); ?>
And I do have gd installed according to phpinfo. Take a look.
Have you tried pressing f5?
Yea I refreshed many times. It works fine on my local windows machine. But the server is a Linux box...
Works fine when I upload that script to my website. Can you get any GD code at all to work? Maybe try imagettftext or some other function instead of imagestring?
how do I reinstall my GD?
How do I reinstall apache without restarting SQL? I have a game server using the SQL database and I would prefer not to restart SQL.
You should not need to touch MySQL at all.
If you're using CentOS, you can install gd/php-gd with:
It's Ubuntu. Yum didn't work.
You'll need to use apt-get then:
Originally Posted by
[email protected]:~# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-gd is already the newest version.
php5-gd set to manually installed.
The following packages were automatically installed and are no longer required:
libboost-test1.34.1 libboost-regex1.34.1 libboost-wave1.34.1
libboost-serialization1.34.1 libboost-date-time1.34.1 libboost-signals1.34.1
libboost-graph1.34.1 libboost-iostreams1.34.1 libboost-filesystem1.34.1
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
If you create a page with just the following then visit it:
Do you see GD listed on the page as being loaded?
Actually, I just solved it. Just save it as *.php instead of *.png...
Edit: Oops, posted in the wrong thread.