Leaderboard
Popular Content
Showing content with the highest reputation on 09/30/2024 in all areas
-
@bernhardIn this test, I didn't want to install benchmark tools, so I just used PHP (code below) with the following results: test 1) Elapsed Processwire Boot time Apache/2.4.62: 0.1405s Page load time: 6.53 ms Database query time: 0.5 ms Memory used: 325.21 KB Elapsed Processwire Boot time nginx/1.26.1: 0.1175s Page load time: 4.68 ms Database query time: 0.65 ms Memory used: 256.13 KB test 2) Elapsed Processwire Boot time Apache/2.4.62: 0.2145s Page load time: 6.42 ms Database query time: 0.45 ms Memory used: 325.21 KB Elapsed Processwire Boot time nginx/1.26.1: 0.1512s Page load time: 4.86 ms Database query time: 0.64 ms Memory used: 256.13 KB test 3) Elapsed Processwire Boot time Apache/2.4.62: 0.1809s Page load time: 48.97 ms Database query time: 0.7 ms Memory used: 325.21 KB Elapsed Processwire Boot time nginx/1.26.1: 0.0909s Page load time: 4.65 ms Database query time: 0.64 ms Memory used: 256.13 KB <?php $home = $pages->get('/'); /** @var HomePage $home */ $start_time = microtime(true); $start_memory = memory_get_usage(); $start_query_time = microtime(true); $pages = $pages->find("template=basic-page"); $query_time = microtime(true) - $start_query_time; ?> ?><!DOCTYPE html> <!-- STANDARD >main.php body--> <?php $end_time = microtime(true); $page_load_time = $end_time - $start_time; $end_memory = memory_get_usage(); $memory_used = $end_memory - $start_memory; $elapsed = Debug::stopTimer($timer, 's'); // Debug::startTimer in index.php ?> <div> <p>Elapsed Processwire Boot time <?php echo $_SERVER['SERVER_SOFTWARE'] . ': ' . $elapsed ?><br> Page load time: <?php echo round($page_load_time * 1000, 2); ?> ms<br> Database query time: <?php echo round($query_time * 1000, 2); ?> ms<br> Memory used: <?php echo round($memory_used / 1024, 2); ?> KB</p> </div> </body> </html> Breakdown of results: Elapsed ProcessWire Boot Time: NGINX consistently shows lower boot times, indicating it may handle PHP requests more efficiently than Apache in this test case. Page Load Time: The page load time in the third test for Apache (48.97 ms) is an anomaly I can't explain. Caching? Network latency? Database Query Time: Apache and NGINX have similar query times Memory Used: Memory usage is relatively low, and the difference between the two servers is not substantial.3 points
-
Meta are disabling the Instagram Basic Display API on December 4th, 2024. After this point, the InstagramBasicDisplayApi module will no longer function. Meta do provide an API that can be used to access Instagram media, Instagram API with Instagram Login. Using this API I've been able to refactor InstagramBasicDisplayApi as a new module called InstagramMediaDisplay: https://github.com/nbcommunication/InstagramMediaDisplay The main caveat with using this module (and API) is that personal and/or private accounts cannot be used. If you try to generate an access token for a personal account, IG will prompt you to upgrade to a business account. As far as I'm aware this is still a free account, and the main limitation is that you cannot use licensed music in the same way you can on a personal account. I have access to various IG accounts, some personal, some business, and I've never noticed a difference. This new module is built to supersede InstagramBasicDisplayApi and its implementation is practically identical. Upgrading should simply be a case of installing, configuring your new Meta app, authorising the same account(s), and updating the call to the previous module to call this one: <?php // $instagram = $modules->get('InstagramBasicDisplayApi'); $instagram = $modules->get('InstagramMediaDisplay'); Cheers, Chris2 points
-
1 point
-
So funny, I was yesterday reading the RockFrontend Docs and planned a little project to test this out ^^1 point
-
@Robin S I am sorry for the confusion, the issue is related to the Custom Logs module for sure. I mixed up the modules because both support threads were open in my browser, and I picked the wrong one. I use the modules in tandem, as that is the most obvious way to have the best log viewing experience. As for the issue: "Do you have a custom log named 'my-log' defined in the module config?" Yes, I did set the file's name (without the extension) in the module config. The good news is that it has now "started to work". I'm not sure what I did right this time, but renaming it in the config and in my code fixed the issue. Maybe some invisible character was involved, I don't know (that's just my best guess), as I had definitely tried to make it work before I reported my issue. Thanks for both modules and your support as well!1 point
-
Hello @Cybermano I have published it again, with a fix for multilanguage sites, but it will take some time until the module will appear in the module directory again. In the meantime you can download it directly from GitHub. As fas as I know, an action on a parent page will have an effect on all childpages. Fe if the parent page will be unpublished, all child pages will be unpublished too. For example moving pages to another place. If you move the parent page to directory A, then all child pages will be also moved to directory A. But it is not possible to select between different templates of childpages. You cannot move child pages with template 1 to directory A and leave child pages with template 2 untouched. Sorry! It is also not possible to leave the parent page as it is and only move/trash/unpublish,.. child pages.1 point
-
Hi @Cybermano Yes, you are right. I have discovered some problems by using the module on a multilanguage site, so I have decided to unpublish the module now in the module directory, because I have not the time at the moment to make it more stable and to work properly. Maybe someday I will publish it again, but for now I cannot recommend you to use this module. Best regards Jürgen1 point
-
And another thing to mention / take care of. Just because ProcessWire seems to be running fine that doesn't mean that you are all done. For example what if one of the installed modules had a custom .htaccess in it's module folder that has some custom rules that are necessary to protect some files from direct access? As far as I understand nginx will not be able to read these instructions and you might be open to attacks, no? I think it should at least be clearly mentioned in this thread that anybody trying to use non-apache webservers for running ProcessWire has to take care of this risk on his own and check every single module and every single update or is otherwise really highjacking one of ProcessWires main strengths: Security. For me this seems like a very high risk to take and I'd really be interested in numbers of how much faster nginx is compared to apache so that one can decide whether it's really worth the risk and additional effort.1 point
-
I will study this issue, it promises a lot for me. I don't really want to use it. Thanks for attention.1 point
-
@szabesz, this is the support thread for Logs JSON Viewer but I think you are talking about the Custom Logs module. Custom Logs is working for me here with a log named "my-log", so it would be good to find out why it's not working for you. Do you have a custom log named "my-log" defined in the module config? What do you see if you use Tracy to do this... bd($name, "name"); bd($custom_logs, "custom_logs"); ...just before this line.1 point
-
1 point
-
I am looking for a developer to update ProcessWire CMF code on a website as well as some edits to the site. Our preference is to work with someone in the Ottawa, Ontario area. If interested, please contact us via: neiljjm@yahoo.ca and put IHA Developer Request in the subject line. Thank you.1 point
-
Here's the full vhost file for one of my PW sites that uses ProCache. (Note that I've changed the real domain to example.com, and the ProCache string to "ProCache-xxxxxxxxxxxxx".) server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name example.com; return 301 https://www.example.com$request_uri; } server { listen 8080; listen [::]:8080; server_name www.example.com www1.example.com; {{root}} index index.php index.html; } server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name www.example.com www1.example.com; {{root}} index index.php index.html; {{nginx_access_log}} {{nginx_error_log}} if ($scheme != "https") { rewrite ^ https://$host$uri permanent; } location ~ /.well-known { auth_basic off; allow all; } {{settings}} location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ { add_header Access-Control-Allow-Origin "*"; expires 48h; access_log off; try_files $uri $uri/ /index.php?it=$uri&$args; } # Block access to ProcessWire system files location ~ \.(inc|info|module|sh|sql)$ { deny all; } # Block access to protected assets directories location ~ ^/(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) { deny all; } # Block acceess to the /site/install/ directory location ~ ^/(site|site-[^/]+)/install($|/.*$) { deny all; } # Block dirs in /site/assets/ dirs that start with a hyphen location ~ ^/(site|site-[^/]+)/assets.*/-.+/.* { deny all; } # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php location ~ ^/(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ { deny all; } # Block access to any PHP-based files in /templates-admin/ location ~ ^/(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP or markup files in /site/templates/ location ~ ^/(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP files in /site/assets/ location ~ ^/(site|site-[^/]+)/assets($|/|/.*\.php)$ { deny all; } # Block access to any PHP files in core or core module directories location ~ ^/wire/(core|modules)/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any PHP files in /site/modules/ location ~ ^/(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any software identifying txt files location ~ ^/(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ { deny all; } # ProCache Rules set $cache_uri $request_uri; if ($request_method = POST) { set $cache_uri 'nocache'; } if ($request_method = HX_REQUEST) { set $cache_uri 'nocache'; } if ($http_cookie ~* "wires_challenge") { set $cache_uri 'nocache'; } if ($http_cookie ~* "persist") { set $cache_uri 'nocache'; } # ----------------------------------------------------------------------------------------------- # This location processes all other requests. If the request is for a file or directory that # physically exists on the server, then load the file. Else give control to ProcessWire. # ----------------------------------------------------------------------------------------------- location / { expires -1; try_files /site/assets/ProCache-xxxxxxxxxxxxx/$cache_uri/index.html $uri $uri/ /index.php?it=$uri&$args; } location ~ \.php$ { include fastcgi_params; fastcgi_intercept_errors on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri =404; fastcgi_read_timeout 3600; fastcgi_send_timeout 3600; fastcgi_param HTTPS "on"; fastcgi_param SERVER_PORT 443; fastcgi_pass 127.0.0.1:{{php_fpm_port}}; fastcgi_param PHP_VALUE "{{php_settings}}"; } if (-f $request_filename) { break; } } Hope this helps.1 point
-
This idea is so under rated. Forums have declined in popularity as the primary communication method for software projects and general communities over the years in place of social networks and chat apps (Reddit, Discord, Twitter, Facebook). This makes me very sad because I find forums to be the optimal way to communicate while maintaining true control of the community. Discussions on Discord/Slack can't be discovered by a search engine. Twitter and similar services aren't ideal for long discussions. Reddit seems childish and their UI update is terrible. Facebook is closed and has bad discoverability. If ProcessWire didn't have this forum, it wouldn't be nearly the same. If a large software project similar to ProcessWire doesn't have a community powered by a forum like this, it's a big missing feature in my book. When I did a small Craft CMS project a few years ago, there was no equivalent to this forum, only Slack, although it did have a lot of people in it. Then if I asked a question that was answered in the past many times over, I would probably feel like an idiot.1 point
-
I set one myself, like so (from within a module): $this->wire('session')->set('cart', $cart);1 point
-
Related to Pete's 3rd point above: It might be helpful to potential respondents if people posting jobs here would also state what timezone they are operating in.1 point
-
Also wanted to add this as a disclaimer for this forum: Any arrangement for work made via this board is a private contract between the individuals concerned. ProcessWire and Ryan Cramer / Ryan Cramer Design, LLC or any of its agents cannot be held responsible for the operation of that contract or any of the financial arrangements and will not get involved in any disputes under any circumstances. If it goes wrong for any reason, it should be sorted away from this community. Thanks to Joss for the suggestion and wording.1 point