Forums / Installing on a Windows Server / clean install Curl issue on WAMP

clean install Curl issue on WAMP

Views: 32,304

Results 1 to 15 of 15
16 Dec 2018, 7:18 PM
#1
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

clean install Curl issue on WAMP

I have tried to run zc 1.5.6 on a clean install new databases and an WAMP server with PHP 7.2.13 and 7.3
Cannot get front end to load on version 7.3 and cannot get admin to load either

php 7.2.13 I get the front end loaded, but only get login to show on admin.

Looking at the logs I get this error:

PHP Fatal error: Uncaught Error: Call to undefined function curl_init() ....in "admin"\includes\classes\VersionServer.php

this is a local WAMP Curl is on and if I run the extras/curltester/php

Fatal error: Uncaught Error: Call to undefined function curl_init() in .....\extras\curltester.php on line 21
( ! ) Error: Call to undefined function curl_init() in ...\extras\curltester.php on line 21

searching the php code for the whole of the zencart site I do not see a definition for the function curl_init(). If this is designed to call the curl.dll file on the server (in php directory) then I don't know why it is not as the server show that it is running.

Any clues please. Have I missed something obvious.

16 Dec 2018, 7:35 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: clean install Curl issue on WAMP

You may need to contact your hoster to have them enable cURL (or perhaps move to another hoster). You'll see in Admin->Version whether it's turned on for your hoster (it sounds like it isn't).

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Dec 2018, 7:45 PM
#3
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: clean install Curl issue on WAMP

He is the host, it is a local installation wampp :cool:

swguy:

You may need to contact your hoster to have them enable cURL (or perhaps move to another hoster). You'll see in Admin->Version whether it's turned on for your hoster (it sounds like it isn't).

16 Dec 2018, 7:54 PM
#4
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: clean install Curl issue on WAMP

Okay it is some thing with teh server as I have just gone back to PHP version 7.0.4 and I can now get logged in.

Any clues for how to fix WAMP for php version 7.3 much appreciated.

16 Dec 2018, 7:56 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,729
Plugin Contributions:
56

Re: clean install Curl issue on WAMP

Design75:

He is the host, it is a local installation wampp :cool:

Even though this was in the subject and the body, I somehow missed it. :( LOL.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

16 Dec 2018, 7:58 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: clean install Curl issue on WAMP

curl_init is a function that PHP provides. But it only provides it if CURL is installed/compiled-into PHP. (Separately for each PHP version you have installed.)

You will need to make sure your WAMP config has CURL enabled in PHP. I'd offer instructions but I don't use WAMP.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Dec 2018, 8:01 PM
#7
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: clean install Curl issue on WAMP

Just as an aside - the check for new version shows an error: get a bunch of curly brackets and logs give:

PHP Warning: Illegal string offset 'versionMajor' in ....admin\includes\classes\VersionServer.php

and also:

PHP Warning: Illegal string offset 'versionDownloadURI' in ...."admin"\includes\header.php on line 122

16 Dec 2018, 8:03 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: clean install Curl issue on WAMP

MikeyG:

Just as an aside - the check for new version shows an error: get a bunch of curly brackets and logs give:

PHP Warning: Illegal string offset 'versionMajor' in ....admin\includes\classes\VersionServer.php

and also:

PHP Warning: Illegal string offset 'versionDownloadURI' in ...."admin"\includes\header.php on line 122
Ya, those are because your CURL problem is causing empty results from the version-check that's being attempted.
Those will go away once your curl issue is fixed.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Dec 2018, 8:07 PM
#9
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: clean install Curl issue on WAMP

DrByte,

Thank you for reply, I have checked the php extensions and the curl does have a tick next to it in all version when looking at the wampmanager menu from the icon on the start bar.

I have also looked in the php ini and they also have the line uncommented so it appears to be installed. the only difference between the version is the php_curl.dll and curl.dll names for the extension when you go and look for the files in the wamp install directories but the documents say that this has been taken care of in the apache server. So I am continuing to search the web for answers.

Any further ideas of course most appreciated.

16 Dec 2018, 8:27 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: clean install Curl issue on WAMP

FYI - a simpler way to test CURL, without loading the core of Zen Cart is to point your browser URL to your /extras/paypal_tlstest.php or /extras/curltester.php file.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Jan 2019, 9:58 PM
#11
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: clean install Curl issue on WAMP

Dr Byte,

Thank you for the pointer about curltester.php so it appears that the Curl is running but the error is not having a local SSL certificate in place. Obvious really... so the next question is of course how can I install a certificate on local host.....I have read bit about self signing but do not seem to be able to find some step by step instructions on how to do this. Those I have found I have not been successful with. Anyone know a good site with how to set up Open SSL on a local host (for testing purposes locally only as this is in development.)

Thank you once again for the great support you guys do.

Regards

Mikeyg

4 Jan 2019, 10:04 PM
#12
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: clean install Curl issue on WAMP

Sorry Me again, actually that is not the issue as I just realised I had change my php back to 7.0.4 and not on 7.3

So infact when I run on 7.3 the curltester it does not run at all: Uncaught Error: Call to undefined function curl_init()

so I am back to trying to sort out why wamp does not run curl in 7.3.

5 Jan 2019, 1:07 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: clean install Curl issue on WAMP

MikeyG:

Uncaught Error: Call to undefined function curl_init()
That means PHP wasn't compiled/built with curl support included. Hopefully the WAMP support site can offer guidance on using their bundled software.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Feb 2019, 6:13 PM
#14
gwynwyffar avatar

gwynwyffar

New Zenner

Join Date:
Dec 2006
Location:
Hudson Valley, New York USA
Posts:
93
Plugin Contributions:
0

Re: clean install Curl issue on WAMP

I'm having similar issues running a clean install of 1.5.6a on Wampserver on Windows 10. I spent the morning battling just to get cURL to load - You may want to try making sure that both your PHP and Apache are updated (I was running Apache 2.4.17 along with PHP 7.1.26 and cURL wouldn't work). Updating to Apache 2.4.38 did the trick.

cURL seems to work fine everywhere except where the Version check is concerned - my error log gives me:

[01-Feb-2019 18:04:18 UTC] Request URI: /zencart156/splIt-yzB-sNack/index.php, IP address: ::1
#1  VersionServer->isProjectCurrent() called at [C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php:97]
#2  require(C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php:222]
#3  require(C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index.php:26]
--> PHP Warning: Illegal string offset 'versionMajor' in C:\wamp\www\zencart156\splIt-yzB-sNack\includes\classes\VersionServer.php on line 77.

[01-Feb-2019 18:04:18 UTC] Request URI: /zencart156/splIt-yzB-sNack/index.php, IP address: ::1
#1  require(C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php:222]
#2  require(C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index.php:26]
--> PHP Warning: Illegal string offset 'versionMajor' in C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php on line 103.

[01-Feb-2019 18:04:18 UTC] Request URI: /zencart156/splIt-yzB-sNack/index.php, IP address: ::1
#1  require(C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php:222]
#2  require(C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index.php:26]
--> PHP Warning: Illegal string offset 'versionMinor' in C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php on line 103.

[01-Feb-2019 18:04:18 UTC] Request URI: /zencart156/splIt-yzB-sNack/index.php, IP address: ::1
#1  require(C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php:222]
#2  require(C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index.php:26]
--> PHP Warning: Illegal string offset 'versionDetail' in C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php on line 103.

[01-Feb-2019 18:04:18 UTC] Request URI: /zencart156/splIt-yzB-sNack/index.php, IP address: ::1
#1  require(C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php:222]
#2  require(C:\wamp\www\zencart156\splIt-yzB-sNack\index_dashboard.php) called at [C:\wamp\www\zencart156\splIt-yzB-sNack\index.php:26]
--> PHP Warning: Illegal string offset 'versionDownloadURI' in C:\wamp\www\zencart156\splIt-yzB-sNack\includes\header.php on line 122.

Here's what I see at the top of my admin
[Attachment no longer available]

I believe this is because I'm not running in SSL and don't have a local certificate. Just sharing in case it helps anyone else out.

22 Feb 2020, 11:41 PM
#15
fjolsvith avatar

fjolsvith

New Zenner

Join Date:
Mar 2016
Location:
Norcatur, Kansas, USA
Posts:
88
Plugin Contributions:
2

Re: clean install Curl issue on WAMP

gwynwyffar:

I'm having similar issues running a clean install of 1.5.6a on Wampserver on Windows 10. I spent the morning battling just to get cURL to load - You may want to try making sure that both your PHP and Apache are updated (I was running Apache 2.4.17 along with PHP 7.1.26 and cURL wouldn't work). Updating to Apache 2.4.38 did the trick.

What did you update your PHP to?