草庐IT

bad-alloc

全部标签

PHP GD : Bad quality on resize?

我不喜欢我输出的调整大小的图像,imagecopyresized($resized_img,$new_img,0,0,0,0,$newwidth,$newheight,$width,$height);ImageJpeg($resized_img,"$path_thumbs/$rand_name.$file_ext",100);我在ImageJpeg中添加了100,因为我希望提高质量,但它并没有变得更好。我如何提高调整大小的图像/缩略图的质量 最佳答案 尝试使用imagecopyresampled反而。这会进行插值,这会让事情看起来更

file-upload - PHP fatal error : Out of memory (allocated 80740352) (tried to allocate 12352 bytes) in

当用户在我的网站上上传图片时出现此错误。错误消息是“PHPfatalerror:/home中内存不足(已分配80740352)(已尝试分配12352字节)......”我该如何使用php.ini解决这个问题?这是我当前的上传php.ini设置upload_max_filesize=2000M;post_max_size=2000Mmax_file_uploads=8有什么想法我还需要添加什么来解决这个错误吗? 最佳答案 最佳memory_limit值取决于您对上传文件的处理方式。您是使用file_get_contents还是GD库将

file-upload - PHP fatal error : Out of memory (allocated 80740352) (tried to allocate 12352 bytes) in

当用户在我的网站上上传图片时出现此错误。错误消息是“PHPfatalerror:/home中内存不足(已分配80740352)(已尝试分配12352字节)......”我该如何使用php.ini解决这个问题?这是我当前的上传php.ini设置upload_max_filesize=2000M;post_max_size=2000Mmax_file_uploads=8有什么想法我还需要添加什么来解决这个错误吗? 最佳答案 最佳memory_limit值取决于您对上传文件的处理方式。您是使用file_get_contents还是GD库将

php - fatal error : Allowed memory size of 67108864 bytes exhausted (tried to allocate 39 bytes) in xxx/xxx/xxx/xxx

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭6年前。Improvethisquestion我在godaddy托管了一个drupal网站。但现在有几天我正在与最奇怪的问题作斗争“fatalerror:允许的67108864字

php - preg_replace : bad regex == 'Unknown Modifier' ?

我正在编造假的电子邮件地址,我只是想确保它们采用有效的电子邮件格式,所以我试图删除不在以下集合中的任何字符:$jusr['email']=preg_replace('/[^a-zA-Z0-9.-_@]/g','',$jusr['email']);我在我的windows机器上没有遇到任何问题,但是在linux开发服务器上我每次运行这段代码时都会收到这个错误:Warning:preg_replace()[function.preg-replace]:Unknownmodifier'g'in/var/www/vhosts/....我认为这是正则表达式字符串,但我无法确定。帮助不大?谢谢。澄清

php - fatal error : Allowed memory size of 134217728 bytes exhausted (tried to allocate 87 bytes)

当我登录到我的Web应用程序时,它显示如下错误:Fatalerror:Allowedmemorysizeof134217728bytesexhausted(triedtoallocate87bytes)in/gt/2.ps.fo/home/hft/domains/console.fo.spalgo.com/public_html/cake/libs/model/datasources/dbo/dbo_mysql.phponline775有什么办法可以解决这个问题吗?为什么会出现此错误? 最佳答案 听起来你已经分配了morememor

php - Laravel 社交名媛 Facebook 错误 : "POST https://graph.facebook.com/oauth/access_token resulted in a ` 400 Bad Request` "

这个问题在这里已经有了答案:OAuthError:ThisIPcan'tmakerequestsforthatapplication(4个答案)关闭3年前。我已经使用LaravelSocialite为facebook进行了社交登录,并且运行良好。我没有改变任何东西,现在它不起作用。尝试登录时显示此错误:客户端错误:POSThttps://graph.facebook.com/oauth/access_token导致400错误请求响应:{"error":{"message":"ThisIPcan'tmakerequestsforthatapplication.","type":"OAut

php - 502 Bad Gateway PHP Storm 但设置了解释器和可执行文件

操作系统:Windows7-64位PHP:独立的php.exe(PHP5.5版)PHPStorm版本:10.0.1我看到的所有关于解决PhpStorm中的502网关错误的建议都涉及确保您拥有解释器和可执行文件集。我正在使用独立的php.exe(http://windows.php.net/download#php-5.5VC11x86线程安全(2015-Oct-0101:25:56))并将所有内容设置为PHP5.5老实说,我很困惑为什么我仍然收到502错误。我已经多次运行它,它确实运行了一次(之前或之后的实例都没有变化),我发现这非常奇怪,但仅适用于一页加载,而且它不是可重复的。编辑:

php - 服务器恢复后 502 Bad Gateway Nginx

所以我有一个Ubuntu服务器,我正试图从备份中恢复它。当出现虚拟PHP版本页面时,我得到502BadGateway。我尝试过什么来修复它?很多事情,包括这个相关问题的答案-nginx502badgateway这是我在Ubuntu上的默认配置server{listen80;#listen[::]:81ipv6only=ondefault_server;root/var/www/html;indexindex.phpindex.htmlindex.htm;server_namelocalhost;location~*\.(js|css|png|jpg|jpeg|gif|ico|html)

Android 模拟器和 OpenGL ES3 : EGL_BAD_CONFIG

我正在运行AndroidVirtualDevice在我的Ubuntu主机上。它使用的是CPU/ABIIntelAtom(x86),而我使用的是主机GPU。模拟器正在使用Kernel-basedVirtualMachine.只要我使用OpenGLES2上下文,它就可以很好地工作。但是,如果我的应用尝试创建OpenGLES3上下文,则使用...constEGLintcontextAttribs[]={EGL_CONTEXT_CLIENT_VERSION,3,EGL_NONE};context=eglCreateContext(display,config,NULL,contextAttri