Fatal error require failed opening required

New Page

Fatal error of PHP No se pudo to open the archive requerido

Pregunta

Preguntó hace 11 years, 6 months

Modified 1 year, 11 months ago

Visto 464k times

This question shows research effort; it is useful and clear

63

This question shows no research effort; it’s not clear or not helpful

Keep this question.

View activity on this post.

Get the following error from Apache

[Sábado Mar 19 23:10:50 2011] [advertencia] mod_fcgid: stderr: PHP fatal error: require_once() [function.require]: Error al open requerido ‘/common/configs/config_templates.inc.php’ (include_path =’.:/usr/share/pear:/usr/share/php’) en /home/viapics1/public_html/common/configs/config.inc.php en line 158

Definitivamente no soy un experto in Apache, pero los archives config.inc.php and config_templates.inc.php isán ahí. You also intend to navigate to a test.html page that has been uploaded to common/configs/, as well as there are no more hay derechos issues. Also establish the derechos in config_templates.inc.php to otorgar a todos los derechos de lectura, escritura y ejecución. No isoy seguro de qué hacer en este punto, verified if you have a directorio /usr/share/php and discover that no, pero cuando installed yum php, dijo que tenía la última versión. Ideas ?

  • php
  • sender

To share

Share a link to this question

Copy link CC BY-SA 2.5

Seguir

Sigue esta pregunta para recibir notifications

modified on February 16, 2014 at 6:06 AM

Your Common Sense user's avatar

your common sense

156k 39 39 gold badges 208 208 silver badges 331 331 bronze badges

asked on March 19, 2011 at 7:06 p.m.

Al Katawazi user avatar

Al Katawazi Al Katawazi

7 102 6 6 gold badges 25 25 silver badges 38 38 bronze badges

0

Add a comment | 

6 answers6

Ordenado por: Restablecer a predeterminado

Puntaje más alto (predeterminado) Tendencia (los votos recientes cuentan más) Fecha de modification (más reciente primero) Fecha de creación (el más antiguo primero)

This answer is helpful

103

This answer is not helpful

Save this response.

View activity on this post.

In reality, no es una pregunta relacionada con Apache. Neither siquiera uno linked with PHP. To understand this error, we must distinguish a route in the virtual server from a route in the system of archives.

require operator trabaja con archivos. Pero un camino como este

/common/configs/config_templates.inc.php

only exists in the virtual HTTP server, except that there is no route in the system of archives. The ruta correcta del sistema de archivos sería

/home/viapics1/public_html/common/configs/config_templates.inc.php

wave

/home/viapics1/public_html

parte se llama raíz del documento y conecta el mundo virtual con el real. Fortunately, web servers only use the document content in a configuration variable which we compare with PHP. Entonces, si cambias tu código a algo como esto

require_once $_SERVER[‘DOCUMENT_ROOT’].’/common/configs/config_templates.inc.php’;

¡Funcionará desde cualquier archivo colocado in cualquier directorio!

Actualización: eventualmente escribí un artículo that explains the difference between rutas relativas and absolutas , in el sistema de archivos y in el servidor web, that explains el asunto en detalle and contiene algunas soluciones prácticas. As, a variable tan útil no exist cuando ejecuta su secuencia de comandos desde una línea de comando. In this case, una técnica llamada “un único punto de entrada” viene al rescate. Also can consult the anterior artículo to obtain more details.

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Seguir

Sigue esta respuesta para recibir notifications

modified on October 9, 2020 at 9:39 AM

answered on March 19, 2011 at 7:12 PM

Your Common Sense user's avatar

Your common sense Your common sense

156k 39 39 gold badges 208 208 silver badges 331 331 bronze badges

