Jump to content

zoeck

Members
  • Posts

    436
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by zoeck

  1. Just edit the thread title and add [solved]?
  2. Now I have finally switched from Laragon (Windows) to DDEV (WSL2). My first attempt some time ago was not very successful, but this time everything worked straight away. However, I need a "special" feature for my project: sqlsrv/pdo_sqlsrv as a PHP extension for the connection to an MSSQL server That was a minor challenge at first, then i found some older scripts on Stackoverflow, but unfortunately they no longer worked. Here is a short guide on how to use sqlsrv (incl. msodbcsql18) with DDEV: Create a "Dockerfile" and a "install_sqlsrv.sh" inside of the .ddev/web-build folder Dockerfile: ARG BASE_IMAGE FROM $BASE_IMAGE COPY install_sqlsrv.sh /var/tmp/ RUN apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests gcc make autoconf libc-dev pkg-config php-pear php-dev RUN /bin/bash /var/tmp/install_sqlsrv.sh install_sqlsrv.sh: #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive # Install sqlsrv drivers. export PHP_VERSIONS="php8.1 php8.2 php8.3" # Note: Only works for PHP 7.0+. export PHP_SUFFIXES="8.1 8.2 8.3" OS=$(grep -P '(?<=^ID=)' /etc/os-release | cut -c 4-) VERSION=$(lsb_release -rs) if [ ! -f /etc/apt/sources.list.d/mssql-release.list ]; then curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg curl https://packages.microsoft.com/config/debian/12/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list fi sudo apt-get update sudo apt -y update for v in $PHP_VERSIONS; do sudo apt-get install -y "$v" "$v"-dev "$v"-xml done if [ ! -d /opt/microsoft ]; then sudo ACCEPT_EULA=Y apt -y install msodbcsql18 mssql-tools sudo apt -y install unixodbc-dev echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bash_profile echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >>~/.bashrc fi for v in $PHP_SUFFIXES; do sudo pecl -d php_suffix="$v" install sqlsrv sudo pecl -d php_suffix="$v" install pdo_sqlsrv # This does not remove the extensions; it just removes the metadata that says # the extensions are installed. sudo pecl uninstall -r sqlsrv sudo pecl uninstall -r pdo_sqlsrv done for v in $PHP_SUFFIXES; do sudo bash -c "printf \"; priority=20\nextension=sqlsrv.so\n\" >/etc/php/\"$v\"/mods-available/sqlsrv.ini " sudo bash -c "printf \"; priority=30\nextension=pdo_sqlsrv.so\n\" >/etc/php/\"$v\"/mods-available/pdo_sqlsrv.ini " sudo bash -c "chmod 666 /etc/php/"$v"/mods-available/*sqlsrv*.ini" done sudo phpenmod sqlsrv pdo_sqlsrv ddev start -> Aaaand BAM! Everything is working ? DDEV is simply great to use once you know how.
  3. I think he means the "ProcessWire Weekly #519" Newsletter ? This does not come from Ryan but from @teppo
  4. Did you use the "$cache->save()" method? So something like this: $cache->save("test", $consultants, 3600); // get single cache value $str = $cache->get('test');
  5. There is a paid module for this, called Media Manager https://processwire.com/talk/forum/67-media-manager/ Unfortunately, the purchase page is currently in maintenance mode, but i think you can also contact @kongondo directly
  6. Nice module! An "autoclose on save" function would still be good ?
  7. Did you take note of this information from the module description?
  8. zoeck

    if query

    "if ($article->gallery_images)" just works if the field is set to one image only. You have to use "if (count($article->gallery_images))" if you want to check whether one or more images are available. https://processwire.com/docs/fields/images/ -> "How to tell if a page has images present"
  9. That looks very interesting, currently I use PhpSpreadsheet for such tasks, but I think the library is actually too big for what I use ?
  10. No, the latest master version was released in august 2023…
  11. Could it be that you have an absolute path to the css files with https in the source code?
  12. Unfortunately, I'm not really familiar with XAMPP. But does the website work if you call it up via the following link: http://192.168.0.225/ticf/ or http://192.168.0.225:8080/ticf/ You would have to check which ports your XAMPP uses, apparently port 8085 is set for https. There should be another port for http (possibly 80 or 8080?)
  13. If you don't want https, you have to do the opposite ? Simply write a # before lines 194 and 195.
  14. Just create a new field in the admin and add it to your template? Here's a little tutorial ? https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/#three-simple-core-concepts
  15. Wouldn't it make more sense to put the H2 headings in a separate field? Would also be easier for the editor ?
  16. You have to open the database + table (field_pass) in an SQL administration tool, e.g. PHPMyAdmin (Or if you have installed Tracy with Adminer, you can also use this)
  17. For the custom page classes there is a great video by @bernhard And you can take a look at the Latte documentation, everything is well described here
  18. Do you mean the beginner Template? https://github.com/processwire/site-beginner you can also have a Look at the other starter templates: https://github.com/orgs/processwire/repositories
  19. I think Both is possible ? Port 465 is the SSL Port. All Inkl FAQ: The Mail address as username also works (mostly), but I have had problems with it before, so I always recommend using the username.
  20. You can also have a look at "Bruno" ? (Win, Mac & Linux) https://www.usebruno.com/
  21. You have entered a few small details incorrectly ? Use Port 587, Uncheck "use SSL" and then "Select a crypto method for TLS" (for Example STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT) And change the SMTP User to your Mail USERNAME, not your Email Address (you can find this info in the All-Inkl KAS -> Edit the Mailbox).
  22. A very nice module, thank you Bernhard! That was a missing function of the Processwire Core ? (even if you could do it via a page)
×
×
  • Create New...