0

hello. I am getting a blank page on localhost/myproject/
i am pretcty sure th.at\ it cant connect to the database because when i am using a simple echo it returns. for example
<?php echo 'DDD'; ?>

THE THING IS THAT I AM USING WOS PORTABLE IS IT POSSIBLE THAT IT DOESNT SUPPORT PHPMYADMIN?

I HAVE IMPORTED THE DATABASE ON localhost/phpmyadmin/

3
Contributors
7
Replies
31
Views
2 Years
Discussion Span
Last Post by SimonIoa
1

Okay, questionaire:

  1. Do you have Apache server? Start it.
  2. Do you have MySQL server? Start it.
  3. Create a file called config.php, put inside

    <?php
        $sql_un = "root";   // default: "root";
        $sql_pd = "";       // default: "";
        $sql_db = "";       // you will need to create database and input here it's name
        $sql_conn = mysqli_connect("127.0.0.1", $sql_un, $sql_pd, $sql_db);
        if (!$sql_conn) {
            die("Something didn't work, the file couldn't connect to database!");
        }
        echo "File's request has been successfully sent and answer received.";
    ?>
    

I don't get the <?php echo 'DDD'; ?> part... what about it?

Edited by Aeonix

0

i just did so i see what it returns without connecting to db. Where shall i put the config file?

0

ok. when i use this $sql_conn = mysql_connect("127.0.0.1", $sql_un, $sql_pd, $sql_db); it replies File's request has been successfully sent and answer received.

when i leave it as you send it to me
$sql_conn = mysqli_connect("127.0.0.1", $sql_un, $sql_pd, $sql_db);
it returns a blank page

0

mysql is how the database is called, but there has been an update to it called mysqli which is essentially just "MySQL improved", I think you need to upgrade your SQL server. The file should be put inside of htdocs or www folder, but you already figured that out.

0

yes thats the issue i was using wos portable and it doesnt supports php 5.4, only php 4 thats why ive been having problems. For future reference i had problems. as

  1. Couldn't read private or public funcion (i mean the syntax of cit ) i change them to function and it worked. I dont know how to put it better. Sorry
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.