php-extension

Geolocate an IP without extensions?

大城市里の小女人 提交于 2019-12-10 12:20:30
问题 Is there a way to locate an IP's country without using any php extensions? I know there are certain extensions, but is this possible without using extensions nor using other websites. For example: www.[ip to country].[something]/?ip=123.123.123.123 回答1: Download a database that maps IP addresses to countries, e.g. from MaxMind, and install it on the server. There is no way to calculate the information stored in the database without accessing remote systems. That's why you really need a

PHP Sql Server PDOException:could not find driver

回眸只為那壹抹淺笑 提交于 2019-12-10 03:52:15
问题 My server is a Windows 2008 server. PHP Version 7.2.7 is installed and running. Sql Server 11 (64 bit) is installed and is working (there is a couple asp.net apps running and already using that database) I downloaded the PHP Sql Server Drivers from Microsofts website and placed the .dll files in the PHP ext directory. In my PHP.ini I added: extension=php_pdo_sqlsrv_7_nts_x64 In my .php file I am using to test my db connection I have: $SqlServer = "THISSERVER\SQLEXPRESS"; $SqlServerCon = new

7z extension for php?

浪子不回头ぞ 提交于 2019-12-09 02:30:03
问题 I can't find one and I don't know if any of PHP Compression and Archive Extensions will work. Do you think I could use a compression stream to read data from a 7z file? UPDATE 7z forums have a lot of requests for a php extension 回答1: The 7z file format can use various compression algorithms, so you might be able to decompress the archive with one of the existing utilities for bzip2 or deflate. I found a 7z PHP class as well, and you are lucky since it's still being developed. Here is the

Can I hide PHP extension in HTML source code

好久不见. 提交于 2019-12-08 15:26:23
问题 I know that we can hide PHP extensions on URL bar. Can we hide PHP extensions when the user view source code? For example, in the index.php page (on url bar it is abc.com/index) And I view the source code, the .php extension is still there (in <a> tags). Can I hide it? 回答1: If you already have configured your web server to interpret any chosen extension like ".do" as a php script instead of extension ".php", then all your links must use this chosen extension. So it is not that you "can", it

Where to download iMagick PHP extension VC6 and VC9

自古美人都是妖i 提交于 2019-12-08 15:21:16
问题 I would like to use iMagick with my PHP web page, but I can't find where to download an official PHP extension for Windows compiled with code http://pecl.php.net/package/imagick I found some links on the web like : http://valokuva.org/outside-blog-content/imagick-windows-builds/php53/imagick-2.3.0-dev/ http://dev.freshsite.pl/php-extensions/imagick.html But some PHP extensions are very old and makes Apache crash, others are working. And how can I trust the DLL code inside? Is there a trusted

Unable to load dynamic library php_zmq.dll - The specified module could not be found

心已入冬 提交于 2019-12-08 13:28:33
I have XAMPP with PHP Version PHP 7.1.13 (cli) (built: Jan 3 2018 20:16:04) ( ZTS MSVC14 (Visual C++ 2015) x86 ) . I want to install the ZeroMQ extension, which I downloaded from here http://pecl.php.net/package/zmq/1.1.3/windows specifically 7.1 Thread Safe (TS) x86 moved the php_zmq.dll to the file C:\xampp\php\ext , and wrote extension=php_zmq.dll into the file C:\xampp\php\php.ini , wrote C:\xampp\php\ext in to Windows PATH , but I still getting this error : PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_zmq.dll' - The specified module could not be found. in

Mongo php extension after Heroku update (composer)

血红的双手。 提交于 2019-12-08 12:25:11
问题 I have days trying everything and looking everywhere the solution. The problem happened when Heroku sent me an email about an update which required Composer for PHP aplications. My folder currently: -- MyProject/ ------ ext/ ---------- mongo.so ------ php.ini ------ composer.json ------ index.php (Before the problem, this running perfect of course without Composer ). php.ini extension_dir = "/app/www/ext/" extension=mongo.so composer.json { "require": { "ext-mongo": "*" } } Obviously if I run

How to call function from .so file using php script?

做~自己de王妃 提交于 2019-12-08 07:33:08
问题 I have created .so file for following function: main.cpp: #include<stdio.h> #include "test.h" int main() { int a=hello(); printf("%d",a); return 0; } test.h int test() { int a=5,b=10,c; printf("Hi"); c=a+b; return c; } Now I create shared library file main.so for above program and want to call hell() function from php script. p1.php <?php // Call to test function in main.cpp > I saw various tutorials on web but no clear explaination. Can someone give link to some tutorial or help me for this

Unable to load dynamic library php_zmq.dll - The specified module could not be found

ぐ巨炮叔叔 提交于 2019-12-08 07:07:42
问题 I have XAMPP with PHP Version PHP 7.1.13 (cli) (built: Jan 3 2018 20:16:04) ( ZTS MSVC14 (Visual C++ 2015) x86 ) . I want to install the ZeroMQ extension, which I downloaded from here http://pecl.php.net/package/zmq/1.1.3/windows specifically 7.1 Thread Safe (TS) x86 moved the php_zmq.dll to the file C:\xampp\php\ext , and wrote extension=php_zmq.dll into the file C:\xampp\php\php.ini , wrote C:\xampp\php\ext in to Windows PATH , but I still getting this error : PHP Warning: PHP Startup:

No performance gain with APC on WampServer

穿精又带淫゛_ 提交于 2019-12-07 13:46:29
问题 I'm working on a Windows workstation, on which I use WampServer as my development platform, to write PHP applications which are then run on Linux. I'm pretty used to APC on Linux, which is blazing fast and a must have for me. However, I'm always surprised to get no performance gain when I use it on Windows. This leads to generation times close to 1 second per page, on applications relying heavily on the Zend Framework for example. Most of this time is spent parsing PHP files (I verified that