PHP inside CSS

Hullo,
I'm trying to work out if I can add PHP script pulling
dynamic images from database, inside CSS "background-image
url(xx);".
Like this:
#someID {
background-image: url(../randomimage.php)
the PHP script works ok (done with ADDT) and shows image ok
when run separately. I get no errors from CSS either, but no
picture is shown. One or two sites claim that this should be ok...
Maybe i'm doing it the wrong way then.
Any ideas, suggestions?
All help welcome.

Hi,
I must have something terribly wrong with the code. The
bannerimg fecthing PHP follows at the end of this posting... (the
problem is probably there, but I cannot see it with my very vague
understanding of PHP, which relies 99,9% on DW generated code). The
page where the img should appear has "Banner" DIV, and the CSS
tries to fetch the Background-image using that PHP script. The
script shows the test img nice and ok, when run on its own with IE,
but actually with firefox it gets another result.... It's very
frustrating since the problem is probably very very small :D, or
maybe, the whole combination is faulty??
<?php require_once('Connections/connElektra3.php'); ?>
<?php
header('Content-type: image/jpeg');
// Load the tNG classes
require_once('includes/tng/tNG.inc.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
: $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) .
"'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue :
$theNotDefinedValue;
break;
return $theValue;
mysql_select_db($database_connElektra3, $connElektra3);
$query_rs_bannerbg = "SELECT img_name FROM bannerimages";
$rs_bannerbg = mysql_query($query_rs_bannerbg, $connElektra3)
or die(mysql_error());
$row_rs_bannerbg = mysql_fetch_assoc($rs_bannerbg);
$totalRows_rs_bannerbg = mysql_num_rows($rs_bannerbg);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p><img src="<?php echo tNG_showDynamicImage("",
"img/banners/", "{rs_bannerbg.img_name}");?>" />
</p>
</body>
</html>
<?php
mysql_free_result($rs_bannerbg);
?>

