Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts

    Comrades, curl error

    Hello. My problem being that its been a long time since ive fired up my Plug n Play CMS and done some work on it. When i left it it was working just as i planned. Im now making a video to display how it works online. Problem being when i ran the install scripts I have an error:

    Code:
    Fatal error: Call to undefined function curl_init()
    Now, I do know a bit about a bit :-P so i checked all the usuals - ini file to see if it is loading in curl libs and checking the curl libs are in place. All ok.

    The only thing i can think of is the last time i ran my CMS was before i switched over to windows 7.

    PHP Code:
    $url $fileTrue;
    $ch curl_init(); //This be the naughty line that causes my error.
    curl_setopt($chCURLOPT_URL$url);
    curl_setopt($chCURLOPT_HEADERtrue);
    curl_setopt($chCURLOPT_NOBODYtrue);
    curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    curl_setopt($chCURLOPT_MAXREDIRS10); //follow up to 10 redirections - avoids loops
    $data curl_exec($ch);
    curl_close($ch);
    preg_match_all("/HTTP\/1\.[1|0]\s(\d{3})/",$data,$matches);
    $code end($matches[1]); 
    I am running WAMP on windows 7.
    Any help much appreciated.
    Last edited by Phil Jackson; 08-31-2009 at 09:12 PM.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You checked the ini but did you run phpinfo() and make sure for sure?

  • #3
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    Thanks for looking into it but its solved. I remembered i've heard of this before:

    remove ; from the begining of extension=php_curl.dll in php.ini file

  • #4
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    how the hell do you do the "resolved" thing...

  • #5
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Yeah... semicolons comment out a line so you would indeed need that gone.

    I think you have a time limit on marking your thread resolved but you shouldn't have gone past that limit at this point, surely... edit your message and see if you can find some select box somewhere you can choose "resolved".

  • Users who have thanked Fumigator for this post:

    Phil Jackson (08-31-2009)

  • #6
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    bloody genius aint ya.
    You got the thanks for tellin me where the "resolved" was... always wanted to know..
    Last edited by Phil Jackson; 08-31-2009 at 09:15 PM.

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Quote Originally Posted by Phil Jackson View Post
    bloody genius aint ya.
    You got the thanks for tellin me where the "resolved" was... always wanted to know..
    Edit you're original post, you'll be able to change the title from there, and a select box will let you choose the resolved.
    This should be new enough for you to edit it, so I'll leave it to you :P

    Edit:
    Lol, missed that fumigator already gave you the answer :P
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • Users who have thanked Fou-Lu for this post:

    Phil Jackson (09-01-2009)

  • #8
    Senior Coder
    Join Date
    Aug 2009
    Location
    Mansfield, Nottinghamshire, UK
    Posts
    1,555
    Thanks
    57
    Thanked 148 Times in 147 Posts
    you just want to get a sneaky "thank user for this helpful post" dont ya! :-p


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •