0

I am working on a new Wordpress blog and it's very important to have code snippets in it.

So to highlight the code snippet I downloaded a Code Snippet plugin from https://wordpress.org/plugins/codesnippet-20/

Now, everything is screwed up. Below is the error when I access the site.

Warning: require_once(geshi.php): failed to open stream:

No such file or directory in /home1/jamburster/public_html/wp-content/plugins/codesnippet-20/codesnippet.php on line 126

Fatal error: require_once(): Failed opening required 'geshi.php' 
(include_path='.:/opt/php56/lib/php:/home1/jamburster/public_html//wp-content/plugins/codesnippet/lib:/home1/jamburster/public_html//wp-content/plugins/codesnippet/lib/PEAR') 
in /home1/jamburster/public_html/wp-content/plugins/codesnippet-20/codesnippet.php on line 126

Here is what I did. 1. Downloaded the archive from https://wordpress.org/plugins/codesnippet-20/ 2. Uploaded the plugin WordPress -> Plugins -> Add Plugin. Browsed the downloaded one and clicked on upload. 3. Activated the plugin.

Can anyone please help.

2 Answers 2

1

i suggest you, using crayon syntax highlighter instead of current plugin

Sign up to request clarification or add additional context in comments.

Comments

0

Ok, so it looks to me like the plugin is having trouble finding a file called geshi.php. I just downloaded the plugin and activated it in my WordPress admin dashboard and I got the same error. So this isn't specific to you. One thing to note is that this plugin is not currently being maintained.

"This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress."

However, I believe I have a fix for you. Go into your plugin and open the codesnippet.php file. Go to line 126 and replace that line with this:

require_once('/lib/geshi.php');    

It looks like the directory structure of the plugin got changed without the necessary changes being made in the code base. I just tried this change on my machine and I am now able to activate the plugin without WordPress crashing. I haven't tried to use it, though.

2 Comments

Thanks for quick response. I added this plugin by uploading the downloaded zipped folder. Just by changing this in my local how would it reflect in the wordpress site?When I try to access the site, it gives me the error that I mentioned. So, I cannot do anything on the site presently.
so take the downloaded zip file, go into the codesnippet.php file, make the change i told you to, save the change, then upload folder with the changes instead of uploading the plugin that is defective. However, you might be better off with @esmail answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.