草庐IT

geoip_open

全部标签

linux - 无法打开流 : Too many open files

我正在为在共享主机中运行的客户端编写PHPCLI脚本。它使用一个简单的函数记录到一个文件,例如:functionlog_entry($msg){global$log_file,$log_handle;$msg="[".date('Y-m-dH:i:s')."]".$msg."\n";echo$msg;$log_handle=fopen($log_file,'a');fwrite($log_handle,$msg);}我得到这个错误:PHPWarning:fopen(./logs/sync.20130410.log)[function.fopen]:failedtoopenstream:

php - Symfony 2 服务器部署 fatal error : It tries to open localhost file

我制作了一个symfony2应用程序,并尝试将其部署到共享服务器上,但出现fatalerror。我在这里采取了推荐的步骤:Deployment-Tools我已经更新了供应商依赖项:phpcomposer.pharinstall--optimize-autoloader我已经清除了缓存:phpapp/consolecache:clear--env=prod--no-debug我已经更改了服务器上app/cache和app/logs的权限但它不起作用。这是错误:Fatalerror:Uncaughtexception'UnexpectedValueException'withmessage

php - Codeigniter open_basedir_restriction 对共享主机有效

严重性:警告消息:mkdir():open_basedir限制生效。File()不在允许的路径内:(/home/thelazyppl/:/home/thelazyppl:/tmp:/usr/local/lib/php/)文件名:drivers/Session_files_drivers.php该站点的根文件夹是一个wordpress网站,因此我在根文件夹中为名为“Bazaar”的Codeigniter站点创建了一个子域。我已经在config.php和wordpresshtaccess中设置了base_url以允许文件夹“Bazaar”,但仍然没有任何效果。我的主机不允许修改php.in

php - fopen : failed to open stream: Permission denied in PHP on Mac

这个问题在这里已经有了答案:PHP-Failedtoopenstream:Nosuchfileordirectory(10个答案)关闭6年前。我写了这段代码:if(file_exists("testfile.rtf"))echo"fileexists.";elseecho"filedoesn'texist.";$fh=fopen("testfile.rtf",'w')ordie("impossibletoopenthefile");$text=但是当我运行它时它说:fopen(testfile.rtf):failedtoopenstream:Permissiondeniedin/App

php - 如何在 PHP 项目中创建 GeoIP 功能?

我有一些IP地址($_SERVER['REMOTE_ADDR']),我必须接收(学习)国家名称,如果我也能接收(学习)城市名称就好了.别忘了它是php-project,有用的API-非常好。P.S.这是一些开源项目,我们必须只使用免费和开源的工具。 最佳答案 无(只需要“GeoIP.dat”文件)。下载免费的GeoIP标准国家/地区数据库,去http://maxmind.com/download/geoip/database/安装只需将“geoip.inc”文件根据“include_path”指令放在某处即可您的“php.ini”文

php - "open_basedir restriction in effect"但文件在正确的目录中

我正在尝试将一些站点移动到新服务器(运行Plesk11),但出现以下错误:Warning:file_exists()[function.file-exists]:open_basedirrestrictionineffect.File(configuration.php)isnotwithintheallowedpath(s):(C:\Inetpub\vhosts\domain.com\domains\domain.com\www\;C:\Windows\Temp)inC:\Inetpub\vhosts\domain.com\domains\domain.com\www\index.p

php - codeigniter 显示 form_open

我正在尝试学习codeigniter,但出于某种原因我不能做最简单的事情。基本上我是在登录页面上创建一个表单。但是我越来越Fatalerror:Calltoundefinedfunctionvalidation_errors()inA:\work\codeigniter\ci\application\views\pages\login.phponline5如果我注释掉validation_errors行,我会得到Fatalerror:Calltoundefinedfunctionform_open()inA:\work\codeigniter\ci\application\views\

PHP fatal error : require_once(): Failed opening required 'Zend/Gdata/Extension.php'

由于某些奇怪的原因,我现在无法弄清楚,NoEmbed.php在尝试包含文件时失败并出现fatalerror。包含路径设置正确,我已经验证如下(就在NoEmbed.php中的require_once指令之前):$s=ini_get('include_path');$a=explode(':',$s);foreach($aAS$path){echo$path;if(file_exists($path.'/Zend/Gdata/Extension.php'))echo'...found';elseecho'...notfound';}在预期位置输出“found”。我必须承认,我目前无法想出发

php - 地理定位和 GeoIP 替代方案

对于GEOIP和HTML5地理定位,有哪些替代方案更准确并且能够在黑莓浏览器上可靠地工作? 最佳答案 您可以查看IP2Location。但是,如果您担心准确性,则不应期望从免费服务中获得高百分比。即使是付费服务也不比免费服务高出多少,而且总是有。准确性。这就是野兽的本性。我听说过很多英国境内的人无法在线观看BBC的情况,因为他们的IP被错误地发现在国外。一些geoip服务:Akamai、Quova、DigitalEnvoy(数字元素)、Google(javascript)、Maxmind(您已经使用过)、hostip.info、Ge

php - imagick readImageBlob 给出 'uable to open file' 错误

我收到以下错误:PHPfatalerror:未捕获的异常“ImagickException”,消息“无法打开图像`/tmp/magick-2244K7gyKdSJDqKW':/var/www/中没有这样的文件或目录@error/blob.c/OpenBlob/2658”nodeviz-read-only/www/NodeViz/library/GraphVizExporter.php:454引用的相关代码在这里:$im=newImagick();$im->setFormat('svg');#removelabelsfromtherasterversion$im->readImageBl