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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:43:12+00:00 2026-06-03T12:43:12+00:00

In Windows (WAMP) I have an index.php like this <?xml version=1.0 encoding=utf-8?> <?php //

  • 0

In Windows (WAMP) I have an index.php like this

<?xml version="1.0" encoding="utf-8"?>
<?php
    // ...
?>

and it works as expected.
Now I’ve just configured a LAMP on Ubuntu and the same file (when invoked from a browser) gives me an error. Looking in error.log I’ve found

PHP Parse error: syntax error, unexpected T_STRING in
/var/www/test/index.php on line 1

If I remove first line everything works fine.
What’s wrong? Why this works on Windows and not on Linux?
Could this be caused from a particular extension?

  • 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-03T12:43:15+00:00Added an answer on June 3, 2026 at 12:43 pm

    It sounds like you have short tags enabled, which will cause PHP to try and parse what comes after <?.

    Set the config option short_open_tag in php.ini to 0 or Off and restart Apache.

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

Sidebar

Related Questions

I just installed WAMP on Windows XP. I have a simple PHP file that
I have a WAMP (windows (7), apache, mysql, php) stack all setup and running.
I have just downloaded the latest xdebug for my windows machine running wamp and
I have started to learn PHP. So installed WAMP server on my windows 7
previously i was using Wamp 1 and Windows XP, but now i have WAMP
I have installed WAMP 2.1 on Windows 7 with PHP-5.3.4 and Apache-2.2.17 but instead
I have installed WAMP version 2.1 on my windows 7 machine. When i browse
I have PHP source code of http://www.sitename.com . This site is located on Windows
I have a development environment set up in Windows using WAMP. The production environment
I have the following php code: index.php <?php spl_autoload_extensions(.php); spl_autoload_register(); use modules\standard as std;

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.