Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th March 2011, 20:24
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default Had a typo in open_basedir and now it cannot change back.

Currently on ISPConfig3 version 3.0.3.2 on Fedora Core 13.

Months ago while working on a different problem I changed the open_basedir path in ISPConfig3 for the web site but when I changed it back I had a typo in two of the paths adn didn't notice it until today.

The open_basedir path with the typo:

/var/www/clients/client1/web1/web:
/var/www/clients/client1/web1/tmp:
/var/www/mrcoptech.com/web:
/srv/www/mrcoptech.com/web:
/usr/share/php5:
/tmp:
/usr/share/phpmyadmin

It should have been mrcomptech not mrcoptech:

/var/www/clients/client1/web1/web:
/var/www/clients/client1/web1/tmp:
/var/www/mrcomptech.com/web:
/srv/www/mrcomptech.com/web:
/usr/share/php5:
/tmp:
/usr/share/phpmyadmin

Even though I corrected the path in ISPConfig3, when I use the phpinfo() function the open_basedir paths still show with the typo. And in my Joomla admin panel 'Help' ==> 'System Info' also still shows the open_basedir path as incorrect as well. I looked in the ISPConfig3 database and it has the correct paths.

When I found this problem I was troubleshooting a problem with no being able to ad a module to my Joomla web site and the web site error log revealed that the 'FcgidMaxRequestLen' was at the default file size. I made a change in ISPConfig3 for the web site () but the change does not take effect. Using phpinfo() still shows that 'FcgidMaxRequestLen' is still set to the default.

I am guessing that the typo is causing the problem with the web site configuration changes in ISPConfig3 not taking effect.

And every time a web page of the site is displayed about 6 to 10 errors are logged showing the incorrect path '/mrcoptech.com/'.

Thanks for any help you may be able to provide.
__________________
MrCompTech.com
Reply With Quote
Sponsored Links
  #2  
Old 26th March 2011, 22:19
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default A bit more Information...

I created a phpinfo.php file for each web site on my ISPConfig3 server.

Of the 4 web sites only mrcomptech.com shows any open_basedir paths.

The remaining 3 web sites show the open_basedir as 'no value', despite the fact that all three have open_basedir paths set in their ISPConfig3 web site settings.

All the docs I have looked at seem to indicate that there should be be directives in the web sites vhost file such as
Code:
"php_admin_value open_basedir {path}"
, but there are none, in any of the web site vhosts files.

In the /etc/php.ini file the open_basedir is commented out so what configuration file does ISPConfig3 use to enable open_basedir and what file is used to set the open_basedir paths for each web site?
__________________
MrCompTech.com
Reply With Quote
  #3  
Old 26th March 2011, 22:59
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default And a bit more info...

I tried running server.sh as root but all kinds of stuff scrolled up the screen, so much that I had to Ctrl-C to stop it. Tried capturing it to a file and got over 21 MB of stuff in about 2 seconds!

Well the problem seemed to be that the settings in the database are not being implemented by the server.sh script.

This small bit of output from server.sh indicates thsi as well:

Code:
26.03.2011-16:32 - DEBUG - There is already a lockfile set. Waiting another 10 seconds...

26.03.2011-16:32 - WARNING - DB::query(INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES ('1',0,'0','1301171523','There is already a lockfile set. Waiting another 10 seconds...')) -> mysql_query Table './dbispconfig/sys_log' is marked as crashed and should be repaired

26.03.2011-16:32 - WARNING - DB::query(INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES ('1',0,'1','1301171523','DB::query(INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES (\'1\',0,\'0\',\'1301171523\',\'There is already a lockfile set. Waiting another 10 seconds...\')) -> mysql_query Table \'./dbispconfig/sys_log\' is marked as crashed and should be repaired')) -> mysql_query Table './dbispconfig/sys_log' is marked as crashed and should be repaired
When I try an look at the table 'sys_log' in PHPMyAdmin it shows the table as "in use" and it cannot be viewed. When I click onthe structure icon in PHPMyAdmin I see the error message:

"mysql said - #145 - Table './dbispconfig/sys_log' is marked as crashed and should be repaired"

Any idea on how to repair this?
I'm working on reading the MySQL docs now to figure this out, is there an easy way to fix this?
__________________
MrCompTech.com
Reply With Quote
  #4  
