Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Okay I have Apache Service Monitor running in my system tray telling me Apache/2.2.4 (Win32) PHP 5.2.0 is running (it says that in the system tray and has a green light next to "Apache 2" in the service status area).

    And when I direct my browser to my local host, which has all worked fine before I downloaded the new PHP and this Apache Service Monitor and so on, I get this:

    "home", 'pagetitle' => "Welcome!"); include('includes/config.inc.php'); include($sitedetails['root'] . 'includes/page/top.inc.php'); ?> Welcome to my website, it's just a personal site of mine, but feel free to have a look around. More about me
    From this file:

    Code:
    <?
     
     $pagedetails = array('section' => "home",
                          'pagetitle' => "Welcome!");
     
     include('includes/config.inc.php');
     include($sitedetails['root'] . 'includes/page/top.inc.php');
     
    ?>
    
     <div class="pre pre_1">
      <p>
         Welcome to my website, it's just a personal site of mine, but feel free to have a look around. <a href="<? print $sitedetails['homeurl']; ?>about/me">More about me &raquo;</a>
        </p>
     </div>
    
    <?
    
     include($sitedetails['root'] . 'includes/page/bottom.inc.php');
     
    ?>
    I.e., it, for some reason, stops parsing the PHP after 'section' => and I have no idea why? it does it with all of my pages too, and it's not including the things it should either.

    It might be something int he httpd.conf or php.ini that isn't set right or something? But I'm really not confident in going around and messing about with that.

    Please help?
    tekp :cheeky: tekponline.com

  2.  

  3. #2
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Hmmm.... I'm not sure, but at least I can tell you why it's breaking off where it is. Your browser's HTML parser has grouped everything from the <? to the => as a tag.

    Someone more adept in the config files will probably arive soon...
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  4. #3
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Ohhhh that makes sense so basically the problem is it's not recognising it as PHP?
    tekp :cheeky: tekponline.com

  5. #4
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Yeah, pretty much that. I'm not sure how PHP 5 does it (seeing as I use PHP 4), and I assume you're already putting them down as .php and using proper doctypes... I'll post again if I get more info.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  6. #5
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    If the files are named .php and it's still not working, then you'll need to modify your Apache configuration file and add a directive that (I believe) reads:
    Code:
    AddType application/x-httpd-php .php

  7. #6
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    I already have

    Code:
    #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    PHPIniDir "C:\webserver\php\"
    LoadModule php5_module "C:\webserver\php\php5apache2_2.dll"
    AddType application/x-httpd-php .php .phtml
    #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    And all the directories are correct...
    tekp :cheeky: tekponline.com

  8. #7
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    It appears as if short tags (asp tags) are not enabled. You'll have to find that (asp_tags = false) in the php.ini and set it to true.

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Ah. Point. Though ASP-style tags are <%%>, not <??> :-)

    To double-check if that's the problem, you can just use <?php ?> to delimit your PHP blocks (which is what I usually use anyway).

  10. #9
    Senior Member tekp's Avatar
    Join Date
    Jan 2004
    Location
    A small village near a small city near a small cit
    Posts
    918
    Member #
    4667
    Liked
    1 times
    Right, when I used <?php ?> it worked ^_^ but I don't want to have to go through all my files and change that? :/ or is this a stricter rule that PHP5 has enforced? I.e, finishing <? and ?> and enforcing <?php and ?>?

    Or is there something in the php.ini file like asp_tags where I can turn on <? and ?>

    Thanks ^-^
    tekp :cheeky: tekponline.com

  11. #10
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    As Eddy mentioned, there is an option in php.ini. I believe it's short_tags, but I don't recall for sure.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com