Jump to content

Hector Nguyen

  • Content Count

  • Joined

  • Last visited

Community Reputation

29 Excellent

About Hector Nguyen

  • Rank
    Jr. Member
  • Birthday September 23

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    The Colony

Recent Profile Visitors

857 profile views
  1. @MoritzLost Do you encountered any issue with the autoloader? I used this inside public/site/init.php require __DIR__ . '/../vendor/autoload.php'; But the autoloader cannot work properly, it is saying my namespace is undefined 2021-04-14 08:38:10 nntoan http://xxx.test/ Fatal Error: Uncaught Error: Call to undefined function QFramework\Phrase() in /srv/users/capima/webapps/xxx/releases/1/public/site/templates/home.php:10 Stack trace: #0 /srv/users/capima/webapps/xxx/releases/1/public/wire/core/TemplateFile.php(318): require() #1 /srv/users/capima/webapps/xxx/releases/1/public/wire/
  2. @ryan I'm afraid not, fget() in PHP will return one string (a line) but fgetcsv() will return an indexed array. An array in PHP is not very friendly with big dataset because it's still saved into the memory! The main difference is in memory usage. In the first case all the data are in memory when you return the array. Because of no matter what, if you "returns" values, that will be save in memory. In the second case you get a lazy approach, and you can iterate the values without keeping all of them in memory. This would be a great benefit when memory is a constraint compared to the s
  3. I think you could try the generators here while you are playing with CSV. For .eg <?php function getRows($file) { $handle = fopen($file, 'rb'); if ($handle === false) { throw new Exception('open file '.$file.' error'); } while (feof($handle) === false) { yield fgetcsv($handle); } fclose($handle); } // allocate memory for only a single line in the csv file // do not need the entire csv file is read into memory $generator = getRows('../data/20_mil_data.csv'); // foreach ($it as $row) {print_r($row);} while ($generator->valid()) { print_r(
  4. Will all plugins from 2.7.x or 2.8.x will works on 3.x version? In the plugin directory I saw only few plugins compatiable with 3.x, that is why I asked 3.x or 2.x. Another question is can I manage my own plugin via composer? Or can we install ProcessWire via composer? For some not so secret reasons, I marriaged with Composer
  5. Regarding to #5 (config files), ProcessWire does store database configuration in site/config.php, isn't it?
  6. Hi @szabesz, thanks for your interesting. I've created poor documentation here: https://magephp.github.io I'm using GitLab and GitLab CI for all projects I had. So the purpose of the tool is, whenever I have a new push or accept merge request to production branch (master) or staging branch on GitLab. GitLab CI will start building my project and execute Magallanes deploy command. The repo changes content will be pulled to my server as a new release, and that release directory will be symlink to my `public_html` directory. I'm using 2 environments: production and staging.
  7. Hello everyone, I didn't play much with ProcessWire, my project has just started and I have no experience about how ProcessWire will be when go live. I'm using a tool to deploy my code automatically to production server after build passed (Magallanes). Please give me the answers for the questions below: Which folders/files will be created by the application after installed ? Which folders/files usually be overwritten? Which folders/files using as cache, as session, as temporary? Do ProcessWire supports logs? If so, where is it? Which files are using as c
  8. One more question, which version I should use? PW 2.7 or 3.0? Is there any comparison between 2 version above? I tried myself both of them and see no differences at all.
  9. I'm sorry if content is duplicated, but I'm wondering if it work with 3.0 version?
  10. Thanks to @mr-fan and the others It's more clearly to me now, so I may have Categories/Category, Books/Book but Chapter will standalone? I also taking a note and stick it into my screen: "Pages is everything in PW". Thank you (all of you and yes you) once again, I'm trying it right now and will come back soon
  11. Hi @szabesz, As my understanding, you recommend me to use one-to-many to solve relationship in my case, right? But there are two things confusing me right now: How does Chapters/Chapter make sense in my case? Because there are thoudsand of chapters for a book, so if I use relationship like Chapters/Chapter, it mean one "Chapters" template contains million of "Chapter" templates. How can I living among them? Quite confused to me
  12. I know that package, but seems people forgot about them nowadays so I pick that name
  13. I'm using NodeQuery to monitor all servers I have. It is SaaS and quite useful to me.
  14. Actually, mobile shell is what I'm using at this moment not mine script. But mosh is in heavily development and it denied to work with mouse scroll then in few hosting providers, they doesn't allow you to white list port range (scaleway.com for example). That is why I have to write this to use it in few case. Like SSH tunneling or NAT....
  15. Hello there, If you are the guy who is living in terminal like me, then I assume that you will love this script If you usually SSH-ing to servers, then I believe you used to have headache when you are trying to keep your SSH sessions alive. Most of them can resolve by adding this to your ~/.ssh/config Host * ServerAliveInterval 60 But if you are working in a company or you are connecting to Interet through VPN/Proxy, then your SSH sessions are really unstable. Like this: Write failed: broken pipe packet_write_wait connection to: XXXXX To use this script, you c
  • Create New...