Hardware Secrets Forums


Go Back   Hardware Secrets Forums > Miscellaneous > Content Comments



Reply
 
Thread Tools Search this Thread Display Modes
Old 04-19-2007, 06:53 AM   #1
Hardware Secrets Team
Administrator
 
Join Date Nov 2004
Posts: 5,578
Hardware Secrets Team is on a distinguished road

Default How to Build a Web Server with PHP 5 and MySQL 5 Support

There has been a new article posted.

Title: How to Build a Web Server with PHP 5 and MySQL 5 Support
URL: http://www.hardwaresecrets.com/article/436

Here is a snippet:
"Building a PHP 5 web server with MySQL 5 support isnít as easy as it seems. We know this by heart: we spend literally a whole day last week trying to do this. The main problem is that PHP 5 doesnít co..."

Comments on this article are welcome.

Best regards,
Hardware Secrets Team
http://www.hardwaresecrets.com
Hardware Secrets Team is offline   Reply With Quote
new Sponsored Links

Old 04-29-2007, 11:27 AM   #2
supermonkeyman2004
Junior Member
 
Join Date Apr 2007
Posts: 1
supermonkeyman2004 is on a distinguished road

Default There is a better way!!

In these days of open-source projects, I find that, while interesting (if you're a geek), compiling your own software is so 'old fashioned'.

For a complete installation of Apache 2, MySQL 5, PHP 5, and a number of other bundled utilities such as a FTP server, Mail server, webalizer (a weblog analysis tool), try XAMPP - http:/www.xampp.org - it really is the best - a simple install - one msi or tar file, many supported operating systems - linux, solaris, windows etc, etc - you get ALL the above products installed and most importantly... all working together out-of-the-box - there is no easier path to paradise than XAMPP!

Personally, I don't work on the XAMPP project, I'm just a very, very satisfied user of XAMPP - it really has transformed getting a standard box to a full web/database/mail/ftp server - literally in a manner of minutes (about 2 mins MAX on a Win32 system).

The XAMPP guys are always on top of the latest releases of Apache, MySQL, PHP and many other modules.

-- D.
supermonkeyman2004 is offline   Reply With Quote
Old 04-30-2007, 07:43 AM   #3
Gabriel Torres
Administrator
 
Gabriel Torres's Avatar
 
Join Date Oct 2004
USA
Posts: 4,415
Gabriel Torres is on a distinguished road

Default

Thanks a lot for your input, it will definetely help out our readers!

Thanks,
Gabriel.
Gabriel Torres is offline   Reply With Quote
Old 06-18-2007, 09:20 AM   #4
Zeelot
Junior Member
 
Join Date Jun 2007
Posts: 3
Zeelot is on a distinguished road

Default Problem compiling php

Hi guys,

I followed the guide but when I get to installing php I get this when I run ./configure...

checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find MySQL header files under /usr/local/mysql/bin.

I installed mysql client and server and that is exactly where mysql_config is yet I still get that error...

any ideas?
I have mysql 5.0.41 and php 5.2.3


update:

got it, this is what I ran:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --prefix=/usr/local/apache2/php --with-config-file-path=/usr/local/apache2/php --with-zlib-dir=/usr/lib --with-gd --with-imap=/usr/local/imap-2004a --with-xml --enable-shmop --with-zlib --with-png --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --enable-exif --with-kerberos --with-imap-ssl --with-imagick

Last edited by Zeelot; 06-18-2007 at 09:35 AM.
Zeelot is offline   Reply With Quote
Old 06-18-2007, 03:29 PM   #5
Zeelot
Junior Member
 
Join Date Jun 2007
Posts: 3
Zeelot is on a distinguished road

Default ssl

./configure --prefix=/usr/local/apache2 --enable-deflate --enable--ssl --enable-suexec --with-suexec-caller=apache --with-suexec-docroot=/ --with-suexec-datadir=/www/ --enable-mods-shared=most

your --enable--ssl is wrong and won't work, should be --enable-ssl

./configure --prefix=/usr/local/apache2 --enable-deflate --enable-ssl --enable-suexec --with-suexec-caller=apache --with-suexec-docroot=/ --with-suexec-datadir=/www/ --enable-mods-shared=most

cheers.
Zeelot is offline   Reply With Quote
Old 06-19-2007, 03:52 AM   #6
Gabriel Torres
Administrator
 
Gabriel Torres's Avatar
 
Join Date Oct 2004
USA
Posts: 4,415
Gabriel Torres is on a distinguished road

Default

Hi,

Are you sure that you read our tutorial? Because the explanation for what is wrong is there at http://www.hardwaresecrets.com/article/436/4:

Quote:
The major trick here are the --with-mysql and --with-mysqli parameters. They must tell configure script the location of mysql_config file: it can be at /usr/local/bin/ or at /usr/local/mysql/bin, depending wether you installed only MySQL 5 client or both client and server, respectively. The major problem with PHP 5 configuration with MySQL 5 support resides on these two parameters. If they are misconfigured, you will get errors such as:

configure: error: Cannot find MySQL header files under /usr/bin/mysql.
Note that the MySQL client library is not bundled anymore.
You didn't run our recommended config line.

The problem seems to be with --with-mysql, which needs to point to mysql_config

So it should be:

--with-mysql=/usr/local/bin/mysql_config

AND NOT --with-mysql=/usr/local/mysql

Also, what is this:

Quote:
your --enable--ssl is wrong and won't work, should be --enable-ssl
?

We didn't post anything about SSL on our tutorial, so I don't know where you get that our configure line is wrong.

Cheers,
Gabriel
Gabriel Torres is offline   Reply With Quote
Old 06-19-2007, 06:09 AM   #7
Zeelot
Junior Member
 
Join Date Jun 2007
Posts: 3
Zeelot is on a distinguished road

Default

--with-mysql=/usr/local/bin/mysql_config just doesn't work for me not sure why...I seemed to follow the tutorial almost word for word except for the config options which I added some of my own needs.

On page 2, the apache setup page you have

Quote:
cd /root
wget http://www.apache.org/dist/httpd/httpd-2.0.59.tar.gz
tar -xvzf httpd-2.0.59.tar.gz
cd httpd-2.0.59
./configure --prefix=/usr/local/apache2 --enable-deflate --enable--ssl --enable-suexec --with-suexec-caller=apache --with-suexec-docroot=/ --with-suexec-datadir=/www/ --enable-mods-shared=most
make
make install
and if someone follows that just by copying and pasting their ssl will not be enabled because it is mistyped, even though you didn't explain anything about ssl which is fine, you have it in the configure script but incorrectly
Zeelot is offline   Reply With Quote
Old 06-21-2007, 06:40 AM   #8
Gabriel Torres
Administrator
 
Gabriel Torres's Avatar
 
Join Date Oct 2004
USA
Posts: 4,415
Gabriel Torres is on a distinguished road

Default

Hi,

You should point out where mysql_config is installed. This is a file. Go to /usr/local/bin and check if it is there. If you followed our instructions, this file should be installed under /usr/local/mysql/bin.

Sorry about overlooking the error, thanks for poiting it, I am fixing it right now.

Cheers,
Gabriel.
Gabriel Torres is offline   Reply With Quote
new Sponsored Links

Reply

Share This Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -8. The time now is 01:23 PM.


vBulletin Security provided by vBSecurity (Lite) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
vBulletin Optimisation provided by vB Optimise (Lite) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd. ()
© 2004-12, Hardware Secrets, LLC. All rights reserved.