seven

  • 1

    @Al Katawazi nope, in your PHP code. you are addressing a file in your PHP code. And you have to use RIGHT address

    –  Your Common Sense

    Mar 19, 2011 at 19:20

  • Sorry this wasn’t it. I updated the code to look like this: <?php require_once($_SERVER[‘DOCUMENT_ROOT’].’/common/configs/config.inc.php’); and I am still getting the exact same error. Interestingly when I put an X in the url it goes back spells out the entire URL like this: Failed opening required ‘/home/viapics1/public_htmlX/common/configs/config.inc.php’, its all pretty strange, could there be somekind of global override going on? The really strange part is this app was working on another server but when moved to the new one I started having this issue. Thanks so much for the help so far.

    –  Al Katawazi

    Mar 19, 2011 at 20:07

  • @Al Katawazi I’ve edited second part (using __FILE__), try it now. If fail, post it’s error message.

    –  Your Common Sense

    Mar 19, 2011 at 20:17

  • [Sun Mar 20 01:53:43 2011] [warn] mod_fcgid: stderr: PHP Fatal error: require_once() [<a href=’function.require’>function.require</a>]: Failed opening required ‘/home/viapics1/public_html/photo/common/configs/config.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /home/viapics1/public_html/photo/index.php on line 2. That directory doesn’t exsist. Its trying to go off photo and then to common when it should go to the html root directory and then go into common. I think the code was right and there is some other potential issue going on, perhaps in actually opening the file.

    –  Al Katawazi

    Mar 19, 2011 at 21:51

  • @Al Katawazi that’s another mistake. you have to fix it the same way

    – Your common sense

    March 19, 2011 at 9:58 PM

 | Show 2 more comments

This answer is helpful

ten

This answer is not helpful

Save this response.

View activity on this post.

If you have SELinux ejecutándose, es possible que deba otorgar permito httpd para leer desde /home dir usando:

sudo setsebool httpd_read_user_content=1

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Seguir

Sigue esta respuesta para recibir notifications

answered on December 23, 2014 at 4:54 PM

User avatar of user1533634

user1533634 user1533634

411 4 4 silver badges 5 5 bronze badges

2

  • should I run this command from /home dir?

    – jayaprakash R

    April 27 at 5:34 PM

  • you shouldn’t need to do this because /home should already be tagged as user content.

    – user1533634

    April 29 at 2:08

Add a comment | 

This answer is helpful

4

This answer is not helpful

Save this response.

View activity on this post.

Ejecutar php -f /common/configs/config_templates.inc.phppara verificar the validate of the syntax of PHP in el archivo.

To share

Share a link to this answer

Copy link CC BY-SA 2.5

Seguir

Sigue esta respuesta para recibir notifications

answered on March 19, 2011 at 7:09 PM

User avatar of Alex Howansky

Alex HowanskyAlex Howansky

47.8k 8 8 gold badges 76 76 silver badges 95 95 bronze badges

6

  • Le message d’erreur indique clairement que le fichier n’existe pas, alors quel est l’intérêt de RERUNNING php juste pour confirmer qu’il n’existe pas ? OP a une barre oblique en tête, transformant le chemin en un chemin absolu. Il doit s’agir au minimum d’un chemin relatif sans barre oblique.

    –Marc B.

    19 mars 2011 à 19:43

  • 2

    “The error message makes it clear that file doesn’t exist.” No it doesn’t. That identical error message could result from include path settings, file permissions settings, or safe mode settings. (I was also guessing that it could come from syntax errors, depending on the error reporting settings, but after some testing, it looks like PHP always shows the actual syntax error.)

    –  Alex Howansky

    Mar 19, 2011 at 19:58

  • You are wrong. Each of cases you mentioned has its own distinct error message. As well as syntax error. One could easily distinguish “parse error” from “file not found error”. Your assumptions are all wrong and misleading. Get more experience with PHP

    –  Your Common Sense

    Mar 19, 2011 at 20:14

  • 1

    My error_log includes the stack trace, which contains the same text for these different conditions. E.g., here’s a line pulled from my log just now (w/ paths obscured), for a non-existing file: PHP Fatal error: require(): Failed opening required ‘sub/include.php’ (include_path=’.:/usr/local/lib/php’) in /path/to/test.php on line 4” And here’s one for an existing file with bad perms: PHP Fatal error: require(): Failed opening required ‘sub/include.php’ (include_path=’.:/usr/local/lib/php’) in /path/to/test.php on line 4″” Ditto for a bad include_path.

    –  Alex Howansky

    Mar 19, 2011 at 20:56

  • check file perms, dude. failed to open stream: Permission denied is an error message for the bad perms

    –  Your Common Sense

    Mar 19, 2011 at 21:13

 |  Show 1 more comment

