Koozali.org: home of the SME Server

PHP --without-mysql

Hazen Valliant-Saunders

PHP --without-mysql
« on: March 20, 2001, 11:24:52 PM »
Ok;
      I'm attempting to run Keystone (www.stonekeep.com)  which requires php3 or better (4.0.3 i believe) heres the output from





Linux porky.devel.redhat.com 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000 i686 unknown
Build Date Oct 18 2000

Configure Command './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-shared' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd=shared' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--without-mysql' '--without-oracle' '--without-oci8' '--with-openssl' '--with-xml'

Server API Apache

Virtual Directory Support disabled

Configuration File (php.ini) Path /etc

ZEND_DEBUG disabled

Thread Safety disabled


now I need to alter the "--without-mysql" to "--with-mysql"  for the web-app keystone to function properley.

However,
There are no GNU utilities on the evaluation copy of e-smith I was mailed,
I've downloaded most of the important packages (gcc, bison, blah blah balh you know those silly things that ./configure invokes)

But I'm hopeing someone here could show me the path (if there is any) that would allow me to simply alter the php-config without having to re-install (yes it's a gateway and uptime is precious).


Thankyou all agian in advance,
Hazen Valliant-Saunders

"you know your all grown up when you stop eating food from the floor"
-me-

Charlie Brady

Re: PHP --without-mysql
« Reply #1 on: March 20, 2001, 11:46:15 PM »
Hazen Valliant-Saunders wrote:

>       I'm attempting to run Keystone (www.stonekeep.com)
> which requires php3 or better (4.0.3 i believe)

php bundled with e-smith 4.1.1 is v 4.0.3pl1 so you are OK there.

> heres the output from
...
> '--without-mysql' '--without-oracle' '--without-oci8'

You shouldn't worry about that, the mysql support is in a seperate module, in the php-mysql RPM. The mysql support just isn't compiled into mod_php.

> There are no GNU utilities on the evaluation copy of e-smith
> I was mailed,

Please see http://www.e-smith.org/faq.php3#q20.

Regards

Charlie

Pierluigi Miranda

Re: PHP --without-mysql
« Reply #2 on: March 21, 2001, 02:34:32 PM »
Charlie Brady wrote:

> You shouldn't worry about that, the mysql support is in a
> seperate module, in the php-mysql RPM. The mysql support just
> isn't compiled into mod_php.

Please excuse me if I break in... I had to add Oracle 8 support to PHP4, and the first thing I did was just to compile the php-oci8 shared library, then add it to the php.ini config file.

It worked, but I experienced stability problems, and when I added the mysql module PHP began crashing apache on startup.

This behaviour changed when I recompiled the whole PHP4 package, adding both "--with-mysql=shared" and "--with-oci8=shared" to the standard configuration: now PHP4 is rock-solid.

I did several builds of PHP on my E-Smith 4.0.1 development machine, and now I am using the same version E-Smith 4.1 has, plus some more functionalities: mysql and oci8 shared support, gdbm and zlib support, dbase and trans-sid enabled. It works like a charm.

I did not investigate further, may be that PHP build process actually does not need the "--with-something=shared" specified, and the instability I experienced was just a quirk, or that the "--with-something=shared" creates some entry points in the main module, don't know: I leave further in-depths to more knowledgeable people... :)

--

Pierluigi Miranda

Hazen Valliant-Saunders

Re: PHP --without-mysql
« Reply #3 on: March 21, 2001, 05:36:47 PM »
Thankyou DAN!! :)

   Ok so that one is problem a, Problem b (as described by the Keystone FAQ) is apparently because mysql isin't configured in php returns among the many settings '--without-mysql' however I've been told that this isint a problem with php or mysql but the methods invoked from keystone use db calls that are functions generated in php when it's configured with '--with-mysql=shared'
 
   Do you know exactly whats needed to re install php or install a more current version (i've read the faq on development) and installed the appropriate dev-tools (cpp, egcs, make, kernel-headers, glib, glibc-dev, and a couple other needed rpm's)  Now I need to know if there is any way to modify the e-smith templates to accomadate the changes I'm about to make.

   I like the power of e-smith but do you know if there is any way to keep all the headers (or install them) I get configure errors when two things are called for php '--with-axps' and an openssl error which is nowhere to be found.

              Both of these errors are enough to cause fatals killing the configure script for PHP, now I'm compiling a tarball of PHP-4.0.4  But do I need to recompile Apache?

Dan Brown

Re: PHP --without-mysql
« Reply #4 on: March 21, 2001, 05:47:43 PM »
Your problem is not that PHP isn't compiled with mysql support.  The PHP that comes with e-smith supports mysql just fine.  You DO NOT need to recompile or upgrade PHP unless Keystone requires a more recent version of PHP than 4.0.3pl1, or requires functions other than IMAP, LDAP, and MySQL.

The reason you're getting errors is presumably because you don't have apache-devel and openssl-devel installed.  However, again, you DON'T NEED TO BE DOING THIS.  You don't need to recompile Apache, you don't need to recompile PHP, and for that matter, you'd probably be best off just removing all the development tools from the e-smith box--they aren't needed.

If you want to verify that PHP supports mysql, don't look at the configure options in the phpinfo page; look for the heading of "mysql support".  If you see that, you'll be fine.

Dan Brown

Re: PHP --without-mysql
« Reply #5 on: March 21, 2001, 06:10:00 PM »
To install keystone:

Create a new ibay called keystone.
Unpack the .tar.gz file to the html subdirectory in the keystone ibay, then move everything in the keystone subdirectory back to html.  That is, you want everything in ibays/keystone/html, not ibays/keystone/html/keystone.
Follow the docs to make copies of the config files, and create the database and tables.
***VERY IMPORTANT***
Make a user for this database:
# mysql
mysql> grant all on keystone.* to keystone@localhost identified by 'somepassword';
mysql> quit
# mysqladmin reload

Now, edit the keystone.conf file as follows:

# Options: mysql(default), postgresql, msql, or sybase
$sys_server             = "mysql";      /* database server type */

$sys_dbhost             = "localhost";  /* database server host */
$sys_dbname             = "keystone";   /* PTS database name */
$sys_dbuser             = "keystone";   /* database username */
$sys_dbpasswd           = "somepassword";   /* database password */

This took less than ten minutes for me to set up _and_ write this message.

Hazen Valliant-Saunders

Re: PHP --without-mysql
« Reply #6 on: March 21, 2001, 07:31:48 PM »
Thankyou all,
  Well it's up and running.