webserver is not working on systemd as a service [closed]

I have a php project and server , when i ran it through terminal by hitting
php -S 127.0.0.1:8000 it works fine but when i add it to systemd as a service , it guves me the following error :

May 30 15:45:32 srv714079 php[1309201]: [Fri May 30 15:45:32 2025] 127.0.0.1:45940 [500]: GET /scp/login.php - Uncaught Error: Call to undefined function osTicketMail_S() in /var/www/html/osticket/include/class.mailer.php:635 
May 30 15:45:32 srv714079 php[1309201]: Stack trace: May 30 15:45:32 srv714079 php[1309201]: #0 /var/www/html/osticket/include/class.mailer.php(673): osTicketMailMailer->send() 
May 30 15:45:32 srv714079 php[1309201]: #1 /var/www/html/osticket/bootstrap.php(342): osTicketMailMailer::sendmail() 
May 30 15:45:32 srv714079 php[1309201]: #2 /var/www/html/osticket/bootstrap.php(228): Bootstrap::croak() 
May 30 15:45:32 srv714079 php[1309201]: #3 /var/www/html/osticket/main.inc.php(28): Bootstrap::connect() 
May 30 15:45:32 srv714079 php[1309201]: #4 /var/www/html/osticket/scp/login.php(16): require_once('...') 
May 30 15:45:32 srv714079 php[1309201]: #5 {main} 
May 30 15:45:32 srv714079 php[1309201]:   thrown in /var/www/html/osticket/include/class.mailer.php on line 635 
May 30 15:45:32 srv714079 php[1309201]: [Fri May 30 15:45:32 2025] 127.0.0.1:45940 Closing

here is my service file

[Unit]
Description=OS Ticket  Web Server
After=network.target
[Service]
Type=simple
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="LANG=en_US.UTF-8"
Environment="LC_ALL=en_US.UTF-8"
# Replace with your PHP files directory path
WorkingDirectory=/var/www/html/osticket
ExecStart=php -S 127.0.0.1:8000
#ExecStart=/usr/bin/php -S 127.0.0.1:8080 -t /var/www/html/osticket
Restart=always
RestartSec=3
# User to run the service (recommended: non-root user)
User=www-data
Group=www-data
Environment=USER=www-data HOME=/home/www-data
# Important for PHP environment
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target

tbh i am not sure what i am doing wrong so your help is so much appreciated

i tried to change user or play with environment variable or something like that but with no success