WordPress & PHP 5
-
huerg
Hello, I’m facing repetitive problems when installing WP under PHP 5.0.0RC3. What is your experience? Will the next release of WP be compliant with PHP 5? Thanks a lot.
-
What problems?
wordpress didn’t return anything (no output) when using PHP5 … my other scripts works fine
I am running w2k3 with IIS6.
I have had wordpress working with PHP 4.3.7, and updated to the just released 4.2.8 and all works fine. I’ve been working on getting 5.0.0 working, but I’m getting the following error when trying to log in:
“The specified CGI application misbehaved by not returning a complete set of HTTP headers.”
Everything else appears to be working correctly. It also appears that PHP5 needs to be installed in the CGI form, and NOT the ISAPI form.
Has anybody had any success with wordpress and PHP 5?on php5, you have to manually add the mysql extension (copy php_mysql.dll to the extension dir, copy libmysql.dll to %SYSTEMROOT%) and that’s just about it.
but i have problems with wp-login.php … it won’t show up when accessed from the front page. on a random try, i accessed wp-register.php and then typed wp-login.php’s url, then it did show the login page, but when i entered my username/pass, nothing happened. entered my blog’s front page and there’s no sign that i have logged in. (no “Edit this” on my posts)
any ideas why? i’ll try looking at the source on sunday. i guess there’s something in the header/cookie that prevents wp-login.php from working properly.^ forgot to say that the symptom only appears on php5. i switched back to php4 and all was ok. php5 worked with my scripts which usesd mysql/forms, so i guess it’s a wp problem.
The next version of WP will support PHP5 — you might want to try the nightly builds, they may all ready — I don’t know.
I’d be curious to hear how the current CVS works with PHP5.
I’m hitting an error on Step 3. of the install wizard when trying to do a clean WP1.2 install under PHP5. The error is:
“Fatal error: Cannot use object of type stdClass as array in /wordpress/wp-admin/upgrade-functions.php on line 705”
The line is question is:
$res = $wpdb->get_results($query);
if ($res[0][‘Type’] != ‘varchar(32)’) {
Under PHP5 if you want to use an object as an array you’ll need to define __get, and __set methods.I’m just setting up a new site and noticed even the latest 1.2.x’s fail at step 3 and figured I give 1.3.x-CVS a try and got through all stages just fine, however… the problem now is the inability to login. The Apache error logs show nothing, unlike in a current install of 1.2 installed when I was using PHP4.3.6 which showed an error regarding setcookie() using too few parameters. It’s a good job WP use persistant cookies as otherwise I won’t be able to log back into my sites! But I digress… (actually, I don’t recall login being broken for my existing WP1.2 install under PHP5.0.0RC3)
I’m currently using PHP5.0.1-dev, having grabbed the latest snapshots as in PHP5.0.0, HTTP_AUTH is broken (which broke phpMyAdmin…) and the configure line is as follows:
./configure \
--prefix=/usr/local/php_501-dev \
--with-config-file-path=/etc/php5x \
--with-apxs=/usr/bin/apxs \
--enable-track-vars \
--with-mysql=/usr \
--with-mysql-sock=/var/run/mysqld/mysqld.sock \
--enable-bcmath \
--enable-sockets \
--enable-memory-limit \
--with-zlib \
--with-zlib-dir=/usr \
--enable-mbstring \
--with-bz2 \
--with-mhash \
--with-mcrypt \
--with-ming \
--with-curl \
--enable-cli \
--with-ncurses \
--with-mcal=/usr \
--enable-calendar \
--disable-debug \
--enable-inline-optimization \
--enable-ftp \
--with-gd=/usr \
--with-gettext \
--with-openssl \
--with-ttf \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--with-iconv \
--enable-exif \
--enable-xml \
--enable-libxml \
--with-xmlrpc \
--with-xsl=/usr \
--with-libxml-dir=/usr \
--with-expat-dir=/usr \
--with-iconv-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-tiff-dir=/usr \
--with-imap \
--with-sqlite \
--enable-sqlite-utf8 \
--enable-soap \
--with-kerberos
My php.ini is pretty much php.ini-recommended though I do register the depreciated PHP3.x/4.x HTTP_*_VARS setting “register_long_arrays” to “On”.
Overall, WP1.x does seem to work with PHP5 once it’s installed and as long as you’ve logged in already! ??Just a follow up reverting back to PHP5.0.0RC3 for a sanity check, the login issue is actually still there (wp-login.php not actually loading at all), though 1 times out of 3 (approx.) the login page will actually load and is the case with both WP1.2 and WP1.3.x.
Going back to PHP5.0.1-dev, there is occasionally still a slight chance that the login page will load (about 1 in 15 tries) but submitting from that point just hangs till the bowser times out and not logging in at all.I’ve had the exact same problems, even using the latest stable release of PHP5.
I’ve decided that i’m rolling back my server to PHP 4.3.8.Anonymous said here:
***
on php5, you have to manually add the mysql extension (copy php_mysql.dll to the extension dir, copy libmysql.dll to %SYSTEMROOT%) and that’s just about it.
***
I tried putting the libmysql.dll into the systemroot (c:\windows in my case) and have php_mysql.dll in the ‘ext’ directory under my php dir AND uncommenting line “extension=php_mysql.dll” in the php.ini file but I still get the error:
“Warning: PHP Startup: Unable to load dynamic library ‘./php_mysql.dll’ – The specified module could not be found. in Unknown on line 0 “
Why can it still not find the dll? Is the extension dir ‘ext’ correct or does it have to be named something else? OR do I still have to change something else in the php.ini to make mysql work?Seems PHP5 isn’t allowing MYSQL to work properly, so I went back to PHP 4.3.8 and all is well (built into that version).
Hello, is there a way to run WP1.2 (or 1.3) under PHP5? I’ve read the bug is in PHP, but I’m quite sure my hosting provider wouldn’t update PHP to latests CVSs. I’m a newbie to PHP scripting. Can anyone write a “patch” for it?
I tried installing WP1.2 and its builds several times under PHP5, always problems occur.
Though I have tried other blogging systems, WordPress was the best pick.1.3 works in php5 – I’m running it on a testblog.
1.2 *will* break in php5
- The topic ‘WordPress & PHP 5’ is closed to new replies.