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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:16:38+00:00 2026-06-06T13:16:38+00:00

I am indexing a pdf file using this php script. The curl give me

  • 0

I am indexing a pdf file using this php script. The curl give me an error

curl_error:Protocol “http not supported or disabled in libcurl

Here is my code please help me in this error, I am also searching for the error on the google i will respond to the post if I found the solution. Thanks in advance.

$result=move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"]);
     if ($result == 1) echo "<p>Upload done .</p>";
        $options = getopt("f:");
        $infile = $options['f'];

        $url = "\"http://localhost:8983/solr/update/";
        $post_string = file_get_contents("upload/" . $_FILES["file"]["name"]);

        $header = array("Content-type:text/xml; charset=utf-8");

        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
        curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
        curl_setopt($ch, CURLINFO_HEADER_OUT, 1);

        $data = curl_exec($ch);

        if (curl_errno($ch)) {
           print "curl_error:" . curl_error($ch);
        } else {
           curl_close($ch);
           print "curl exited okay\n";
           echo "Data returned...\n";
           echo "------------------------------------\n";
           echo $data;
           echo "------------------------------------\n";
        }
  • 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-06T13:16:40+00:00Added an answer on June 6, 2026 at 1:16 pm

    i think…remove \”

    $url = "http://localhost:8983/solr/update/";
           ^
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am indexing the file using php curl library. I am stuck here with
I'm using a PHP library called solr-php-client (http://code.google.com/p/solr-php-client/) to interface with my Solr server.
I am using Apache Solr for my search , using this i am indexing
While indexing I get this error: indexing index 'qtl_table_core'... ERROR: index 'qtl_table_core': sql_range_query: 'soybase.qtl_table.QTLName'
I am using indexing for mysql tables. My query was like this EXPLAIN SELECT
I am converting a PDF with PDF2SWF and Indexing with XPDF.. with exec.. only
Indexing Service is set up on our file server to index a couple dozen
I am indexing some URIs in SOLR using the UAX29URLEmailTokenizerFactory tokenizer. The problem is
Having difficulty indexing an attachment type in elasticsearch via the Tire gem. Not able
Is Latent Semantic Indexing (LSI) a Statistical Classification algorithm? Why or why not? Basically,

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.