logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: php mysql new set up
Author
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Tue 10 Apr '07 6:10    Post subject: php mysql new set up Reply with quote

I am setting up mysql in the php.ini and would like to no what socket number
I should us and other imfo I mite need to us mysql with php5 do I need a php
database to us web template with its own database I am trying to install phpBB2and have created forum database and keep coming up php the database typ.you not avalibell and am trying to get my sql working right Mr. Green Mr. Green
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 10 Apr '07 9:52    Post subject: Reply with quote

Leave it blank in php.ini

e.g.
Code:

[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 120
mysql.trace_mode = Off


There you can only set a default. But you should set the connection settings in your PHP scripts.
Take a look into php.ini-recommended in your PHP folder.
Back to top
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Tue 10 Apr '07 11:35    Post subject: Reply with quote

have don all that is there some way to test the php extentions=mysql.dll
to see if it is working Question Cool
php has past the test and the php info its all working good
mysql server works can connect to all my databaes with Heidisql
and mysql query browser but still cant get phpBB2 to connect to its data base
get this mess.
The PHP configuration on your server doesn't support the database type that you chosen
database chose was mysql 4.x/5.x Embarassed
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 10 Apr '07 13:57    Post subject: Reply with quote

There is a test file for that Wink
http://www.apachelounge.com/download/mysqlinfo.zip

Did you set PHPIniDir in httpd.conf?

What is heidisql?? Never seen!
Back to top
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Tue 10 Apr '07 23:13    Post subject: Reply with quote

yes I put PHPIniDir "C:/Windows" into http.config php I am using php.ini-dist it seem,s to work grate run phpinfo get the display page but there is no display for my sql all php pages work grate
I have the sqlinfo zip but could not figure out how to use it
as I am a newbe!!! Laughing

Heidisql is a grate sql database admin browser for you mysql
its fast and simple to use try it you like it and best of all its free Mr. Green

http://www.heidisql.com/screenshots.php#s1

http://www.heidisql.com/download.php
Mr. Green

should I be using php safe mode and if so where mite I fined info to do the setup Question for newbe,s!!! Laughing
Back to top
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Wed 11 Apr '07 8:26    Post subject: Reply with quote

do I have to load module libmysql.dll into the apache load module httpd.config for the MySQL to work Question
or is that dun by the php module when MySQL extension is activated

I also added


[SQL]
sql.safe_mode = on

[ODBC]
;odbc.default_db = MySQL
;odbc.default_user = root
;odbc.default_pw = *********
; Allow or prevent persistent links.
odbc.allow_persistent = On

; Check that a connection is still valid before reuse.
odbc.check_persistent = On

if you see mistake please point them out
Wink
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 11 Apr '07 10:06    Post subject: Reply with quote

Copy libmysql.dll from mysql\bin to apache\bin folder

in php.ini you don't have to change SQL nor ODBC.

Make sure that you have set the right path in php.ini

e.g.
extension_dir = C:/server2/php/ext/

change

;extension=php_mysql.dll

to

extension=php_mysql.dll
Back to top
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Thu 12 Apr '07 2:35    Post subject: Reply with quote

I have gone over all of my php MySQL setup and cofig and still non of the templates phpbb or word press can fined the MySQL sever 5.0 I Have cofig
both templates with host usre name db name password and still thay cant fined the server nor the database server is working as I have been righting
databases and can log into them all what mite problem be get no error messages to work from I am lost!!!! Embarassed Embarassed
as every thing looks right
Back to top
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Fri 13 Apr '07 5:28    Post subject: Reply with quote

I used phpmyAdmin install from htdocs phpmyadmin test and the mysql extension,s is not working and did not take I used your directions and pips instructions for the set up
using papach2.2.4 php 5.2 and mysql 5.0.27
php.ini-dist in windows dir set env. ver. PHPRC C:\windows\
extension=php_mysql.dll
what mite I try next Mr. Green
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 13 Apr '07 9:48    Post subject: Reply with quote

Shocked php.ini-dist in C:\Windows *g* you have to rename it to php.ini making that working!
Back to top
Bruce



Joined: 28 Nov 2006
Posts: 77
Location: Mars

PostPosted: Fri 13 Apr '07 12:21    Post subject: Reply with quote

O I forgot to put that in my post it was don that way at the start saved as
php.ini I think that I will try out the php.ini_recommended the dist dos not work I have tried every thing still the extension mysql dont work

witch I do not understand the rest of the php works so good not even one error to be found
could it be the php_mysql.dll it self dos not work should I try changing


Mr. Green Mr. Green Mr. Green I just finished putting php.ini_recommended into C:\windows\
as php.ini and changed the extension_dir= "C:/PHP/ext/"
(and put slash at the end of the path) !!!!!!!!!!! Very Happy
now MySQL is shoeing up in my php info test

Very Happy Laughing Cool Laughing Mr. Green Mr. Green Mr. Green Very Happy

did you get a chance to check out heidisql what did you think of it
Back to top
skindu26



Joined: 29 May 2007
Posts: 2

PostPosted: Tue 29 May '07 7:31    Post subject: working solution, tested solution and the best solution Reply with quote

FOR THOSE WHO TRIED INSTALLING APACHE,PHP AND MYSQL BEFORE AND FAILED TO CONNECT

1) Search My Computer for php.ini..If found delete all the instances.
2) Search My Computer for libmysql.dll..If found delete all the instances.
3) Delete Previous Installations directories of Apache, PHP and MySQL. Go to Step 5
4) If you have installed PHPDEV and want to try this Standalone installations Go To
Start->
Run->
type regedit->
Go To the Following Key: HKLM/CurrentControlSet/Services/dev4_* or dev5_*----* represents the version number of phpdev
Delete the Key.
Delete phpdev installation Directory and Startmenu Directory.
Do the Steps 1,2 and 3 above.
5) Restart the Computer.


