Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#13268 closed defect (bug) (invalid)

Website URL as plain text causes error

Reported by: coyot Owned by:
Milestone: Priority: low
Severity: minor Version: 2.9.2
Component: General Keywords: slash url
Focuses: Cc:


When an URL appears in the post as clear text (not as a link) with the http:// the slashes cause an PHP warning when viewing the article (warning text below) and the post doesn't get viewed.

Removing the "" from the URL or formatting the string as a URL with the editor fixes the problem.

Noticed from version 2.9.2

Warning: wp_oembed_get() [function.wp-oembed-get]: open_basedir restriction in effect. File(/usr/share/php5class-oembed.php) is not within the allowed path(s): (.:/srv/www/vhosts/xxx.com/httpdocs/:/tmp:/usr/share/php5/) in /srv/www/vhosts/xxx.com/httpdocs/blog/wp-includes/media.php on line 1282

Warning: wp_oembed_get(class-oembed.php) [function.wp-oembed-get]: failed to open stream: Operation not permitted in /srv/www/vhosts/xxx.com/httpdocs/blog/wp-includes/media.php on line 1282

Change History (4)

#1 @ocean90
11 years ago

This should be fixed in 3.0.

2.9 code block:

function wp_oembed_get( $url, $args = '' ) {
        require_once( 'class-oembed.php' );
        $oembed = _wp_oembed_get_object();
        return $oembed->get_html( $url, $args );

trunk code block:

function wp_oembed_get( $url, $args = '' ) {
	require_once( ABSPATH . WPINC . '/class-oembed.php' );
	$oembed = _wp_oembed_get_object();
	return $oembed->get_html( $url, $args );

Can't find a ticket for this at the moment.

#3 @Viper007Bond
11 years ago

  • Milestone Unassigned deleted
  • Resolution set to invalid
  • Status changed from new to closed

Yeah, this has been fixed already. The require_once() path is absolute in 3.0.

#4 @Viper007Bond
11 years ago

BTW, your server is configured improperly.

Note: See TracTickets for help on using tickets.