Enterprise Evaluation stuck - php.ini not loading for suPHP site, no MySQL either
We have just started our 14 day Enterprise trial, are have a customer that is interested in upgrading their Apache web server to LiteSpeed. They are using the Interworx panel. The underlying OS is Redhat 6.
We found some quite good install instructions here:
This install went fine, we need to use suPHP which we enabled during setup. Once complete - we then logged into Litespeed admin, and compiled PHP 5.4.11.
We used the following compile options:
'./configure' '--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-libdir=lib64' '--with-mysql' '--with-litespeed'
This all went swimmingly, and soon the compile was complete.
We switched the Interworx Litespeed plugin on, and were then able to create a site and run a phpinfo which showed that Litespeed was working, and that the PHP version was correct.
However we immediately saw a problem. No Php.ini was loaded for this site.
PHP was telling us it was looking for a configuration file in /usr/local/lsws/lsphp5/lib/php.ini
However the standard LSWS install and PHP compile does not place this file in there - hence it was missing - simple fix we thought.
So we copied the following file:
Restarted. Same problem.
This is an suphp setup, and we could also see this was working as the phpinfo file was set to the correct user.
We would like to get unique php.inis for each site on the server, so we followed this thread:
We set PHPRC=$VH_ROOT/myphp.ini as directed, restarted and still no dice.
However phpinfo does show '_ENV["PHPRC"]' in PHP Variables and this is set to the right place.
As mentioned in the title, we are unable to connect to a MySQL database from this instance, (testing a Wordpress install) but we have put that down to the fact that the php.ini is not loading.
This is a limited trial period, so we would really like to get up and running as soon as possible so we can devote time to important testing of applications / plugins for compatibility.
Hope someone can help....
One thing I forgot to mention - if we go to
And then go:
./lsphp5 -i | grep Configuration
Configuration File (php.ini) Path => /usr/local/lsws/lsphp5/lib
Loaded Configuration File => /usr/local/lsws/lsphp5/lib/php.ini
So it seems the config file is loading, however this is not the case from the phpinfo we are running on the vsite.
please refer this wiki page:
Sorry we saw some discrepancy on some of the guides, so we tried both.
We compiled with the defaults to keep things simple:
'./configure' '--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed'
So to recap - the situation is right now:
Is set in 'Configuration' 'Server' 'External App' 'LSPHP5'
We have a php.ini in /home/user/ini/php.ini
This file is owned / full access to the suPHP user of that site
No php.ini is loading.
Whilst trying to figure out the php.ini problem I have gone back to look at MySQL. It seemed that the default configure does not include support for it.
So we re-compiled using this:
'./configure' '--prefix=/usr/local/lsws/lsphp5' '--with-mysqli' '--with-mcrypt' '--with-mysql=/usr' '--with-libdir=lib64' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed'
With this, we have MySQL support now.
So it's just a matter of trying to figure out why php.ini is not loading....
OK this is interesting.
When I specify the following:
I now get a white screen when trying to view the phpinfo file.
However on the very site site instance, I am still able to browse a Wordpress site....?
If I remove the php.ini - the phpinfo page comes back but of course without any config loaded.....
This is totally weird....
OK this one is solved - apparently!
After adding in the 'PHP_INI_SCAN_DIR=$VH_ROOT/ini' - the blank page was a change factor at least - so I knew that something was going on with the php.ini in that folder.
It turns out that the phpinfo file I had been using used short tags - these are enabled by default, however not in the php.ini file that I had copied into place. After changing the phpinfo file - back it came.
The interesting thing is that although the phpinfo is still telling me that no configuration is loaded - changes made to this site based php.ini DO show up and are made. I changed upload size, corrected a timezone issue, all these php.ini changes worked.
It therefore appears that with LSWS & PHP (I tested both 5.3 and 5.4) - there is no way to tell if your php.ini is actually loaded!!!!
I guess that's a bug eh....?
you can try different PHP version for both 5.3 and 5.4 and see if the issue persists.
lsws admin console(:7080)->
or give the screenshot of Server->General
|All times are GMT -7. The time now is 11:56 AM.|