LibreBooking / app

Repository for the last open source version of Booked Scheduler. The "develop" branch contains the most current working code of the project and should be considered beta. The "master" branch is the most current stable release of BookedScheduler. Please read doc/README.md for further details.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Smarty" errors on Win10 using WAMP

spraragen88 opened this issue · comments

Tried using WAMPSERVER but each time I get these errors:

Fatal error: Uncaught Error: Class "Smarty" not found in C:\wamp64\www\booking\lib\Email\SmartyEmail.php on line 9
Error: Class "Smarty" not found in C:\wamp64\www\booking\lib\Email\SmartyEmail.php on line 9

@spraragen88 , have you done composer install command?

To amplify on the previous as I've been through the same process (still am but now stuck further on):
Download Composer-Setup.exe v2.6.5, this installs composer such that it can be called from any directory (by adding to windows path).
Run this as admin. Select C:\xamp\php\php.exe as the command line php to use
Didn’t need to select a proxy

Follow instructions in: https://www.geeksforgeeks.org/how-to-install-php-gd-in-windows/
xampp control panel – select Admin for Apache
it loads http://localhost/dashboard/
In top tabs, select PHPInfo: http://localhost/dashboard/phpinfo.php
Scroll down alphabetical list of extensions – no GD section present

In xampp control panel, select config for apache, in dropdown select php.ini. It opens for editing
Search for extension=GD – is on line 931 on mine with semi colon in front – delete semi colon
Search for extension=zip - is on line 962 on mine, with semi colon in front - delete semi colon
Save file

Go to C:\xampp\php\ext folder
locate php_gd.dll, copy it and paste into C:\Windows\System32
Close MySQL and apache and xampp control panel
Restart xampp control panel as admin, restart apache and mysql
Select apache admin > PHPinfo tab
Check for GD and Zip in the alphabetical list of extensions.

Open xampp’s shell and navigate to C:\xampp\htdocs\your librebooking folder
type composer install (return) in the shell

You should see something like

composer install

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 10 installs, 0 updates, 0 removals

  • Downloading google/recaptcha (1.2.4)
  • Downloading symfony/finder (v7.0.0)
  • Downloading gregwar/captcha (v1.2.1)
  • Downloading kint-php/kint (4.2.3)
  • Downloading psr/log (3.0.0)
  • Downloading monolog/monolog (2.9.2)
  • Downloading squizlabs/php_codesniffer (3.8.0)
  • Downloading phpcompatibility/php-compatibility (9.3.5)
  • Downloading smarty/smarty (v4.3.4)
  • Downloading stripe/stripe-php (v10.21.0)
  • Installing google/recaptcha (1.2.4): Extracting archive
  • Installing symfony/finder (v7.0.0): Extracting archive
  • Installing gregwar/captcha (v1.2.1): Extracting archive
  • Installing kint-php/kint (4.2.3): Extracting archive
  • Installing psr/log (3.0.0): Extracting archive
  • Installing monolog/monolog (2.9.2): Extracting archive
  • Installing squizlabs/php_codesniffer (3.8.0): Extracting archive
  • Installing phpcompatibility/php-compatibility (9.3.5): Extracting archive
  • Installing smarty/smarty (v4.3.4): Extracting archive
  • Installing stripe/stripe-php (v10.21.0): Extracting archive
    Generating autoload files
    3 packages you are using are looking for funding.
    Use the composer fund command to find out more!

That gets you over that hurdle.

I'm now stuck further on as the auto installation using Web/install doesn't work (it requires a folder tpl_c which is no longer in the app) and my attempts to manually install give error messages and I can't open the app in the browser for other errors. I've lodged an issue higher up (dated 23/12/2023) in the hope of getting further along. I've been running multiple instances of earlier versions on win7 for many years, but this one is causing me real issues.

Hope this helps you or someone else.

just to add, I then found a couple of typos in my config.php file which, when corrected allowed Web/install to run successfully but my user account wasn't created (and I couldn't create the user or admin accounts by importing the sample data script), so had to tweak privileges and then import sections of the sample data sql file manually by copy-pasting them into the sql function of phpMyAdmin. That allowed me to log in as admin and create myself as an application administrator.