Jump to content

failed to open stream error


ajetrumpet

Recommended Posts

I am trying to install a wordpress plugin called CiviCRM.  I am using the GoDaddy wordpress dashboard to do this.  I am getting this error (which is just the first error in a list of several that are appearing):

Warning: require(/home/NAME/public_html/wordpress.SITE.com/wp-content/plugins/civicrm/civicrm/vendor/composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: 

No such file or directory in /home/NAME/public_html/wordpress.SITE.com/wp-content/plugins/civicrm/civicrm/vendor/composer/autoload_real.php on line 70

I am looking at the code in file "autoload_real.php"  and line 70 reads:

require $file;

nowhere else in this file is $file defined.  the directory "/home/NAME/public_html/wordpress.SITE.com/wp-content/plugins/civicrm/civicrm/vendor/composer/" DOES exist, but the rest of the line "../symfony/polyfill-ctype/bootstrap.php" does not.  there are also 3 other errors in eclipse that are indicated and all of those errors are "syntax error: unexpected 'Autoload()'.  The 3 different lines of code that throw this error are:

1) self::$loader = $loader = new \Composer\Autoload\ClassLoader();
2) call_user_func(\Composer\Autoload\ComposerStaticInitdb2000479593e65ef23454e56d74a73f::getInitializer($loader));
3) $includeFiles = Composer\Autoload\ComposerStaticInitdb2000479593e65ef23454e56d74a73f::$files;

I'm not really sure what the issue is, as I'm not experienced enough.  Any help from the experts here?  GoDaddy claims the problem is with the plugin file's coding.

Edited by ajetrumpet
Link to comment
Share on other sites

i did my best to go thru this checklist.  #5 on the list mentions a few things.  one is the setting of "open_basedir" in phpinfo().  this has a setting of "no value".  i set all directories leading up to "autoload_real.php" to "read, write and execute" permissions, as well as the file itself to the same permissions.  but alas, the error persists.  based on my original post, which file do you think the error "failed to open stream" is referring to?  is it trying to open "bootstrap.php" or "autoload_real.php"?

Edited by ajetrumpet
Link to comment
Share on other sites

While that link may be helpful in the general case, it will do nothing to help your specific problem. No comment on whether that user is in the UK, or even in that same hemisphere, as they claim to be.

You're looking at Composer autoload files. Don't do anything to them. Instead, tell Composer to regenerate all that data by running  `composer dump-autoload`.

Link to comment
Share on other sites

10 minutes ago, requinix said:

 tell Composer to regenerate all that data by running  'composer dump-autoload'

 

i would not know how to do this.  as a serparate file in the 'composer' directory?  run this code?

composer dump-autoload

 

Edited by ajetrumpet
Link to comment
Share on other sites

58 minutes ago, ajetrumpet said:

is this relevant to this situation?

Nope. Note the "url" in those names. You're working with files, not URLs.

52 minutes ago, ajetrumpet said:

I browsed thru that article req, but my question was not addressed

Your question was whether to create the dump-autoload as a file or run it as code. If you've gone into the CLI documentation you should know how (a) what dump-autoload is, (b) that it is neither a file or code, and instead (c) how you are supposed to run it.

dump-autoload is a "command" (argument) you give to the composer.phar application. That you should have a copy of... though you may not, actually, so if you don't then the first thing you have to do is download it.

Link to comment
Share on other sites

well i googled the hell the out of this my friend and I found composer.exe for windows, but during installation it wants me to select a php.exe to use but i don't have such a thing.  perhaps i'm a little too inexperienced to be doing this but this seems to be a little too much trouble to go through for a plugin installation that should be relatively easy.

Link to comment
Share on other sites

A sure-fire way to become a good developer is to give up.

But at least part of the blame lies on Google for featuring an article about downloading the Windows installer for Composer? Yeah, no. That's dumb. Don't do that.

Find your composer.json file. It should be at or near the root of your project. Do you also have a composer.phar there? If not, do the Manual Download to get it. Then run it like

php composer.phar update

update will also redo the autoloads.

Link to comment
Share on other sites

I DID have a composer.json file, but there was no PHAR file in there.  and I'm not technically giving up.  This was just a test on a wordpress subdomain because I was interviewing to volunteer at a non-profit and they were running the civiCRM on wordpress.  I had never heard of civiCRM so I wanted to experiment with it before I talked to them.  They were confused as well, as they didn't get any errors about searching for a bootstrap.php file when they installed theirs.  I'm still convinced that GoDaddy is at fault.  Man that company sucks!  Even the company I interviewed with said they are leaving GoDaddy in the coming months because their technology is not reliable.  A great example of GoDaddy's incompetence is this article:

https://www.godaddy.com/help/connecting-to-mysql-using-php-216

It was telling customers to use mysql_connect() for years and according to you guys the mysql() functions have been deprecated in PHP for years.  Now that article is showing mysqli() functions, but they probably fixed in the last week because I told them to when I was on the phone with them!

Edited by ajetrumpet
Link to comment
Share on other sites

  • 2 months later...

This error occurs because your WordPress site could not load the file from the code. Your blog may continue to load with the error message or may fails to load with error message saying fatal error.

You will see the error messages that tells you where the error is located and can be fix following the clue in the message e.g. such file or directory, permission denied, fatal error.

Warning: require(/home/blog/wp-includes/load.php): failed to open stream: No such file or directory in /home/blog/wp-settings.php on line 17.

This guide could help you to fix the error. https://www.webminto.com/how-to-fix-the-wordpress-failed-to-open-stream-error/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.