Title: [Plugin: Permalink Editor] Parse Error
Last modified: August 19, 2016

---

# [Plugin: Permalink Editor] Parse Error

 *  Resolved [wildhorses](https://wordpress.org/support/users/wildhorses/)
 * (@wildhorses)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-permalink-editor-parse-error/)
 * 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](https://wordpress.org/support/users/36flavours/)
 * (@36flavours)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-permalink-editor-parse-error/#post-2016293)
 * 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](https://wordpress.org/support/users/wildhorses/)
 * (@wildhorses)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-permalink-editor-parse-error/#post-2016305)
 * 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](https://wordpress.org/support/users/fubra/)
 * (@fubra)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-permalink-editor-parse-error/#post-2016344)
 * 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](https://wordpress.org/support/users/wildhorses/)
 * (@wildhorses)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-permalink-editor-parse-error/#post-2016425)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/permalink-editor.svg)
 * [Permalink Editor](https://wordpress.org/plugins/permalink-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/permalink-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/permalink-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/permalink-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/permalink-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/permalink-editor/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [wildhorses](https://wordpress.org/support/users/wildhorses/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-permalink-editor-parse-error/#post-2016425)
 * Status: resolved