This topic is locked

Application is not working in Apache web server

4/21/2021 3:30:39 PM
PHPRunner General questions
A
abhijit2020 author

I have downloaded and installed Apache 2.4.46 (64 bits) on my laptop (windows 10 64 bits) from ApacheHaus. The testing page is working as expected, however my phprunner application(project) is not working. Application works in default built-in web server. Is there any document other than the xampp example that I can refer to. Any help/direction is much appreciated.

I have following two changes in httpd.conf file:

Define SRVROOT "/app/Apache24"

Listen localhost:8080

PHPRunners version is 10.4 Enterprise (Build: 37031)

Build the application with the following:

Selected "I have my own web server"

http://localhost:8080/TSheet

Output folder:

C:\app\Apache24\htdocs\TSheet

After the full build, when I try to launch the application from "View in browser", I see the index list page instead of login page

I get following messages when I try with the URL, http://localhost:8080/TSheet/login.htm

IE browser:

init(); $pageObject->process(); ?>

Chrome and Edge:

<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");

require_once("include/dbcommon.php");
require_once('include/xtempl.php');
require_once('classes/loginpage.php');
add_nocache_headers();

$xt = new Xtempl();

//an array of LoginPage constructor's params
$params = array();
$params["id"] = postvalue_number("id");
$params["xt"] = &$xt;
$params["pageType"] = PAGE_LOGIN;
$params["pageTable"] = GLOBAL_PAGES;
$params["needSearchClauseObj"] = false;

$params["captchaValue"] = postvalue("value_captcha_1");
$params["notRedirect"] = postvalue("notRedirect");

$params["rememberPassword"] = postvalue("remember_password");

$params["mode"] = LoginPage::readLoginModeFromRequest();
$params["action"] = LoginPage::readActionFromRequest();

$params["message"] = postvalue("message");
$params["var_pUsername"] = postvalue("username");
$params["var_pPassword"] = postvalue("password");
$params["redirectAfterLogin"] = postvalue("return");

$params["tName"] = GLOBAL_PAGES;

$pageObject = new LoginPage( $params );
$pageObject->init();

$pageObject->process();
?>

Thank you,

Abhi

admin 4/21/2021

You didn't install PHP or didn't enable it in Apache settings. This is why we recommend downloading XAMPP as it comes with everything you need.
XAMPP

A
abhijit2020 author 4/23/2021

I have installed PHP & mssql drivers and configured the following in php.ini. I am getting following connection errors; do I need to configure anything in PHPRunners end? Application is working fine in XAMPP.

extension_dir = "ext"
extension=php_com_dotnet.dll
extension=php_sqlsrv.dll
extension=php_sqlsrv_80_ts_x86.dll
extension=php_pdo_sqlsrv_80_ts_x86.dll

Errors:

Warning: Undefined array key "language" in C:\app\Apache24\htdocs\TSheet\include\commonfunctions.php on line 3522

Warning: Undefined array key "mediaType" in C:\app\Apache24\htdocs\TSheet\include\appsettings.php on line 737

Warning: Undefined array key "SQLConnString" in C:\app\Apache24\htdocs\TSheet\connections\MSSQLWinConnection.php on line 63

Warning: Undefined variable $options in C:\app\Apache24\htdocs\TSheet\connections\MSSQLWinConnection.php on line 68

Warning: Undefined variable $options in C:\app\Apache24\htdocs\TSheet\connections\MSSQLWinConnection.php on line 73

Warning: Undefined array key "password" in C:\app\Apache24\htdocs\TSheet\include\appsettings.php on line 764

Fatal error: Uncaught TypeError: Unsupported operand types: int + string in C:\app\Apache24\htdocs\TSheet\include\commonfunctions.php:4269 Stack trace: #0 C:\app\Apache24\htdocs\TSheet\login.php(15): postvalue_number('id') #1 {main} thrown in C:\app\Apache24\htdocs\TSheet\include\commonfunctions.php on line 4269

Thank you.

admin 4/23/2021

What version of PHP is this?