WordPress.org

Support

Support » Installation » [Resolved] Step 3 error: Cannot use object of type stdClass

[Resolved] Step 3 error: Cannot use object of type stdClass

  • I’ve installed WordPress three times without troubles.
    Today I’ve tried to install it in the root directory of my website, everything seems to be Ok during the installation but when it reachs Step 3 I get this error:
    Fatal error: Cannot use object of type stdClass as array in /home/pop-page/public_html/wp-admin/upgrade-functions.php on line 705
    PHP version 5.0.0.
    You can see the complete PHP confihuration at http://pop-page.com/info.php
    Thanks

Viewing 15 replies - 1 through 15 (of 21 total)
  • Well, I’ve use phpadmin to reset the password, and I can login; but anyway, what was the problem? anything related to PHP 5 + WP?

    Mark (podz)

    @podz

    Support Maven

    Are you trying to install 1.2 ?
    I get that error if I forget.
    1.2 and php5 don’t get on in certain small areas.
    1.3 is rec’d for php5

    Yes, I’m trying to install WP 1.2. After I used phpadmin to reset the password everything seemed to work, but i’ve noted some things don’t go properly: when I try to activate a plugin, the page reloads and says the modifications have been saved, but in the plugin list its status doesn’t change, I mean, the plugin shows the ‘activate’ buttom, not the ‘deactive’ one. I’ve checked the chmod permissions and the plugin dir is 755. So i’m really lost 🙁
    It’s strange because in the same server (but in a subdir) I installed WP 1.2 several weeks ago without problems, although I don’t know if PHP 5.0.0. was running then.

    by the way, What nightly build should I download? the last one?

    Anonymous

    I too got the following and I really would like this thing to work. That is without phpadmin which I don’t have.
    Anyone with an idea? Thanks!
    Fatal error: Cannot use object of type stdClass as array in …/wordpress/wp-admin/upgrade-functions.php on line 705
    PHP 5.0.2 (cli) (built: Sep 25 2004 15:10:57)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies
    mysql Ver 12.22 Distrib 4.0.20, for pc-linux-gnu (i686)
    apache:
    Latest version available: 2.0.51-r1
    Latest version installed: 2.0.51-r1
    gentoo: kernel 2.6……
    etc…

    Anonymous

    I am getting this error, too. I recently upgraded to Apache 1.3.31 and php 5.02 on my OS X machine.
    Fatal error: Cannot use object of type stdClass as array in /Users/payam/Sites/wp/wp-admin/upgrade-functions.php on line 705
    Did I forget something when I was compiling? I used the instructions on this page to compile Apache and php5.0.2. I hope this helps.
    http://www.phpmac.com/articles.php?view=203
    P

    here is a quick fix (tested against php5.0.1)
    change line 705 in wp-admin/upgrade-functions.php from
    if ($res[0][‘Type’] != ‘varchar(32)’) {
    to
    if ($res[0]->Type != ‘varchar(32)’) {
    hope it helps.

    that information is correct!!! \o/

    hey, thanks a lot… saved me a lot of time looking through code

    [quote]here is a quick fix (tested against php5.0.1)
    change line 705 in wp-admin/upgrade-functions.php from
    if ($res[0][‘Type’] != ‘varchar(32)’) {
    to
    if ($res[0]->Type != ‘varchar(32)’) {
    hope it helps.
    [/quote]
    A BIG THANKS!!!!!!… you’ve saved me a lot of time!
    Just a question? This is due to a update in php, right?
    m^r(oS | cba-arg

    Yeah and no. PHP 4 considers it as a two level array, so you have to give the first indice ([0]) to use it. Although, it refuses to use array functions on the second level, that’s (I think) reserved to PHP5.

    great!! thank you

    Quote:
    here is a quick fix (tested against php5.0.1)
    change line 705 in wp-admin/upgrade-functions.php from
    if ($res[0][‘Type’] != ‘varchar(32)’) {
    to
    if ($res[0]->Type != ‘varchar(32)’) {
    hope it helps.
    Unquote
    Anonymous, whoever you are … you’re amazing. Your help will come back to you a thousand fold. Thanks!

    helped me also a lot, thanks

    I had a similar problem that the code fixed for me. I’m running PHP 5.03 and WP 1.2.2. My symptom was that install.php would hang on step 3 – the page would only say “step 3”, nothing else. Many thanks to masquerade on #wordpress.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Resolved] Step 3 error: Cannot use object of type stdClass’ is closed to new replies.