Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7177713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:46:17+00:00 2026-05-28T16:46:17+00:00

I have installed a piece of code on a website, wich includes gd functions.

  • 0

I have installed a piece of code on a website, wich includes gd functions.
After debugging I came to a conclusion that the

$src = imagecreatefrompng($s);

is causing the server to respond: “Connection was reset”
Even if I change the code to:

$src = @imagecreatefrompng($s);

The same error occurs.
I have checked the php version, checked if gd library is installed and enabled, but everything is ok. There is nothing in the error_log.
Also, the file path is all right, the file exists, and other functions can access the file (like fopen or file_get_contents), so there is no problem with the rights.

Anyone has an idea?

Edit:
The file is on a local server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:46:17+00:00Added an answer on May 28, 2026 at 4:46 pm

    Hmm, if you can’t access the server via command line you may have some headaches tracking this down. 2 things that come to mind:

    1. It’s unlikely, yet possible libpng is not installed, or gd wasn’t compiled w/ PNG support. Run phpinfo() from the browser and look for the gd section, you should see PNG support ‘enabled’ there.
    2. The image might not be a PNG image! I know it’s wacky but these things can happen, just naming a file .png does not a PNG file make, haha. If you have ImageMagick you can use the identify program to check, here’s a run from my laptop:

      $ identify ~/transparent-pixel.png
      ~/transparent-pixel.png PNG 1×1 1×1+0+0 8-bit DirectClass 2.79KB 0.010u 0:00.009

    There are probly some other programs you can use to verify the image is indeed an PNG.

    Lastly, I would suggest getting your script to work in a local environment that simulates the server, like a VM or similar. That should help you track down the issue on the server w/o quite as many headaches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small piece of code in a template file that I ONLY
I have a piece of code that I can run in four ways Debug
I have taken a perfectly working MDX piece of code to Windows 2008R2 (all
I am looking for a piece of code Python code that would give me
At my company we have produced a piece of software that a lot of
Let's say you are working on a piece of legacy code that was written
I have the following piece of code, which prints the metadata of an image
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.