This answer is helpful

2

This answer is not helpful

Save this response.

View activity on this post.

Podrías arreglarlo with the PHP__DIR__ constant

require_once __DIR__ . ‘/common/configs/config_templates.inc.php’;

This is the file directory. If used inside an include, the directory of the included file is returned. This is equivalent to dirname __FILE__ . This directory name does not have a trailing slash unless it is the root directory. 1

To share

Share a link to this answer

Copy link CC BY-SA 4.0

Follow

Follow this answer to receive notifications

answered on February 27, 2019 at 4:35 am

User avatar of Bernard

Bernard-Bernard

527 5 5 silver badges 11 11 bronze badges

Add a comment | 

This answer is helpful

1

This answer is not helpful

Save this response.

View activity on this post.

Just in case this helps anybody else out there, I stumbled on an obscure case for this error triggering last night. Specifically, I was using the require_once method and specifying only a filename and no path, since the file being required was present in the same directory.

I started to get the ‘Failed opening required file’ error at one point. After tearing my hair out for a while, I finally noticed a PHP Warning message immediately above the fatal error output, indicating ‘failed to open stream: Permission denied’, but more importantly, informing me of the path to the file it was trying to open. I then twigged to the fact I had created a copy of the file (with ownership not accessible to Apache) elsewhere that happened to also be in the PHP ‘include’ search path, and ahead of the folder where I wanted it to be picked up. D’oh!

Share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

answered Dec 3, 2017 at 23:44

John Rix user avatar

John Rix John Rix

5,707 5 5 gold badges 37 37 silver badges 44 44 bronze badges

Add a comment  | 

This answer is useful

-7

This answer is not helpful

Save this response.

View activity on this post.

I had the exact same problem, I triple checked the include paths, I also checked that the pear was installed and everything seemed OK and I was still getting the errors, after a crazy couple of hours at looking at this, I realized that in my script had this:

include_once “../Mail.php”;

instead of:

include_once(“../Mail.php”);

Yes, the dumb parenthesis was missing, but there was no error thrown on that line of my script, which was strange to me

To share

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

modified on December 23, 2012 at 1:09

User avatar of Brett Gregson

Brett Gregson

5,817 3 3 gold badges 43 43 silver badges 59 59 bronze badges

answered on December 23, 2012 at 0:45

Eduardo user avatar

Eduardo Eduardo

11

1

  • 6

    Because include_once is a language construct, and not a “real” function, the parenthesis are optional. Not sure why adding them fixed it for you.

    –Mike Hedman

    Feb 8, 2013 at 6:07 PM

Add a comment | 

Highly active question . Earn 10 reputation (not counting the association bonus) in order to answer this question. The reputation requirement helps protect this question from spam and non-answer activity.

Not the answer you’re looking for? Browse other questions tagged

  • php
  • path

or ask your own question.

  • The Overflow Blog
  • Meet the AI ​​helping you choose what to watch next

  • A chat with Redhat’s Matt Hicks on his path from developer to CEO (Ep. 494)

  • Featured on Meta
  • Recent color contrast changes and accessibility updates

  • Inbox improvements: marking notifications as read/unread, and a filtered…

  • Reviewer overboard! Or a request for improved onboarding guidance for new…

  • Collectives update: recognized members, articles and GitLab

  • Do I need to explain other people’s answers in code?

Related

0

authentication not working in php file

-1

Fatal error: require_once() (include_path=’.;C:\php5\pear’)

-3

PHP fatal error: /autoload_real.php at line 71

0

how to fix require_one startup.php

0

Fatal error on require once()

1

Path include error (Failed to open stream – PHP)

1

How to resolve file path error in composer autoload

0

