Syntax error on line 299 of /etc/apache2/apache2.conf

syntax error on line 299 of /etc/apache2/apache2.conf

I've created nextcloud.conf file in /etc/httpd/conf.d/ and write the following Fix the syntax error at line 353 of your config file. httpd: Syntax error on line 700 of /usr/pw/apache/conf/httpd.conf: Syntax error on line 1 of /usr/pw/apache/conf/mod_security.conf: Cannot. d/apache2 -M This generated error message for me apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuration.

Thematic video

57 RHCE7 Managing Advanced Apache Services
I am having problems with PHP mysqli functions recognizing my database. I keep getting the following error:
"Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\guardsman\trunk\prod\_swf\data\register.php online122"

"Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\guardsman\trunk\prod\_swf\data\register.php online217
Could not connect to MySQL:"

The typical cause of this erroris syntax error on line 299 of /etc/apache2/apache2.conf the parameters in the wrong order. That doesn't seem to be the case here.
I have tried everything I can think of to get rid of these errors: I've tried to validate my PHP syntax(Aptana doesn't seem to have a problem with it but I'm not ruling it out as the cause???). I have no problem accessing the XAMPP installation syntax error on line 299 of /etc/apache2/apache2.conf MySQL (which is XAMPP for Windows v. 1.7.3, MySQL v, syntax error on line 299 of /etc/apache2/apache2.conf. 5.1.41). I run PHPMyAdmin and MySQL Workbench flawlessly. I've run my queries through PHPMyAdmin and MySQL Workbench to validate the syntax-- to be sure they are actually retrieving data from the tables as designed (they work as typed--without the PHP vars of course). But, when I try to use the queries in PHP I get the errors. I've done a var_dump($dba) onthe linebefore the mysqli functions and I it returns NULL, but I can access the database and the server is running. I've run out of variables in this equation and can only assume that the errors are syntax error on line 299 of /etc/apache2/apache2.conf to some settings in XAMPP (i.e, syntax error on line 299 of /etc/apache2/apache2.conf. MySQL or PHP config files???).

Anyone have any ideas? Any help, suggestions, opinions, criticisms, or educated guesses would be greatly appreciated.

Kurt

Code: Select all

IncludeOptional fails when a directory does not exist

[Impact]

An instruction in apache config such as the following will make apache2 fail to start if the target path does not exist:

IncludeOptional /etc/apache2/mellon/sp-location*.conf

https://paste.ubuntu.com/p/f2Tb9rgrBB/ (full file: /etc/apache2/sites-enabled/openstack_https_frontend.conf)

Apr 23 06:58:31 maas-xenial1 apache2[28269]: * The apache2 configtest failed.
Apr 23 06:58:31 maas-xenial1 apache2[28269]: Output of config test was:
Apr 23 06:58:31 maas-xenial1 apache2[28269]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 17 of /etc/apache2/sites-enabled/openstack_https_frontend.conf: Could not o
Apr 23 06:58:31 maas-xenial1 apache2[28269]: Action 'configtest' failed.
Apr 23 06:58:31 maas-xenial1 apache2[28269]: The Apache error log may have more information.
Apr 23 06:58:31 maas-xenial1 systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 23 06:58:31 maas-xenial1 systemd[1]: Failed to start LSB: Apache2 web server.

A fix is available upstream:

https://bz.apache.org/bugzilla/show_bug.cgi?id=57585
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878920

https://github.com/apache/httpd/commit/a17ce7dd5e6277867ca48659f70c4bb8a11add56#diff-18a4bdb1520687ad43a0b4dd2b51d957R1954

[Test Case]

 * add IncludeOptional /etc/apache2/mellon/sp-location*.conf to an apache config file and try to restart the apache2 service

[Regression Potential]

 * minimal, the patch eases up requirements without rewriting or removing the existing code;
 * the patch author says that it's been used for ~ 3 years in clearlinux https://bz.apache.org/bugzilla/show_bug.cgi?id=57585#c4
 * applied in debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878920#22

Let's Canon mp160 e23 error Community Support

