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

  • Home
  • SEARCH
  • 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 8691597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:09:05+00:00 2026-06-13T00:09:05+00:00

I am having a problem Here <?php include(‘smsconfig.php’); include(SMTPconfig.php); include(dbconnect.php); define(SITE_URL, http://gf2fyu.blah.com); $GLOBAL_REST_URL =

  • 0

I am having a problem Here

<?php 
        include('smsconfig.php');
        include("SMTPconfig.php");
        include("dbconnect.php");

        define("SITE_URL", "http://gf2fyu.blah.com");
        $GLOBAL_REST_URL = "gf2fyu.domain.com/organization/";

        $headers = array(
                        'X-MYDOMAIN-Secret:VuFlRQv40SUp0y1AXflMD0hWw8ZiiTu08f9ZXc0AYFc=',
                        'Content-Type: application/json; charset=UTF-8',
                        'Accept: application/json; charset=UTF-8',
        );
        //$json = array2json($ages);
        $curl_handle=curl_init();
        curl_setopt($curl_handle,CURLOPT_URL,$GLOBAL_REST_URL);
        curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
    //    curl_setopt($curl_handle, CURLOPT_POSTFIELDS,$json);
        curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
        $buffer = curl_exec($curl_handle);
        curl_close($curl_handle);
        $getit =  json_decode($buffer, true);
        $smskey =  substr(number_format(time() * rand(),0,'',''),0,5);
        print_r($getit);
?>

The above code working fine for me if i am running it on my local server and mozila REST

client but whenever i am trying to put this code on production version

this code is not hitting the rest server .

Please tell me what is the problem here ?

I am using the same header in MOzila also it is working fine

I am running Nginx

  • 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-13T00:09:06+00:00Added an answer on June 13, 2026 at 12:09 am

    Everything really is in the comments, but let’s put it down in order.

    1) Curl may not be installed in the PHP on the server. To find out, turn on error reporting (or check error logs). Alternatively, a more robust way is to check for the function. Add the following to your code (just after the includes)

    if (!function_exists('curl_init')) {
         die('Curl not installed');
    }
    

    Solution: you can try file_get_contents, but as noted in comments is it generally not recommended because this is also disabled. If you need to pass headers, you can do this in the “context” (third parameter in the call – check the manual). Better option is to install curl (or get support to install it).

    2) There may be a firewall enabled. You can establish this by checking curl_getinfo() and dumping the result to screen (for testing). This will tell you if it got blocked or made it through. See the manual for more info (linked above).

    3) There may be an error higher up in your code that is causing problems. Check the error log, or turn on error_reporting with

    error_reporting(E_ALL);
    ini_set('display_errors', 'on');
    

    Remember to remove those lines when you finally go into production, though.

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

Sidebar

Related Questions

I'm having a problem installing SAM 1.1.0 on fedora 16 same as here https://bugs.php.net/bug.php?id=59632&thanks=6
Im having a problem here. i downloaded jake wharton. He gave an example of
I'm having a little problem here, I'm new to Actionscript 3, and what I'm
Super weird problem here. I'm having trouble getting jQuery to bind any selectors except
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
HI Guys, Here I am having problem that How can I post an image
I'm having a hard time trying to create a XmlRepository. The problem here I
I am having a problem with a combo box here. What I did is
I' having a problem allocating a structure in a function. Here is the code(I'm
I'm having a problem with keeping a JBoss server running. Here's the command I'm

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.