Re: Portable Uwamp / Apache PHP.ini and Curl

Richard Quadling <[email protected]> Tue, 2 May 2017 12:42:20 +0100
Newsgroups gmane.comp.php.windows
Message-ID <CAKUjMCXbfiMeUVZeE2PDneWcj3y+P-MihH1HyrVLdDJ_R44iHw@mail.gmail.com>
--001a1138ea248edc4b054e8909d2
Content-Type: text/plain; charset=UTF-8

On 30 April 2017 at 11:26, devo <[email protected]> wrote:

> Hi all
> Wonder if someone can explain how to get curl working when using a
> php.ini in the apache directory
>
> Using Uwamp also tried with MAMP
> I am trying to create a constant connection for a CLI (command line
> interface) with GRAV CMS
>
> Part of getting GRAV is to use a php file which require curl.
>
> The systax would be php ./bin/gpm <install/download/upgrade> <name of
> file/template/plugin>
>
> Using uwamp (portable) it create a PHP.INI in the apache directory from
> a custom PHP file named php_uwamp.ini when starting and running the
> server.
>
> Added the windows verable to path=c:\C:\Users\Nick\Desktop\Uwamp\bin\php
> \php-5.6.18 so it can find the php exectuable
>
> C:\Users\Nick\Desktop\Uwamp\www\skeleton>php -c C:\Users\Nick\Desktop
> \Uwamp\bin\apache ./bin/gpm --help
>
> if I run php ./bin/skeleton/gpm then I will recieve the error message
> FATAL: GPM requires PHP Curl module to be installed
>
> I have made sure in the php directory the php_unwamp.ini that the curl
> extentsion is loading
> {extension=C:/Users/Nick/Desktop/Uwamp/bin/php/php-5.6.18/ext
> \php_curl.dll}
>
>
> Thing that I have noticed is when I run
> http://localhost/uwamp/phpinfo.php
>
> configuration File (php.ini) Path       C:\Windows
>
> Loaded Configuration File       C:\Users\Nick\Desktop\Uwamp\bin\apache
> \php.ini
>
> just to confirm that if I use phpinfo, curl is listed and enabled.
>
> Which will be using the PHP.INI in the php\bin directory there is
> actually no PHP.INI but there is PHP_inital.ini (not sure if it get the
> values from there due to having the windows path pointing at the PHP
> directory (I dont know)
>
>
> So how can I correctly get this to work !! (lol) without thinking about
> using the php -c command everytime or am I overthinking this!
>
> is it just altering line in the php ini file so the configuration
> directory value is pointing at the apache directory ? Or is it the
> cscript of php or apache ?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Hi.

Are you running the same version/installation of PHP for CLI and Web?

You've ran phpinfo() via the Web, so now try the CLI.

Run:

php --ini

That will show you output similar to this (I'm on MacOS, so different
paths).

Configuration File (php.ini) Path: /usr/local/etc/php/7.0

Loaded Configuration File:         /usr/local/etc/php/7.0/php.ini

Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d

Additional .ini files parsed:
/usr/local/etc/php/7.0/conf.d/10-extension_dir.ini,

/usr/local/etc/php/7.0/conf.d/20-extension-opcache.ini,

/usr/local/etc/php/7.0/conf.d/40-openssl.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-apcu.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-gmp.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-imap.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-intl.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-mcrypt.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-mssql.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-pdo_pgsql.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-pgsql.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-propro.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-raphf.ini,

/usr/local/etc/php/7.0/conf.d/50-extension-xdebug.ini,

/usr/local/etc/php/7.0/conf.d/60-extension-pecl_http.ini,

/usr/local/etc/php/7.0/conf.d/99-liip-developer.ini,

/usr/local/etc/php/7.0/conf.d/ext-xdebug.ini

and

php -m

will show you a list of the modules installed. Pay attention to any errors
at the top of the output - that's where they'll be if you have any.


Maybe also:

where php

(
http://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line
).

This will show you where PHP is being run when if you have many installed
and accessible via your PATH.


Hopefully, with all of that, you can diagnose the issue.

Regards,

Richard.

-- 
Richard Quadling

--001a1138ea248edc4b054e8909d2--