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

  • SEARCH
  • Home
  • 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 841797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:51:30+00:00 2026-05-15T05:51:30+00:00

I’ve got a very old php application (1999) that has been worked on during

  • 0

I’ve got a very old php application (1999) that has been worked on during the last ten years. At this point the app starts to show it’s age so i’m in te progress of migrating to a “new” framework, symfony 1.4. But since the app is very large, i cannot do this at once. So i’m planning to wrap the old app into the new symfony app, and convert functionality by functionality.

First step in this transition was making the old app appear in the new symfony app. So, i’ve created the “frontend” application, added a “legacy” module, made it the default homepage, and i’ve put everyhting i had in my index.php (all pages went through this index.php) in the indexSuccess.php file for the indexAction. I’ve added the code in the “view” because there are also functions in it and changing that setup would take me more time than i want to spend on the old app.

Unfortunately i’ve now got an issue with global variables. Let me give you an example (i would have never made this register function like this, but it is, so please look past that.

$session = new ps_session;
$demo = "this is a demo variable";
$session->register('demo');

In ps_session i have this method

public function register($var) {
    global $$var;
    $_SESSION [$var] = $$var;
}

So it should put the content of $demo in a session var named “demo”. Clever right 🙂 Anyway, var_dumping shows me the that $$var is “null” and $demo is filled if i var_dump before and after calling the function. Exact same code without symfony and it returns the correct content.

What am i missing? The global call is spread out in all area’s of this massive app so i really don’t want to switch to something else, so i’m hoping for a quick fix 🙂

Maybe relevant, the all code except the index.php content are in frontend/lib/legacy/ folder, the index is in frontend/modules/legacy/ (if there is some scope issue i’m missing)

  • 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-05-15T05:51:31+00:00Added an answer on May 15, 2026 at 5:51 am

    I went with putting the entire old site under web/legacy and redirecting from the default index action to the legacy folder. Most of the url’s were made by mod_rewrite so easily fixed. The other url’s went through a function so fixing was ok, and only a few were hardcoded. To make it totally transparant, i only need to redo the homepage to start from, so i don’t have a visible /legacy/ in my url. Thanks for the help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 410k
  • Answers 410k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer EDIT: I'm making a big assumption here about your requirements,… May 15, 2026 at 7:30 am
  • Editorial Team
    Editorial Team added an answer I figured out this issue. This code is valid but… May 15, 2026 at 7:30 am
  • Editorial Team
    Editorial Team added an answer $("#someid").html(s.join("<br/>")); May 15, 2026 at 7:30 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.