WebsiteBaker Support (2.10.x) > Modules
Modul Jobs error
rumen:
Hello, I have error in module jobs. I'm running WB 2.12 error message:
--- Code: ---Warning: require(/opt/lampp/htdocs/config.php): failed to open stream: Няма такъв файл или директория in /opt/lampp/htdocs/212/modules/jobs/update.php on line 16
Fatal error: require(): Failed opening required '/opt/lampp/htdocs/config.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/212/modules/jobs/update.php on line 16
--- End code ---
Line 16:
--- Code: ---require($_SERVER['DOCUMENT_ROOT'].'/config.php');
--- End code ---
What can be wrong?
Regards,
Rumen
Ruud:
Line 16 expects your WB to be installed in the root of the webspace.
Just replace line 16 with:
--- Code: ---require('../../config.php');
--- End code ---
Gast:
maybe your DOCUMENT_ROOT ;-)
for example: if you work in a subfolder from your domain, it's possible, that your DOCUMENT_ROOT is not the WB-Root-Folder
to your special case:
compare the error messages
path to the file / path to WB is
/opt/lampp/htdocs/212/modules/jobs/update.php or /opt/lampp/htdocs/212/
your document-root is
/opt/lampp/htdocs/config.php
i'm missing the 212-folder
change it in your upgrade.php to
require('../../config.php');
Ruud was faster (Y)
rumen:
I got same error
--- Code: ---Warning: require(/opt/lampp/htdocs../../config.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/212/modules/jobs/update.php on line 17
Fatal error: require(): Failed opening required '/opt/lampp/htdocs../../config.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/212/modules/jobs/update.php on line 17
--- End code ---
It is set
--- Code: ---require($_SERVER['DOCUMENT_ROOT'].'../../config.php');
--- End code ---
It is row 17 because I keep copy of the original (as always) on row 16
--- Code: ---// require($_SERVER['DOCUMENT_ROOT'].'/config.php'); ORIGINAL
--- End code ---
If it is necessary I can move it to the host and try there.
Gast:
see answer from Ruud
replace line 16 with
--- Code: ---require('../../config.php');
--- End code ---
dont use $_SERVER['DOCUMENT_ROOT'] in a sub-folder for the locale test's or you have to correct the path everytime
this works on your locale server:
--- Code: ---require($_SERVER['DOCUMENT_ROOT'].'/212/config.php');
--- End code ---
but not longer, if you move from your locale server to another one
Navigation
[0] Message Index
[#] Next page
Go to full version