Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:37:40+00:00 2026-06-10T11:37:40+00:00

It seems like you get different relative paths depending on how you are executing

  • 0

It seems like you get different relative paths depending on how you are executing the script: console or web.

I find this extremely annoying, haven’t you had any issues with this?

Every time I need to copy/move/delete files, I have to be thinking if I’m on cli or web, if I saved it as cli or web path, etc.

Eg: Say someone uploads an image. You will probably store the image with this kind of path: uploads/picture-123.jpeg. Then a cronjob decides to move the picture or something. First it will have to preppend this to the source path: web/. It will also need a target path, that begins with web/. After moving it, it will want to save the new path in the corresponding database row or document, so it will have to strip web/ from the target path.

Any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:37:42+00:00Added an answer on June 10, 2026 at 11:37 am

    For handling files the best practice for paths defining is to use absolute ones, that start from %kernel.root_dir%:

    parameters:
        your_upload_path: %kernel.root_dir%/../web/uploads/
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like a petty question, but this situation is starting to get annoying:
This seems like a repeated question but i'm not able to get my answer.
This seems like I'm missing something obvious but I can't get redirects (>) to
This seems like it should be very simple but I can't get it to
Ok, so this seems like a really silly problem but I can't get my
It seems like every time I float two elements to the right, they get
It seems like no matter what i do, i get AG_E_PARSER_PROPERTY_NOT_FOUND when trying to
I have this design which I cannot seem to get right, I would like
This seems like a reasonable (and maybe simple?) scenario, but how would you do
This seems like it should be really simple. I compiled a library in Qt

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.