Application Error Image In Server Upload
Contents |
here for a quick overview of the site Help Center Detailed wordpress http error image upload answers to any questions you might have Meta Discuss
Http Error Wordpress Media Upload
the workings and policies of this site About Us Learn more about Stack Overflow the http error while uploading images in wordpress company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Wordpress Http Error Media Upload 2015
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error with uploading image from iOS app to server up vote 0 down vote favorite I am trying to do wordpress http error media upload 2016 a simple task of uploading an image to server from iOS app. However I am receiving the following error message after running it: Error: Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.} Any idea why? The following is my code for client side and server side respectively. App side code: -(void) uploadPhoto: (UIImage*) image{ NSString *urlString = @"myServerDNS.com/upload.php"; AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"]; NSData *imageData = UIImageJPEGRepresentation(image, 0.8); NSDictionary *parameters = @{@"foo":@"bar"}; [manager POST:urlString parameters:parameters constructingBodyWithBlock:^(id here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 http error wordpress media library million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Image Uploading from android application to Server is not working up vote 0 down vote favorite I'm developing an http://stackoverflow.com/questions/34470215/error-with-uploading-image-from-ios-app-to-server android app which requires to upload the image taken with camera to the server. I used a tutorial for this and imported the project from this link, refer this for android code My PHP file which is indicating success of the image and returning me the URL but the image is not found on the server. I am not able to troubleshoot this problem. My PHP file code is: http://stackoverflow.com/questions/30972939/image-uploading-from-android-application-to-server-is-not-working to move uploaded files $target_path = "Upload_image_ANDROID/"; // array for final json respone $response = array(); // getting server ip address $server_ip = '216.86.147.200'; // final file url that is being uploaded $file_upload_url = 'http://' . $server_ip . '/' . 'sss_api' . '/' . $target_path; if (isset($_FILES['image']['name'])) { $target_path = $target_path . basename($_FILES['image']['name']); // reading other post parameters // $email = isset($_POST['email']) ? $_POST['email'] : ''; //$website = isset($_POST['website']) ? $_POST['website'] : ''; $response['file_name'] = basename($_FILES['image']['name']); //$response['email'] = $email; //$response['website'] = $website; try { // Throws exception incase file is not being moved if (!move_uploaded_file($_FILES['image']['tmp_name'], $target_path)) { // make error flag true $response['error'] = true; $response['message'] = 'Could not move the file!'; } // File successfully uploaded $response['message'] = 'File uploaded successfully!'; $response['error'] = false; $response['file_path'] = $file_upload_url . basename($_FILES['image']['name']); } catch (Exception $e) { // Exception occurred. Make error flag true $response['error'] = true; $response['message'] = $e->getMessage(); } } else { // File parameter is missing $response['error'] = true; $response['message'] = 'Not received any file!F'; } // Echo final json response to client echo json_encode($response); ?> php android server android-camera share|improve this question edited Jun 24 '15 at 10:02 NoNaMe 3,495174477 asked Jun 22 '15 at 5:57 Alpesh 115215 Can you add some echo statements to see what the values of your variable Videos ForgeAbout UsHelp MeHelp Us Help YouFAQForumsWarrantyContact Us IndexRecent Support TopicsNew Support TopicsRecent TopicsEtiquetteSearch IndexRecent Support TopicsNew Support TopicsRecent TopicsEtiquetteSearch Forums Support and Presales Professional Member Support [SOLVED] Image upload - Internal Server Error 500 [SOLVED] Image upload - Internal Server Error 500 StartPrev1NextEnd 1 crony OFFLINE Gold Boarder Posts: 168 Thanks: 3 Karma: 1 4 http://www.joomlapolis.com/forum/153-professional-member-support/208494-solved-image-upload-internal-server-error-500 years 1 month ago #208494 Hello, I've setup the image field to 500x500 and 2 Mo. If I upload a bigger image I've got an internal server error 500. I know it's my mistake to upload a too big image, but shouldn't I receive a more friendly message ? ( like "image has not the correct size") Thanks ! J! 2.5.6 - CB 1.8.1 - GroupJive 2.5.3 Last Edit: 4 years 1 month ago by http error krileon. krileon Team Member ONLINE Posts: 47653 Thanks: 5049 Karma: 1251 4 years 1 month ago #208504 Your host probably doesn't allow 2mb uploads. You need to ensure maximum post size and such is all adjusted properly. If you allow 2mb, adjust it to say 3mb so the error can catch it and output. Example as follows using php.ini. upload_max_filesize = 4M post_max_size = 4M Kyle (Krileon) Community Builder Team Member Before posting on forums: wordpress http error Read FAQ thoroughly + Read our Documentation + Search the forums CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive -- If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results! -- If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible! -- Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you. -- My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development. crony OFFLINE Gold Boarder Posts: 168 Thanks: 3 Karma: 1 4 years 1 month ago #208508 The limit is actually 48 Mb. But I've limited to 2 Mb the profile image with 500*500 px. If I upload a bigger image, I've got an internal Wordpress Http Error Image Upload 2015
Wordpress Image Upload Http Error 2016