PDA

View Full Version : php4, MySQL and Apache


TRN
07-25-2003, 08:58 PM
After avoiding this journey for several months, it seemed like a good idea to install postnuke onto my local machine so that I can spend more time tinkering with it. It didn't go very well.

First, the postnuke database would not install. The install.php script returned an error that said it could not connect to the database. I tested the creation of a database at the command line and was able to use :

mysqladmin -h localhost -u root create test

I was able to create the database within webmin too. However, I could not connect from the browser to the mysql database.

After pounding my head on the desk, I decided to install phpmyadmin. This was in the repositories so the installation was very easy. Click click. However, phpmyadmin would not start. The error message was:

cannot load MySQL extension,
please check PHP Configuration.

This really perplexed me. I read the documents for phpmyadmin, and modified the config.inc.php file for the host. However, it should have autodetected it.

Finally, I took the advice I've handed out freely to others - load phpinfo() and see what is happening. Sure enough, after loading the phpinfo(), I noticed that there was no information about mysql. I checked the php.ini file and absolutely NO extensions were available in the script. I added the line extension=mysql.so but this did not work.

Drats.

So, since I had downloaded php 4.3.0 several months ago, I am trying to compile it on this machine as I'm typing this message.

Hope this works ;)

TRN
07-25-2003, 09:08 PM
The end of make install provide this message:

Installing PHP SAPI module
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - installed: 0.9
[PEAR] Console_Getopt - installed: 1.0
[PEAR] PEAR - installed: 1.0b3
[PEAR] DB - installed: 1.3
[PEAR] HTTP - installed: 1.2
[PEAR] Mail - installed: 1.0.1
[PEAR] Net_SMTP - installed: 1.0
[PEAR] Net_Socket - installed: 1.0.1
[PEAR] XML_Parser - installed: 1.0
[PEAR] XML_RPC - installed: 1.0.4
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist

Running phpinfo still shows PHP Version 4.2.3.

Drats

TRN
07-25-2003, 09:50 PM
Now I've done it :/

I decided to remove the apache package and install apache 2. Oh brother. Now the localhost isn't rendering php pages at all.

:P

TRN
07-25-2003, 09:53 PM
Modified the httpd.conf file for apache to load the php module. This is getting boring !

TRN
07-25-2003, 09:54 PM
The good news is that my postnuke installation now works and so everything has worked out for the best :)

Hooray for happy endings !