Why does this slash show backwords in the file path?

1

Open Required Failed()

0

Failed to load resource: server responded with a status of 500 () PHP website

See more related questions

Related

0

Failed to open required ‘MYSQL’

1

include path error in cron job in php

1252

Reference – What does this error mean in PHP?

1

PHP fatal error: require_once(): Failed to open required ‘/usr/share/php/Mail.php’

3

PHP warning: require_once failed to open stream: No such file or directory in

0

Warning: require_once(../initialize.php): failed to open stream and fatal error: require_once(): failed to open required issue

Network burning questions

  • Sont des sous-domaines de sites Web qui commencent par “www.” et ceux qui ne commencent pas par “www.” une seule et même chose ?
  • S’il faut beaucoup de temps pour obtenir un rapport d’arbitre, cela signifie-t-il que l’arbitre voulait me saboter ?
  • Comment défendre ses alliés en tant que Fighter au niveau 1 ?
  • Est-ce que pipe ( | ) est une commande ?
  • pourquoi plus d’angle d’inclinaison à la meilleure vitesse de plané donne moins de perte d’altitude ?
  • Comment la police humaine appréhende-t-elle (de manière non létale) des races bien plus grandes et plus dangereuses ?
  • When is hProp equivalent to the subobject classifier?
  • Natural Armor vs Mage Armor, which takes precedence?
  • Is TTGATATAT a gene?
  • How / where do I hide the seam?
  • So… what happened to the Great Zapfish?
  • Sources of plain minifigures
  • Why doesn’t law take into account probability?
  • How was the first release of Java (JDK 1.0) used?
  • Is compression mandatory with TLS?
  • If I quit, can my employer claim back pay that was agreed to but not included in our written contract?
  • How can I remove this Kwikset entry door dead bolt lock?
  • Is `/dev/null` treated differently from other files when the `noclobber` option is set?
  • Published AI-generated nonsense math papers
  • Crossing by land from Georgia into Russia 2022
  • Accuracy is getting worse after text pre processing
  • What extra number did I form?
  • What is a definition for ‘third-party-curious’?
  • PHP readfile() with 304 Not Modified and HTTP 206 Partial content support: httpreadfile

Question flow

Subscribe to RSS

Question flow

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Skip Navigation

  • English English
    • Spanish Spanish
    • German German
    • French French
    • Portuguese (Brazil) Portuguese (Brazil)
    • Japanese Japanese
    • Russian Russian
    • Simplified Chinese) Simplified Chinese)
    • Italian Italian
    • Hebrew Hebrew
    • Arab Arab
  • Login

WPML - The plugin for creating multilingual WordPress sites WPML - The plugin for creating multilingual WordPress sites

  • House
    • À propos de WPML
    • Exigences minimales de WPML
    • Comparaison de WPML avec des alternatives gratuites et payantes
    • Comment créer un site Web WordPress multilingue en 2022
    • Ressources pour les blogueurs et les affiliés
    • Vitrine WPML
    • Témoignages
    • Nous contacter
  • Fonctionnalités
  • Acheter
    • Tarification WPML
    • Politique de soutien
    • Remboursements
    • Processus d’achat
    • Questions avant-vente
  • Documentation
    • Guide de Démarrage
    • Plugins de base et modules complémentaires WPML
    • Traduction de chaînes WPML
    • Gestion des traductions WPML
    • WooCommerce Multilingue
    • Thèmes recommandés pour les sites multilingues
    • Plugins recommandés pour les sites multilingues
    • Traduction automatique de contenu WordPress avec WPML
    • Services de traduction pour les sites Web WordPress
    • Translation Management Systems Integrated with WPML
    • FAQs
    • Developers Information
    • Related Projects
    • Privacy Policy and GDPR Compliance
  • Support
    • Support Forum
    • Hire developers for multilingual sites
    • Certified Reviewers for Automatic Translation
  • Blog
    • Announcements
    • WPML versions
    • Compatibility
    • Tutorials
    • Others writing about WPML

Home » About WPML

About WPML

