I am having a hard time installing Apache
Syntax error on line 535 of C:/Apache24/conf/httpd.conf: LoadModule takes two arguments, a module name and the name of a shared object file to load it from
How can I resolve the issue?
I am having a hard time installing Apache
Syntax error on line 535 of C:/Apache24/conf/httpd.conf: LoadModule takes two arguments, a module name and the name of a shared object file to load it from
How can I resolve the issue?
You could edit the file /Apache24/conf/httpd.conf
And fix the line 535. You could post it here if youâre not sure whatâs wrong with it.
After that you need to restart apache.
Thank you for your kind response. Im a newbee in Apache. which line is 535?
This is what i included at the end of my httpd.conf
LoadModule php 5_module "C:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
Quite possibly one of those you added. Which editor are you using? Depending it might support line numbering but youâll have to enable it.
By looking at those lines not sure whatâs the problem but will check my config once i get a chance.
You could rule possibilities out by commenting a line with # and restart apache and see if it runs
They look similar to the end of my conf file. My guess is PHPIniDir needs to come first so AddHandler knows where it is?
PHPIniDir "C:/PHP"
LoadModule php7_module "C:/php/php7apache2_4.dll"
# AddModule mod_php7.c
AddType application/x-httpd-php .php .phar
AddType application/x-httpd-php-source .phps
* Note, I commented out mod_php7.c but left it there so I wouldnât need to remember in case I ever needed it, mine is AddType not AddHandler and you probablay donât want phar or phps unless you plan on doing that kind of thing.
BTW, you shpuld consider upgrading your PHP version from 5, version 7 has been out for a while now.
im just using notepad. I tried to put # to
#LoadModule php 5_module "C:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
then message box appears but none happens after clicking accept.
Im newbie in programming and just wanted to self study. This is my first time installing php. Is it okay if Im gonna use 5 and use the one you gave me ?
What do you mean by ânothing happensâ? Something must be happening.
This is what i get when I tried
Syntax error on line 536 of C:/Apache24/conf/httpd.conf:
Invalid command âPHPIniDirâ, perhaps misspelled or defined by a module not included in the server configuration
# configure the path to php.ini
PHPIniDir "C:/php"
LoadModule php 5_module "C:/php/php5apache2_4.dll"
Addtype application/x-httpd-php .php
Well, as youâre just starting I think itâs a bit foolish to learn in an enviroment that is in itâs last days, but thatâs up to you.
You may need to open notepad by âright click, run as adminâ and after you make changes youâll need to restart the server
i tried starting apache and this is what happened
php-7.2.4-Win32-VC15-x64 (1).zip
VC15 x64 Thread Safe (2018-Mar-28 20:47:30)
I downloaded v7 now
I have only two guesses.
You still had the conf file open in your editor
Your conf file is still broken somehow
Youâll be glad you did. version 5.6 is getting only security updates and even those will stop Jan 1 2019
It is now working. Iâve used PHP 7 and apache 7. Thank you so much!
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.