WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] PHP 5 and WordPress installation problems (11 posts)

  1. whitethunder
    Member
    Posted 8 years ago #

    Hi.

    I tried the 5-minute set-up. I clicked on the link in step 5, "Open /wp-admin/install.php in your browser."

    This text was at the top of the next page given to me:

    wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file."); require_once('../wp-config.php'); require_once('./upgrade-functions.php'); $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; $guessurl = str_replace('/wp-admin/install.php?step=2', '', $schema . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) ); if (isset($_GET['step'])) $step = $_GET['step']; else $step = 0; header( 'Content-Type: text/html; charset=utf-8' ); ?>

    The bad code goes on in various palces throughout the page. It appears to be PHP generated. I am using PHP 5. For PHP, I enabled mysql.dll extension, set my path environment to see PHP in the proper directory, and stopped/restarted my server (Windows IIS).

    When i try to access wp-admin/index.php or wp-admin/install.php, i get a 404 page not found error.

    My wp-config file seems OK - I have looked over it several times.

    It is frustrating to see all the tutorials explain how easy the set-up is because I have been at this for over 6 hours. After reading the help posts here in this forum, I believe the problem is in my PHP set-up somewhere, but I do not know for sure, nor do I know _what_ about PHP 5 I am supposed to fix.

    MySQL is set-up and I created and tested a table for it successfully. WordPress seems easy as pie. The errors I get look PHP related. So I figure that has to be the problem.

    I did a manual install of PHP 5.1.4. I have read through the long php.ini file several times and, I confess, I just dont even know really what to look for or what to change.

    Before this morning, I knew absolutely nothing about PHP, MySQL, or installing WordPress. But now my head is full. Can anyone point me in the right direction?

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    "wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file."); require_once('../wp-config.php');"

    If you can see that then the php is not being read as php - just text. That would appear to mean that php itself is not running?

    On what machine / OS are you installing this?

  3. Chris_K
    Member
    Posted 8 years ago #

    Windows and IIS.

    We can't help you get PHP working with IIS here, but there are some good sites that WILL. Just google 'em up.

  4. whitethunder
    Member
    Posted 8 years ago #

    Podz & HandySolo,

    Thanks for confirming the PHP problem. It gives me a firm direction to head in. Thus far I had just been on the php.net tutorials pages, thinking that would be the best resource. I will try google.

    I will post back with the resolution if I find one.

    Thanks both for your assistance! Much appreciated!

    Chris

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    whitethunder: Alternatively, you might try setting up Apache instead. It's a lot easier to use than IIS, IMO.

  6. whitethunder
    Member
    Posted 8 years ago #

    Otto, Thanks for the tip! Ha, I figured I was in over my head what with being completely new to PHP and mySql, IIS, and WordPress already - didn't want to replace IIS with Apache because (at least) my boss understands and can support IIS. it gave me one leg to stand on. of course, he is on vacation while i am trying to set this up, so maybe I should have. lol!

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Well, Apache is very easy *if* you're not scared away by editing text files for configuration and such. I run Apache on my Windows box, have for years. No issues. IIS, on the other hand, has never given me anything but problems. At least when Apache doesn't work, I know that it's something I did and not just some random IIS nonsense.

    But you can get PHP to work in IIS, the only way I know how to do it is as a CGI program though, which has performance issues. Perhaps you could do it as an ISAPI extension, I've just never tried. Anyway, you need to edit the php.ini file to turn off cgi.force_redirect, and then set an application mapping in IIS for the php extension to run using the php-cgi.exe program.

  8. whitethunder
    Member
    Posted 8 years ago #

    OK, first, thanks so much folks for the direction and gentle guideance. I REALLY appreciate it! you all are the best and I found these support forums really helpful!!

    Second: Here were the problems I needed to correct to resolve my situation, for the next person who needs help. NOTE: This is what worked for me, some of it maybe I did not need to do. I dont know but dont want to change anything now that I am up and running.

    1)I had to enable .php suffix as a default content page. go to your IIS manager, right click on the default website, go properties, go Documents tab, add index.php to the list.

    2)I had to move my DLL files into the proper directory to be read by IIS. This means moving the php.ini file into the c:/windows/ folder and then I moved the rest of the dll files that came with my installation of PHP into my C:/Windows/SYSTEM32 folder

    3)I read my log error files to see what was not working - learned that my ISAPI filter was not turning on because it was not compatible with my 64-bit system (!).

    4)I enabled IIS 6.0 to run 32-bit applications on 54-bit Windows (this proved to be the deciding factor in getting ISAPI to finally work). I found out how to do this in a windows help page. Quick search should explain - i forget the hyperlink.

    5)I enabled the MySQL extension and set the extension_dir path

    6)I added php to my Application Configuration (see:
    http://www.adobe.com/devnet/dreamweaver/articles/php_iis.html).

    OK. There are still some problems, like my php test page does not show up in my browser, but my hello.php file does just fine. And most importantly (for now) the word press installation is finished.

    Thanks so much! Now I'll try some bloggin!

  9. whitethunder
    Member
    Posted 8 years ago #

    Otto,

    You are encouraging me to try Apache! Ack! What next? lol. Seriously, I would like to give it a whirl someday.

    I stayed away from the CGI and used the ISAPI install. My PHP set-up was as a "CLI" though I do not know enough to know how different it is from CGI, but this is what I read about the two:

    Server modules provide significantly better performance and additional functionality compared to the CGI binary. The CLI version is designed to let you use PHP for command line scripting. More information about CLI is available in the chapter about using PHP from the command line.

    from here: http://us3.php.net/manual/en/install.windows.manual.php

    And this is what my ini file says about cgi.force_redirect:

    ; cgi.force_redirect is necessary to provide security running PHP as a CGI under
    ; most web servers. Left undefined, PHP turns this on by default. You can
    ; turn it off here AT YOUR OWN RISK
    ; **You CAN safely turn this off for IIS, in fact, you MUST.**

    What does this functionality do, Otto, for people running CLI and not CGI? I beleived it did not apply to me since I am running IIS and was not running CGI. Am I incorrect?

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Okay, slight amount of confusion here, I see. From your perspective, you can consider CGI and CLI to be the same thing.

    ISAPI = Internet Server Application Programming Interface. In Apache terms, this would be a "module". Basically it's a DLL that gets loaded into the webserver program itself. It runs the PHP code when it's necessary.

    CGI = Common Gateway Interface. Basically it's a way for webservers to run external programs, like php-cgi.exe. It would be used to run PHP if you set it up that way. Usually setting up CGI in your webserver is a bit easier than other ways (like ISAPI), but this varies. CGI is slower because of process overhead and lack of shared memory for multiple requests. It should be avoided when possible.

    CLI = Command Line Interface. You don't have to run PHP on a website. You can run it at a command line too, like most any scripting language. The php-cgi.exe or php.exe would let you do that.

    But if you're running as an ISAPI module, then you likely don't need to screw with the cgi.force_redirect thingy. I think. Put it this way, if it works, then you're probably okay for now. :)

  11. whitethunder
    Member
    Posted 8 years ago #

    Thanks, Otto. And I am confused - but learning :)

    You folks are a great help. Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Topic