• I am working on a site for a client, hosted by Godaddy. We just signed up for a Linux hosting package, and were told that it supports PHP 5.

    In trying to run some very basic scripts (without the ***), such as:
    ****
    <?

    // Connect tot the database
    include (“connect.php”);
    ?>
    ****

    These scripts run fine on other sites I have built. When I run it, the PHP verbiage appears as text on the page. I believe that this is PHP 5. Is there a difference in the syntzx between 5 and earlier versions?

    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter mortgage_master

    (@mortgage_master)

    PHP version is 5.2.8

    I’m not sure about godaddy…does

    <?php
    
    // Connect tot the database
    include ("connect.php");
    ?>

    make any difference?

    Thread Starter mortgage_master

    (@mortgage_master)

    I tried that as well, and no dice, although I can run standalone .php files. It’s just getting stuff to run in WP.

    If I call Godaddy’s help desk are they going to tell me it’s a WP issue?

    Thanks

    Use the little one line script from Finding_Server_Info–that takes WordPress out of the equation. If it doesn’t return the phpinfo then tell Godaddy that the web-server and/or PHP may not be configured properly.

    Sometimes you might be able to add this to .htaccess to use PHP5

    AddHandler x-httpd-php5 .php

    WordPress only requires PHP 4.3 or higher.

    Thread Starter mortgage_master

    (@mortgage_master)

    Thanks. Where is the .htaccess file? I have looked everywhere for it.

    you may have to make your own. If you have WP installed it’s in the (WP) root…. it usually gets generated when you set up permalinks in WP

    you seem to be using php shorttags <?

    check with your hoster if these are anabled

    Thread Starter mortgage_master

    (@mortgage_master)

    alchymyth, can you please elaborate on short tags, and I will set up the permalinks before I do anytbing else.

    Thanks

    this was something a came across a few times, as well on my local installation.

    some php installations have the short open tag in php disabled:
    which means that code with <? does not work;
    <?php works fine.

    your code example:

    <?
    
    // Connect tot the database
    include ("connect.php");
    ?>

    has these short open tags, so this is just something to consider when trouble shooting.

    the short_open_tag needs to be enabled in php.ini;
    and i assume that your hoster might be able to assist you there.

    i have no personal experience with that , though.

    Thread Starter mortgage_master

    (@mortgage_master)

    I spent 10 minutes on the phone with Godaddy support, and as usual, they offered very little in the way of a solution. WP came installed with the hosting package. The next step is to uninstall and reinstall.

    This is such a PITA.

    Thanks for your help.

    Thread Starter mortgage_master

    (@mortgage_master)

    Oh, and yes, I tried both tag formats.

    Honestly, with godaddy….I always just do a manual WP install…. seems to work out smoothly every time…..

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Unable to run php code on new Godady Linux WP install’ is closed to new replies.