?
Solved

Curl and PHP 5.2.5

Posted on 2008-06-17
16
Medium Priority
?
9,100 Views
Last Modified: 2013-12-13
How do you install Curl on Windows Server using 5.2.5

I have 4.2 install and CURL working on the same machine.

But 5.2.5 will not pick up this mod.  Please help the customer is upset!

http://www.piratewear.com/info.php

Shows all
http://blog.igeek.info/still-fresh/2005/07/06/installing-curl-on-windowsiis/
http://www.google.com/search?hl=en&q=install+curl+php+5.2.5+windows&btnG=Search
0
Comment
Question by:cybersharks1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
  • 4
16 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 1200 total points
ID: 21806926
Are you sure the php_curl.dll for php 5.2.x is located in       C:\PHP\extensions, so recheck the extension_dir for valid php-extensions.
0
 
LVL 24

Assisted Solution

by:purplepomegranite
purplepomegranite earned 800 total points
ID: 21806965
You're right, your PHP hasn't initialised cURL - it isn't in the phpinfo.

It should just be a case of removing the semicolon from the relevant line in the php.ini:
extension=php_curl.dll

I have just done this on my Windows installation, and that is all that was needed: http://cedit.dyndns.biz/phpinfo.php (notice it has a CURL entry).  That is version 5.2.6.

The only other thing I can think to check is the existence of the php_curl.dll file - this should be in your extensions folder.
0
 

Author Comment

by:cybersharks1
ID: 21812004
Thanks guys,
  Strange thing is I also have to run 4.2 for other web clients and it does have Curl working.  I check the php.ini file for 5 and curl extension is uncommitted.  If there anyway it could be having some kind of conflict on who gets to use it?  I also checked that the .curl.dll was in extensions and windows
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 1200 total points
ID: 21812041
Running both version of php can get complicated as they might share the same php.ini and thus different php_*.dll which are not compatible. So scheck 4.2 for used php.ini and php5 for php.ini and activate the php_cul.dll in the php5.ini
0
 
LVL 24

Expert Comment

by:purplepomegranite
ID: 21812075
Yes, the phpinfo page you referenced above states that the php.ini is in the c:\windows folder.  If you have two PHP versions installed, it is very possible that they are using the same php.ini - which is not good.  If you look at a phpinfo page on one of your 4.2 sites, is it pointing to the same ini file?

On my configuration I put the php.ini in the PHP folder itself - it makes more sense to me, and can be set-up using an Apache directive.  Are you using Apache or IIS for that matter?
0
 
LVL 24

Expert Comment

by:purplepomegranite
ID: 21812097
You're using IIS, should have thought I can check the info file, duh.

How have you set up your 4.2 and 5.2 PHP sites?  Different virtual server for each version?
0
 

Author Comment

by:cybersharks1
ID: 21812105
Hi Hernst42,
  Your telling me about how hard it is to run to version of PHP on a Windows 2003 machine with full MySQL and CURL.  Go check this OUT!

http://www.piratewear.com/info.php   5.2.5

http://propaneva.com/info.php   Version 4.4.2

Both of these use the windows/php.ini file and both use the C:php/ext

How in the world can this stuff be working?  I've never seen it be able to use both at same time.  This has to be the issue
0
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 1200 total points
ID: 21812135
the two versions need to use different php.ini as they require different extension_dirs

So you don't get any other extension in 5.2 except the compiled in extension as the extension for 4.2 will fail to load in 5.2, that's why you get no curl in 5.2.

read the comments on http://www.php.net/manual/en/install.windows.iis.php#63572 for the problem of dual php with IIS
0
 
LVL 24

Assisted Solution

by:purplepomegranite
purplepomegranite earned 800 total points
ID: 21812166
Then that is the problem.  Most of the extensions for version 5 are different to version 4.  You certainly shouldn't be using the same ext directory, and shouldn't really be using the same php.ini.

Do you need to use IIS particularly?  A good solution maybe to install Apache for one PHP version and keep IIS for the other.  Then they are completely segregated.  The only issue maybe a port issue, as you only have one port 80...
0
 

Author Comment

by:cybersharks1
ID: 21812245
I place the PHP.ini file inside the PHP5 folder how do I activate it so it read that first instead of looking at my 4.2 in the windows folder?
0
 
LVL 48

Expert Comment

by:hernst42
ID: 21812254
It might not be possible at all to run php4 and php5 within IIS. Offical it's not supported by php. So the only solution might be to run a second webserver to have php5 there and php4 in IIS.
0
 

Author Comment

by:cybersharks1
ID: 21812289
Ok, last step.  In that article it says run PHP 5 as .exe or cgi because it will look in it owns folder instead the default path of windows.  Every time I changed from isipa to .php.exe is bombs out.  Is there some other setting in IIS to run PHP 5 using cgi or exe?  If I can get this to work I think it will read its own ini file and load the php5 extensions just like your talking about.  In the future we will keep these separate.  

Thanks everyone for time I will give you points.  
0
 

Author Comment

by:cybersharks1
ID: 21814267
This is the final questions.  How do I tell me PHP 5.2 to read the php.ini file inside its own folder.  That is my problem.  

http://propaneva.com/info.php
PHP Version 4.4.2

System       Windows NT HELM5 5.2 build 3790
Build Date       Jan 13 2006 13:49:27
Server API       ISAPI
Virtual Directory Support       enabled
Configuration File (php.ini) Path       C:\WINDOWS\php.ini


http://www.piratewear.com/info.php

PHP Version 5.2.5

System       Windows NT HELM5 5.2 build 3790
Build Date       Nov 8 2007 23:18:08
Configure Command       cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API       ISAPI
Virtual Directory Support       enabled
Configuration File (php.ini) Path       C:\WINDOWS
Loaded Configuration File       C:\WINDOWS\php.ini

The only thing really is the extensions path that contains Curl.dll and has two different version.  That is where my problem is.  
0
 
LVL 48

Expert Comment

by:hernst42
ID: 21814663
> This is the final questions.  How do I tell me PHP 5.2 to read the php.ini file inside its own folder.  That is my problem.  
Thats not possible. As any setting will have effect on 4.2 and 5.2 when using the same Server API
0
 

Author Comment

by:cybersharks1
ID: 21815097
The only issue is Curl for PHP 4.2 is 192kb and it works, then if you replace with curl.dll for php5.2 289kb it breaks 4 and 5 works.  Sounds silly but is there like a curl.dll file that works with both or they changed so much code?  Is there a way to make the ini file look for like a second ext folder.

Like add:
c:\php\extensions\
and
c:\php\extensions\curl4

And just put both files?
0
 

Author Comment

by:cybersharks1
ID: 21815329
DUDE i changed the website to 5.2 and it works!!!!  They said it had to run in 4.2 so this solved all my problems.  The fixed would be the install 5.2 using exe so it will set the system path to th eini folder in php5 folder.  Thanks for help this was a head banger!
0

Featured Post

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article investigates the question of whether a computer can really be cleaned once it has been infected, and what the best ways of cleaning a computer might be (in this author's opinion).
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question