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
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
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.