google app engine won't recognize contents of php.ini - php

I'm trying to use curl in the google app engine, but it gives this error:
Uncaught Error: Call to undefined function curl_init()
HP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/curl.so' - /usr/lib/php/20151012/curl.so: cann
ot open shared object file: No such file or directory in Unknown on line 0
ERROR:root:php failure (255)
I searched, and found that the curl is disabled, and that i had to create a php.ini file with this code inside:
extension = "curl.so"
I also read that it could be a problem of versions of the service, so i did it in the getting started of the app engine(first version).but it did not work.
But it seems that the php.ini is not recognized by the app engine,someone could help me how could i POST using curl or another way

There are two things that you should also keep in mind:
cURL is only available for applications with billing enabled as stated in the documentation.
In your php.ini you have both cURL and cURLite enabled which is incorrect. Only one of those can be enabled and not both at the same time.
You can deploy sample application following the steps provided, which will get you started using cURL with PHP in App Engine Standard.
For other methods of issuing HTTP(S) requests using PHP, refer to the documentation here.

Related

Sporadic error when loading PHP extension in Azure App Service

We have an Azure App Service that makes use of the Redis PHP extension. Both the App Service and extension are PHP 5.6 / 32-bit. We are loading the PHP extension from a settings.ini in accordance with the Azure documentation.
extension = "d:\home\site\wwwroot\ext\php_redis.dll"
Once every few weeks the App Service will fail to load the extension and the site breaks. We receive the following error in our logs:
[06-Nov-2016 17:25:42 America/Los_Angeles] PHP Warning: PHP Startup: Unable to load dynamic library 'd:\home\site\wwwroot\ext\php_redis.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
This problem will go away on its own some hours later, presumably when the app service restarts or is migrated to another VM. We have an identical 'secondary' app service in a different region that never exhibits this problem.
Has anyone seen this sporadic failure? How can it be prevented?
The error message which can be caused in some unexpected condition that the file path is formed properly, for example, when there is file storage failover, auto-healing, etc.
We had tested installing php_redis.dll from application settings instead of PHP_INI_SCAN_DIR, this way php.ini will be modified to include the extension path. This change can mitigate the issue.

I am getting an error [Unable to find the wrapper "chrome-extension"] with TCPDF

I have an OpenCart e-commerce system setup. I tried to use TCPDF module for generating PDF Invoices of my existing orders.
Module Name: TCPDF
URL: https://sourceforge.net/projects/tcpdf/
Version: 5.9.202
Release date: 2012-12-16
Author: Nicola Asuni
This Modules seems to work fine on my Local (Dev Environment) but it does not function on my Production environment (which is similar in configs).
Error:
Warning: file_exists(): Unable to find the wrapper "chrome-extension" - did you forget to enable it when you configured PHP? in /var/www/html/2store/catalog/tcpdf/tcpdf.php on line 2Warning: file_exists(): Unable to find the wrapper "chrome-extension" - did you forget to enable it when you configured PHP? in /var/www/html/2store/catalog/tcpdf/tcpdf.php on line 2
TCPDF ERROR: [Image] Unable to get image: chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/call_skype_logo.png
I tried troubleshooting but I am not able to find what is causing it. Can anyone please advice?
Firstly, you're using a really old version of TCPDF. You should use the latest version from https://github.com/tecnickcom/TCPDF.
Secondly, it looks like you're asking TCPDF to include an image using a URL but you are providing a URL that would probably only work locally on a browser. The wrapper that the error is talking about is related to streams. See http://php.net/manual/en/intro.stream.php Basically, "chrome-extension" is not a valid stream. Examples of valid types of streams can be found here: http://php.net/manual/en/wrappers.php I'm surprised this URL worked locally, but I guess it's because you have Chrome installed locally so your operating system is being nice and allowing PHP to access the file referred to by that URL.
To resolve your issue on the server you will need to grab a copy of the file that you want to include in the PDF file, put it somewhere on the server in a directory that the web server user can access and provide that file name to TCPDF.

connect to mysql database with php issue

I'm going to expand my local project (that used mysql database and php ) to web.
i upload all file and changed all addresses to my server.
but my app wont work and i get the error like this in server Error log:
[10-Feb-2014 04:06:38 America/New_York] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/magickwand.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/magickwand.so: cannot open shared object file: No such file or directory in Unknown on line 0
my app is load some list of goods. then it can be shown detail and edit.
there is no image.
what is this problem and how I can solve it?
You don't have ImageMagick installed at your server.
In order to use the MagickWand For PHP module's functions, you need to install ImageMagick version 6.3.5, or greater, and the MagickWand for PHP extension source code / DLL. For more detail please see here http://www.magickwand.org/

Openssl php not working

I am trying to build a twitter feed to search for relevant hashtags and display them in my mobile app. I found a package at http://mlemos.users.phpclasses.org/package/8109-PHP-Generate-RSS-feeds-from-timelines-and-searches.html that seems to do the job. However, opensll isnt loading. i get Error: it was not possible to open the API call URL: establishing SSL connections requires the OpenSSL extension enabled. Now, i have used open ssl on this machine before, and phpinfo says it is enabled. i have checked my php.ini file to make sure the line is uncommented, as well as check my path variable. No success. Google has turned up nothing helpful. Any ideas? Thanks
Ended up using a twitAPI handler package

enable curl in xampp, windows

trying to enable curl in xampp 3.0.12 in windows environment.
Updated the php.ini in the php folder to enable curl, and there is no php.ini file in the apache/bin folder.
phpinfo() says:
loaded configuration file: C:\xampp\php\php.ini
curl support:enbaled
curl information: 7.24.0
and when i try to run a http_get() command php says:
Fatal error: Call to undefined function http_get()
Restarted both windows and xampp several times to update the changes.
Would be grateful for some advice, as I searched through similar topics on the web but can't get any further.
Note that the function http_get() belongs to the pecl http extension and not to the curl extension. Refer to the documentation of the curl extension to learn how you can use it to retrieve documents via http. You'll also find a lot of posts on stackoverflow
Also note, that the function file_get_contents() can be used to get documents over http in a very simple way. Although it is limited it will fit in much cases. To retrieve a page you can issue:
file_get_contents('http://www.server.com/page.html');

Categories