From day one, our priorities have remained the same – to make WordPress run multilingual quickly, efficiently, and affordably.

Our Story

In 2007, we started our journey by offering website translation services. As the approach to translation solutions has developed, so have we. All our efforts have led to the creation of WPML, which is now the market-leading multilingual WordPress plugin.

Today, WPML is installed on over 1,000,000 WordPress sites and makes it possible to translate your site into 45+ languages.

With WPML, you can choose from different translation methods, including automatic translation.

Discover WPML Features

2007 —

Today

>1,000,000

WordPress sites use WPML

45+

languages

Build WordPress Sites the Right Way

We believe all WordPress users should be able to create effective sites – regardless of coding knowledge and skills.

Nuestro conjunto de complementos Toolset hace que la creación de sitios avanzados sea fácil para todos. Puede diseñar desde dentro de WordPress, y no hay necesidad de crear temas secundarios o escribir PHP.

Más sobre el conjunto de herramientas

6

días por semana

19

horas al día

9

idiomas

Soporte Integral

Hacemos todo lo posible para brindar asistencia precisa, informada y oportuna a través de nuestro foro de asistencia y asistencia por chat.

Nuestro equipo de soporte trabaja 6 días a la semana, 19 horas al día. Tenemos seguidores que cubren Asia, Europa y las Américas. 

Pregunte a soporte

Nuestro equipo

Puede que conozca a OnTheGoSystems como la empresa detrás de WPML y Toolset, pero detrás de cada empresa hay un gran grupo de personas. Nuestra empresa está registrada en Hong Kong, pero somos un equipo verdaderamente global. OnTheGoSystems está formado por más de 90 personas, todas trabajando juntas de forma 100 % remota desde 40 países diferentes. Vivimos, trabajamos y respiramos nuestro lema:

– La gente feliz hace productos felices

Siempre estamos buscando personas talentosas y apasionadas para unirse a nosotros. Si está interesado en transformar los sitios de WordPress en potencias multilingües, eche un vistazo a nuestras posiciones abiertas.

Unete a nuestro equipo

Conozca a nuestro equipo

>90

gente

100%

remotamente

40

países

© 2022 OnTheGoSystems Limited (opens in a new window)

(opens in a new window) (opens in a new window) (opens in a new window)

(opens in a new window)

About WPML

WordPress Developer and Support Jobs (opens in a new window)

  • Fr Fr English
  • are are Español
  • of of Deutsch
  • in in Français
  • pt-br pt-br Português
  • yea yea 日本語
  • ru ru Русский
  • zh-hans zh-hans 简体中文
  • this this Italiano
  • he he עברית
  • ar ar العربية

Notifications

tr tr

Support » Fixing WordPress » Fatal error: require(): Failed opening required

Error fatal: require (): se requiere apertura fallida

  • Resolved 141f75d0b672669b335b2e7590f68e89templateskart399

    (@templateskart399)

    2 years, 1 month ago

    Warning: require(/home/sriharig/domains/sriharigraphics.tech/public_html/wp-includes/rest-api/class-wp-rest-server.php): failed to open stream: No such file or directory in /home/sriharig/domains/sriharigraphics.tech/public_html/wp-settings.php on line 240

    Fatal error: require(): Failed opening required ‘/home/sriharig/domains/sriharigraphics.tech/public_html/wp-includes/rest-api/class-wp-rest-server.php’ (include_path=’.:/usr/share/php’) in /home/sriharig/domains/sriharigraphics.tech/public_html/wp-settings.php on line 240 There has been a critical error on your website.

    • This topic was modified 2 years, 1 month ago by 0aa97265877473ee40d30ec76e1ce2e6Steven Stern (sterndata). Reason: removed nsfw

    The page I need help with: [log in to see the link]

