Home › Forums › WordPress Plugins › file_get_contents()
- This topic has 8 replies, 2 voices, and was last updated 11 years, 8 months ago by Diego.
-
AuthorPosts
-
-
November 26, 2012 at 7:25 pm #1932DiegoGuest
Hey!
Im having tons of issues with the shipping extension. Now I get this error:
<b>Warning</b>: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents
</a>]: URL file-access is disabled in the server configuration in <b>/homepages/16/d260502780/htdocs
/comapeno/wp-content/plugins/eshop-shipping-extension/includes/modules/usps-module/USC_eShop_USPS.php
</b> on line <b>392</b><br />
I enabled theallow_url_fopen = ON
in the php.ini but it dosnt seem to work. There is no way to edit the master php.ini file and .htaccess modification makes the hosting complain about everything.Is there a workaround with curl or something like that?
Thank you!
-
November 26, 2012 at 7:30 pm #1933vinnyKeymaster
Hi Diego,
allow_url_fopen = ON in the .htaccess file indeed does not work. Adding it to your local php.ini should have done the trick. Did you check phpinfo(); after setting it to make sure that you got the right php.ini file updated?
Regardless, I'll add an alternative to USPS (and the other modules). I'll try to have it out by Sunday tops.
Cheers,
Vinny
-
November 26, 2012 at 7:41 pm #1934DiegoGuest
Hi Vinny,
Check
this link(link removed by Vinny), in allow_url_fopen it says “On”, but it keeps sending the error.I had to upload the php.ini to several folders because the configuration wasn’t recursive.
Maybe the configuration is not working in the particular folder where the function is executed? I think this might be an easier fix, if not, I appreciate the workaround.
Thank you again!
-
November 26, 2012 at 7:56 pm #1935vinnyKeymaster
Please see the emails I sent you and contact me on skype. The address is in the first email.
Vinny
-
December 20, 2012 at 3:55 pm #1966DiegoGuest
Hello Vinny!
UPS is working fine now, but USPS is giving me a headache. Here is the response to the request, it’s not a json encoded response, so I guess that’s the issue.
As you can see, at the end is the response from the UPS server, that works fine.
By the way, production settings have been enabled at USPS servers, I sent an email asking them to do so and they replied saying the configuration was working now.
Any ideas? Here is the response:
<?xml version=”1.0″?>
<RateV4Response>
<Package ID=”0″>
<ZipOrigination>
21152
</ZipOrigination>
<ZipDestination>
78257
</ZipDestination>
<Pounds>
0
</Pounds>
<Ounces>
0.6
</Ounces>
<FirstClassMailType>
PARCEL
</FirstClassMailType>
<Size>
REGULAR
</Size>
<Zone>
6
</Zone>
<Postage CLASSID=”0″>
<MailService>
First-Class Mail
</MailService>
<Rate>
1.95
</Rate>
<SpecialServices>
<SpecialService>
<ServiceID>
9
</ServiceID>
<ServiceName>
Certificate of Mailing
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
1.15
</Price>
<PriceOnline>
0
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
1
</ServiceID>
<ServiceName>
Insurance
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
1.85
</Price>
<PriceOnline>
0
</PriceOnline>
<DeclaredValueRequired>
true
</DeclaredValueRequired>
<DueSenderRequired>
false
</DueSenderRequired>
</SpecialService>
<SpecialService>
<ServiceID>
5
</ServiceID>
<ServiceName>
Registered Mail&lt;sup&gt;&amp;trade;&lt;/sup&gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
10.95
</Price>
<PriceOnline>
0
</PriceOnline>
<DeclaredValueRequired>
true
</DeclaredValueRequired>
<DueSenderRequired>
false
</DueSenderRequired>
</SpecialService>
<SpecialService>
<ServiceID>
4
</ServiceID>
<ServiceName>
Registered without Insurance
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
10.95
</Price>
<PriceOnline>
0
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
0
</ServiceID>
<ServiceName>
Certified Mail&lt;sup&gt;&amp;reg;&lt;/sup&gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
2.95
</Price>
<PriceOnline>
0
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
13
</ServiceID>
<ServiceName>
Delivery Confirmation&lt;sup&gt;&amp;trade;&lt;/sup&gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
true
</AvailableOnline>
<Price>
0.85
</Price>
<PriceOnline>
0.00
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
15
</ServiceID>
<ServiceName>
Signature Confirmation&lt;sup&gt;&amp;trade;&lt;/sup&gt;
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
true
</AvailableOnline>
<Price>
2.55
</Price>
<PriceOnline>
2.10
</PriceOnline>
</SpecialService>
<SpecialService>
<ServiceID>
6
</ServiceID>
<ServiceName>
Collect on Delivery
</ServiceName>
<Available>
true
</Available>
<AvailableOnline>
false
</AvailableOnline>
<Price>
5.90
</Price>
<PriceOnline>
0
</PriceOnline>
<DeclaredValueRequired>
true
</DeclaredValueRequired>
<DueSenderRequired>
true
</DueSenderRequired>
</SpecialService>
</SpecialServices>
</Postage>
</Package>
</RateV4Response>
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>/homepages/16/d260502780/htdocs/comapeno/wp-content/plugins/eshop-shipping-extension/includes/modules/usps-module/USC_eShop_USPS.php</b> on line <b>683</b>
<br />
{“In-Store Pickup”:{“success”:true,”data”:{“In-Store Pickup”:{“price”:”0.00″,”details”:{“usc_pickup”:”This really only applies if you know us personally as we don’t really have a store front…”}}}},”US Postal Service”:{“msgs”:[“No shipping plans were found for your options!”]},”UPS”:{“data”:{“UPS – UPS Ground”:{“price”:”10.27″,”services”:{“Delivery Confirmation”:”2.00″}},”UPS – UPS Three-Day Select”:{“price”:”17.93″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”3″}},”UPS – UPS Second Day Air A.M.”:{“price”:”28.77″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”2″,”Scheduled Delivery Time”:”10:30 A.M.”}},”UPS – UPS Second Day Air”:{“price”:”25.08″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”2″}},”UPS – UPS Next Day Air Saver”:{“price”:”52.66″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”1″,”Scheduled Delivery Time”:”3:00 P.M.”}},”UPS – UPS Next Day Air”:{“price”:”57.09″,”services”:{“Delivery Confirmation”:”2.00″},”details”:{“Guaranteed Days to Delivery”:”1″,”Scheduled Delivery Time”:”10:30 A.M.”}}},”success”:true}} -
December 20, 2012 at 3:57 pm #1967vinnyKeymaster
Hi Diego,
Please update to the latest USPS plugin. That issue has already been fixed. Also, please make sure you are subscribed to the Releases newsletter so you get alerted when a new fix comes out.
Cheers,
Vinny -
January 4, 2013 at 11:42 am #2002DiegoGuest
Hello again!
I updated the USPS plugin and still no luck, the “update shipping options” animation keeps on going and I get the same XML response. Any idea why?
Thank you again.
-
January 4, 2013 at 12:03 pm #2003vinnyKeymaster
What version of USPS are you using? Please send a link to your test site so I can test it myself.
Vinny
-
January 14, 2013 at 12:41 pm #2061DiegoGuest
Never mind, had a duplicate with an older version.
Thank you!
-
-
AuthorPosts
- You must be logged in to reply to this topic.