webERP Forum

Full Version: php 7 include problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We are running php v5.6.17 and weberp 4.15 with no problems.  We installed php 7.2.29 and now get include errors in session.php.

This problem is not unique to weberp as MediaWiki 1.23.3 shows similar errors.

We are at a loss to correct the problem.  Is there a setting in php.ini that would correct the problem?

Thank you,
Bob Thomas
Can you copy and paste exact error messages here Bob.

Thanks
Tim
The following are the errors displayed:

Warning: include(config.php): failed to open stream: no such file or directory in /ast$www/000000/weberp/includes/session.php on line 15

Warning: include(): Failed opening 'config.php' for inclusion (include_path='.:/php_root/000000') in /ast$www/000000/weberp/includes/session.php on line 15

Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /ast$www/000000/weberp/includes/session.php on line 31

Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /ast$www/000000/weberp/includes/session.php on line 39

Warning: session_name(): Cannot change session name when headers already sent in /ast$www/000000/weberp/includes/session.php on line 45

Warning: session_start(): Cannot start session when headers already sent in /ast$www/000000/weberp/includes/session.php on line 46

Warning: include(includes/ConnectDB.inc): failed to open stream: no such file or directory in /ast$www/000000/weberp/includes/session.php on line 48

Warning: include(): Failed opening 'includes/ConnectDB.inc' for inclusion (include_path='.:/php_root/000000') in /ast$www/000000/weberp/includes/session.php on line 48

Warning: include(includes/DateFunctions.inc): failed to open stream: no such file or directory in /ast$www/000000/weberp/includes/session.php on line 49

Warning: include(): Failed opening 'includes/DateFunctions.inc' for inclusion (include_path='.:/php_root/000000') in /ast$www/000000/weberp/includes/session.php on line 49

Warning: include(includes/LanguageSetup.php): failed to open stream: no such file or directory in /ast$www/000000/weberp/includes/session.php on line 90

Warning: include(): Failed opening 'includes/LanguageSetup.php' for inclusion (include_path='.:/php_root/000000') in /ast$www/000000/weberp/includes/session.php on line 90

Warning: include(includes/UserLogin.php): failed to open stream: no such file or directory in /ast$www/000000/weberp/includes/session.php on line 153

Warning: include(): Failed opening 'includes/UserLogin.php' for inclusion (include_path='.:/php_root/000000') in /ast$www/000000/weberp/includes/session.php on line 153

Warning: Use of undefined constant UL_SHOWLOGIN - assumed 'UL_SHOWLOGIN' (this will throw an Error in a future version of PHP) in /ast$www/000000/weberp/includes/session.php on line 159

Warning: Use of undefined constant UL_OK - assumed 'UL_OK' (this will throw an Error in a future version of PHP) in /ast$www/000000/weberp/includes/session.php on line 167

Warning: Use of undefined constant UL_SHOWLOGIN - assumed 'UL_SHOWLOGIN' (this will throw an Error in a future version of PHP) in /ast$www/000000/weberp/includes/session.php on line 171

Warning: include(includes/Login.php): failed to open stream: no such file or directory in /ast$www/000000/weberp/includes/session.php on line 172

Warning: include(): Failed opening 'includes/Login.php' for inclusion (include_path='.:/php_root/000000') in /ast$www/000000/weberp/includes/session.php on line 172
Hmmm, that is odd, for sure. At line 5 in session.php, can you paste the output of:

PHP Code:
echo "PathPrefix is: $PathPrefix.\n";
echo 
getcwd(); die; 
We are running on OpenVMS and the port of PHP 7 has a problem that weberp uncovered:

PHP V5.6.17
PathPrefix is: . ast$www/weberp/

PHP 7.2.29
PathPrefix is: . ast$www:[weberp]

We will contact the PHP support group with respect to this problem.

Thank you!
Some setup options for PHP7 were not properly set.  Weberp now runs correctly.
@rfthomas, thanks for the feedback/update!

Can you elaborate what some of those setup options may have been? (as long as not any credential or security exposure)

The info could be helpful to others that may cross the same problem.
OpenVMS is neither UNIX/LINUX or WINDOWS based.  It's file system and file naming nomenclature is unique to OpenVMS.  A filename consists of <device>:[<directory tree>]<filename>.<extension>;<version>

For example: AST$WWW:[weberp.includes]session.php;1 would in translate to /ast$www/weberp/includes/session.php

The implementation of PHP 7 to properly parse the filenames requires that the following logical symbols (Environment variables in WINDOWS) be set:

DECC$FILENAME_UNIX_REPORT = "enabled"
DECC$GLOB_UNIX_SYSTEM = "enabled"

While weberp works well using PHP 7, several other PHP 5 based applications fail to run.  Several are old packages.  We are investigating our upgrade options.

For the time being we will need to remain with PHP 5.