Viendo 5 respuestas – 1 a 5 (de 5 en total)

  • Moderator ebb357c94b799994fcbb4eb3d18af1a9t-p

    (@t-p)

    2 years, 1 month ago

    Please check the error logs on your server for a more specific error message, which may give a clue to why this is happening on your website/server. If you need help locating them, ask your hosting provider to help you with that.

    If you cannot find error logs or if you don’t find any helpful info in the error logs, enable debugging. See: https://wordpress.org/support/article/debugging-in-wordpress/

    If error logs and debug does not provide any cluse, try: – manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause. – If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins). – MANUALLY updating. Download WordPress again and unzip it, and use that to copy up. Access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), and delete then replace your copies of everything on the server EXCEPT the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings. (NOTE: do not delete the wp-content directory or your wp-config.php file). Please read the Manual Update directions first.Backup: If you haven’t done so already, always back up everything (including your database) before performing any action, just in case something goes seriously wrong. You can never have enough backups! See https://wordpress.org/support/article/wordpress-backups/

    Moderator 0aa97265877473ee40d30ec76e1ce2e6Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator and Support Team Representative

    2 years, 1 month ago

    WordPress is not currently installed!

    See https://i.imgur.com/ojqrUCH.png

    ojqrUCH

    Moderator 0aa97265877473ee40d30ec76e1ce2e6Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator and Support Team Representative

    2 years, 1 month ago

    What does your WordPress file tree look like now? (And please don’t create another duplicate topic.)

    141f75d0b672669b335b2e7590f68e89Templateskart399 Chat Starter

    (@templateskart399)

    2 years, 1 month ago

    How now?

    Moderator 0aa97265877473ee40d30ec76e1ce2e6Steven Stern (sterndata)

    (@sterndata)

    Forum Moderator and Support Team Representative

    2 years, 1 month ago

    I see

    Warning: require(/home/sriharig/domains/sriharigraphics.tech/public_html/wp-includes/version.php): Failed to open stream: No such file or directory in /home/sriharig/domains/sriharigraphics .tech/public_html/wp-settings.php at line 33 Fatal error: require(): Failed to open required ‘/home/sriharig/domains/sriharigraphics.tech/public_html/wp-includes/version.php'( include_path=’.:/usr/share /php’) in /home/sriharig/domains/sriharigraphics.tech/public_html/wp-settings.php on line 33

    I think you have to manually reinstall WordPress.

    Download it from wordpress.org. Unzip locally. Upload the resulting files and directories to your server’s public_html directory.

Viendo 5 answers – 1 to 5 (of 5 in total)

  • The debate ‘Fatal error: require(): Error al shelter requerido’ is cerrado y no admite más respuestas.


Video Fatal error require failed opening required

Related Posts

Your media file could not be processed.

Contents1 Fixed: Twitter Error “Your media file could not be processed”1.1 freno de mano1.2 ClipChamp Créer1.3 FilmoraGo1.4 adobe sparkle2 Video Your media file could not be processed….

Gravity forms not sending email

Contents1 [SOLVED] Why doesn’t Gravity Forms send email?1.1 How does Gravity Forms send email?1.2 Résoudre les problèmes liés aux formulaires Gravity qui n’envoient pas d’e-mail1.3 Configure Gravity…

This webpage is not founderr_file_not_found

Contents1 Install and manage extensions1.1 Install trusted extensions1.2 Agregar o eliminar el acceso a un sitio específico1.3 Hide extensions1.4 Show extensions2 5 Ways To Permanently Fix Chrome…

Continue to this website not recommended missing

Contents1 Ignore the “Continue to this website (not recommended)” message1.1 publication information1.2 Information1.3 Contents1.4 Admin Items2 Internet Explorer 10 ‘Continue to this website’ is missing option2.1 Similar…

Error loading stream id not found on server

Contents1 JWPlayer 6 error message “Error loading stream: ID not found on server”1.1 Inscrivez-vous ou connectez-vous1.2 Post as guest1.3 Post as guest2 Subscribe to RSS3 Problems with…

Internal error missing template err_connect_fail

Contents1 What does Internal Error: Missing Model ERR_CONNECT_FAIL mean?2 Serving index.html displays “Internal Error: Missing Template ERR_CONNECT_FAIL” in browser2.1 Sign up or log in2.2 Post as guest2.3…