How2 Install PhP & Apache ToWork With MySql Win7
Posted: Mon Nov 15, 2010 11:28 pm
im not happy to say it took me 3 days to get this right. as always there is a ton of info on the net and it all uses old files. i tried a bunch of the how2 out there and after mulit trial and error i got it working. this is ONLY My Notes, as of 11/15/2010 These notes will point you to the needed files to get all this working on a windows7 system.
use My notes with the guide
http://www.webdevelopersnotes.com/how-d ... dows-7.php
My Notes
Apache
•Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.17-win32-x86-no_ssl.msi
Installed to c:/apache
TEST goto localhost in brower get "IT WORKS" Page
DONE!
PHP
Which version do I choose?
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP.
ok what one?
VC6 x86 Non Thread Safe (2010-Jul-21 20:11:31)
VC6 x86 Thread Safe (2010-Jul-21 20:06:17)
more info
What’s the difference between thread-safe and non-thread-safe?
The non-thread-safe version of PHP should be used when there is a single request per instance of PHP--like, when you use FastCGI—a single PHP-CGI.EXE handles a single request at a time, and the Web Server spins off multiple instances of PHP-CGI.EXE to handle requests in parallel. Because each instance is in a separate process, there is no need to have all the thread-safety code in PHP.
The thread-safe version is required when you use PHP as a module—as you would in Apache on Windows—and the WebServer handles multiple requests in the same process.
ok so downloading
VC6 x86 Thread Safe (2010-Jul-21 20:06:17) zip, not installer
make folder c:/PHP unzip files to c:/php
copy/past or rename php.ini-production to php.ini dubble check its not saved as txt file
Configure Apache to work with php edit httpd.conf in c:/apache
add
to loadmodule
LoadModule php5_module "c:/PHP/php5apache2_2.dll"
to addtype
AddType application/x-httpd-php .php
Note: You can also use other file extensions for PHP like .php3 or .php4 - simply add them at the end of the above line separated by a blank space.
add to end of file
PHPIniDir "C:/PHP"
make new folder for webpage link it to apache
c:/websites
back in httpd edit
DocumentRoot "C:/Apache/htdocs"
to
DocumentRoot "C:/websites"
change
<Directory "C:/Apache/htdocs">
to
<Directory "C:/websites">
close save
TEST PHP INSTALL
open notepad add line
<?php phpinfo(); ?>
save as phpinfo.php (duble check not txt file) save in your websight folder
open brower goto
http://localhost/phpinfo.php should see a new page with all PHP Info
TEST WORKED
Install MYSQL, im guessing you already have mysql installed because of l2j server so skip this. (But if your not 100% shur about your sql look at this)
Configuring php to work with mysql install
We now have to modify this file (php.ini) so that all the three - Apache, PHP and MySQL - work together.
goto c:/php/php.ini edit file
find
extension_dir = "./"
change to
extension_dir = C:\PHP\ext
remove # befor
extension=php_mysql.dll
extension=php_mysqli.dll
hope this helps someone. i know these forums are not support forums for this but i see this get asked alot and maybe this will help. if u cant get this to work try it again. find your error. use google serch your error your missing a dll or have something in wrong place. dont ask here.
THIS IS ONLY TO HELP AND STOP QUESTIONS ABOUT THIS DONT EXPECT SUPPORT ON THIS MATTER HERE!
All i can do is put your question in google so do it yourself.
use My notes with the guide
http://www.webdevelopersnotes.com/how-d ... dows-7.php
My Notes
Apache
•Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.17-win32-x86-no_ssl.msi
Installed to c:/apache
TEST goto localhost in brower get "IT WORKS" Page
DONE!
PHP
Which version do I choose?
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP.
ok what one?
VC6 x86 Non Thread Safe (2010-Jul-21 20:11:31)
VC6 x86 Thread Safe (2010-Jul-21 20:06:17)
more info
What’s the difference between thread-safe and non-thread-safe?
The non-thread-safe version of PHP should be used when there is a single request per instance of PHP--like, when you use FastCGI—a single PHP-CGI.EXE handles a single request at a time, and the Web Server spins off multiple instances of PHP-CGI.EXE to handle requests in parallel. Because each instance is in a separate process, there is no need to have all the thread-safety code in PHP.
The thread-safe version is required when you use PHP as a module—as you would in Apache on Windows—and the WebServer handles multiple requests in the same process.
ok so downloading
VC6 x86 Thread Safe (2010-Jul-21 20:06:17) zip, not installer
make folder c:/PHP unzip files to c:/php
copy/past or rename php.ini-production to php.ini dubble check its not saved as txt file
Configure Apache to work with php edit httpd.conf in c:/apache
add
to loadmodule
LoadModule php5_module "c:/PHP/php5apache2_2.dll"
to addtype
AddType application/x-httpd-php .php
Note: You can also use other file extensions for PHP like .php3 or .php4 - simply add them at the end of the above line separated by a blank space.
add to end of file
PHPIniDir "C:/PHP"
make new folder for webpage link it to apache
c:/websites
back in httpd edit
DocumentRoot "C:/Apache/htdocs"
to
DocumentRoot "C:/websites"
change
<Directory "C:/Apache/htdocs">
to
<Directory "C:/websites">
close save
TEST PHP INSTALL
open notepad add line
<?php phpinfo(); ?>
save as phpinfo.php (duble check not txt file) save in your websight folder
open brower goto
http://localhost/phpinfo.php should see a new page with all PHP Info
TEST WORKED
Install MYSQL, im guessing you already have mysql installed because of l2j server so skip this. (But if your not 100% shur about your sql look at this)
Configuring php to work with mysql install
We now have to modify this file (php.ini) so that all the three - Apache, PHP and MySQL - work together.
goto c:/php/php.ini edit file
find
extension_dir = "./"
change to
extension_dir = C:\PHP\ext
remove # befor
extension=php_mysql.dll
extension=php_mysqli.dll
hope this helps someone. i know these forums are not support forums for this but i see this get asked alot and maybe this will help. if u cant get this to work try it again. find your error. use google serch your error your missing a dll or have something in wrong place. dont ask here.
THIS IS ONLY TO HELP AND STOP QUESTIONS ABOUT THIS DONT EXPECT SUPPORT ON THIS MATTER HERE!
All i can do is put your question in google so do it yourself.