본문 바로가기

개발 & IT/백엔드

(49)
[Apache] upload file size limit PHP-Apache로 구동 중인 서버의 업로드 파일 사이즈 변경php 환경설정 파일의 위치를 확인한다.$ find / -name php.iniphp.ini 파일을 open$ sudo vim /etc/php/7.2/apache2/php.inipost_max_size, upload_max_filesize 필드를 찾아 원하는 값으로 수정한다.post_max_size = 100M...upload_max_filesize = 100M 혹은 sed 명령어도 수정한다.# 예시: /etc/php/7.2/apache2/php.ini 파일 수정PHP_INI="/etc/php/7.2/apache2/php.ini"# post_max_size 설정 (있으면 주석 제거 및 값 변경, 없으면 맨 아래 추가)sudo sed -i '/..
[face-api.js] 얼굴인식 https://justadudewhohacks.github.io/face-api.js/docs/index.html face-api.js face-api.js JavaScript API for face detection and face recognition in the browser implemented on top of the tensorflow.js core API (tensorflow/tfjs-core) Table of Contents: Resources Live Demos Check out the live demos! Tutorials Check out my face-api.js t justadudewhohacks.github.io 업로드된 파일에서 사람을 인식해서 학습하고, 학습된 데이터 내에서 ..
[fluent-ffmpeg] video codec 변경 flutter로 작성한 모바일앱에서 첨부한 동영상 파일 중 일부가 재생 안 되는 현상 발생. 동영상 코덱이 재생할 수 없는 형태로 인코딩 되어있음을 확인했다. nodejs 구성한 백엔드에서 첨부된 비디오 코덱을 일괄 변경하기로 결정. fluent-ffmpeg이라는 라이브러리를 사용했다. https://www.npmjs.com/package/fluent-ffmpeg fluent-ffmpeg A fluent API to FFMPEG (http://www.ffmpeg.org). Latest version: 2.1.2, last published: 5 years ago. Start using fluent-ffmpeg in your project by running `npm i fluent-ffmpeg`. The..
[PHP] XMLWriter https://www.php.net/manual/en/book.xmlwriter.php ※ 참고 사이트 : https://board.phpbuilder.com/d/10356853-a-quick-php-xmlwriter-class-tutorial-xml-amp-rss/2 A quick PHP XMLWriter Class Tutorial (XML & RSS) Since there is absolutely no documentation on how to use PHP5's XMLWriter class, here is a very simple example of how to use the class to create an rss feed.... board.phpbuilder.com
[Swift] EXC_BREAKPOINT (SIGTRAP) 앱이 특정 케이스에서 crash 되는 오류가 발생. 오류를 보니 EXC_BREAKPOINT 라는 exception이 발생했다. Apple Developer Documentation developer.apple.com 애플 문서를 보면,, trace trap이 특정 지점에 프로세스를 중단했다는 말이라고 하는데.. swift 런타임은 복구할 수 없는 오류가 발생했을 경우 trace trap을 사용해서 프로세스를 중단시킨다고 한다. https://developer.apple.com/documentation/xcode/addressing-crashes-from-swift-runtime-errors Apple Developer Documentation developer.apple.com 관련 문서를 보면 nil ..
[laravel5.5] 302 redirect status code 컨텐츠를 수정할 Controller를 작성한 후 Route::post('/contents-video-sort', 'ContentsController@changeLectureOrder'); 프론트에서 호출하였을 때 axios.post("/contents-video-sort", {list : this.list.data}) .then(...) 아래와 같이 302 redirect error 가 나면서 호출이 되지 않는 문제가 발생하였다. 찾아보니 CSRF 문제일 수 있다고 했다. https://stackoverflow.com/questions/42426859/laravel-ajax-post-request-does-not-work-302-found Laravel Ajax POST Request does not w..
[Swift] hierarchy 문제 AController(UINavigationController). topViewController = BController(UIViewController) 로 호출한 뷰컨트롤러를 다시 호출할 경우 계층 문제 발생하며 컨트롤러가 로드되지 않는 문제 발생. 뷰 컨트롤러 호출하기 전에 현재 호출된 뷰 컨트롤러 체크 후 동일한 뷰컨트롤러이면 dismiss 하도록 수정 let pvc = self.presentedViewController //현재 컨트롤러가 UINavigationController 니? if let nc = pvc as? UINavigationController, nc.viewControllers.count > 0 { //고렇다면 현재컨트롤러의 topViewController가 BControlle..
[laravel 5.5/QueryBuilder] SubQuery 같은 테이블 데이터를 조인해서 id로 group by 하고 생성된 테이블 데이터의 기간 차이를 가져올 예정. subquery에서 select 하는 querybuilder 가 존재하지 않으므로.. logs 테이블을 조건검색하는 sql문을 생성한다. $sql = $this->logs() ->select('logs.id', 'logs.createdate', DB::raw('MIN(b.createdate) as nextdate')) ->leftJoin('logs as b', function($join) { $join->on('logs.id', '=', 'b.id'); $join->on('logs.createdate', '

반응형