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.
How2 Install PhP & Apache ToWork With MySql Win7
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- EvilHoe
- Posts: 45
- Joined: Sun Sep 26, 2010 9:06 am
How2 Install PhP & Apache ToWork With MySql Win7
Last edited by EvilHoe on Mon Nov 15, 2010 11:42 pm, edited 1 time in total.
The Children of Dawn
- EvilHoe
- Posts: 45
- Joined: Sun Sep 26, 2010 9:06 am
Re: How2 Install PhP & Apache ToWork With MySql Win7
someone's online offline script
i belive this also from these forums but no name on it and no time to serch again. post if its yours and ill change it.
i belive this also from these forums but no name on it and no time to serch again. post if its yours and ill change it.
Code: Select all
<html><head><meta http-equiv="Content-Type" content="text/html" charset="Windows-1251"><meta http-equiv="Content-Style-Type" content="text/css"><title>Status</title></head><body><?phpglobal $FORM;$FORM = "";$flogin = @fsockopen ("your.ip,port",2106, $errno, $errstr, 1);if ( $flogin )$FORM .= "Login Server - <img src=up.png><br>";else$FORM .= "Login Server - <img src=down.png><br>";$fgame = @fsockopen ("your.ip,port",7777, $errno, $errstr, 1);if ( $fgame )$FORM .= "Game Server - <img src=up.png><br>";else$FORM .= "Game Server - <img src=down.png><br>";echo $FORM;@fclose($flogin);@fclose($fgame);?></body></html>
Last edited by EvilHoe on Tue Nov 16, 2010 12:18 am, edited 1 time in total.
The Children of Dawn
- EvilHoe
- Posts: 45
- Joined: Sun Sep 26, 2010 9:06 am
Re: How2 Install PhP & Apache ToWork With MySql Win7
Zoey76 rankings found in these forums
Code: Select all
<?PHP $title = "by Zoey76"; // Page Title Here $server = "localhost"; // MySQL IP $user = "root"; //MySQL Username $password = ""; //MySQL Password $database = "l2jdb"; //MySQL Database $top="10";?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <? if (!empty($title)) { print("<title>$title</title>"); } else { print("<title>Top ".$top."</title>"); } ?> </head> <body> <? mysql_connect("$server", "$user", "$password") or die(mysql_error()); mysql_select_db("$database") or die(mysql_error()); //added LIMIT to the query to avoid loading the whole list of char $result = mysql_query("SELECT char_name, level FROM characters WHERE (level > 0) AND (accesslevel = 0) ORDER BY level DESC LIMIT $top") or die(mysql_error()); print "<center><h1>Top $top Level Players</h1><table><tr><th>Character</th><th>Level</th></tr>"; //improved iteration while($char = mysql_fetch_array( $result )) { echo "<tr><td>".$char['char_name']."</td><td align=center>".$char['level']."</td></tr>"; } //added end tab for table print "</table></center>"; //added close db conection mysql_close(); ?> </body></html>
Last edited by EvilHoe on Tue Nov 16, 2010 12:07 am, edited 1 time in total.
The Children of Dawn
- EvilHoe
- Posts: 45
- Joined: Sun Sep 26, 2010 9:06 am
Re: How2 Install PhP & Apache ToWork With MySql Win7
if you put the 2 files above in a txt file save as .php in your /websites dir Edit the Ip you will see the files work.
Now ill figer out how to post this info to the webpage and post that next. unless someone already has this info
i know its just more settings in the configs
Now ill figer out how to post this info to the webpage and post that next. unless someone already has this info
i know its just more settings in the configs
The Children of Dawn
- Zoey76
- L2j Inner Circle
- Posts: 7008
- Joined: Tue Aug 11, 2009 3:36 am
Re: How2 Install PhP & Apache ToWork With MySql Win7
lolEvilHoe wrote:someone's rankings found in these forums

If you need any help feel free to ask

Powered by Eclipse 4.34
| Eclipse Temurin 21
| MariaDB 11.3.2
| L2J Server 2.6.3.0 - High Five 
Join our Discord! 

- EvilHoe
- Posts: 45
- Joined: Sun Sep 26, 2010 9:06 am
Re: How2 Install PhP & Apache ToWork With MySql Win7
lol i changed that when i hit accept you posted to funnie sorry about that your fast hehe
o i look at the time and 7 min did pass between the post guess my page wasnt reloaded so didnt see tell after i fixed. anyway its right. had your name on the file hole time anyway (8^)
All this info was gotten with google serch. i had no idea what i was doing. now 3 days latter i know this very well due to mulit trys at setting up configs. trial and error is the key.
o i look at the time and 7 min did pass between the post guess my page wasnt reloaded so didnt see tell after i fixed. anyway its right. had your name on the file hole time anyway (8^)
All this info was gotten with google serch. i had no idea what i was doing. now 3 days latter i know this very well due to mulit trys at setting up configs. trial and error is the key.
The Children of Dawn