ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Laksh1999
    3. Posts
    L
    • Profile
    • Following 3
    • Followers 1
    • Topics 20
    • Posts 55
    • Best 7
    • Controversial 1
    • Groups 0

    Posts made by Laksh1999

    • RE: HTML Form filling Integrating through GCP Serverless

      @Pete-S said in HTML Form filling Integrating through GCP Serverless:

      API integration that allows you to submit tickets directly from other places, like a website.

      How to create an api to send the email to the helpdesk email from the google form?
      Here the user send an email to helpdesk email to create a ticket for their daily issue

      posted in IT Discussion
      L
      Laksh1999
    • HTML Form filling Integrating through GCP Serverless

      Hi All,

      I have created a new IT portal for my organization. I have created a form in there to submit their Name,Email,Subject,Message. I am in need to have the user information who have submitted the form from their end.Once they submit that form that needs to send an email to IT helpdesk email id. That will get converted into ticket.Got help from Chat GPT but not all the time the Chat GPT can help like Humans in this forum like this.

      I need to know why this error is coming

      Error Logs for Reference

      2023/04/11 06:52:28 [error] 19#19: *5 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught LogicException: Your function must have "Psr\Http\Message\ServerRequestInterface" as the typehint for the first argument in /workspace/vendor/google/cloud-functions-framework/src/FunctionWrapper.php:99 Stack trace: #0 /workspace/vendor/google/cloud-functions-framework/src/FunctionWrapper.php(82): Google\CloudFunctions\FunctionWrapper->throwInvalidFunctionException() #1 /workspace/vendor/google/cloud-functions-framework/src/FunctionWrapper.php(36): Google\CloudFunctions\FunctionWrapper->validateFunctionSignature(Object(ReflectionFunction)) #2 /workspace/vendor/google/cloud-functions-framework/src/Invoker.php(53): Google\CloudFunctions\FunctionWrapper->__construct('submitForm') #3 /workspace/vendor/google/cloud-functions-framework/router.php(56): Google\CloudFunctions\Invoker->__construct('submitForm', 'http') #4 /workspace/vendor/google/cloud-functions-framework/router.php(59): {closure}() #5 {main} thrown in /workspace/vendor/google/cloud-functions-framework/src/F" while reading response header from upstream, 
      

      index.php

      <?php
      require __DIR__ . '/vendor/autoload.php';
      
      use PHPMailer\PHPMailer\PHPMailer;
      use Psr\Http\Message\ServerRequestInterface;
      
      function submitForm(ServerRequestInterface $request) {
        $parsedBody = $request->getParsedBody();
      
        $name = $parsedBody['name'];
        $email = $parsedBody['email'];
        $subject = $parsedBody['subject'];
        $message = $parsedBody['message'];
      
        // Write the form data to logs
        $log_message = "Form submission: Name=$name, Email=$email, Subject=$subject, Message=$message";
        error_log($log_message);
      
        // Send an email to the helpdesk only if email is from @domain.com domain
        if (strpos($email, '@domain.com') !== false) {
          $mail = new PHPMailer(true);
          $mail->isSMTP();
          $mail->SMTPAuth = true;
          $mail->Host = 'smtp.gmail.com';
          $mail->Port = port number;
          $mail->Username = 'email';
          $mail->Password = 'password';
          $mail->setFrom($email);
          $mail->addAddress('helpdesk Email');
          $mail->Subject = $subject;
          $mail->Body = $message;
          $mail->send();
        }
      
        $message = 'Form submission successful!'; // Include a success message in the response
        return $message;
      }
      
      

      composer.json

      {
        "require": {
          "phpmailer/phpmailer": "^6.5"
        },
        "autoload": {
          "psr-4": {
            "": "src/"
          }
        },
        "scripts": {
          "start": "php -S localhost:8080 -t public/",
          "serve": "functions-framework --target=submitForm --signature-type=http"
        },
        "minimum-stability": "dev",
        "prefer-stable": true
      }
      
      posted in IT Discussion
      L
      Laksh1999
    • AWS - Code Deployment is getting in Deployment

      Hi Team,

      I am following below link this to create a codepipeline to copy the file from Codecommit repository

      https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-simple-codecommit.html

      I have created the appssec.yml file in the ProgramData folder as well still i am getting the same error

      I have a Windows EC2 instance to copy the codecommit repo to the EC2 instance.When the CodePipeline is started the Codedeployment is getting failed and getting this error.Anyone can help me on this

      The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path "appspec.yml". The revision was unpacked to directory "C:\ProgramData/Amazon/CodeDeploy/deployment-archive", and the AppSpec file was expected but not found at path "C:\ProgramData/Amazon/CodeDeploy/deployment-archive/appspec.yml". Consult the AWS CodeDeploy Appspec documentation for more information at http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html 
      
      posted in IT Discussion
      L
      Laksh1999
    • AWS - Automated Code Deployments

      Hi Team,

      I have a code is being uploaded to the internal GIT repository and that is automatically uploaded to the CodeCommit Repository.
      The code which is available in the CodeCommit repository needs to be cloned to the EC2 instance which i am running.Once the clone is done the same needs to be uploaded to other servers which is connected to the same VPC in AWS instance

      Whether this requires to do a CodeBuild,CodeDeploy and CodePipeline to clone the code to the EC2 ?

      Code1 > Copied to CodeCommitRepository > Copy the pulled code to the EC2 and that needs to be copied to the other servers which is already connected to it in the same VPC

      Whether any one have done this before ?

      posted in IT Discussion
      L
      Laksh1999
    • RE: Exchange Environment - Lab

      I am not trying anything with the Government jobs.

      I am in Exchange environment to learn new things.I cannot do anything with the Production exchange environment. Just to understand the alerts in the servers i am creating my own lab servers and testing it in the test environment.If any one can help do help me .If not no issues.

      Close this thread or dont reply if no one is ready to help me on this topic

      Corrected this as well
      \Setup.exe /IAcceptExchangeServerLicenseTerms

      posted in IT Discussion
      L
      Laksh1999
    • RE: Exchange Environment - Lab

      @dashrender said in Exchange Environment - Lab:

      @laksh1999 said in Exchange Environment - Lab:

      @syko24 said in Exchange Environment - Lab:

      @laksh1999 - From the looks of it, you are trying to run setup.exe from C:\Windows\System32. Fix the path to wherever you installation media is located.

      ex: D:\setup.exe

      e7a746c2-ce9b-402a-ae45-d0c58f1d5d4a-image.png

      Tried from D drive got this error

      make sure you spelled everything correctly.

      you're pictures are to small for my horrible eyesight to read.

      Tried this
      .\setup.exe /PrepareSchema /IAcceptExchangeServerLicenseTerms

      posted in IT Discussion
      L
      Laksh1999
    • RE: Exchange Environment - Lab

      @syko24 said in Exchange Environment - Lab:

      @laksh1999 - From the looks of it, you are trying to run setup.exe from C:\Windows\System32. Fix the path to wherever you installation media is located.

      ex: D:\setup.exe

      e7a746c2-ce9b-402a-ae45-d0c58f1d5d4a-image.png

      Tried from D drive got this error

      posted in IT Discussion
      L
      Laksh1999
    • Exchange Environment - Lab

      Hi Team,

      I am trying to create a Exchange 2016 in Microsoft 2016 server DataCenter Evaluation version.I am trying to do this from my virtualbox application.Any one have followed this lab setup before ?

      Followed Link : https://www.prajwaldesai.com/step-by-step-guide-to-install-exchange-server-2016/

      8ae7d030-9c81-4e15-b569-479b0564d69f-image.png

      posted in IT Discussion
      L
      Laksh1999
    • RE: login code need

      @vignesh said in login code need:

      hello im new to reactjs i need a login code to run in vs code. please help me

      https://code.visualstudio.com/docs/nodejs/reactjs-tutorial

      posted in IT Discussion
      L
      Laksh1999
    • RE: Bash Help

      @pete-s said in Bash Help:

      @jaredbusch said in Bash Help:

      @pete-s his source data is json

      So even more reason to use a scripting language then.

      Both php and python can read and write json files natively. It looks like perl needs to have a module installed.

      Since there is a restriction installing modules in my developer desktop so only trying without python

      posted in IT Discussion
      L
      Laksh1999
    • RE: Need Reactjs login form code

      @vignesh said in Need Reactjs login form code:

      im new to reactjs need login form code

      https://serverless-stack.com/chapters/create-a-login-page.html

      https://dev.to/diraskreact/create-simple-login-form-in-react-227b

      posted in IT Discussion
      L
      Laksh1999
    • RE: Bash Help

      @scottalanmiller said in Bash Help:

      @laksh1999 said in Bash Help:

      cut command is working but its not showing the full data if i use it

      If cut was working, it would show the entire result.

      Please post the cut command that you are using.

      Also, this is a cut question, not a BASH question.

      title:Test Ticket how are you
      ticketnumber:D000000000
      createdate:2021-08-17T00:00:00.555
      lastupdatedate:2021-08-17T05:00:00.11
      assignedgroup:Group

      I am in need to cut only the createdate and lastupdatedate only .How to do this ?

      cut -b 1-23 data.txt
      
      posted in IT Discussion
      L
      Laksh1999
    • Bash Help

      I have a .txt file which is having
      title:
      ticketnumber:
      createdate:2021-08-17T00:00:00.555
      lastupdatedate:2021-08-17T05:00:00.11
      assignedgroup:

      I want to get only the date details from the ticketnumber dont need the values after T.how to do this in bash?

      cut command is working but its not showing the full data if i use it

      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @jaredbusch said in Grep help:

      @laksh1999 said in Grep help:

      @jaredbusch said in Grep help:

      @laksh1999 said in Grep help:

      This does not work for me.

      I would love to see proof because I just showed you proof it does work.

       cat newdata.txt | grep [V][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]] 
      zsh: no matches found: [V][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]
      

      no one knows WTF you have in newdata.txt....

      cat > test.txt << EOF
      stuff 1 A00000000 more stuff 1
      stuff 2 B00000001 more stuff 2
      stuff 3 C00000002 more stuff 3
      stuff 4 D00000003 more stuff 4
      stuff 5 E00000002 more stuff 5
      EOF
      

      then

      cat test.txt | grep [AD][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]
      

      3a3ec045-a5a6-4a91-aeeb-a9a0e5aa4ff8-image.png

      This worked for me now

      cat test.txt | grep '[V][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]'
      
      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @jaredbusch said in Grep help:

      @jaredbusch said in Grep help:

      the correct syntax is jq '.id

      I'm also assuming that id is one of the json keys based on your first post.

      There are more id values are there in the txt file

      Example)
      This id value example is only for the 1 tickets
      "id"="D00000000"
      "id" ="V00000000"
      "id"="eeeeeee-eeeeee-eeeee-eeeee"
      "id"="eadsga-ereagag"

      i just want to grep only D0000000 and V000000 values for each tickets.There are around 5000 tickets are there and each for more id for one ticket

      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @jaredbusch said in Grep help:

      @laksh1999 said in Grep help:

      json file

      Then use json tools FFS.
      man jq

      cat wtf.txt | jq *.id
      
      cat newdata.txt | jq *.id
      zsh: no matches found: *.id
      
      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @jaredbusch said in Grep help:

      @laksh1999 said in Grep help:

      This does not work for me.

      I would love to see proof because I just showed you proof it does work.

       cat newdata.txt | grep [V][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]] 
      zsh: no matches found: [V][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]
      
      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @jaredbusch said in Grep help:

      @laksh1999 Because you are attempting to use regular expressions with a tool that does not know WTF those are.
      man grep is a wonderful thing.
      If you are going to keep asking questions, you should learn to do a little basic reading.

      but to spoon feed you...

      # return lines with an A or D followed by 8 digits.
      grep [AD][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]
      

      Sample:

      stuff 1 A00000000 more stuff 1
      stuff 2 B0000001 more stuff 2
      stuff 3 C00000002 more stuff 3
      stuff 4 D00000003 more stuff 4
      stuff 5 E00000002 more stuff 5
      

      Result:

      cat test.txt | grep [AD][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]][[:digit:]]
      stuff 1 A00000000 more stuff 1
      stuff 4 D00000003 more stuff 4
      

      This does not work for me.I have tried this as well.I am not asking for spoon feeding for the same.

      i have the json file with "id" ="D00000000" and "id"="V000000000" and i too have some id with encrypted data.i need to get only the D and V numbers and arranged in order from the json file which i have downloaded as .txt

      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @scottalanmiller said in Grep help:

      I'm not sure that I understand? Can you show a sample of five or six different ticket numbers?

      example the txt file have

      D00000000
      D00000001
      D00000002
      D00000003

      Theses are the tickets numbers which is available in the txt file where i am in need to grep the ticket number only from the txt file

      posted in IT Discussion
      L
      Laksh1999
    • RE: Grep help

      @laksh1999

      cat test.txt | grep [A-Z]{1}\d{8}
      zsh: no matches found: [A-Z]{1}d{8}
      
      posted in IT Discussion
      L
      Laksh1999
    • 1
    • 2
    • 3
    • 1 / 3