Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-31-2009, 08:37 PM   PM User | #1
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
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..
Phil Jackson is offline   Reply With Quote
Old 08-31-2009, 08:58 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
You checked the ini but did you run phpinfo() and make sure for sure?
__________________
Fumigator is offline   Reply With Quote
Old 08-31-2009, 09:04 PM   PM User | #3
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
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
Phil Jackson is offline   Reply With Quote
Old 08-31-2009, 09:05 PM   PM User | #4
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
how the hell do you do the "resolved" thing...
Phil Jackson is offline   Reply With Quote
Old 08-31-2009, 09:11 PM   PM User | #5
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,686
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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".
__________________
Fumigator is offline   Reply With Quote
Users who have thanked Fumigator for this post:
Phil Jackson (08-31-2009)
Old 08-31-2009, 09:12 PM   PM User | #6
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
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..
Phil Jackson is offline   Reply With Quote
Old 09-01-2009, 01:02 AM   PM User | #7
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
Phil Jackson (09-01-2009)
Old 09-01-2009, 08:49 AM   PM User | #8
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
you just want to get a sneaky "thank user for this helpful post" dont ya! :-p
Phil Jackson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:43 AM.


Advertisement
Log in to turn off these ads.