Similar Messages

  • CS5 : tabs for .php and .css but spaces for .html ?!?

    Hello
    my problem is simple
    I modify the shorcuts for text indent to Tab by changing the files Menus.xml and the shorcuts file (these manips are painfull !). I have set 2 spaces as text indent in the preferences BUT it persists to add 2 tabs in php and css files !! in html-assimilated files no problem : 2 spaces
    Is Dreamweaver for pro or .... ?

    Hello
    lots of answers fo other thread but here...
    Please, Did  somebody have the same issue ?
    Best regards

  • Syntax higlighting (php inside html docs)

    Hi.
    Instead of .php I use .html to parse my php files. But DW
    shows the syntax highlighting of html even between <?php ?>.
    This is pretty uncomfortable when writing php. Is there a way I can
    render the syntax correctly? Perhabs there is an extension (I can't
    find anything).
    Hope for some help.
    Thanks.

    suntrop wrote:
    > Is there a way I can render the syntax correctly?
    Yes. I haven't done it myself, but I believe the following
    technote
    contains the relevant information:
    http://www.adobe.com/go/tn_16410
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • PHP inside the SAP VM Container ?

    I don't have deep knowledge of the PHP core, but I guess the PHP interpreter is also something like a VM.
    SAP is building a VM Container, where ABAP and Java VM's are running in, so wouldn't it be nice to also have PHP running in the SAP VM Container ?
    I guess there would be a lot of advantages using the PHP VM into the SAP VM Container technology.

    Raphael:
    PHP runs on an engine called the Zend Engine. In some ways you could think of it as something simliar to the Java or I suppose the ABAP Virtual machine. As far as this VM container, I'm not very familiar with the technology so I'm not sure how PHP's inclusion in it would be of benefit. Perhaps someone could show me some documentation on the technology and I can give a more reasonable answer?
    John

  • Help with PHP and CSS links (&mysql results)

    Hi
    Hope someone can help.  I have a column in a mysql5 database that records if an advert is 'featured' or not with 'yes' or 'no' in the database fields.
    I'm dynamically creating a list of adverts using php5 and DWCS3 where each ad comprises several table rows and these are wrapped up in a repeat region (rather than one table row per ad title) and I'd like to highlight the background of the 'featured' advert using  link to a style class eg so that the 'featured' ads have a different background colour to the rest of the ads listed.
    I've got the following code so far, which highlights the adverts but it does this for all of them (featured and non-featured).
    The 'advertpagetabletext' class is the standard (default) rule applied to non-featured adverts.  The "advertfeatured" class is the new background colour.
    Can anyone point me in the right direction / comment on the code below?
    Thanks in advance,
    M
    <?php $featured = $row_listJobs(['job_featured']; ?>
    <?php do { ?>
    <table width="100%" border="0" cellpadding="3" cellspacing="0"<?php if($featured == y) {echo 'class="advertfeatured"'; } else {echo 'class="advertpagetabletext"'; } ?>>
    <tr>
    <td ....rest of table and rows etc etc...

    Ahh, penny drops,
    From what I can see the class is coming through as "advertfeatured" on all of the ads - so it seems to be ignoring the fact that some are not featured / and doesn't revert to the other class for the second ad listing.
    //This is for a featured advert //
    Job Title: Viticulturalist
    etc etc //This is for a nonfeatured advert//
    Job Title: Cellar Hand
    Job Category: �i�o
            <tr

  • PHP Template CSS not showing up in html site

    I'm making a website for a school assignment, but after making my template, and attempting to make a site out of it, the CSS for my drop down menu didn't apply.
    I can see that it's there (Saying DDMenu.css in the css bar) but it's just one line, with no possible extentions or anything beneath.
    < template < "index" site
    any tips?

    1. Have you defined a site in DW?
    2. Are you working within this defined site?
    3. Is the link in the template to the CSS file correct FROM THE TEMPLATE FILE?
    4. Why are you using APdivs (the worst possible way to build a page)?
    The image you are showing for the index site means that the link to the CSS file in that page is incorrect (i.e., the link is there but the path is wrong).

  • Web files (html, php, css ...) slow to update

    I am web developer.
    I have always worked in mac, but when I upgraded to Mavericks began to have a serious problem.
    When I edit a web archive (such as html, php or css) and I open it in the browser, I visualize an old version. For the latest updates, you must spend a period of time (2 to 3 minutes).
    It happens with web server (MAMP) or HTML files. Any browser.
    I'm desperate because my work is very slow.
    thank you very much

    Here is how I access my local wordpress site using mamp
    http://localhost:8888/ub-new/
    And here is how I access it on ampps:
    http://localhost/ub-new/
    They are both very slow.
    Here is what I have inside /etc/hosts
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost
    Which parts should be modified or added?

  • Problem with PHP, CSS & Code Navigator in CS4

    Hi,
    I've got al little problem with code navigator. To show the problem, I created this 3 files:
    test1.html
    The CSS-Definition is defined static, with simple HTML.
    <html>
    <head>
         <style type="text/css">
              @import "test.css";
         </style>
    </head>
    <body>
          <p>Hello World</p>
    </body>
    </html>
    test2.php
    The CSS-Definition is defined dynamic, with PHP-Code.
    <html>
    <head>
         <style type="text/css">
              <? echo "@import \"test.css\";\n"; ?>
         </style>
    </head>
    <body>
          <p>Hello World</p>
    </body>
    </html>   
    test.css
    The CSS-File which is imported in test1.html and test2.php
    p {
         font-size:20px;
    The Problem in Dreamweaver CS4
    When opening the test.html - File in Dreamweaver CS4, I can easily see the CSS-Definition of the <p>-Tag in Code Navigator. To edit these definition I can simple open the test.css by clicking on the definition in Code navigator. For a complex webpage this is a greate feature. Sadly, this does not work, when I open the test2.php. Although when going to Live View and selecting the <p>-Tag I can see the CSS-Definition and the file in which it is defined in Code Navigator. But by clicking on the definition the test.css DOES NOT OPEN!
    Has anybody a solution? Because many of our projects have dynamic CSS-Definitions, it would be a shame, if this would not work.
    Tanks for help! :-)

    I've done some testing, which might point you in the direction of an interim solution.
    This is the code for related_files.php:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Related files test</title>
    <?php include('include.css'); ?>
    </head>
    <body>
    <p>This is a paragraph.</p>
    </body>
    </html>
    This is the code for include.css:
    <style type="text/css">
    p {
         font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
         color:#F00;
    </style>
    Note that the include file contains the opening and closing style tags.
    By including your styles like this in a PHP include file, Dreamweaver applies the CSS in Design view (you don't need to turn on Live View). Holding down the Alt key while clicking in Design view brings up the Code Navigator with all the details of the CSS. The one missing link in the chain is that clicking the style selector in the Code Navigator does not open the CSS file. However...
    The file that contains the CSS is listed in the Related Files toolbar, so you can edit it in Split view, and see the results in Design view in exactly the same way as with an HTML page and ordinary style sheet.
    As I say, not the full solution that you wanted, but it might be something worth experimenting with.

  • Show css styles on php pages

    Hi,
    When working on a php website, css urls are not included in each page. As a consequence, if I open any other file the styling info is not taken into account. Is there a way to configure dreamweaver so that it does attach stylesheets that should be attached ?
    Many thanks

    When working on a php website, css urls are not included in each page
    What?  What do you mean by this?  If any page contains a link to a CSS file, that file's contents are considered in rendering the page in DW's Design view.

  • CSS and PHP ready files! How do I add them to dreamweaver?

    Hi Guys,
    I have been sent ready made PHP and CSS files so I can manipulate and change text/fonts and pictures etc... for a new website. How do I insert both of them into the same document?
    Please help if you can!!
    Thanks,l
    Oli

    What is a ready file?  Did this developer give you any kind of instruction?
    It's hard to say what to do because depending on the code, you may need to perform all the work in code view.  I would get back in touch with who gave you the files, if not, you may need to upload them somewhere or post the code from them.

  • How to add a comment in a php file which has html code

    Hi
    I have a html file which I renamed .php after adding a form. I discovered that the html comment text I was using - <!--this is a comment --> - was affecting how the page rendered, particularly in IE9.
    My question is, now that it is a php file do I need to change all the comments syntax? I started to do it using the "apply comment" button in CS5 i.e. syntax: <?php /*?>form<?php */?>.
    Is this the right way to do it? It gives "php" icons in design view but appears to render ok.
    Thanks

    PHP comments:
    <?php
    //This is a comment
    This is
    a php comment
    block
    ?>
    Use PHP comments inside PHP scripts/code.
    HTML comments:
    <!--comment-->
    <!--this is
    an html comment
    block-->
    Use HTML comments inside HTML code.
    CSS Comments:
         /*comment*/
         /*this is
         a css comment
         block*/
    Use CSS comments inside CSS code (either embedded or external).
    JavaScript comments:
    //this is a single line comment
    //this is another single line comment
    /*this is a multi-line
    javascript
    comment
    Use JavaScript comments inside JavaScript code (either embedded or external).
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • CSS Centered & Fixed Width Layout

    I'm trying to use CSS for building a new layout and do so without resorting to the old methods, like using tables. But I can't even get past a very basic thing using Dreamweaver CS5.5. I want the page layout to be a fixed width yet centered in the browser window instead of stuck to the left. Lots of web sites do this (even Adobe's main site).
    In the past I would just create a parent table and simply give it a center alignment then build everything else inside of it. Easy. Unless I'm overlooking something obvious there appears to be no way at all to apply the same sort of alignment property to a DIV-based container. Dreamweaver provides lots and lots of other formatting options, but page alignment for that DIV object isn't there.
    If I could just get the first big overall DIV centered on the page where I want it I think I could use absolute positioning on the DIVs inside of it.
    I've searched around for examples on how to code CSS to make this work, but haven't been able to simply cut and paste the code into Dreamweaver to make it happen. I need to learn how to do this correctly using Dreamweaver's own CSS property dialog boxes.

    If I could just get the first big overall DIV centered on the page where I want it I think I could use absolute positioning on the DIVs inside of it.
    OMG no.  You don't want to use absolute positioning at all, until you understand CSS positioning fully.
    Read this to get an idea how to do your layout -
    http://www.apptools.com/examples/pagelayout101.php
    HTML & CSS Tutorials - http://w3schools.com/
    How to Develop with CSS?       
    http://phrogz.net/css/HowToDevelopWithCSS.html
    Learn CSS positioning in 10 Steps
    http://www.barelyfitz.com/screencast/html-training/css/positioning/
    ========================================
    PRE-BUILT CSS LAYOUTS
    For rock solid, commercial products that perform well in all browsers/devices, visit Project Seven:
    http://www.projectseven.com/products/index.htm
    Not Just a Grid CSS Framework (free)
    http://www.notjustagrid.com/demo.asp
    Ultimate Multi-Column Layouts (free)
    http://matthewjamestaylor.com/blog/ultimate-multi-column-liquid-layout s-em-and-pixel-widths
    EZ-CSS Templates (watch the screencast to see how it works)
    http://www.ez-css.org/css_templates
    Dreamweaver CSS Templates for beginners (free)
    http://www.adobe.com/devnet/dreamweaver/articles/dreamweaver_custom_te mplates.html
    New DW Starter Pages (free)
    http://www.adobe.com/devnet/dreamweaver/articles/introducing_new_css_l ayouts.html

  • A PHP newbie question

    It appears I can't have all my PHP files neatly placed away in a directory called PHP (assets/php), like I do with my images (assets/images) and css files (assets/css).
    When I use <?php include("assets/php/header.php"); ?>, my index.php file doesn't see the header.php file. But... if I take the header.php file and place it in the root directroy, <?php include("header.php"); ?>, all is well.
    Any idea what I'm doing wrong? Please help.
    Mike

    if the header.php file contains an image, the index.php file will only show an image placeholder, and not the image itself.
    Without seeing your code, it's difficult to judge. However, I suspect the problem is that you are also using a document-relative path for the image inside the include file.
    The problem with PHP includes is that the include command needs a document-relative path to the include file; but once the file is included, it's treated as part of the main file. Consequently, a document-relative path inside the include file will point to a different location unless the include file and the file into which it's included are in the same folder (directory).
    The answer is simple:
    When including a file, use a document-relative path in the PHP include command, e.g. include('../includes/header.php');
    Inside the include file itself, always use site-relative paths, e.g. <img src="/images/mypic.jpg" . . . />
    The difference lies in the leading forward slash at the beginning of the path for a site-relative path.
    WARNING: Site-relative paths don't work if your testing server is in a sub-folder of the Apache (or IIS) server root. You need to define a virtual host in your local testing environment for this to work. For a tutorial on setting up virtual hosts in Apache 2.2, see this tutorial on my website: http://foundationphp.com/tutorials/apache22_vhosts.php.
    It all sounds complicated, but once you realize what's going on, it's fairly straightforward.

  • CSS is not showing in design view

    Hello, I wonder if anyone can help. I would appreciate very
    much if you can... I have read all the css related problems, but
    did not see the problem I am having.
    Anyway, I have done a website template for someone and I gave
    it to him to update the contents. However, on his dreamweaver
    Design view, the css does not support it at all so it looks all
    messy. Though when he preview it on IE, this is all fine. I have
    made templates and css files with dreamweaver and I can view
    everything fine. He seems to have the same version of DW (MX 2004)
    so I am not sure how this happens. We were looking in everything
    (including goofy css as someone says on this forum), but have no
    luck so far. Here is my link and I pasted my css here.
    http://www.norithefish.com/index2.html
    Many thanks for this.
    Noriko
    /* HTML tag styles */
    body
    {background: #cccccc; font-family: Verdana, Arial, Helvetica,
    sans-serif;
    font-size: small; color: #000000; font-weight: normal}
    a { color: #333333; text-decoration: none }
    a:active { color: #666666; text-decoration: none }
    a:hover { color: #CC3300; text-decoration: underline }
    .bodytext { font-size: small; color: #000000; font-weight:
    normal}
    .smalltext { font-size: x-small; color: #000000; font-weight:
    normal}
    .smalltextw { font-size: x-small; color: #ffffff;
    font-weight: normal}
    .title{ font-size: 1.5em; font-weight: bold; color: #CC3300}
    .wbracket{ font-size: small; font-weight: normal; color:
    #ffffff}
    .smalltitle { font-size: 1em; font-weight: normal; color:
    #666666}
    .sub { font-size: small; font-weight: bold; color: #ffffff }
    .foot { font-size: x-small; font-weight: normal; color:
    #000000}
    h1 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 1.5em;
    color: #cc3300
    h2 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 1.15em;
    color: #cc3300
    h3 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 1em;
    color: #666666
    ul{
    list-style-type: square;
    ul ul{
    list-style-type: disc;
    ul ul ul{
    list-style-type: none;
    /* Layout Divs */
    #pageNav{
    float: left;
    width:21.3%;
    top:10px;
    padding-left: 0px;
    border-bottom: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
    #content{
    width:75%;
    float: left;
    padding: 0px 0px 0px 0px;
    margin: 0px 0px 1px 20px;
    /* Component Divs */
    #siteName{
    margin: 0px;
    padding: 16px 0px 8px 0px;
    color: #ffffff;
    font-weight: normal;
    /************** feature styles *****************/
    .feature{
    padding: 0px 0px 0px 0px;
    font-size: 100%;
    /************* #siteInfo styles ***************/
    #siteInfo{
    clear: both;
    font-size: 100%;
    background-color: #999999;
    padding: 0px 0px 0px 0px;
    border-top: 1px solid #666666;
    /************* #smalltitle styles ***************/
    #smalltitle{
    clear: both;
    background-color: #ffffff;
    font-size: 100%;
    padding: 0px 0px 0px 0px;
    border-top: 1px solid #CC3300;
    border-bottom: 1px solid #CC3300;
    /*********** #sectionLinks styles ***********/
    #sectionLinks{
    position: relative;
    width: 150px;
    margin: 0px;
    padding: 0px;
    border-bottom: 1px solid #cccccc;
    font-size: 90%;
    #sectionLinks a:link{
    font-size: 1.15em;
    padding: 2px 0px 5px 10px;
    border-top: 1px solid #cccccc;
    width: 100%;
    width: auto;
    #sectionLinks a:visited{
    font-size: 1.15em;
    border-top: 1px solid #cccccc;
    padding: 2px 0px 5px 10px;
    #sectionLinks a:hover{
    font-size: 1.15em;
    border-top: 1px solid #cc3300;
    background-color: #dddddd;
    padding: 2px 0px 5px 10px;
    /*********** .frame styles ***********/
    .frame {
    width: 700px;
    left: 50%;
    padding-top: 0px;
    margin-left: -350px;
    margin-top: 0px;
    position: absolute;
    visibility: visible;
    border-top: 1px solid #999999;
    border-bottom: 1px solid #999999;
    border-right: 1px solid #999999;
    border-left: 1px solid #999999;
    background-color: #ffffff;
    .bg {
    height: 1px;
    background-color: #cccccc;
    width: 100%;
    /*********** #pageNav link styles ***********/
    #pageNav ul a:link, #pageNav ul a:visited {display: block;}
    #pageNav ul {list-style: none; margin: 0; padding: 0;}
    /* hack to fix IE/Win's broken rendering of block-level
    anchors in lists */
    #pageNav li {border-bottom: 1px solid #EEE;}
    /* fix for browsers that don't need the hack */
    html>body #pageNav li {border-bottom: none;}
    /********************* end **********************/

    > *** you are missing <li> at the beginning of the
    line and </li> at the end
    > or you want to remove the </li> from the previous
    lines.
    Or move the image within the existing pair. You cannot have
    that
    construction, though -
    <li>blah</li>
    <img>
    <li>blah</li>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "josie1one" <[email protected]> wrote in message
    news:[email protected]...
    > It sounds to me as if it's a path issue.
    > Your path is this:
    > <link rel="stylesheet" href="styles/inside.css"
    type="text/css">
    >
    > Does he have a folder called "styles" within which
    should be the
    > stylesheet?
    >
    > You have a couple of code problems (I'd say unrelated to
    your question).
    > <li><a href="1-about.html">Order your Tshirt
    </a></li>
    > <img src="ferrari_team_polo.jpg" alt="photo of a
    T-shirt" width="120"
    > height="180">***
    > <li><a href="1-about.html">Order your
    cap</a></li>
    > <img src="ferrari_cap.jpg" alt="photo of a cap"
    width="120"
    > height="75"><br>***
    >
    > *** you are missing <li> at the beginning of the
    line and </li> at the end
    > or you want to remove the </li> from the previous
    lines.
    >
    > and according to
    >
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.norithefish.com%2Findex2.html
    >
    > you have an extra </div> a couple of lines above
    the </body>
    >
    >
    > --
    > Jo
    >
    >
    >
    >
    >
    > "norithefish" <[email protected]> wrote
    in message
    > news:[email protected]...
    >> Hello, I wonder if anyone can help. I would
    appreciate very much if you
    >> can...
    >> I have read all the css related problems, but did
    not see the problem I
    >> am
    >> having.
    >>
    >> Anyway, I have done a website template for someone
    and I gave it to him
    >> to
    >> update the contents. However, on his dreamweaver
    Design view, the css
    >> does not
    >> support it at all so it looks all messy. Though when
    he preview it on IE,
    >> this
    >> is all fine. I have made templates and css files
    with dreamweaver and I
    >> can
    >> view everything fine. He seems to have the same
    version of DW (MX 2004)
    >> so I am
    >> not sure how this happens. We were looking in
    everything (including goofy
    >> css
    >> as someone says on this forum), but have no luck so
    far. Here is my link
    >> and I
    >> pasted my css here.
    >>
    >>
    http://www.norithefish.com/index2.html
    >>
    >> Many thanks for this.
    >> Noriko
    >>
    >> /***********************************************/
    >> /* HTML tag styles */
    >> /***********************************************/
    >>
    >> body
    >> {background: #cccccc; font-family: Verdana, Arial,
    Helvetica, sans-serif;
    >> font-size: small; color: #000000; font-weight:
    normal}
    >>
    >> a { color: #333333; text-decoration: none }
    >>
    >> a:active { color: #666666; text-decoration: none }
    >>
    >> a:hover { color: #CC3300; text-decoration: underline
    >>
    >> .bodytext { font-size: small; color: #000000;
    font-weight: normal}
    >>
    >> .smalltext { font-size: x-small; color: #000000;
    font-weight: normal}
    >>
    >> .smalltextw { font-size: x-small; color: #ffffff;
    font-weight: normal}
    >>
    >> .title{ font-size: 1.5em; font-weight: bold; color:
    #CC3300}
    >>
    >> .wbracket{ font-size: small; font-weight: normal;
    color: #ffffff}
    >>
    >> .smalltitle { font-size: 1em; font-weight: normal;
    color: #666666}
    >>
    >> .sub { font-size: small; font-weight: bold; color:
    #ffffff }
    >>
    >> .foot { font-size: x-small; font-weight: normal;
    color: #000000}
    >>
    >>
    >> h1 {
    >> font-family: Verdana, Arial, Helvetica, sans-serif;
    >> font-size: 1.5em;
    >> color: #cc3300
    >> }
    >> h2 {
    >> font-family: Verdana, Arial, Helvetica, sans-serif;
    >> font-size: 1.15em;
    >> color: #cc3300
    >> }
    >> h3 {
    >> font-family: Verdana, Arial, Helvetica, sans-serif;
    >> font-size: 1em;
    >> color: #666666
    >> }
    >>
    >> ul{
    >> list-style-type: square;
    >> }
    >>
    >> ul ul{
    >> list-style-type: disc;
    >> }
    >>
    >> ul ul ul{
    >> list-style-type: none;
    >> }
    >>
    >>
    >> /***********************************************/
    >> /* Layout Divs */
    >> /***********************************************/
    >>
    >> #pageNav{
    >>
    >> float: left;
    >> width:21.3%;
    >>
    >> top:10px;
    >> padding-left: 0px;
    >> border-bottom: 1px solid #cccccc;
    >> border-right: 1px solid #cccccc;
    >> }
    >>
    >> #content{
    >> width:75%;
    >> float: left;
    >> padding: 0px 0px 0px 0px;
    >>
    >> margin: 0px 0px 1px 20px;
    >>
    >> }
    >>
    >>
    >> /***********************************************/
    >> /* Component Divs */
    >> /***********************************************/
    >> #siteName{
    >> margin: 0px;
    >> padding: 16px 0px 8px 0px;
    >> color: #ffffff;
    >> font-weight: normal;
    >> }
    >>
    >>
    >> /************** feature styles *****************/
    >>
    >> .feature{
    >> padding: 0px 0px 0px 0px;
    >> font-size: 100%;
    >>
    >>
    >> }
    >>
    >>
    >>
    >> /************* #siteInfo styles ***************/
    >>
    >> #siteInfo{
    >> clear: both;
    >>
    >> font-size: 100%;
    >> background-color: #999999;
    >> padding: 0px 0px 0px 0px;
    >> border-top: 1px solid #666666;
    >> }
    >>
    >> /************* #smalltitle styles ***************/
    >>
    >> #smalltitle{
    >> clear: both;
    >>
    >> background-color: #ffffff;
    >> font-size: 100%;
    >> padding: 0px 0px 0px 0px;
    >> border-top: 1px solid #CC3300;
    >> border-bottom: 1px solid #CC3300;
    >>
    >> }
    >>
    >>
    >>
    >> /*********** #sectionLinks styles ***********/
    >>
    >> #sectionLinks{
    >> position: relative;
    >> width: 150px;
    >> margin: 0px;
    >> padding: 0px;
    >> border-bottom: 1px solid #cccccc;
    >> font-size: 90%;
    >>
    >> }
    >>
    >>
    >>
    >> #sectionLinks a:link{
    >> font-size: 1.15em;
    >> padding: 2px 0px 5px 10px;
    >> border-top: 1px solid #cccccc;
    >> width: 100%;
    >>
    >> width: auto;
    >> }
    >>
    >> #sectionLinks a:visited{
    >> font-size: 1.15em;
    >> border-top: 1px solid #cccccc;
    >> padding: 2px 0px 5px 10px;
    >> }
    >>
    >> #sectionLinks a:hover{
    >> font-size: 1.15em;
    >> border-top: 1px solid #cc3300;
    >> background-color: #dddddd;
    >> padding: 2px 0px 5px 10px;
    >> }
    >>
    >>
    >>
    >>
    >> /*********** .frame styles ***********/
    >> .frame {
    >> width: 700px;
    >> left: 50%;
    >> padding-top: 0px;
    >>
    >> margin-left: -350px;
    >> margin-top: 0px;
    >> position: absolute;
    >> visibility: visible;
    >>
    >> border-top: 1px solid #999999;
    >> border-bottom: 1px solid #999999;
    >> border-right: 1px solid #999999;
    >> border-left: 1px solid #999999;
    >> background-color: #ffffff;
    >> }
    >> .bg {
    >> height: 1px;
    >>
    >> background-color: #cccccc;
    >> width: 100%;
    >> }
    >>
    >> /*********** #pageNav link styles ***********/
    >>
    >> #pageNav ul a:link, #pageNav ul a:visited {display:
    block;}
    >> #pageNav ul {list-style: none; margin: 0; padding:
    0;}
    >>
    >> /* hack to fix IE/Win's broken rendering of
    block-level anchors in lists
    >> */
    >> #pageNav li {border-bottom: 1px solid #EEE;}
    >>
    >> /* fix for browsers that don't need the hack */
    >> html>body #pageNav li {border-bottom: none;}
    >>
    >> /********************* end **********************/
    >>
    >>
    >>
    >>
    >
    >

  • Local net ssh failure Tiger (PHP MYSQL Apache Dreamweaver)

    I can't be sure, but I think this problem started with the latest security update. I'm 80% done with my first web application using PHP and Mysql in dreamweaver when I began getting an unknown error from dreamweaver when attempting to connect to my DB on my testing server. After 2 days of debugging and re-installing apps I finally wiped the testing server (G4 400 Cube memory topped out 120GB HD, down to the metal) reinstalled Tiger, fully patched, edited the httpd.conf file to enable php 4.4.1. Installed Mysql 4.1 (which was the last general distribution with a packaged install) and the server works fine, so I created myself as a user in mysql @localhost & @localmachinename to replicate root user. Navicat was up and running in no time, so I re-populated my server from my backup. Then I jumped over to my design workstation (G5 2Ghz Dual, 2GB Ram, 250GB HD) only to find navicat can't login to the mysql server because ssh wont connect to the G4. After much testing I discovered ALL of my macs will attach only to external addresses. My linux box, external linux boxes, even windows boxes emulating ssh will attach internally or extenally, the macs won't talk to anything in the local network 10.0.x What the ****! My project is now past due and I'm stuck because I can no longer ssh from any macs to internal machines mac or otherwise. PLEASE HELP!!! is there an SSH pakage so I can re-install? I couldn't find a mac ssh package on apple or ssh.org, Will that even make a difference? Can I uninstall the security update? Can anyone suggest a workaround?
    My network
    *10.0.1.2 Ganymede (Mandrivia 10 server and Gateway)
    *10.0.1.6 Artemis (G5 10.4.7) Web/Video
    *10.0.1.10 Miletus (G4 10.4.7) Web Testing
    *10.0.1.5 Venus (G4 10.4.7) Photo editing
    *10.0.1.4 Hero (G3 ibook 10.4.7) office work
    *10.0.1.7 Hermes (iMac 10.4.7) iLife
    *10.0.1.3 Apollo (Wintendo XP) Web Testing/The Sims
    Here are several ssh logs.
    mac to mac (FAIL)
    Artemis:~ phil$ ssh -vv 10.0.1.10
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 10.0.1.10 [10.0.1.10] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2
    debug1: match: OpenSSH_4.2 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    Write failed: Broken pipe
    Artemis:~ phil$
    Mac to linux internal (FAIL)
    Artemis:~ phil$ ssh -vv 10.0.1.2
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 10.0.1.2 [10.0.1.2] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    Write failed: Broken pipe
    mac to linux external (Success)
    Artemis:~ phil$ ssh -vv 69.253.x.x
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 69.253.x.x [69.253.x.x] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    debug2: dhgenkey: priv key bits set: 130/256
    debug2: bits set: 514/1024
    debug1: SSH2MSG_KEX_DH_GEXINIT sent
    debug1: expecting SSH2MSG_KEX_DH_GEXREPLY
    debug1: Host '69.253.239.85' is known and matches the RSA host key.
    debug1: Found key in /Users/phil/.ssh/known_hosts:3
    debug2: bits set: 516/1024
    debug1: sshrsaverify: signature correct
    debug2: kexderivekeys
    debug2: set_newkeys: mode 1
    debug1: SSH2MSGNEWKEYS sent
    debug1: expecting SSH2MSGNEWKEYS
    debug2: set_newkeys: mode 0
    debug1: SSH2MSGNEWKEYS received
    debug1: SSH2MSG_SERVICEREQUEST sent
    debug2: service_accept: ssh-userauth
    debug1: SSH2MSG_SERVICEACCEPT received
    debug2: key: /Users/phil/.ssh/identity (0x0)
    debug2: key: /Users/phil/.ssh/id_rsa (0x0)
    debug2: key: /Users/phil/.ssh/id_dsa (0x0)
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Trying private key: /Users/phil/.ssh/identity
    debug1: Trying private key: /Users/phil/.ssh/id_rsa
    debug1: Trying private key: /Users/phil/.ssh/id_dsa
    debug2: we did not send a packet, disable method
    debug1: Next authentication method: keyboard-interactive
    debug2: userauth_kbdint
    debug2: we sent a keyboard-interactive packet, wait for reply
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug2: we did not send a packet, disable method
    debug1: Next authentication method: password
    [email protected]'s password:
    debug2: we sent a password packet, wait for reply
    debug1: Authentication succeeded (password).
    debug1: channel 0: new [client-session]
    debug2: channel 0: send open
    debug1: Entering interactive session.
    debug2: callback start
    debug2: clientsession2setup: id 0
    debug2: channel 0: request pty-req confirm 0
    debug2: channel 0: request shell confirm 0
    debug2: fd 3 setting TCP_NODELAY
    debug2: callback done
    debug2: channel 0: open confirm rwindow 0 rmax 32768
    debug2: channel 0: rcvd adjust 131072
    Last login: Tue Aug 15 12:56:42 2006 from artemis.ganymedia.net
    [phil@ganymede ~]$
    G5 Dual 2G   Mac OS X (10.4.7)  

    Mac comes with a fully functioning Apache web server with all the scripting languages (except VB). You need to enable them in the configuration file.
    You need some light weight UNIX administration skills to do this. Use the system restore disk to set the password for the root account.
    Open a terminal screen from the Utilities folder in Applications. Type "su", press return, then enter the root password you set using the system restore disk.
    Make a backup copy of the Apache configuration file with the following command (type this in with no mistakes and press the return key).
    cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.copy
    Enter the following to open the Apache configuration (type this in with no mistakes and hit the return key).
    /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/httpd/httpd.conf &
    Locate and remove the # comment symbol from the following lines and save the file in /etc/httpd/httpd.conf.
    #LoadModule php4_module libexec/httpd/libphp4.so
    #AddModule mod_php4.c
    Exit the TextEdit application and quit out of the terminal application.
    Put the following web page into a file named greetings.php inside the folder Library/WebServer/Documents.
    <html>
    <head>
    <title>Experiment</title>
    </head>
    <?php
    echo "Greetings";
    ?>
    </body>
    </html>
    Once you have made these changes, you can reboot to activate the changes.
    Put the following into your browser to test the configuration.
    http://localhost/greetings.php
    You should see "Greetings" on a web page titled "Experiment".
    MySQL is a separate server that you need to download and configure to complete your web server.
    I hope this helps.
    Best regards - Greg

Maybe you are looking for