PHP code is not getting parsed or isn't outputting anything.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • derjavina
    New Member
    • Jun 2007
    • 2

    PHP code is not getting parsed or isn't outputting anything.

    Hi forum. I'm interested in learning PHP. I'm having trouble though configuring the PHP installation to work with Apache 2.2. I've written a couple of simple scripts but they don't work properly. I'm only getting what is echoed in the script such as "Today is" but then nothing ---
    [code=php]Today is <? print strftime("%m/%d/%Y"); ?>[/code]
    [Please use CODE tags when posting source code. Thanks! --pbmods]

    I'm assuming Apache is not running PHP properly. I've configured the httpd.conf file in Apache and the php.ini files accordingly.

    Would be great if someone could point out the likely cause of this problem.

    I'd also be interested to here opinions on how long it takes to get a good enough grasp of PHP to understand the workings of Joomla, Zen Cart, and the like. I'm not well computer savvy and perhaps should leave it alone, but would certainly invite some expert opinions.

    Hope to here from you
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    did u remember to move the "php5ts.dll " file into the windows directory and restart apache??

    if it still doesn't work or if apache says it can't start up TRY THIS

    i've used that site many times to install apache and php on another computers.

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Changed thread title to better describe the problem.

      Are you getting any errors? Check your error_log, or else try turning on PHP debugging messages.

      Does your PHP installation support short tags? Check to see if your PHP code is showing up in the source of the page.

      You can edit this behavior in your php.ini file, though I recommend you get in the habit of just using the long-format <?php tag, since using short tags will prevent your server from parsing well-formed XHTML files properly.

      Comment

      • derjavina
        New Member
        • Jun 2007
        • 2

        #4
        Yeah, the problem was short tags. Sorry. I had another file I tried but had <? php instead of <?php.

        Comment

        Working...