Discussion:
[PHP-INSTALL] 3 day nightmare
PJ
2008-12-18 16:49:10 UTC
Permalink
This is rather complicated, so please bear with me.
Running FreeBSD 7.0
Background: Originally installed MySql 6.08alpha (compiled from ports),
php5.27,phpMyAdmin3.10, php-mysql-5.27,php-gd-5.27 and eventually got
things working ok.
Problem: My ISP host is using MySql 5.0.37 and phpMyAdmin 2.10.1 ; so,
I figure that I had better use something "compatible" in developing a
site.
Currently on FBSD Mysql50 is 5.0.67_1 and phpMyAdmin 3.1.0 - assume
that installing these should make the MySql db work on the site as well
as on my local development serve...
I have gone through innumerable contortions for 3 days trying to install
the needed versions but the only thing that works (more or less) is Webmin.
I have checked and rechecked, installed and reinstalled Mysql, Php5,
phpMyAdmin and php5-mysql, php-gd2, etc. and all I get is nada.
info.php does not show mysql but it does show the pgsql and gd2 extensions.
the mysql.so module is in the extensions.ini file and the file location
is set in php.ini.
After installing phpMyAdmin there is no phpadmin database in MySql and I
cannot connect to phpadmin - error - Cannot access mysql module, check
php configuration.
I tried to clean out theFBSD server files of almost all files and
directories related to MySql, php5, phpmyadmin and then reinstalled
MySql50, php5, phpmyadmin as well as php5-mysql, php5-gd and php5-pgsql.
Both php5-mysql and php5-pgsql installed the required modules in the
extensions.ini directory - but the mysql module is not recognized by
info.php.
What am I missing here? I can seek out and attach error files - but I
don't know where or what would give any indications of what is wrong.
mysqld seems to be runnin -
ps -waux returns:
root 1482 0.0 0.1 3456 1384 ?? I 8:55AM 0:00.00 sh -c
((/usr/local/bin/safe_mysqld || /usr/local/bin/mysqld_safe) &)

root 1483 0.0 0.1 3456 1492 ?? I 8:55AM 0:00.01 /bin/sh
/usr/local/bin/mysqld_safe

mysql 1497 0.0 1.1 65860 22400 ?? I 8:55AM 0:03.28
/usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/mysq

root 66079 0.0 0.1 3308 1136 v0 S+ 11:26AM 0:00.00 grep mysql

Is the datadir=/var/db/mysq correct or is it truncated?

