MySQL/PHP setup problems

MySQL/PHP setup problems

Post by Jason Ahma » Sun, 31 Dec 1899 09:00:00



Hi,

I'm setting up a linux webserver and am having some issues with MySQL and
PHP3. The machine is running Redhat 6.1 with the stock installs of apache
and php3. These two work fine together and were pretty painless to setup. So
I grabbed the latest MySQL (3.22) rpm and installed that. The server and
client both work great. Now the only catch is making it all work together.
It appears that PHP doesn't have the MySQL extension installed, although
php3.ini has a section with MySQL settings (it came that way - along with
settings for mSQL and postgres and a few others i think). Anyway, if anyone
could drop me a line about how to make this all work together, that'd be
great.

Thanks,
Jason

PS: I was going to just tag a line onto the end of the dynamic extensions
section of php3.ini, but then i realized that I don't have any mysql.so
anywhere on my system. problematic.

 
 
 

MySQL/PHP setup problems

Post by Alex Schlu » Sun, 31 Dec 1899 09:00:00


Jason,

I am assuming that your server is processing straight php so for example

<?echo "Did it work?";?>

prints

Did it work?

to the browser.

If so, then what you have to do is recompile php and apache with the php
mysql module (as you had already guessed). To do this :

You may need to adjust some of the source locations (e.g.
../apache_1.3.6) in the commands below to match your system.

In the apache source directory :

Quote:>>./configure

In the php source directory :

Quote:>>./configure --with-mysql --with-apache=../apache_1.3.6 --enable-track-vars
>>make
>>make install

In the apache source directory :

Quote:>>./configure --activate-module=src/modules/php3/libphp3.a
>>make
>>make install

In the php source directory :

Quote:>>cp php3.ini-dist /usr/local/lib/php3.ini

To save yourself from having to change rc.d details in order to start
apache at boot time, make sure that the config.layout matches your
current executable location for httpd before running configure on
apache.

Regards,
Alex.

 
 
 

MySQL/PHP setup problems

Post by Raymon » Sun, 31 Dec 1899 09:00:00




Quote:> Jason,

> I am assuming that your server is processing straight php so for
example

> <?echo "Did it work?";?>

> prints

> Did it work?

> to the browser.

> If so, then what you have to do is recompile php and apache with the
php
> mysql module (as you had already guessed). To do this :

> You may need to adjust some of the source locations (e.g.
> ../apache_1.3.6) in the commands below to match your system.

> In the apache source directory :

> >>./configure

My Solaris has already installed apache 1.3.3 but I cannot find the
file "configure" under the apache directory. Then, do I need to
download the "apache_1.3.x.tar.gz" from apache.org, unzip it and just
make use of its "configure" ? Thanks a lot.

- Show quoted text -

Quote:> In the php source directory :

> >>./configure --with-mysql --with-apache=../apache_1.3.6 --enable-
track-vars

> >>make

> >>make install

> In the apache source directory :

> >>./configure --activate-module=src/modules/php3/libphp3.a

> >>make

> >>make install

> In the php source directory :

> >>cp php3.ini-dist /usr/local/lib/php3.ini

> To save yourself from having to change rc.d details in order to start
> apache at boot time, make sure that the config.layout matches your
> current executable location for httpd before running configure on
> apache.

> Regards,
> Alex.

Sent via Deja.com http://www.deja.com/
Before you buy.
 
 
 

MySQL/PHP setup problems

Post by Brad Littlejoh » Sun, 31 Dec 1899 09:00:00



Quote:> My Solaris has already installed apache 1.3.3 but I cannot find the
> file "configure" under the apache directory. Then, do I need to
> download the "apache_1.3.x.tar.gz" from apache.org, unzip it and just
> make use of its "configure" ? Thanks a lot.

        Actually, you will need to copile apache 1.3.6 or greater, from
scratch. Apache 1.3.3 did not use configure/autoconf at the time, I
believe, to compile the daemon. It's been a while since I looked at
1.3.3, but I don't remember using configure in it, to get it compiled.
Best bet, is to grab apache 1.3.9 or apache 1.3.6, and use that instead.

                                                        BL.
--


Web + NewsMaster, BOFH.. Smeghead! :)   | http://www.omnilinx.net/~tyketto
  PGP: 1024D/E319F0BF 6980 AAD6 7329 E9E6 D569  F620 C819 199A E319 F0BF

 
 
 

MySQL/PHP setup problems

Post by Raymon » Sun, 31 Dec 1899 09:00:00





> > My Solaris has already installed apache 1.3.3 but I cannot find the
> > file "configure" under the apache directory. Then, do I need to
> > download the "apache_1.3.x.tar.gz" from apache.org, unzip it and
just
> > make use of its "configure" ? Thanks a lot.

>    Actually, you will need to copile apache 1.3.6 or greater,
from
> scratch. Apache 1.3.3 did not use configure/autoconf at the time, I
> believe, to compile the daemon. It's been a while since I looked at
> 1.3.3, but I don't remember using configure in it, to get it compiled.
> Best bet, is to grab apache 1.3.9 or apache 1.3.6, and use that

instead.

I have uninstalled apache 1.3.3 and reinstalled 1.3.9.
After I have successfully installed apache 1.3.9,
I follow the installation guide of PHP :

1) cd apache_1.3.x
2) ./configure
3) cd ../php-4.0.x
4) ./configure --with-mysql --with-apache=../apache_1.3.9 --enable-
track-vars
5) make
6) make install
7)  cd ../apache_1.3.x
8) ./configure --prefix=/www --activate-
module=src/modules/php4/libphp4.a
9) make

