草庐IT

spark-streaming

全部标签

php - 如何检测 stream_copy_to_stream 错误?

我有一些代码,简化后看起来像这样:$fout=fsockopen($host,80);stream_set_timeout($fout,10*3600);//10hours$fin=fopen($file,'rb');//notreallyafilestream,butgoodenoughproxyhere$readbytes=stream_copy_to_stream($fin,$fout);if(!$readbytes)die('copyfailed');但是,我有时会遇到以下类型的错误:Notice:stream_copy_to_stream():sendof952bytesfa

php - GAE、PHP 和 GCM : failed to open stream: HTTP request failed! HTTP/1.0 405 方法不允许

我正在开发一个Web应用程序(使用适用于PHP的GAE),它会在某些内容可供下载时通知Android客户端(通过GCM-GoogleCloudMessaging)。下面的PHP脚本应该可以完成工作:$json=array('data'=>array(...),'registration_ids'=>array(...));$data=json_encode($json);$context=array('http'=>array('method'=>'post','header'=>'Authorization:key=MY_SECRET_KEY'."\r\n".'Content-Typ

php - 如何获得 facebook 应用程序的 publish_stream 权限?

我有一个已经运行了一段时间的应用程序,它只请求了一些用于登录目的的帐户信息。现在我想用它来发布到流。我已将publish_stream添加到req_perms,但它仍然没有请求该权限。我错过了什么吗?FACEBOOKAPPID,'secret'=>FACEBOOKSECRET,'cookie'=>false,));$fb_session=$facebook->getUser();$fb_me=null;//SessionbasedAPIcall.if($fb_session){try{$fb_uid=$fb_session;$fb_me=$facebook->api('/me');$f

php - Laravel Spark 无法正确引入 css

我正在尝试使用Spark以了解如何使用它。我按照安装说明在Homestead下进行了新安装。从路由页面生成的css链接是没有生成css。所以,主页被劫持了。谁能帮我找出问题所在?更新以下是我在运行npminstall时收到的警告:npmWARNpackage.jsonlaravel-spark@1.0.12NoREADMEdatanpmWARNunmetdependency/home/vagrant/projects/spark-test/node_modules/laravel-elixir/node_modules/browserifyrequiresglob@'^4.0.5'bu

php - 个人资料图片的 Laravel Spark 符号链接(symbolic link)不起作用

我在新安装的Spark中遇到存储目录的符号链接(symboliclink)问题。我查看了Spark文档(foundhere),并尝试按照链接存储目录部分下的说明进行操作。但是,当我运行命令时ln-s/storage/app/public/public/storage我收到以下错误:ln:创建符号链接(symboliclink)“/public/storage”失败:没有这样的文件或目录。这很奇怪,因为我已经通过命令行和我的编辑器进行了检查,并且该目录确实存在。我也试过ln-sr/storage/app/public/public/storage建议here.这确实创建了符号链接(sym

PHP 警告 : require_once(/var/www/html/wp-config. php) : failed to open stream: Permission denied in/var/www/html/wp-load. php on line 37

我正在apache上创建一个Wordpress应用程序服务器,在访问url时收到错误500。因此,我确实检查了httpd/logs/error_log,以下是错误[SunJan1522:42:54.4403492017][:error][pid767][client10.203.116.148:9173]PHPWarning:require_once(/var/www/html/wp-config.php):failedtoopenstream:Permissiondeniedin/var/www/html/wp-load.phponline37[SunJan1522:42:54.44

php - file_put_contents(.../bootstrap/cache/services.json) : failed to open stream: No such file or directory

我在运行任何phpartisan命令时一直收到此错误。[ErrorException]file_put_contents(/Applications/MAMP/htdocs/code/bheng/md-bheng/bootstrap/cache/services.json):failedtoopenstream:Nosuchfileordirectory我该如何阻止它? 最佳答案 编辑-如果services.json文件不存在,运行phpartisanserve然后停止强制创建文件。请参阅:laravelservices.jsonn

php - 使用 Graph API 通过 PHP 发布到 Facebook Stream

我正在尝试使用新的图形API和PHP将消息发布到用户的墙上。连接似乎工作正常,但没有出现任何帖子。我不确定如何正确设置发布代码。请帮帮我。抱歉,看起来很糟糕的代码,出于某种原因,StackOverflow不想在代码块中将其全部关闭。下面是我的完整代码。我是否缺少扩展程序权限请求,或者是否在这段代码中得到了注意:PHP代码'xxxxxxxxxxxxxxxxxx','secret'=>'xxxxxxxxxxxxxxxxxxxxxxxxxx','cookie'=>true));$session=$facebook->getSession();if(!$session){$url=$faceb

php - stream_socket_client 通过 http 代理

我正在研究APNS(Apple推送通知服务)。我正在按照教程所说的那样做:$ctx=stream_context_create();stream_context_set_option($ctx,'ssl','local_cert','ck.pem');stream_context_set_option($ctx,'ssl','passphrase',$passphrase);$fp=stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195',$err,$errstr,60,STREAM_CLIENT_CONNECT|

php - Apache Spark - 后端服务器

我用PHP开发了一个报告应用程序。该应用程序是用HTML、CSS、javascript库、图表库(Highcharts)和MySQL构建的,用于存储数据。用户在前端选择一些选项并单击“提交按钮”。然后PHP层执行一堆需要的SQL,将json结果返回给绘制图表和数据表的UI。现在的要求是,能够将大数据解决方案ApacheSpark插入现有应用程序。在过去的两周里,我一直在研究是否可以使用RESTAPI或某种SparkSQL驱动程序以某种方式插入PHP应用程序以连接到SparkSQL服务器并执行我现在拥有的同一组SQL,在星火SQL。我还没有找到解决方案。我现在开始研究基于java的技术,