voigtstr###oigtstr-VirtualBox:/etc/apache2/sites-enabled$ ls -lR /etc/letsencrypt/live/
ls: cannot open directory '/etc/letsencrypt/live/': Permission denied
voigtstr###oigtstr-VirtualBox:/etc/apache2/sites-enabled$ sudo ls -lR /etc/letsencrypt/live/
/etc/letsencrypt/live/:
total 16
drwxr-xr-x 2 root root 4096 Nov 17 22:05 minecraft.voigtstr.com
drwxr-xr-x 2 root root 4096 Nov 17 22:05 music.voigtstr.com
-rw-r--r-- 1 root root 740 Sep 21 2020 README
drwxr-xr-x 2 root root 4096 Nov 17 22:05 voigtstr.com

/etc/letsencrypt/live/minecraft.voigtstr.com:
total 4
lrwxrwxrwx 1 root root 46 Nov 17 22:05 cert.pem -> ././archive/minecraft.voigtstr.com/cert8.pem
lrwxrwxrwx 1 root root 47 Nov 17 22:05 chain.pem -> ././archive/minecraft.voigtstr.com/chain8.pem
lrwxrwxrwx 1 root root 51 Nov 17 22:05 fullchain.pem -> ././archive/minecraft.voigtstr.com/fullchain8.pem
lrwxrwxrwx 1 root root 49 Nov 17 22:05 privkey.pem -> ././archive/minecraft.voigtstr.com/privkey8.pem
-rw-r--r-- 1 root root 692 Sep 21 2020 README

/etc/letsencrypt/live/music.voigtstr.com:
total 4
lrwxrwxrwx 1 root root 42 Nov 17 22:05 cert.pem -> ././archive/music.voigtstr.com/cert8.pem
lrwxrwxrwx 1 root root 43 Nov 17 22:05 chain.pem -> ././archive/music.voigtstr.com/chain8.pem
lrwxrwxrwx 1 root root 47 Nov 17 22:05 fullchain.pem -> ././archive/music.voigtstr.com/fullchain8.pem
lrwxrwxrwx 1 root root 45 Nov 17 22:05 privkey.pem -> ././archive/music.voigtstr.com/privkey8.pem
error - imapd configuration file missing 1 root root 692 Sep 21 2020 README

/etc/letsencrypt/live/voigtstr.com:
total 4
lrwxrwxrwx 1 root root 36 Nov 17 22:05 cert.pem -> ././archive/voigtstr.com/cert8.pem
lrwxrwxrwx 1 root root 37 Nov 17 22:05 chain.pem -> ././archive/voigtstr.com/chain8.pem
lrwxrwxrwx 1 root root 41 Nov 17 22:05 fullchain.pem -> ././archive/voigtstr.com/fullchain8.pem
lrwxrwxrwx 1 root root 39 Nov 17 22:05 privkey.pem -> ././archive/voigtstr.com/privkey8.pem
-rw-r--r-- 1 root root 692 Sep 21 2020 README

voigtstr###oigtstr-VirtualBox:/etc/apache2/sites-enabled$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Found the following certs:
Certificate Name: minecraft.voigtstr.com
Domains: minecraft.voigtstr.com
Expiry Date: 2022-02-15 10:05:36+00:00 (VALID: 22 days)
Certificate Path: /etc/letsencrypt/live/minecraft.voigtstr.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/minecraft.voigtstr.com/privkey.pem
Certificate Name: music.voigtstr.com
Domains: music.voigtstr.com
Expiry Date: 2022-02-15 10:05:46+00:00 (VALID: 22 days)
Certificate Path: /etc/letsencrypt/live/music.voigtstr.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/music.voigtstr.com/privkey.pem
Certificate Name: voigtstr.com
Domains: voigtstr.comwww.voigtstr.com
Expiry Date: 2022-02-15 10:05:56+00:00 (VALID: 22 days)
Certificate Path: /etc/letsencrypt/live/voigtstr.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/voigtstr.com/privkey.pem


Apache Friends Support Forum

Search found 1289 matches: Syntax error on line 477

Searched query: +Syntax +error +line +477

