bootes
bootes OP wrote
Reply to comment by WindTalk in 404 errors with index.php by bootes
my memory limit is -1 already. php 7.2 using the php.ini located under the 7.2 directory.
bootes OP wrote
Reply to comment by WindTalk in 404 errors with index.php by bootes
ok. Finally got the exact error:
2018/02/28 07:39:51 [error] 2158#2158: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Postmill/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 109
PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /Postmill/vendor/symfony/debug/Exception/OutOfMemoryException.php on line 1" while reading response header from upstream, client: 192.168.1.100, server: 192.168.1.109, request: "GET /login HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "192.168.1.106"
$ cat /proc/meminfo
MemTotal: 4039996 kB
MemFree: 1599136 kB
MemAvailable: 2040880 kB
Buffers: 84896 kB
Cached: 579648 kB
SwapCached: 0 kB
Active: 622112 kB
Inactive: 447528 kB
Active(anon): 439524 kB
Inactive(anon): 30144 kB
Active(file): 182588 kB
Inactive(file): 417384 kB
Unevictable: 1210420 kB
Mlocked: 1210420 kB
SwapTotal: 1043964 kB
SwapFree: 1043964 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 1615536 kB
Mapped: 116184 kB
Shmem: 36372 kB
Slab: 117284 kB
SReclaimable: 89756 kB
SUnreclaim: 27528 kB
KernelStack: 4336 kB
PageTables: 13224 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3063960 kB
Committed_AS: 2435176 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 212992 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 71616 kB
DirectMap2M: 4122624 kB
bootes OP wrote
Reply to comment by WindTalk in 404 errors with index.php by bootes
Im not sure on top, I'll give that a check. But the error Im getting is
Fatal error: Out of memory (allocated 17039360) (tried to allocate 77824 bytes) in /postmill
I have my php.ini memory limit set to -1
bootes OP wrote
Reply to comment by WindTalk in 404 errors with index.php by bootes
I got it up and running now sorta. I figured out the permissions issues, but Now Im running into memory issues with PHP. Since Im running it on a test VM, I figured thats the problem , even with 4g dedicated to it...but still.
I 've got a raspberry PI for some other projects comming. I'll wait till then.
bootes OP wrote
Reply to comment by WindTalk in 404 errors with index.php by bootes
Not yet. I have not had a chance to try this yet. Im planning on this weekend giving it a go.
bootes OP wrote (edited )
Reply to comment by emma in 404 errors with index.php by bootes
server {
listen 80;
server_name 192.168.1.109;
root /Postmill/public;
index index.php;
location / {
# try to serve file directly, fallback to index.php
#try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param APP_ENV 'prod';
fastcgi_param APP_SECRET 'xxx';
fastcgi_param SITE_NAME 'TestSite';
fastcgi_param DATABASE_URL 'pgsql://xxx:xxx@localhost:5432/postmill?serverVersion=10';
fastcgi_param MAILER_URL 'smtp://localhost:25?encryption=&auth_mode=';
fastcgi_param NO_REPLY_ADDRESS '[email protected]';
include fastcgi_params;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
# return 404 for all other php files not matching the front controller
# this prevents access to other php files you don't want to be accessible.
location ~ \.php$ {
return 404;
}
error_log /var/log/nginx/project_error.log;
access_log /var/log/nginx/project_access.log;
}
bootes OP wrote
Reply to comment by WindTalk in Looking for project root - newbe question by bootes
Thanks!
bootes OP wrote
Reply to comment by WindTalk in Looking for project root - newbe question by bootes
duh..shit. I didn't even thing of hidden files. Stupid windows brain.
psql (PostgreSQL) 9.6.6 , But I can upgrade to 10.
bootes OP wrote
Reply to comment by WindTalk in 404 errors with index.php by bootes
php -v
PHP 7.2.2-3+ubuntu17.10.1+deb.sury.org+1 (cli) (built: Feb 6 2018 16:11:55) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.2-3+ubuntu17.10.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
php -ini
$ php -i-ini phpinfo() PHP Version => 7.2.2-3+ubuntu17.10.1+deb.sury.org+1
System => Linux reddit 4.13.0-32-generic #35-Ubuntu SMP Thu Jan 25 09:13:46 UTC 2018 x86_64 Build Date => Feb 6 2018 16:11:55 Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /etc/php/7.2/cli Loaded Configuration File => /etc/php/7.2/cli/php.ini
$ cat /etc/php/7.2/cli/php.ini | grep 'memory_limit'
memory_limit = -1