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 9252601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:59:13+00:00 2026-06-18T10:59:13+00:00

I’ve tried to make this: Upload photo from a PC as base64 string (data:image/jpeg;base64,…)

  • 0

I’ve tried to make this:

  • Upload photo from a PC as base64 string (“data:image/jpeg;base64,…”)
  • PHP will save this photo in full resolition as .jpg and make 160×160 .png thumbnail
  • Then it will return link to full-size image and user will crop this photo using Jcop and send dimensions automaticly when user confirm

I’ve done this pretty far and it works fine on my local Apache. But when I’ve moved it to remote web-hosting (I dont have access to shell) the first ajax request (when user submit the photo) returns 401 Unauthorized. I searched for wrong files permissions but I’m not sure if it’s problem of photo.php’s permissions or the uploaded image’s permissions. I’ve set 0650 to all directories.

Captured request: http://netbox.wayo.cz/401unauthorized.PNG

Here is code that saves the photo:

if($image = imagecreatefromstring($content))
{
     // save full-size photo
     if($photo = imagejpeg($image,$file_path,$control->get_config('upload_photo_quality')))
     {  
        // get photo params
        list($width,$height,$type,$attr) = getimagesize($file_path);

        // create photo thumbnail
        $thumb_name = uniqid().'.png';
        $thumb_path = DIR_DATA.'thumbs/'.$thumb_name;
        imagepng($image,$thumb_path,$control->get_config('upload_photo_compression'));
  • 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-06-18T10:59:16+00:00Added an answer on June 18, 2026 at 10:59 am

    you must Set 654, in 650 public user can not access the directory and inner File if You Request For PHP Must Set 655 that allow user to Execute PHP file

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
Does anyone know how can I replace this 2 symbol below from the string
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am using Paperclip to handle profile photo uploads in my app. They upload
I would like to count the length of a string with PHP. The string
I am using jsonparser to parse data and images obtained from json response. When
I have just tried to save a simple *.rtf file with some websites and

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.