squirrelmail and phpmyadmin problem on Virtualmin CentOS 5.5 32bit system

Hello,

I have install Webmin/Virtualmin with phpmyadmin and squirrelmail too but i receive some error when the installation is finished and after i run the configuration script for squirrelmail .
When i go to http:/mydomian.com/webmail i receive this error:

Code:
ERROR: Config file ’ . '“config/config.php” not found. You need to ’ . 'configure SquirrelMail before you can use it.
'; exit; } // If we are, go ahead to the login page. header(‘Location: src/login.php’); ?>

I have check and see that there is config.php and the file looks fine.

I the same problem with phpmyadmin. when i go to http:/mydomian.com/phpmyadmin i receive error:

The requested URL /phpmyadmin/navigation.php< was not found on this server.

I just notice that when when i create an account in virtualmin squirrelmail and phpmyadmin stop working and give me error instead. IF i remove the account squirrelmail and phpmyadmin start working normally.

So without any account created in virtualmin squirrelmail and phpmyadmin WORK, but if i create any account they don`t.

Any idea what can be the problem ?!

Thanks

Howdy,

Are you by chance using an RPM of phpmyadmin and squirrelmail?

Doing that has the problem that they aren’t being run from within the users home directory in /home.

With the FCGID mode used by default with Virtualmin, you’ll have the best luck performing installation of web apps within the users home directory. The same would be the case using CGI mode.

My recommendation would be to perform the install of any web apps in your user’s DocumentRoot in /home – but it might work to switch to mod_php, which you can try by going into Server Configuration -> Website Options, and changing the PHP Execution mode.

-Eric

Hello,

Yes i have used RPM to install them.

Looks like is working.
Thanks for the tip!

Tell me something more.
Will i run on problems latter because i change the Default PHP execution mode to Apache mod_php (run as Apache’s user) ?!

If you think that i will have problems latter i think is better if i reinstall the VPS here on the beginning rather than having problems in the future.

Thanks

Howdy,

Well, using FCGID/CGI is a more secure environment, since it runs as the individual user rather than as the Apache user.

That may not be all that big a deal if it’s not a multi-user environment you’re using.

I don’t see a need to reinstall your VPS though… worst case, you can just remove the phpmyadmin and squirrelmail RPM’s, install those apps in the homedir of one of your Virtual Servers, and then set that Virtual Server to use FCGID or CGI.

-Eric

Hello again :),

There are problems again. If i set the Default PHP execution mode to Apache mod_php (run as Apache’s user) phpmyadin is working fine but the scripts i host they need some writable directories, since all folder are 755 they are not seen writable so i need to manually to set the folders and filles to 777. This is not secure and on top of that is a lot of work to do. If i live the Default PHP execution to FCGID/CGI the folders and filles ate 755/644 and they are writable for the script so i do not need to set anything to 777 but on this phpmyadmin is not working :(.
I have removed the phpmyadmin with command yum remove phpmyadmin and download and install manually ( i have used this tutorial: https://www.sevenl.net/blog/how-to-install-lamp-phpmyadmin-and-vsftp-on-centos-5-3-using-yum/ ) but again i run on the same problem. I have try to set symbolic link from /usr/share/phpmyadmin to /var/www/http/phpmyadmin and /home/phpmyadmin but running on the same problem. Even i have copy the phpmyadmin folder from /usr/share/ to home and /var/www/http directory and again i have the same problem and the same error. Normally i change the Alias /phpmyadmin path to var/www/http/phpmyadmin and /home/phpmyadmin in apache configuration and restart the apache but always i`m facing the same problem.

any idea or solution how to fix this problem?!
Thanks

Howdy,

since all folder are 755 they are not seen writable so i need to manually to set the folders and filles to 777. This is not secure and on top of that is a lot of work to do.

Yeah, that’s unfortunately the downside to using mod_php… since the scripts are run as the Apache user, the files and directories need to be 777 in order for it to write to them.

I have removed the phpmyadmin with command yum remove phpmyadmin and download and install manually

Well, remember that the issue at hand isn’t the RPM specifically – it’s the fact that you’re running phpmyadmin from outside of the users home directory.

My recommendation is to perform the phpmyadmin install into a specific Virtual Server’s home directory. And then, anyone who needs to access phpmyadmin – have them browse to that particular Virtual Server. Or, setup a redirect to redirect to that Virtual Server.

However, I don’t recommend setting up PHP apps in /usr, that’s really hard to get working right… instead, I recommend putting them in the DocumentRoot for one specific Virtual Server. That’s the simplest and most secure setup :slight_smile:

So, try to get it working just for that one domain, without any aliases or redirects. Once that works, then you can work from there :slight_smile:

-Eric

I have two questions here.

  1. The first problem is when I set up Squirrelmail I didn’t specify a host because when I change domains I am wanting Squirrel mail to look like it’s actually coming from that domain rather than my server. How does one do this?

  2. I have tried testing Squirrelmail by going to http://ipaddress/src/configtest.php without any results. What is going on is this all related to the domain name? See the prob here is that I have server.pilotalk.net and everytime I set up a new virtual server I want the Squirrelmail to actually come from the TLD so say we have www.likedogs.com then I want Squirrelmail to show “likesdog” as the domain not my server.pilotalk.net. In otherwords, I want to be transparent to what the other domains are.

So, i been at this problem for days and then I found this weblog about installing phpmyadmin working with virtualmin / webmin just today. Thank you.

I have downloaded the latest phpMyAdmin-3.4.9-rc1-all-languages from the publishers official site into /home/sitename/ as a .gzip

I untar into /home/sitename/phpmyadmin/ and it looks great except that I still have a stupid question.

How to “install” phpmyadmin as you mention “install” above in reference to phpmyadmin module after it is in the /home/sitename/phpmyadmin directory?

Just use the included documentation.html ?
Then would we need to edit httpd.conf Alias??

comment; I was surprised to find phpmyadmin was unable to be installed through the webmin module console with automatic configuration…

http://pkgs.org/centos-6-rhel-6/epel-x86_64/php-mcrypt-5.3.3-1.el6.x86_64.rpm.html

The above link solved problem locating correct mcrypt version to install under php 5.3 using yum installer over ssh with an epel repository.