FOR FRESH INSTALLATION AND THOSE WHO HAVE ADOPTED THE STEPS ABOVE.
1) Install Apache - www.apache.org - VERSION 2.2.4--(recomend version 2+)

2) Choose Custom installation and install it into directory C:\Apache

3) Install Mysql - www.mysql.com - VERSION 5.0.41 -(recomend version 5+)

4) Choose Custom installation and install it into directory C:\MySQL

5) Download PHP5(Not Windows Installer but only Zip binaries-VERSION 5.2.2)

6) Unzip into C:/php - www.php.net - (recomend version 5+)

7) Configure Apache>Edit http.config from Directory C:\Apache\Conf\ and do the following:

For Apache version 2.2.4 Add To the http.config file

1) Find 'DirectoryIndex index.html' in dir_module and change it to:
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>

2) Insert the following lines inside <IfModule mime_module> below AddType application/x-gzip .gz .tgz
# Load php module
LoadModule php5_module c:/php/php5apache2_2.dll (!!!!Front Slashes please)
AddType application/x-httpd-php .php




Cool Config php

1) Copy the 'php5ts.dll' from "C:\php\" to the bin dir in the Apache main dir
(C:\Apache\bin)

2) Copy the 'php.ini-dist' from "C:\php\" to "C:\Windows" and rename it as 'php.ini' (Don't Move)

3) Open C:\Windows\php.ini

Set extension_dir:
extension_dir = "C:/php/ext/" (!!!!Front Slashes please)
Find and remove the ';'
;extension=php_mysql.dll

4) Copy the 'libmysql.dll' file from "C:\php\" to C:\Windows



*** NO NEED FOR ANY OTHER SETTINGS AND NO NEED FOR ANY PHP.INI IN PHP INSTALLATION PATH..
*** NO NEED FOR ANY CHANGES IN THE PHP DIRECTORY APART FROM THE ONE'S EXPLAINED ABOVE ..
*** DON'T TEST UNTIL THE COMPLETION OF ALL THE CHANGES ABOVE

RESTART THE COMPUTER SEE IT WORKS.....BEST OF LUCK....

FOR TESTING PURPOSE NOW...
1) Ensure Apache Server is running...
2) Open a Notepad and Type:
<?
phpinfo();
?>
3) Save it as info.php at "C:\Apache\htdocs\"
4) Open your browser and type http://localhost/info.php
5) PHP information pages will be displayed in the browser and you have successfully integrated everything.
6) If the page displays blank, then flush the browser cache
7) Open C:\Windows\php.ini for editing
Cool Find the setting short_open_tag and Change its value to On if Off.
9) If it still displays blank page
10) Open a Notepad and Type:
<?php
phpinfo();
?>
11) Save it as info1.php at "C:\Apache\htdocs\"
12) Open your browser and type http://localhost/info1.php
13) PHP information pages will be displayed in the browser and you have successfully integrated everything.


AND LAST BUT NOT THE LEAST..I WISH TO INFORM YOU ALL THAT I AM A NEWBIE THAT TRIED THE INTEGRATION OF APACHE,PHP AND MYSQL FOR DEVELOPING A FORUM...THESE PIECES OF INFORMATION IS COLLECTED FROM VARIOUS SUPPORT WEBSITES AFTER STRUGGLING FOR MORE THAN 16 HOURS OF CONTINOUS SITTING IN FRONT OF MY PC TO FIND A WAY OUT FOR CONFIGURING INSTEAD OF USING EITHER APPSERVER OR PHPDEV.. I TRIED ATLEAST 25 TIMES INSTALLING AND UNINSTALLING ALL THESE APPLICATIONS.. WHEN I GOOGLED "THE PHP CONFIGURATION DOES NOT SUPPORT THE DATABASE YOU CHOSE" AFTER INSTALLATIONS, I FOUND 100's of SUPPORT FORUMS HAVE BEEN ADDRESSED FOR A SOLUTION TO THIS..
SO I THOUGHT IT FIT TO SHARE MY SUCCESSFUL CONFIGURATION WITH WHICH I WAS ABLE TO INSTALL PHPBB 2.0.22 DATABASE IN THE ABOVE APACHE, MYSQL AND PHP SERVERS.
Back to top


Reply to topic   Topic: php mysql new set up View previous topic :: View next topic
Post new topic   Forum Index -> Other Software