localhost web page with PHP fails - Suse

This is a discussion on localhost web page with PHP fails - Suse ; I have local pages running fine provided I don't do anything php related. php5 is installed and listed in the YaST HTTP server modules. This code page below, saved xxx.html page causes firefox to display: ---------output------ false, "delete_allowed" => false, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: localhost web page with PHP fails

  1. localhost web page with PHP fails

    I have local pages running fine provided I don't do anything php related.
    php5 is installed and listed in the YaST HTTP server modules.

    This code page below, saved xxx.html page causes firefox to display:
    ---------output------
    false, "delete_allowed" => false, "editablecols" =>
    array("name", "birthday", "yeartest", "gender", "realtest", "numtest", "timetest", "tstest", "dttest", "waffle", "blobtest" ), "sortcol"
    => "name", "sort" => "a" ); $src = new drasticSrcMySQL($server, $user, $pw,
    $db, $table, $options); ?>
    ---------------
    If the code page is saved xxx.php firefox will not display anything but
    wants to save the page elsewhere.

    --------the page---------
    define("PATHDRASTICTOOLS", "/var/www/html/DrasticTools/");
    $server="localhost";
    $user="ben";
    $pw="";
    $db="test";
    $table="folks";

    include (PATHDRASTICTOOLS . "drasticSrcMySQL.class.php");

    $options = array (
    "add_allowed" => false,
    "delete_allowed" => false,
    "editablecols" => array("name", "birthday", "yeartest", "gender",
    "realtest", "numtest", "timetest", "tstest", "dttest",
    "waffle", "blobtest" ),
    "sortcol" => "name",
    "sort" => "a"
    );
    $src = new drasticSrcMySQL($server, $user, $pw, $db, $table, $options);
    ?>



    href="/DrasticTools/css/grid_default.css"/>
    What is The Grid?














    -----------------
    This page is an example of using DrasticGrid, which has been downloaded and
    set up per http://www.linux.com/feature/144534

    It looks as if php is not running. I've tried other php examples and none
    of them work.

    Any ideas as to what I need to change to have php active in local web pages?

    Thanks, John



  2. Re: localhost web page with PHP fails

    On October 9, 2008 18:14, in alt.os.linux.suse, John Bowling
    (johnlb2002@cox.net) wrote:

    > I have local pages running fine provided I don't do anything php related.
    > php5 is installed and listed in the YaST HTTP server modules.
    >
    > This code page below, saved xxx.html page causes firefox to display:
    > ---------output------
    > false, "delete_allowed" => false, "editablecols" =>

    [snip]
    > --------the page---------
    >
    [snip]
    >
    > -----------------
    > This page is an example of using DrasticGrid, which has been downloaded
    > and set up per http://www.linux.com/feature/144534
    >
    > It looks as if php is not running. I've tried other php examples and none
    > of them work.
    >
    > Any ideas as to what I need to change to have php active in local web
    > pages?


    In order to get PHP to interpret the page, you have to serve the page up
    from a PHP-enabled webserver. Firefox does not internally connect to PHP to
    interpret PHP source code, and can only display what limited amount of HTML
    is available in the raw page.

    In other words, put the source into one of your Apache directories, and
    reference it through http://localhost/.PHP


    --
    Lew Pitcher

    Master Codewright & JOAT-in-training | Registered Linux User #112576
    http://pitcher.digitalfreehold.ca/ | GPG public key available by request
    ---------- Slackware - Because I know what I'm doing. ------



  3. Re: localhost web page with PHP fails

    Lew Pitcher wrote:

    >
    > In order to get PHP to interpret the page, you have to serve the page up
    > from a PHP-enabled webserver. Firefox does not internally connect to PHP
    > to interpret PHP source code, and can only display what limited amount of
    > HTML is available in the raw page.
    >
    > In other words, put the source into one of your Apache directories, and
    > reference it through
    > http://localhost/.PHP
    >


    I am in the process of putting it on my local backup and nfs server, but it
    was not intended to be a web server, thus apache was not installed
    initially. Attempting to install apache, with the DVD in place, I can't
    get the update and other repositories to respond (on any of my systems) so
    it will take a while to get it set up.

    Everytime repositories are not available there is a several minute wait for
    each and abort never works. I submitted a bug about it back in 10.2/3 days
    and it's not resolved yet. It needs a fast timeout when access is not
    available.