• giberian1

    (@giberian1)


    Hi,

    I just tried to get WordPress to work from localhost but install.php has not been executed. Instead, it’s content has been displayed in the browser window. What can be the problem?

    Lots of thanks for any help. If you need more information, please ask! Thanks, G.

Viewing 8 replies - 1 through 8 (of 8 total)
  • tapeboy929

    (@tapeboy929)

    Create a file in your webroot called ‘phpinfo.php’ with nothing but this line in it-

    <?php phpinfo(); ?>

    Then open this file in your browser. This will show you PHP and all its glory. In this case, it looks like PHP isn’t installed on the server, so it is parsing it as plain text. If you don’t see a PHP Info page, contact your server administrator. Good luck.

    [this is the last sig I will moderate – PER FORUM RULES – I will simply delete posts from now on]

    Take a look at the second comment on this thread. I think you have the same problem and the same solution.

    Thread Starter giberian1

    (@giberian1)

    @tapeboy929: At the moment, I’m trying to get WP working from a localhost. The <?php phpinfo(); ?> is executed correctly.

    @ apljdi: I’ve looked on this thread but I couldn’t find the sequence. Do I just have to add it somewhere? … I did find some similar sequences:

    <IfModule mod_userdir.c>
    UserDir Sites
    </IfModule>

    and:

    <IfModule mod_dir.c>
    DirectoryIndex index.html
    </IfModule>

    and:

    <IfModule mod_mime.c>
    TypesConfig /private/etc/httpd/mime.types
    </IfModule>

    and:

    <IfModule mod_mime_magic.c>
    MIMEMagicFile /private/etc/httpd/magic
    </IfModule>

    You must be running a different version of Apache than I am. Its the DirectoryIndex directive, though. Add index.php after index.html and see if that works.

    giberian

    (@giberian)

    Thanks, it worked! But I still didn’t get it to install, WP says:

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    * Are you sure you have the correct username and password?
    * Are you sure that you have typed the correct hostname?
    * Are you sure that the database server is running?

    I checked username and password, The only thing I’m not sure of is no.3, how do I know if the database server is running? I’m trying to install it on a localhost on my imac PowerPC G5…

    giberian: I feel for you. I tried to get an Apache/MySql/PHP server to work on a Mac (probably 10.3 or 10.4) about two years ago and that was painful, but you are close. That’s good.

    Check your basics. Apache and PHP are running or you’d get a different message. Are you sure mysql is running? If so, check the username, password, and database name. Still no luck? Check the grant settings for your mysql users— user permissions, basically.

    giberian

    (@giberian)

    Hello again,
    mySQL is indicated as “running” in the SystemPreferences.
    Username, password and database name are spelled correctly within the wp-config-file.
    I followed your advise and I got this:

    mysql> SHOW GRANTS FOR ‘root’@’localhost’;
    +—————————————————————————————————————————————-+
    | Grants for root@localhost |
    +—————————————————————————————————————————————-+
    | GRANT ALL PRIVILEGES ON *.* TO ‘root’@’localhost’ IDENTIFIED BY PASSWORD ‘*21E0F9364752C7131FEE054F20B28DA4BDEB6709’ WITH GRANT OPTION |
    +—————————————————————————————————————————————-+
    1 row in set (0.01 sec)

    mysql>

    Ok. If you are connecting from the same machine that MySQL is running on and using the username ‘root’ with whatever that password is, I think that should work. I’m not at home so I can’t compare this to my settings.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘installation fails – browser shows install.php’s content’ is closed to new replies.