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
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?
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
Unregistered
Posted 3 years ago #
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
Unregistered
Posted 3 years ago #
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
Anonymous
Unregistered
Posted 3 years ago #
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.
Anonymous
Unregistered
Posted 3 years ago #
that information is correct!!! \o/
Anonymous
Unregistered
Posted 3 years ago #
hey, thanks a lot... saved me a lot of time looking through code
xmarcos
Member
Posted 3 years ago #
[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.
Anonymous
Unregistered
Posted 3 years ago #
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!
Anonymous
Unregistered
Posted 3 years ago #
helped me also a lot, thanks
digitician
Member
Posted 3 years ago #
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.
Here's a way to quickly change the file in the shell:
cat upgrade-functions.php | sed "s/res\[0\]\['Type'\]/res\[0\]->Type/g" > upgrade-functions.php
I installed 1.2.2 perfectly and then put the nightlies on, trying several different installation methods from overwriting, to completely deleting and trying it fresh (with the wp-config.php containing the right info) and running upgrade EVERY time gets me this:
Fatal error: Call to undefined function: __() in /home/cameraon/public_html/test/wordpress/wp-admin/admin-functions.php on line 857
I hunt through the new version of upgrade-fuctions.php and found no reference to $res anywhere, so this fix isn't working. I waited overnight and got today's new version and did a clean reloading and it also give me the same error.
Ideas?
I did a fresh install with the nightlies and it works, but I had to delete all the tables in my database - no loss since there was nothing in there.
This will have to be fixed for others upgrading!
restlesswanderer
Member
Posted 3 years ago #
I'm getting the same line 857 error when I try to upgrade to a nightly build.
There must be a way to do this without deleting those tables. . .
If not, I guess I'll just have to wait for the stable release.
had a some tipe of problem with stdClas... and this fix worked for me... Thanks to all who contributed
Cheers, works for me. Sorry for creating another thread about it.