But when I run step (9), after it has self executed many command,
the following error message is shown at the end of step (9) :
========================================================================
ld: fatal: symbol `gdImageColorResolve' is multiply defined:
        (file modules/php4/libphp4.a(gd.o) and file /usr/lib/libgd.a
(gd.o));
ld: fatal: File processing errors. No output written to httpd
*** Error code 1
make: Fatal error: Command failed for target `target_static'
Current working directory /home/abc/apache1.3.9/src
*** Error code 1
make: Fatal error: Command failed for target `build-std'
Current working directory /home/abc/apache1.3.9
*** Error code 1
make: Fatal error: Command failed for target `build'
========================================================================

Do you know what happened and how to solve this problem ?
My php version is 4.0b3. Thank you very much for your help.

Raymond

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

MySQL/PHP setup problems

Post by _daCode » Sun, 31 Dec 1899 09:00:00


G'day Jason,

Here's what I've just done to Install Apache->Php3->mySQL on
Red Hat 6.0 (kernel 2.2.2-15 and kernel 2.2.2-22) as an Apache module

Apache:
==========
 -  Installed "out of the box". no need to recompile

mySQL:
==========
 - get the mySQL BINARY tar package (mysql-3.22.27.tar.gz)
 - remove previous mySQL rpm's (server and client)
 - copy the tar file to /usr/local/
 - cd to /usr/local/
 - unpack the tar  (# tar -zxvf mysql-3.22.27.tar.gz)
 - make a link to mysql-3.22.27 (# ln S mysql-3.22.27 mysql)
    [please check syntax]
 - setup mySQL startup and passwords as per included instructions
      (can do this step later - all we need for now is mysql.h
and friends)

PHP3:
==========
 - get php3 SOURCE tar file (php-3.0.11.tar.gz)  
 - copy the tar file to /tmp/
 - unpack the tar (# tar -zxvf php-3.0.11.tar.gz)
 - cd into the php dir (# cd php-3.0.11)

 - configure the php source (I copy and paste the following)
./configure \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/etc/httpd \
--with-mysql=/usr/local/mysql \
--enable-safe-mode \
 -enable-track-vars

 - make (# make )
 - stop Apache (# /etc/rc.d/init.d/httpd stop)  [OK]
 - install php modules (# make install)
 - uncomment the php LoadModules and ActivateModules lines
 in /etc/httpd/conf/httpd.conf (or was it in  srm.conf ?)
 - uncomment the php mime types in /etc/httpd/conf/httpd.conf (or was
it in  srm.conf ?)
 - create a test file in the Apache document root
dir (home/httpd/html/test.php3) [<? phpinfo(); ?>]
 - restart Apache (# /etc/rc.d/init.d/httpd start) [OK]
 - test the installation
  ($ lynx http://localhost/test.php3  should have a
 section saying that mySQL is installed)

Well thats the easy part.The hard part is patching the bug(s)
(regular expressions in php-3.0.11), but thats another
story I'm going to need some help with later :)

Please note: I've put the above instructions down maily from
memory, as most of my notes are at work. Let me know if
you have trouble

Regards

John

On Wed, 19 Jan 2000 23:40:43 -0800, "Jason Ahmad"


>Hi,

>I'm setting up a linux webserver and am having some issues with MySQL and
>PHP3. The machine is running Redhat 6.1 with the stock installs of apache
>and php3. These two work fine together and were pretty painless to setup. So
>I grabbed the latest MySQL (3.22) rpm and installed that. The server and
>client both work great. Now the only catch is making it all work together.
>It appears that PHP doesn't have the MySQL extension installed, although
>php3.ini has a section with MySQL settings (it came that way - along with
>settings for mSQL and postgres and a few others i think). Anyway, if anyone
>could drop me a line about how to make this all work together, that'd be
>great.

>Thanks,
>Jason

>PS: I was going to just tag a line onto the end of the dynamic extensions
>section of php3.ini, but then i realized that I don't have any mysql.so
>anywhere on my system. problematic.

--
John Wildenauer
Mossman, FNQ, Australia
Real email address: jwilde _at_ fastinternet _._ net _._ au

"Don't worry until worry worries you"
The wise owl

 
 
 

1. PHP/MySQL "mysql.sock" not found ???

Hi all,
I've installed two machines (both RedHat) with Apache/PHP and MySQL
database.
The first machine run fine, no problem at all. The second machine,
when I try to execute a PHP script that connect to the MySQL database
display an error that can't connect to the database using
the Socket "/tmp/mysql.sock".

I checked the MySQL installation, and found the mysql.sock into
/var/bin/mysql.

I create a simlink from /tmp to /var/bin/mysql, and the things are
working now... only wonder WHERE the location of the mysql.sock
file are stated... I couldn't found it in any configuration file,
sure it isn't in the apache configuration, nor into the PHP
configuration (there is a PHP configuration ?).

Someone can light a match here ?

Davide

2. sigaction () problem

3. weird php error when using php-mysql-4.2.3 from ports

4. Solaris sprintf :(

5. PHP + MySQL - apparently installed OK - but no MySQL support!

6. loosing files in news

7. PHP+MySQL vs. PHP+PostgreSQL

8. How to build a font server

9. PhP MySQL and Apache Setup under SuSe

10. linux/apache/php/mysql setup

11. PHP + MySQL problem

12. Problem installing PHP + MySQL

13. Apache/PHP/MySQL Problem