Solved

Curl and PHP 5.2.5

Posted on 2008-06-17
16
8,594 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
  • 7
  • 5
  • 4
16 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 300 total points
Comment Utility
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 200 total points
Comment Utility
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
Comment Utility
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
 
LVL 48

Assisted Solution

by:hernst42
hernst42 earned 300 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 300 total points
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 24

Assisted Solution

by:purplepomegranite
purplepomegranite earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
> 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Ransomware continues to be a growing problem for both personal and business users alike and Antivirus companies are still struggling to find a reliable way to protect you from this dangerous threat.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now