• Resolved wildhorses

    (@wildhorses)


    This plug-in, if I can get it to work will be the answer to my prayers. I installed and tried to change ./about/ to ./about.php and when trying to navigate around the site got:

    Warning: parse_url() expects exactly 1 parameter, 2 given in /home/nurse19/public_html/staging/wp-content/plugins/permalink-editor/index.php on line 182

    and

    Warning: Cannot modify header information - headers already sent by (output started at /home/nurse19/public_html/staging/wp-content/plugins/permalink-editor/index.php:182) in /home/nurse19/public_html/staging/wp-includes/pluggable.php on line 897

    Then, I changed it back and still got errors until I deactivated

    Any ideas–because I would really like to use this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Steve

    (@36flavours)

    Hi,

    It appears that you are using a version of PHP that is older than 5.1.2, in which the second parameter (component) was introduced.

    Let’s try some modifications in an attempt to get this working.

    Can you try replacing line 182 in index.php with the following two lines:

    $request = parse_url( $_SERVER['REQUEST_URI'] );
    if ( $request_uri = untrailingslashit( $request['path'] ) ) {

    This should hopefully solve the problem you were having, however they may be some additional issues relating to older versions of PHP that need to be addressed.

    If this fix works, I will commit an updated version of the plugin.

    Thanks,

    – Steve

    Thread Starter wildhorses

    (@wildhorses)

    Hi Steve,

    I get another error in the admin panel trying to get to plug-ins.

    Parse error: syntax error, unexpected '&', expecting ']' in /home/nurse19/public_html/staging/wp-content/plugins/permalink-editor/index.php on line 182

    The index.php now looks like this around line 182

    return $query;
    		// Parse the page request and fetch the URI...
    $request = parse_url( $_SERVER['REQUEST_URI'] );
    if ( $request_uri = untrailingslashit( $request['path'] ) ) {
    			if ( ! $this->get_page_by_path( $request_uri ) ) {
    				// Lookup the original post based on the full request...
    				if ( ! ( $post = $this->get_post_by_custom_permalink( $request_uri ) ) ) {
    Plugin Author Fubra

    (@fubra)

    Hello again!

    I’ve just tested the latest version of the plugin (0.2.6 with the changes suggested above) on a server using PHP 4.4.9 and WordPress 3.1.1 and it seems to be working as expected.

    A parse error indicates that there is something considerably wrong, so either there may possibly be an extra “&” character somewhere in your adjustments.

    What versions of PHP / WordPress / Permalink Editor are you currently using? I can email you a copy of the modified plugin if you would prefer?

    – Steve

    Thread Starter wildhorses

    (@wildhorses)

    Thank you for your quick replies. I changed my cpanel config to use php5 to process php. I am no longer getting parse errors.

    I am using WP 3.1.0. I am using Permalink Editor 0.2.6.

    I do have a 404 error issue that I will post separately if I can’t find an answer already in the forum.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Permalink Editor] Parse Error’ is closed to new replies.