Old 27th March 2011, 01:18
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default

To fix the table table:

1) stop the mysql server - /etc/init.d/mysqld stop
2) to fix the table change to the directory for the database and run 'myisam {table name}' to check the table and then run 'myisamchk -r -q {table name}' to try a quick fix, if that doesn't work rerun the command and leave out the '-q'.

This fixed the table but when trying to run server.sh I kept getting an error "DEBUG - There is already an instance of server.php running. Exiting." I manually deleted the lock file and rebooted the server.

server.sh does seem to run normally now.

Now running mrcomptech.com/phpinfo.php shows 'no value' for the open_basedir, which is the same as the other 3 sites onthis server, but I'm not sure if this is the way it should be. Seems like phpinfo() shoudl report the same paths that are specified in ISPConfig3 managment console for the web sites.

Ok, well now all the settings in the ISPConfig3 console for the mrcomptech.com web site are now showing in the phpinfo() function output, but now there is a different problem!!!!

Now when I run server.sh I see a warning for each web site on the server:

[Sat Mar 26 19:04:01 2011] [warn] VirtualHost 192.168.1.10:80 overlaps with VirtualHost 192.168.1.10:80, the first has precedence, perhaps you need a NameVirtualHost directive

And all my websites all go to the same web site, something else to fix!

In ISPConfig3 tried changing the 'IP-Address' from the severs ip address to '*' but that didn't fix the problem.

Then in the /etc/httpd/conf/site-available directory, for every web site, above the <virtualHost *:80> I added "NameVirtualHost *:80" and now all sites seem to be working.
__________________
MrCompTech.com

Last edited by MrCompTech; 27th March 2011 at 01:41.
Reply With Quote
  #5  
Old 27th March 2011, 03:09
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default I spoke too soon!

After a couple of minutes which would be after cron ran server.sh all my sites point back to the same site and when I took a look at the *.vhost files every entry of NameVirtualHost *:80 that I had put into the files had been removed!

So manual editing is not the fix.

Does anyone know what is?
__________________
MrCompTech.com
Reply With Quote
  #6  
Old 27th March 2011, 03:18
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default

OK - The "NameVirtualHost *:80" had been commented out, not sure how that happened seeing as how I didn't even touch this file! I'm guessing that ISPConfig writes to it even though this seems like something that should not have been changed. guess I'll give it a little while and see if it gets commented out again.
__________________
MrCompTech.com
Reply With Quote
  #7  
Old 27th March 2011, 23:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,654 Times in 4,463 Posts
Default

Quote:
After a couple of minutes which would be after cron ran server.sh all my sites point back to the same site and when I took a look at the *.vhost files every entry of NameVirtualHost *:80 that I had put into the files had been removed!
Thats the correct and intended behaviour. Never edit one of ispconfigs vhost files manually.

Quote:
OK - The "NameVirtualHost *:80" had been commented out, not sure how that happened seeing as how I didn't even touch this file! I'm guessing that ISPConfig writes to it even though this seems like something that should not have been changed. guess I'll give it a little while and see if it gets commented out again.
The NameVirtualHost *:80 is a default of the Linux distribution andnot set or edited by ispconfig as it comes from the Linux distribution.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 28th March 2011, 03:00
MrCompTech MrCompTech is offline
Member
 
Join Date: Jul 2010
Posts: 92
Thanks: 1
Thanked 20 Times in 9 Posts
Default

Quote:
Originally Posted by till View Post
Thats the correct and intended behaviour. Never edit one of ispconfigs vhost files manually.

The NameVirtualHost *:80 is a default of the Linux distribution andnot set or edited by ispconfig as it comes from the Linux distribution.
These sites had been up and running for sometime before I foudn the initial problem, so the NameVirtualHost *:80 at the bottom of the httpd.conf file had been there so I'm not really sure howthis got changed unless it was when, in ISPConfig3, I set all the web site "IP-Address' to "*" instead of the LAN P address of the server.
__________________
MrCompTech.com
Reply With Quote
  #9  
Old 28th March 2011, 11:45
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,654 Times in 4,463 Posts
 
Default

ISPConfig is not editing the httpd.conf file. But you explained already the reason for your problems, you changesd the website settings from IP to * and as your system has no namevirtualhost for * defined, the websites were not reachable anymore.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
incorrect path, open_basedir

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.