HELP, please...
Daniel Brown
2008-12-18 17:59:09 UTC
Permalink
Wow, Peej.... frustration sure makes for jumbled emails, eh?
Let's try to take this one step at a time, and we'll get you going....
Post by PJ
info.php does not show mysql but it does show the pgsql and gd2 extensions.
Are you sure it's using the same php.ini file you're editing?
Check in your phpinfo() (probably your info.php file) and make sure
you're editing the same file that's showing there. Also, *every time*
you make changes to php.ini, you have to restart Apache (or whatever
HTTP server you're using) so that PHP is reloaded with the changes.
Post by PJ
After installing phpMyAdmin there is no phpadmin database in MySql and I
cannot connect to phpadmin - error - Cannot access mysql module, check
php configuration.
There will be no phpMyAdmin database. The phpMyAdmin script is a
frontend to manage your MySQL databases, but doesn't create its own
database. However, installation of that software is beyond the scope
of this list, and doesn't seem to be your primary problem anyway.
Post by PJ
I tried to clean out theFBSD server files of almost all files and
directories related to MySql, php5, phpmyadmin and then reinstalled
MySql50, php5, phpmyadmin as well as php5-mysql, php5-gd and php5-pgsql.
Both php5-mysql and php5-pgsql installed the required modules in the
extensions.ini directory - but the mysql module is not recognized by
info.php.
Once again, verify that you're changing the same php.ini file in
the same location as what phpinfo() reports, and restart Apache when
you make changes.
--
</Daniel P. Brown>
***@parasane.net || ***@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!
PJ
2008-12-18 19:31:01 UTC
Permalink
Post by Daniel Brown
Wow, Peej.... frustration sure makes for jumbled emails, eh?
Let's try to take this one step at a time, and we'll get you going....
Post by PJ
info.php does not show mysql but it does show the pgsql and gd2 extensions.
# /usr/local/bin/php -r 'phpinfo();' does not show mysql - same as with
web info.php
Post by Daniel Brown
Are you sure it's using the same php.ini file you're editing?
Check in your phpinfo() (probably your info.php file) and make sure
you're editing the same file that's showing there. Also, *every time*
you make changes to php.ini, you have to restart Apache (or whatever
HTTP server you're using) so that PHP is reloaded with the changes.
I copied the default php.ini-dist file to php.ini and then adjusted to
point to the /usr/local/etc/php directory for the extensions.ini file
that contains all the .so scripts- and indeed all the scripts are there.

also entered extension=mysql.so; extension=pgsql.so and extension=gd2.so
and left the rest as default

I played with this stuff so much it's coming out of my eyes.... not only
did I find that mysqld would not start as instructed in the mysql
documentation (copy mysql-server to /usr/local/etc/rc.d as
mysql-server.sh ---- only the rc.conf entry enable_mysql=YES worked; but
also I found that even rebooting did not correct the mysql.so module
problem.... pgsql and gd2 are quite evident in the info.php web page.

this seems to be the configure command according to info.php :

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local'
'--with-pcre-regex=/usr/local' '--enable-reflection' '--program-prefix='
'--enable-fastcgi' '--with-apxs2=/usr/local/sbin/apxs'
'--with-regex=php' '--with-zend-vm=CALL' '--disable-ipv6'
'--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.0'

Now, I notice this '--with-config-file-scan-dir=/usr/local/etc/php' ;
the php.ini file is in /usr/local/etc and not in php ;;;;;;;
'--with-config-file-scan-dir=/usr/local/etc/php' is the location of
extensions.ini

info.php does point to /usr/local/etc !!!

Where does this come from, I wonder - could there be an older
configuration file floating about somewhere in the guts of FreeBSD?

This is from php5 Makefile:
(my **** --- are these ok?)
...snip
CONFIGURE_ARGS= \
--with-layout=GNU \
--with-config-file-scan-dir=${PREFIX}/etc/php \ ****
--disable-all \
--enable-libxml \
--with-libxml-dir=${LOCALBASE} \
--with-pcre-regex=${LOCALBASE} \
--enable-reflection \
--program-prefix=""
snip...snip
OPTIONS= CLI "Build CLI version" on \
CGI "Build CGI version" on \
APACHE "Build Apache module" off \ ****
DEBUG "Enable debug" off \
SUHOSIN "Enable Suhosin protection system (not for jails)" on \
MULTIBYTE "Enable zend multibyte support" off \
IPV6 "Enable ipv6 support" on \
MAILHEAD "Enable mail header patch" off \
REDIRECT "Enable force-cgi-redirect support (CGI only)" off \
DISCARD "Enable discard-path support (CGI only)" off \
FASTCGI "Enable fastcgi support (CGI only)" on \
PATHINFO "Enable path-info-check support (CGI only)" on
snip...

????
Post by Daniel Brown
Post by PJ
After installing phpMyAdmin there is no phpadmin database in MySql and I
cannot connect to phpadmin - error - Cannot access mysql module, check
php configuration.
There will be no phpMyAdmin database. The phpMyAdmin script is a
frontend to manage your MySQL databases, but doesn't create its own
database. However, installation of that software is beyond the scope
of this list, and doesn't seem to be your primary problem anyway.
Post by PJ
I tried to clean out theFBSD server files of almost all files and
directories related to MySql, php5, phpmyadmin and then reinstalled
MySql50, php5, phpmyadmin as well as php5-mysql, php5-gd and php5-pgsql.
Both php5-mysql and php5-pgsql installed the required modules in the
extensions.ini directory - but the mysql module is not recognized by
info.php.
Once again, verify that you're changing the same php.ini file in
the same location as what phpinfo() reports, and restart Apache when
you make changes.
I'M JUST GETTING MORE AND MORE CONFUSED AND REALLY DISAPPOINTED AT THE
SEEMING COMPLEXITY OF ALL THIS.
:-(.
PJ
2008-12-19 16:30:38 UTC
Permalink
Things get better - hah!

I finally figured out that the reason for all the "problems" is that the
deinstallation of a port does not clean out the port directories and
there are a lot of residual files that screw up any installations or
upgrades-updates.
It looks like the only way to get things straight is to unistall all the
related programs and delete (remove) the related ports from the ports
directory; then, run cvsup-without-gui :
# cvsup -g -L 2 ports-supfile from the /root directory.
You have to verify the configuration of each port with make showconfig;
then to change the configuration (if so desired) make config and then
make install clean.
Great! Sure works on most of the programs except when so;me idiot has
screwed up the works, like on php5-5.2.8. On installing phpmyadmin there
is a break in a "required" file in php5-spl (don't know what that is).
So, I'm back to square 1, or is it 0...
Still more wonders - some yoyo posted a solution (my donkey!)
http://forums.freebsd.org/showthread.php?t=883
where in he says to do just what I had already done and found does not
work... delete the php5-spl port and then run cvsup (as above)...
but.... the clown merely says "cvsup" .... oh yeah? what the devil does
he mean, cvsup - which version and what directives? And then he says to
run the phpmyadmin make install clean again... Now, does one have to be
naive to think that the phpmyadmin install will now miraculously work?
And that's not all... I wanted to post to the site to find out what the
guy really meant with the cvsup and what miracles would make the
installation work? Yeah, I wanted to... but miracle of miracles.... the
site is having some server issues and it is impossible to register
(especially with their ridiculous image verification setup)... and to
top it all off, their contact for reporting a problem with registration
or anything uses the same verification and again, there is server
problem... result- you can't register to post and you can't report a
problem... BRAVO FreeBSD.
I'm beginning to wonder why there are so many Linux users... all I can
say at this time is - horsemanure !!!
Post by PJ
This is rather complicated, so please bear with me.
Running FreeBSD 7.0
Background: Originally installed MySql 6.08alpha (compiled from ports),
php5.27,phpMyAdmin3.10, php-mysql-5.27,php-gd-5.27 and eventually got
things working ok.
Problem: My ISP host is using MySql 5.0.37 and phpMyAdmin 2.10.1 ; so,
I figure that I had better use something "compatible" in developing a
site.
Currently on FBSD Mysql50 is 5.0.67_1 and phpMyAdmin 3.1.0 - assume
that installing these should make the MySql db work on the site as well
as on my local development serve...
I have gone through innumerable contortions for 3 days trying to install
the needed versions but the only thing that works (more or less) is Webmin.
I have checked and rechecked, installed and reinstalled Mysql, Php5,
phpMyAdmin and php5-mysql, php-gd2, etc. and all I get is nada.
info.php does not show mysql but it does show the pgsql and gd2 extensions.
the mysql.so module is in the extensions.ini file and the file location
is set in php.ini.
After installing phpMyAdmin there is no phpadmin database in MySql and I
cannot connect to phpadmin - error - Cannot access mysql module, check
php configuration.
I tried to clean out theFBSD server files of almost all files and
directories related to MySql, php5, phpmyadmin and then reinstalled
MySql50, php5, phpmyadmin as well as php5-mysql, php5-gd and php5-pgsql.
Both php5-mysql and php5-pgsql installed the required modules in the
extensions.ini directory - but the mysql module is not recognized by
info.php.
What am I missing here? I can seek out and attach error files - but I
don't know where or what would give any indications of what is wrong.
mysqld seems to be runnin -
root 1482 0.0 0.1 3456 1384 ?? I 8:55AM 0:00.00 sh -c
((/usr/local/bin/safe_mysqld || /usr/local/bin/mysqld_safe) &)
root 1483 0.0 0.1 3456 1492 ?? I 8:55AM 0:00.01 /bin/sh
/usr/local/bin/mysqld_safe
mysql 1497 0.0 1.1 65860 22400 ?? I 8:55AM 0:03.28
/usr/local/libexec/mysqld --basedir=/usr/local --datadir=/var/db/mysq
root 66079 0.0 0.1 3308 1136 v0 S+ 11:26AM 0:00.00 grep mysql
Is the datadir=/var/db/mysq correct or is it truncated?
HELP, please...
Daniel Brown
2008-12-19 18:06:26 UTC
Permalink
Post by PJ
I'm beginning to wonder why there are so many Linux users... all I
can say at this time is - horsemanure !!!
FreeBSD isn't Linux, it's BSD. Both are POSIX systems designed to
be nearly identical to *NIX, but are different in their own right.
BSD, FreeBSD, and MacOS are one branch, while Linux (Mandriva, CentOS,
and my own as-yet unnamed small distro) are another branch.

In any case, though, glad to hear you're getting closer to having
this resolved!
--
</Daniel P. Brown>
***@parasane.net || ***@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!
Loading...