PHP - Php Loadmodules And Apache2.4
Greetings forum.
I am attempting to configure loadmodules for PHP 5.6 in Apache 2.4 on Windows Server 2012.
Here is the configuration I am attempting to add into httpd.conf: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2_4.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/phpI place it in the loadmodules section, right at the end of all of the modules. If I try to restart Apache it produces an error and will not run/restart, when I remove my added configuration the Apache server starts up again no worries at all. I believe my configuration to be wrong in this scenario and would like to ask how I should deal with this and/or if I am doing something wrong here. Thank you, Droffo. Similar TutorialsI have been at this for several hours..
<?php ?> I keep getting: Parse error: syntax error, unexpected '?>', expecting ',' or ')' in C:\Apache24\htdocs\mysql_connect.php on line 4 I have tried copy and paste of mysqli_connect from several different web pages, nothing works. PHP is installed correctly, I have a db in MySQL, and Apache is installed with no errors. what the... Edited March 31, 2019 by eljaydeetypo I created this to test the connection to my ms sql server with a web page. I can connect with isql with out fail.
when I open this I get
PHP SQL Test
END PHP SQL Test
I was expecting to get sql data between the above lines. What am I doing wrong.
<html> <head> <title>PHP SQL Test</title> </head> <body> <p> PHP SQL Test </p> <? $conn =odbc_connect("datasource","user","password"); if(!$conn) { exit("Connection Failed: " . $conn); } $sql="SELECT top 10 * from WIP_master"; $rs =odbc_exec($conn,$sql); print_r($rs); if(!$rs){ exit("Error in SQL"); } odbc_close($conn); ?> <p> End PHP SQL Test </p> </body> </html> |