# apache error: Syntax error on line 17 of [SOLVED]

## upengan78

Hi

I did emerge --sync and etc-update using -5 and when I tried to restart apache

I receive this error

/etc/init.d/apache2 restart

 *Quote:*   

>  * Apache2 has detected a syntax error in your configuration files:
> 
> Syntax error on line 17 of /etc/apache2/modules.d/70_mod_php5.conf:
> 
> Invalid command 'AddDirectoryIndex', perhaps misspelled or defined by a module not included in the server configuration
> ...

 

 emerge --info

 *Quote:*   

> Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r3 x86_64)
> 
> =================================================================
> 
> System uname: 2.6.23-gentoo-r3 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz
> ...

 

 emerge -pv apache

 *Quote:*   

> 
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> ...

 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

What could be the issue ?Last edited by upengan78 on Wed Feb 27, 2008 10:00 pm; edited 1 time in total

----------

## upengan78

 :Smile:  SOLVED

running emerge php/etc-update solved the issue

----------

## bkzshabbaz

I had the same problem; I re-emerged PHP, and noticed /etc/apache2/modules.d/70_mod_php5.conf changed from 

```
 AddDirectoryIndex index.php index.phtml
```

to 

```
 DirectoryIndex index.php index.phtml
```

So if people don't want to go through the trouble of re-emerging, just change the conf file

----------

