SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: php and mysql

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    38
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    php and mysql

    Hi,

    I have been using php and mysql for several years and recently my XP installation died and I couldn't revive it. So I have a new installation of Windows 7 Ultimate.

    I have installed PHP 5.3 and IIS following instructions from this forum. That works. I have also installed MySQL 5.6 and that works.
    However, PHP and MySQL don't work together. I have been through the configurations time and time again but I just cannot see where the problem lies.

    It manifests itself from the browser not recognising the CSS scripts.

    calling localhost/phpinfo.php gives

    PHP Warning: phpinfo() [<a href='function.phpinfo'>function.phpinfo</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for '0.0/no DST' instead in C:\inetpub\wwwroot\phpinfo.php on line 3

    calling localhost/index.php gives

    Pre-connect

    This comes from my connect script:

    PHP Code:
    ini_set('display_errors',1);
    error_reporting(E_ALL);

    echo 
    '<p style="color: black;">Pre-connect</p>';

    $dbcnx = @mysql_connect('localhost''root','mancity1' );

    if (!
    $dbcnx) {

        exit( 
    '<p>Unable to connect to server</p>');

    }

    echo 
    '<p style="color: black;">Connected Server</p>';



    if(!@
    mysql_select_db('ut_db')) {

        exit(
    '<p>Unable to locate utilities database.</p>'); 

    }

    echo 
    '<p style="color: black;">Connected Database</p>'
    So I know it is calling the script. The display statements are in there temporarily while I sort out this problem.
    It does not matter whether I replace the mysql_connect function with anything else, it displays the same characteristics and it won't go any further. I know this is going to be something obvious but please help.

    Thanks,

    Steve
    Last edited by cpradio; Feb 19, 2013 at 14:25. Reason: Added [php] tags


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •