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 9193711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:13:43+00:00 2026-06-17T21:13:43+00:00

We’ve inherited a PHP page which runs fine on Ubuntu, but dumps source code

  • 0

We’ve inherited a PHP page which runs fine on Ubuntu, but dumps source code onto the display on a Windows 7 system running either XAMMP using PHP 5.4, or WAMP using PHP 5.3.

The point where the dump occurs seems to be when it tries to parse a “->” (object property) character combination. When I change that to “[]” to access as an array element, it gets past that, but then dumps source code onto the display which appears after the “=>” (mapping) character combination. Commenting that out doesn’t work, only deleting the whole line gets it past there.

Finally, when it’s just printing out html with “<” and “>” signs, that also causes the screen dump. If I replace those characters with the html entities, the source code doesn’t dump any more, but the program doesn’t display the menu and doesn’t function at all. Note that I can successfully log into the app via it’s login page, although even that displays “POST” and some other “<” and “>” characters in the username field.

I’ve tried running unix2dos on the whole app, but that didn’t have any effect. Also tried converting the text of one of the offending pages to UTF-8, but still no luck.

In answer to some of the questions posed:

The working ubuntu version is PHP Version 5.3.10-1ubuntu3.1

The first piece of code that works in Ubuntu and not in Windows is this:

public function __construct($gid)
{
    $this->id = $gid;
    return $this->retrieve();
}

where the code dump onto the display starts with:

id = $gid; return $this->retrieve(); }

Yes, PHPInfo does work, showing for the WAMP server with PHP Version 5.3.13

I tried changing the short-open-tag but it made no difference.

The product was written for us by an outsourcing group, and it appears to be based on some kind of framework. But I couldn’t find any references to any of the classnames on Google, so maybe they wrote the whole thing in-house.

Going to the apache log, the actual error happens on this line:

$_SESSION['admin_gid'] = Membership::getGroup($rUser['id']);

where the error message is:

Membership’ not found

Membership is a class which is declared later in the same file as the one getting dumped on the display at the point shown above, so for some reason the PHP parser doesn’t understand it’s reading PHP code from that point.

  • 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-17T21:13:44+00:00Added an answer on June 17, 2026 at 9:13 pm
    I tried changing the short-open-tag but it made no difference.
    

    In a scenario like this what you can do is write a small script and run it and see whether it works. try short tag and below method. Keep in mind that if you mess with your php.ini you will have to restart the server. It’s better to change the setting by right clicking on the server icon on the task-bar. It could be due to php short tags. Try enabling and disabling and running the script. Also change the below script and see how that affects with your changed settings.

    EG :

    <?php
    echo "hi";
    // phpinfo(); <-- preferred if you can
    ?>
    

    Then you can see whether your server is working you as intend it to. If it O/P hi you are good to try your big code and see.

    By the way code which you have provided does not seems have errors.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.