草庐IT

httpd_can_network_connect

全部标签

php - ftp_connect fatal error : call undefined function

出于某种原因,ftp_connect()函数不起作用,当我尝试使用它时,它以fatalerror结束,指出此函数未定义...令人惊讶的是我仍然可以使用ftp客户端或使用ftp连接通过终端。我该如何解决这个问题?我在MountainLion上运行,我有5.3php版本-我重新安装了一次,希望这能解决我的问题。 最佳答案 检查PHPFTPinstallationmanual在PHP7上,您可以通过将此行添加到php.ini文件来启用它。extension=php_ftp.dll在PHP8+上启用php.ini中的这一行:extensio

php - GCP SQL Postgres 权限问题 : can't run a query with postgres user with generated symfony db

我正在努力使用GoogleCloudPlatform的CloudSQL组件解决这个问题。我的技术栈包括在GoogleKubernetesEngine(GKE)部署中托管我的应用程序,使用CloudSQL代理sidecar连接到pod内的数据库。后端是一个Symfony项目。我按照以下步骤创建和填充数据库(没有成功):创建CloudSQLPostgres实例将代理添加到k8s容器以使用所有凭据连接到CloudSQL实例,如GCPdocumentation中所述进入我的Symfony(phpfpm)pod并运行命令phpbin/consoledoctrine:schema:update--

php - Oracle 11g PHP oci_connect 失败 OCIEnvNlsCreate()

问题:LinuxCentOS/Oracle11g/InstantClient/PHP5.3.3错误:oci_connect():OCIEnvNlsCreate()失败。您的系统有问题-请检查ORACLE_HOME和LD_LIBRARY_PATH是否已设置并指向正确的目录phpinfo()相关部分:如您所见,环境变量已正确设置,我可以使用getenv()在页面上回应它们。我还检查了读取权限,我可以从网页上读取这些目录中的所有文件。客户端库文件在那里(我安装并重新安装了两次)完全安装。这些库是可读和可加载的。ldd没有显示任何错误。这是来自php文件的调用:$test=getenv('LD

php - 新手 : throw new exception - can we change exception name?

我正在尝试处理异常(exception)情况。所以我有类似的东西:如果发生不好的事情:thrownewCreateContactException($codigo,$result->msg);稍后,我会尝试,如果不行,捕获:try{createContact();}catch(CreateContactException$e){$error.='Anerroroccurredwiththecode:'.$e->getCode().'andmessage:'.$e->getMessage();}1)这行得通吗?我的意思是,这个getCode()和getMessage()与CreateCo

php - Laravel 4 : @include causes Apache (httpd. exe) 崩溃(在 Windows 上)

正如标题所说,有一个@include()导致Apache执行时崩溃。这是受控代码,位于profile.php中:@include('sections/userInformations',array('userOwner'=>$profileUser,'userVisitor'=>$user))$profileUser和$user来自PagesController.php:publicfunctiongetProfile($username){returnView::make('profile',array('privacy'=>Privacy::where('user','=',$us

php - SQLSTATE[08001] : [Microsoft][ODBC Driver 13 for SQL Server]TCP Provider: No connection could be made because the target machine actively refused it

我的学说存储库代码无法运行,但我能够正常访问数据库和读取表数据。我得到这个堆栈跟踪:EntityManager->getRepository('AppBundle:Person')insrc\AppBundle\Controller\PersonViewController.php(line18)publicfunctionindexAction(Request$request){$em=$this->getDoctrine()->getManager();$repo=$em->getRepository('AppBundle:Person');$persons=$repo->find

php - 无法连接到 www.googleapis.com 端口 443 : Network unreachable

我正在尝试在我的网站中使用GoogleClientAPI在Symfony2中编写Google登录.我按照说明here,但是当我调用$client->authenticate($code);命令抛出异常,提示:无法连接到www.googleapis.com端口443:网络无法访问有什么问题? 最佳答案 解决方案2(来自更新)。它似乎是ipv6接口(interface)和phpcurl的一些错误,所以另一种解决方案是在curl函数中设置适当的选项以在你的php脚本中使用ipv4连接到远程服务器curl_setopt($curl,CURL

PHP 类 - fatal error : Can't use method return value in write context

mysqli=newmysqli($this->dbHost,$this->dbLogin,$this->dbPwd,$this->dbName);if(mysqli_connect_errno()){echo"ConnectionFailed:".mysqli_connect_errno();exit();}}publicfunctionaddress(){if($stmt=$this->mysqli->prepare("SELECT`email_content`FROM`content`WHERE`content_name`=?")){$content='address';$stm

php - 出现错误 mysqli::real_connect(): (HY000/2002): 当我尝试在实时服务器上访问我的项目时没有这样的文件或目录

这个问题在这里已经有了答案:mysqli_real_connect():(HY000/2002):Nosuchfileordirectory(19个回答)关闭3个月前。我已将我的网站上传到服务器,然后我尝试访问,但代码点火器向我返回错误,我找不到任何答案。为什么会这样?我的配置数据库设置如下:$db['default']=array('dsn'=>'','hostname'=>'localhost','username'=>'netservice','password'=>'*********','database'=>'valedastrutas','dbdriver'=>'mysq

PHP 简单 XML : How can I load an HTML file?

当我尝试使用simplexml_load_string将HTML文件加载为XML时我收到很多关于HTML的错误和警告,但它失败了,有没有办法使用SimpleXML正确加载html文件?这个HTML文件可能有不需要的空格,也可能有一些我希望SimpleXML忽略的其他错误。 最佳答案 使用DomDocument::loadHtmlFile和simplexml_import_dom将格式不正确的HTML页面加载到SimpleXML中。 关于PHP简单XML:HowcanIloadanHTML