Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
php 7 include problems
03-02-2021, 06:46 AM,
#1
php 7 include problems
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
Reply
03-02-2021, 06:57 AM,
#2
RE: php 7 include problems
Can you copy and paste exact error messages here Bob.

Thanks
Tim
Reply
03-02-2021, 07:28 AM,
#3
RE: php 7 include problems
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
Reply
03-02-2021, 12:40 PM, (This post was last modified: 03-02-2021, 12:41 PM by TurboPT.)
#4
RE: php 7 include problems
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; 
Reply
03-03-2021, 01:18 AM, (This post was last modified: 03-03-2021, 02:07 AM by rfthomas.)
#5
RE: php 7 include problems
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!
Reply
03-03-2021, 08:34 AM,
#6
RE: php 7 include problems
Some setup options for PHP7 were not properly set.  Weberp now runs correctly.
Reply
03-03-2021, 11:31 AM, (This post was last modified: 03-03-2021, 11:33 AM by TurboPT.)
#7
RE: php 7 include problems
@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.
Reply
03-04-2021, 01:53 AM,
#8
RE: php 7 include problems
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)