ignored: on

Return to advanced search

Update unter Windows

... Ich habe versucht meine Installation vom letzten Jahr mit der aktuellen ... Auszug aus dem Log: httpd.exe: Syntaxerroronline 35 of C:/Programme/xampp/apache/conf/httpd.conf: ...
by Dogo
22. December 2010 12:32
 
Forum: XAMPP für Windows
Topic: Update unter Windows
Replies: 16
Views: 16895

Re: How to update/upgrade MySQL version?

... from all the stress I had on it and just need to get my site ... one having the problem with MySQL errors on this downgraded version. ... have an error in your SQL syntax; check the manual that corresponds ... right syntax to use near '' at line 1" and others. I'm not prepared ...
by Terrum
05. December 2010 12:06
 
Forum: XAMPP for Windows
Topic: How to update/upgrade MySQL version?
Replies: 4
Views: 16983

How to downgrade PHP in XAMPP

Hello everyone, I have recently installed XAMPP 1.7.3 ... try to browse my mediawiki I get the error: Parse error: syntaxerror, unexpected T_NAMESPACE, expecting ... online 49 After searching a bit it seems this ...
by Read Only
21. November 2010 15:02
 
Forum: XAMPP for Windows
Topic: How to downgrade PHP in XAMPP
Replies: 5
Views: 17447

Tomcat mod_jk.so Xampp problem

... and xampp. Tomcat works good on localhost:8080. I only have the ... and start, I get a load module error. I'm just kind of stuck at this ... line 70: ulimit: open files: cannot ... limit: Invalid argument httpd: Syntaxerroronline 516 of /Applications/xampp/etc/httpd.conf: ...
by xiquid
28, syntax error on line 299 of /etc/apache2/apache2.conf. October 2010 09:35
 
Forum: XAMPP for macOS
Topic: Tomcat mod_jk.so Xampp problem
Replies: 0
Views: 5502

Update

I have updated my XAMPP on Ubuntu for 1.7.3a version Apache ... start with the message XAMPP: Error 1! Couldn't start Apache! XAMPP: ... SIGTERM, shutting down httpd: Syntaxerroronline 80 of /opt/lampp/etc/httpd.conf: Cannot ...
by moissinac
22. September 2010 16:58
 
Forum: XAMPP for Postgresql error codes Update
Replies: 0
Views: 3547

Return to advanced search

Generating new Apache configuration failed plesk 10.4.4

I changed postfix to qmail through the component upgrade and after that Apache configuration is corrupted and will not start.

This is the error I received via mail:

Generating new Apache configuration on host <xxxx.xxx.xxx.xx> failed because the following error(s) occurred:

httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 67 of /usr/local/psa/admin/conf/generated/13391228120.29257900_server.include: Syntax error on line 6 of /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/semar.gob.mx/conf/13391228120.83848500_httpd_ip_default.include: Permission denied


Please fix error(s) in templates of Apache configuration and retry generating the configuration file.

#########################

This is /var/log/sw-cp-server/error_log


2012-06-07T21:25:10-05:00 ERR (3): New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click <a href="/admin/subscription/webserver-configuration-rebuild/?returnUrl=%2Fhome%2Fadmin">here</a> to retry generating configuration.
2012-06-07T21:25:17-05:00 ERR (3): Apache config (13391223170.42606200) generation failed: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax tecdoc error 6006 on line 67 of /usr/local/psa/admin/conf/generated/13391223170.42606200_server.include: Syntax error on line 5 of /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/semar.gob.mx/conf/13391220420.24702800_httpd_ip_default.include: Permission denied

2012-06-07T21:25:38-05:00 ERR (3): Web server reconfiguration syntax error on line 299 of /etc/apache2/apache2.conf New Apache configuration was not built.
2012-06-07 21:25:38: (mod_fastcgi.c.2588) FastCGI-stderr: PleskUtilException: '/usr/local/psa/admin/bin/apache-config' '-t' failed with code .

stdout:


stderr:
httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 67 of /usr/local/psa/admin/conf/generated/13391223170.42606200_server.include: Syntax error on line 5 of /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/xxxxxx.xxxx.xxx/conf/13391220420.24702800_httpd_ip_default.include: Permission denied

file: /usr/local/psa/admin/plib/Service/Agent/Transport/Local/Exec.php
line: 71
code: 0
trace: #0 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(58): Service_Agent_Transport_Local_Exec->process(4, Object(Service_Agent_Command_Exec), Object(Service_Agent_Log), Object(Service_Agent_Transport_LocalTransaction))
#1 /usr/local/psa/admin/plib/Service/Agent/Transport/Local.php(24): Service_Agent_Transport_Local->_command(4, Object(Service_Agent_Command_Exec), Object(Service_Agent_Transport_LocalTransaction), Object(Service_Agent_Log))
#2 /usr/local/psa/admin/plib/Service/Agent.php(133): Service_Agent_Transport_Local->process('ae472cf6ad6f9e4.', Array, Object(Service_Agent_Log))
#3 /usr/local/psa/admin/plib/Template/Writer/Apache.php(58): Service_Agent->commit()
#4 /usr/local/psa/admin/plib/Template/Configuration/Applier.php(196): Template_Writer_Apache->test()
#5 /usr/local/psa/admin/plib/Template/Configuration/Applier.php(117): Template_Configuration_Applier->_applyConfigurationsToServiceNode(1, Array)
#6 /usr/local/psa/admin/panel/application/controllers/SubscriptionController.php(999): Template_Configuration_Applier->applyConfiguration(true)
#7 /usr/local/psa/admin/panel/application/controllers/SubscriptionController.php(969): SubscriptionController->_webserverConfigurationRebuildServerwide()
#8 /usr/local/psa/admin/plib/Zend/Controller/Action.php(513): SubscriptionController->webserverConfigurationRebuildAction()
#9 /usr/local/psa/admin/plib/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('webserverConfig.')
#10 /usr/local/psa/admin/plib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#11 /usr/local/psa/admin/panel/application/library/AdminPanel/Application/Web.php(20): Zend_Controller_Front->dispatch()
#12 /usr/local/psa/admin/panel/application/public/index.php(15): AdminPanel_Application_Web->run()
#13 {main}


2012-06-07T21:25:39-05:00 ERR (3): New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, syntax error on line 299 of /etc/apache2/apache2.conf, and click <a href="/admin/subscription/webserver-configuration-rebuild/?returnUrl=%2Fhome%2Fadmin">here</a> to retry generating configuration.
2012-06-07 21:26:52: (connections.c.1737) SSL (error): 5 -1 32 Broken pipe
2012-06-07 21:31:54: (connections.c.1737) SSL (error): 5 -1 32 Broken pipe
2012-06-07 21:36:00: (connections.c.299) SSL: 1 error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure
2012-06-07 21:36:05: (connections.c.1737) SSL (error): 5 -1 0 Success
2012-06-07 21:36:05: (connections.c.1737) SSL (error): 5 -1 0 Success
2012-06-07 21:36:05: (connections.c.1737) SSL (error): 5 -1 0 Success
2012-06-07T21:36:06-05:00 ERR (3): New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed sub-process usr bin dpkg error code 100 you, so please check the e-mail, fix the errors, and click <a href="/admin/subscription/webserver-configuration-rebuild/?returnUrl=%2Fhome%2Fadmin">here</a> to retry generating configuration.
2012-06-07T21:36:14-05:00 ERR (3): New web server configuration for some domains within the marked subscriptions was not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click <a href="/admin/subscription/webserver-configuration-rebuild/?returnUrl=%2Fsubscription%2Flist">here</a> to retry generating configuration.
2012-06-07 21:36:56: (connections.c.1737) SSL (error): 5 -1 32 Broken pipe
2012-06-07 21:41:59: (connections.c.1737) SSL (error): 5 -1 32 Broken pipe


I tried http://kb.parallels.com/en/111605 without success.

Any ideas?

My server:

Linux 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

 

syntax error on line 299 of /etc/apache2/apache2.conf

1 Comments

Leave a Comment