Saturday 29th November 2014Login | Register
Pages: [1]

Not sure if PHP is working correctly

« on 17/01/2008, 09:22 »
Hi there,

Just activated CGI, and mySQL on my plus net account yesterday, and I've tried uploading Wordpress to the site and going to the site in my browser but I always seem to get internal server errors.

The site is: http://ccgi.icehot.plus.com

Neither that works nor the install script: http://ccgi.icehot.plus.com/wp-admin/install.php

As far as I could tell plus net has the minimum requirements to run Wordpress, and I've changed the permissions of every file to 755 as well.
Logged
« Reply #1 on 17/01/2008, 10:09 »
Do you have a .htaccess file in your home directory (the directory you get when you SSH or FTP to the server)? You may need to set your FTP client to show hidden files to view it.

If you do, could you post the contents of it here, or PM me with them?
Kind Regards,
Colin Ogilvie
Plusnet Application Developer (until June 12th 2009)
Get next generation speeds - Join the ADSL2+ trial!
Logged
« Reply #2 on 17/01/2008, 10:31 »
Hi there,

Double checked that show hidden files was on, and I definately don't have a .htaccess file in there.
Logged
« Reply #3 on 17/01/2008, 11:03 »
Hmm, it looks like your PHP script is throwing an error... but I can't see what the error actually is though.
Kind Regards,
Colin Ogilvie
Plusnet Application Developer (until June 12th 2009)
Get next generation speeds - Join the ADSL2+ trial!
Logged
« Reply #4 on 17/01/2008, 12:23 »
I'm not 100% convinced it is PHP throwing an error, as I am unsure it would throw a 500 internal server error the way it is.

What if you upload a simple PHP file named test.php as follows.

Code:
<?php
echo "test";
Phil Richardson
EX Plusnet staff
Please note: replies before Dec 14th 2012 should be taken in the context of my prior employment at Plusnet
Logged
« Reply #5 on 17/01/2008, 17:27 »
I had a look at this the other day.

What it is is that the latest version of wordpress tries to log errors using the php "error_log" function, with the default setting for output. As we've not set up the "error_log" directive in the php config, this defaults to standard out.

There's a function run before any output to check for certain tables, and as they don't exist on a new install, it errors.

As we use cgiwrap on cgi for security, it sees these errors as headers, and as they aren't in the correct format for headers, it barfs, and gives the 500 server error.

To fix it, change line 163 of wp-includes/wp-db.php from:

Code:
error_log($error_str, 0);

to:

Code:
error_log($error_str . "\n", 3, '<your homedir>/wp-errors.log');

replacing <your homedir> with your homedir, e.g. /files/home1/username

Or alternitively comment out that line.
Ben Brown
Logged
« Reply #6 on 17/01/2008, 18:37 »
Ahhh thanks very much - it's working great now!!!
Logged
« Reply #7 on 29/02/2008, 11:42 »
Hi,

I've got the same issue with Word Press Mulit User 1.3.3 (WPMU) version. It's throwing up a 500 Internal Server Error when I try to install WPMU.

I've looked for the same line of code within the wp-db.php but it's a different setup. I tried commenting the function print_error($str = '') but to no avail.

Has/Is anyone else having this issue, I'm pretty sure it's the same issue as Ben described above?
Thanks

« Last Edit: 03/03/2008, 15:00 by jswags »

Logged
« Reply #8 on 03/03/2008, 15:34 »
I just installed this on my CGI space, version 1.3.3 from the wordpress site, and it "just worked". Here's my comand history:

Code:
wget http://mu.wordpress.org/latest.tar.gz
tar xzf latest.tar.gz
cd wordpress-mu-1.3.3/
find . -type f -name "*.php" -exec chmod +x '{}' \;

I then browsed to where it was installed, and followed the instructions on the page, and the site seems to be fine.
Ben Brown
Logged
« Reply #9 on 03/03/2008, 20:38 »
Thanks for the reply and Ben you're a lucky man cause after countless clean installs I'm still getting no luck. As a note I'm getting this error on install

install_blog - ID: 1 URL: http://myURL.com/wp/ Title: Test WordPress database error: [Unknown column 'blog_public' in 'field list'] UPDATE wp_blogs SET blog_public = '1', last_updated = NOW() WHERE blog_id = '1'

The root http://myURL.com/wp/ throws up a 404. I've been through .htaccess with a fine tooth comb, write permissions, ftp'd and command line upload as you did.

The one thing that is displaying is the login, but it's lost all of the css so I'm thinking the .htaccess still isnt correct. If you can think of anything else let me know.
Thanks again
Jason

PS .htaccess
RewriteEngine On
RewriteBase /wp/

#uploaded files
RewriteRule ^(.*/)?files/$ /index.php [L]
RewriteRule ^(.*/)?files/(.*) /wp-content/blogs.php?file=$2 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

« Last Edit: 04/03/2008, 10:31 by jswags »

Logged
Pages: [1]
Jump to:  

Related Sites

Community Apps

Here at Plusnet we're always trying to use clever open source things to make our lives easier. Sometimes we write our own and make other people's lives easier too!

View the Plusnet Open Source applications page

About Plusnet

We're a Yorkshire-based provider selling broadband and phone services to homes and businesses throughout the UK. Winner of the ISPA 2010 'Best Consumer Customer Service ISP' Award, we're proud to offer the UK's best value standalone broadband.

© Plusnet plc All Rights Reserved. E&OE

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Add to Technorati Favourites