草庐IT

error500

全部标签

php - 大文件上传时的 Apache 错误 500 (mod_security)

就我所尝试的而言,常用的解决方案都不适合我。好吧,我的问题是,每次我上传“大文件”(600KB~)时都会收到500错误,而较小的图像效果很好。所以...,即使使用这个(极端的).htaccess文件,它也会继续发生,是的,.htaccess是事件的:upload_max_filesize=100Mpost_max_size=100Mmemory_limit=128Mmax_input_time=6000max_execution_time=6000因此,我查看了日志并发现了这一点(只有一行,只是将其粘贴为易于阅读并带有行跳转):[MonJul2717:09:28.2015][:erro

php - fatal error : Out of memory (allocated 1979711488) (tried to allocate 131072 bytes) error occur while writing xlsx file using phpexcel

我已经集成了xlsx文件,用于使用phpexcel从数据库写入。我想在xlsx文件中写入3,00,000条记录。但直到通过Fatalerror:Outofmemory(allocated1979711488)(triedtoallocate131072bytes)我的PHP版本5.3.28我还设置了phpini和单元格缓存,请参阅下面的代码ini_set('max_execution_time',-1);ini_set('memory_limit','-1');$cacheMethod=PHPExcel_CachedObjectStorageFactory::cache_in_memo

php - Laravel 解析错误 : syntax error, unexpected T_CLASS, expecting T_STRING

我在今年8月开发了一个laravel应用程序,当时它运行良好。我现在正在尝试运行该应用程序,但它返回了这个错误:parseerror:syntaxerror,unexpectedT_CLASS,expectingT_STRINGorT_VARIABLEor'{'or'$'inD:\bkonme\artisanline31第31行是这样的:$kernel=$app->make(Illuminate\Contracts\Console\Kernel::class);我的PHP版本是5.6.14,我在windows平台上使用XAMPP。我有一些想法,因为laravel和PHP之间存在一些版本

php - 安全抛出 500 异常,在 TokenStorage 中找不到 token ,而不是 403 或 401

我通过ApiKey进行授权,如果没有提供授权数据,我想得到401Unauthorized,如果授权数据无效,我想得到403Forbidden.但是我在这两种情况下都遇到了500InternalServerError。security.yml:security:providers:api_key_user_provider:entity:class:RestBundle:RestUserproperty:apikeyfirewalls:rest_api_area:pattern:^/apistateless:truerest_auth:header:x-apikeyprovider:ap

javascript - 拉维尔 5.2 :How to show validation errors when submitting form with ajax?

我正在使用laravel5.2,我的问题是:使用ajax提交表单时如何显示验证错误?例如:不使用ajax时,如果title字段没有填写,提交的时候有信息:“标题字段是必需的。”以及,当使用ajax时,如何显示上面的信息。查看:Title:Content:Photo:SubmituploadsuccessfullyJavascript:$(function(){vararticleData=newFormData($('#formArticle')[0]);$(document).on('submit','#formArticle',function(e){e.preventDefaul

php - Symfony2 404 错误 : Object Not Found (ParamConverter error)

我创建了一个名为search.html.twig的新边界类,但是当我转到URL(http://localhost:8000/shrubs/search)时,出现以下错误:ERROR-UncaughtPHPExceptionSymfony\Component\HttpKernel\Exception\NotFoundHttpException:"AppBundle\Entity\Shrubsobjectnotfound."atC:\Users\rosmith\shrub_search\vendor\sensio\framework-extra-bundle\Request\ParamCo

php - curl 错误 : OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

我一直收到这个错误,我正在运行OSX、PHP71、Apache2.4、OpenSSLphp-i|grep"SSLVersion"返回SSLVersion=>OpenSSL/1.0.2kPHP和CURL已经安装如下:$brewinstall--with-opensslcurl$brewinstall--with-homebrew-curl--with-httpd24php71 最佳答案 我刚刚遇到了同样的问题。以防其他人遇到这个问题,我使用它:vagrantboxaddlaravel/homestead-c--insecure使用的选

php - Symfony 3.3 从 3.2 : Compile Error: Cannot declare class Symfony\Bundle\SecurityBundle\Security\FirewallMap

自从我从symfony3.2更新到3.3后我遇到了一些问题,我得到了这个错误CompileError:CannotdeclareclassSymfony\Bundle\SecurityBundle\Security\FirewallMap,becausethenameisalreadyinuseinclasses.php(line1709)inClassCollectionLoader.php(line99)atClassCollectionLoader::load()inKernel.php(line428)atKernel->doLoadClassCache()inKernel.p

PHP 7.1.7 imagecreatetruecolor 产生 500 错误

我一直在将我的网站更新到PHP7.1.7和IIS,但遇到了imagecreatetrucolor抛出500错误的问题。http://localhost/test.php500(InternalServerError)该文件中唯一的代码行是这一直在PHP5.6.31和Apache下的站点中运行并返回resource(2)oftype(gd)GDimaging在7.1.7下的phpinfo()中被列为GDimagingRasmusLerdorf,StigBakken,JimWinstead,JouniAhto,IliaAlshanetsky,Pierre-AlainJoye,MarcusB

php - 可疑操作异常 : Invalid Host error

大家我有一个使用Laravel5.4(最新版本)构建的网站,我每天都会在我的日志中多次收到此“SuspiciousOperationException:无效主机错误”。尽管它似乎没有影响我网站的功能,但我担心它可能是某些配置错误的征兆–至少,它污染了我的日志文件,使错误跟踪变得更加困难。我试图自己弄清楚是什么原因造成的,但我缺乏经验表明……我对可能导致这种情况的原因有所了解,但我无法证实我的理论,也不知道如何解决这个问题。错误信息如下:[2017-08-0323:47:03]production.ERROR:Symfony\Component\HttpFoundation\Except