I have uploaded all my files in var/www/html and in one of my php files I have this line :
require_once('libraries/stripe/init.php');
the structure of my folders are list this:
www
-html/
-libraries
-> Stripe -> init.php
-register.php
I keep getting this error message:
Warning: require_once(libraries/Stripe/init.php): failed to open stream: No such file or directory in /var/www/html/register.php on line 116
Fatal error: require_once(): Failed opening required 'libraries/Stripe/init.php' (include_path='.:/usr/share/php:/var/www/html/') in /var/www/html/register.php on line 116
my php.ini file used to be like this
include_path= ".:/usr/local/php/pear/"
but based on some answers here i changed it to
include_path='.:/usr/share/php:/var/www/html/'
but it's not working!
Edit: in my libraries folder I have file called index.php the content is:
<?php
header("Location: ../"); die();
I wouldn't leave library paths to chance like that:
This would make sure you include the script using the absolute directory path of the currently running script.
Update
Well, then the file is simply not there; if this file was generated by some other tool, e.g.
composer
, it would need to be done again on a new server (or ideally at every deployment).File systems under Linux are case sensitive by default (not even sure whether it can be changed) as opposed to Windows. Make sure you use capitalisation consistently.