• Content count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About Karl_T

  • Rank
    Jr. Member

Profile Information

  • Gender

Recent Profile Visitors

538 profile views
  1. I want to try but unfortunately AWS do not provide this service in my region. I think it should be the best option regardless of the cost. I have not try cloud front yet but would like to use if that can speed the site up a lot. The first response time is really not good now, around 300ms while network latency is around 140ms.
  2. Thanks for your suggestion. It is really helpful. I have my debug mode enabled and only cache the assets/files folder now. The loading speed is 250-350ms. I am happy now! I guess the filecompiler in cache folder is the issue. Mounting the cache folder also break the whole processwire system some time showing syntax error with broken file, which is a disaster. However, it is still a huge(100%) slow down compared to not using such mounting file system, which may result in a much lower concurrent request cap. I want to try the elastic file system, the native cloud shared file system, but it serves limited region right now.
  3. After some time, I have tried using s3fs and another claimed faster replacement called goofys to mount s3 bucket to the asset folder. Processwire can work with s3fs, and has no problem with the image sizer fortunately, with the initial loading time increase from 100-200ms to 300-400ms, which is not quite acceptable. I guess the main reason for this is because the cache file is located inside the asset folder. And then I tried goofys. However, it takes over seconds to load the page. I don't know why it is the case. If anybody have experience with s3fs and goofys please share with me. Hopefully I can share my experience later on this topic. Edit: With debug mode off, goofys greatly improve the loading speed from 1-5s to 300-400ms
  4. Unfortunately, I cannot find any clue to get my exported site profile running by connecting remote AWS RDS. The issue should be due to the exported database file. install exported site profile and remote connect RDS database > stuck install exported site profile and local database > success install blank site profile and remote connect RDS database > success And then I tried not using the default processwire installer but import directly to the database and copy the existing files. It shows error that I don't have page "view" permission, then I gave up. I rebuild everything from blank profile again and connect processwire to the aws rds at the beginning and everything is fine. So, the conclusion is if you want to use aws with rds, maybe you should connect to rds at the beginning, otherwise you may stuck like me. And one small piece of information. RDS is very slow when using remotely. The response waiting time increase to 2 seconds from around 100ms. The normal ping from my place to their server is 70ms.
  5. Thanks for your opinion. I just try to use a blank site profile to start installation. This time it has no problem arouse. I am trying to figure out what is happening.
  6. Thanks for your information. I want to keep everything managed inside PW admin though as what my client need is a simple and native drag and drop image upload. Yes thanks for your reminder, I am planning to store the session on Redis for better performance.
  7. Thanks for the reply and link. I have tried install the site profile with local database and it has no problem. But when I try using remote database, the same issue appears. I have the debug mode on already, but no errors shown during the installation. Once I go back to homepage after stuck, the error shown Fatal error: Exception: Template 'admin' is used by the homepage and thus must have the 'guest' role assigned. (in wire\core\Templates.php line 145) but it seems like the error due to incomplete installation. The error log also has the same error only.
  8. The database connection is successful. But I stuck with this screen without any buttons after the page entering database info. I cannot make it to reach the set admin info page. I have inspected the remote database and all the tables and fields are looking good(I use site exporter).
  9. I am looking for a way to implement the alert/notice list look like the below image. SystemNotifications seems like the closest one, but I cannot find any way to modify it. Also, I think it is a more neat way to present them using individual page for each type of notification instead of display them all like the existing SystemNotifications. I can imagine a template called Notifications under admin. Under Notifications, we can add page using NotificationType template which can control the color. Then we can use something like $user->notifications->type->add("Message to send"); to add notification to a user when some events happen.
  10. Short question: is it possible that Processwire uses AWS S3 with s3fs as a remote file system(mount to asset folder)? Please advise anything that have to be take care of. Background: I am currently trying to make Processwire running inside AWS Beanstalk as I want to take advantages of the auto scaling function that my client wanted. I have found a discussion here: By reading this and the link inside, I realize that to use the auto scaling I need to configure my web server to be stateless. So, I was looking for a method that can serve the purpose and then I found s3fs. s3fs is a FUSE filesystem that allows you to mount an Amazon S3 bucket as a local filesystem, quoted from their github. I guess that mounting s3 bucket using s3fs to the asset folder should be the right thing to do. My site needs many image upload as it is an e-commerce site using padloper while the admin always using the local file system for images. I have thought of using modules like AmazonS3Cloudfront or FieldtypeFileS3. It seems like those modules are not support my use case. s3fs suits better and more simple. One of my concerns is that I am not sure can the URL of the images can be generated by the default API like $image->url correctly. Before implementing this, I would like to ask the advise from anyone having implemented this with processwire as I am new to AWS. Is it possible? Any better alternatives? I think if not implementing auto scaling, it is also good to separate asset away in some cases, like reducing requests. Thank you for your reading.
  11. Thanks for the great module, but I get the following error in php7 environment. It runs smoothly in php5. require_once(): Failed opening required '/home/admin/public_html/site/modules/AutoSmush./ImageOptimizer.php' (include_path='.:/usr/share/php') The error is gone after I change line 5 in AutoSmush.module from require_once /*NoCompile*/__DIR__ . './ImageOptimizer.php'; to require_once /*NoCompile*/__DIR__ . '/ImageOptimizer.php'; (remove dot before /ImageOptimizer.php) However, in Local tool optimizers info, the module cannot find any exe.(EDIT: I found that you have posted solution above. Let me try first, thanks) EDIT: Solved by simply apt-get install optipng jpegoptim gifsicle
  12. Thanks for the link. I have googled it and the others. Session folder exists and the permission is 777. Above is another solution I found, and Yes I am using Ubuntu too. However, I got the same error in both php5 and php7 setting.
  13. Hello everyone. I got the error "This request was aborted because it appears to be forged" and found the solution by adding $config->protectCSRF = false; to the config.php. I got the error when I follow this tutorial https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?page=1 and after submitting the form. I do not know much about protectCSRF but I think it is better to keep it as "$config->protectCSRF = false" disables protectCSRF in the whole site . I would like to know any ways to solve this error while keeping $config->protectCSRF = true; . Thank you.
  14. I am using Dev 3.0.33. It works after adding namespace to wire(). Thanks a lot!
  15. Thanks for your reply. I have also used PaegEditPerUser module which offers a $user->editable_pages array in the code below. I have tried using the Custom PHP like this: $p = new PageArray(); $editable_pages = $user->editable_pages; $branches = $pages->find("template=branch"); foreach($branches as $branch){ foreach ($editable_pages as $edit) { if($branch->id == $edit->id){ $p->add($branch); } } } return $p; I tested and this gives correct output in normal template. However, it gives "Error: Class 'PageArray' not found" when I try to enter edit. Then, I tried to remove the PageArray and change the code to: $p = []; $editable_pages = $user->editable_pages; $branches = $pages->find("template=branch"); foreach($branches as $branch){ foreach ($editable_pages as $edit) { if($branch->id == $edit->id){ $p=$branch; } } } return $p; This gives no error, but also no output. I suspect that the Custom PHP is not able to read the $user object so as the PageArray.