Wednesday February 8, 2012 @ 01:25:39 GMT+10 ( Weather: n/a )
|
|
|
|
|
Powered byD's Bloggie
| Weblog Archive browse by category ... |
|
|
|
|
December - It's the time you will feel time travels in the speed of light - 10:24 pm
Also just realize a lot of poeple are born in December too
Personal , Security , Site Issue - DaRen
Lately I'm inactive on this site and a couple of things happened, eg site under attacked (believed it's a worm) around September, then server primary HDD crashed and they're unable to rebuild to the latest data because they didn't set up the RAID properly...I'm speechless when they "announce" this. What else could I say when you expect it's the basic routine but they're not even doing it right... then another attacked which injected codes in my scripts, thanks to that, it delivers *free porn* to visitors whenever they request a page on my site. This is so not creative...
If it's not a friend of mine bring this up to me, I would just leave this ongoing for a while since I'm going t  A couple of IP's and hostname are banned for the time being.
Oh well, Christmas is around the corner. I am planning to get myself a new PC for Christmas ^^ Would go for 2 x 22" LCD monitor setup since I've always wanted to play with multi monitors setup. Was thinking of Apple's Mac but then it's too pricy and the specs are so horrible. I can just get a PC that has equivalent performance as Mac, get a white-piano-feel case or paint it white, and it will still cost me less... .... ....
*it's getting late and I'm starting to type rubbish...*
Spam, Spam, Spam - 11:43 pm
I don't need free porn you idiots !
Site Issue - DaRen
After loosing my eye on this site for some time, I found my site (again, surprisingly) flooded with heaps of search query that contains porn links.  The bot just keep sending queries via the search function on my weblog...
I mean, I've spent a lot of time on writing codes to prevent and to block spam content on my site. For example having user to input image verification code, filtering offensive words & blacklisting domains name before user can post any shout, comments or even pm me. But there are always something spammers/bots can do to surprise you.
The IP 84.16.240.251 belongs to GERMANY and it's now banned. The IP is static and didn't change in a month -_-
Site affected during DNS propagation - 8:02 pm
Site Issue , Site Updates - DaRen
Just blog this to keeptrack the update history on my site.
Alright, my webhosting company has moved my site to another new server. During the DNS propagation period, some people are visiting the latest content on new server and some are seeing the old content on old server, that causes some of the shout messages and also my weblog entries are messed up in new and old server. Luckily I still got the chance to do a database dump on the old server and merge with the dump on new server. The rest of the files (eg photos) can be uploaded again from local computer. So now everything is restored and should be appeared correctly in order.
ps: It would really freaks me out if I can't perform database dump on the old server because I don't have any recent backup... So regular backup of your database is really a good habit... (nah, I'm a lazy person.. who cares anyway about database backup eh ?)
DNS Propagation - 7:17 pm
uh, my windows is caching the DNS records too!
Computing , Internet , Site Issue , Web Hosting - DaRen
Rawwwrrrrrrrr ~~~~~~~ !! This site is finally up and running again
beh tong nia... I can't believe my lame ISP really took 72hrs to update their cache for DNS records ! Last week, my webhosting company actually planned to do some RAM upgrades for the server. Then in the middle, I'm sort of confused, but I think they moved some of the accounts to another new server/datacenter in US. So new server means new IP address. That also means http://ahkuan.com is pointing to another new IP address. The changes is made effective pretty quick in the top registration database and the webhosting's DNS servers, however, the so called DNS propagation process is causing all the mess around.
Let's go in plain english... You see, every ISP cache the master DNS records and read them locally instead of looking them up on the Internet each time someone wants to view a website. Some ISP fetch a new copy once every 24 hrs. However, some ISP (like the one that I'm using) they fetch a new copy once every 72 hrs... or even longer ! So even though the domain name ahkuan.com is already mapped to a new IP address in the top level domain servers, but your ISP's DNS cache is still pointing to the old IP address ! So there will be chaos... some will be viewing the most updated content on the new server but some will still be visiting the old content on old server. Unless everybody is using pure IP address xxx.xxx.xxx.xxx instead of ahkuan.com, you'll probably have to wait up to 72hrs until your ISP refresh their DNS records cache.
It won't be surprised if you're still having problem to resolve to the correct address even after your ISP updated the cache. The problem might be your operating system is caching its own copy of DNS records. For windows user, go to command prompt, and type the following command:
This will flushes and resets the contents of the DNS client resolver cache. Try /displaydns to display the cache content.
Website is doomed for 3 days - 10:16 pm
omg... where did I save my recent database dump ?
Site Issue , Site Updates , Web Hosting - DaRen
Yikes... my site has been acting strangely or totally down since the evening of 2/10/2006 until this evening  At first I'm pretty nervous because I suddenly remembered that I haven't pay the bill and it's going to due... in 1 day time....
However, the sql is acting strange and keep throwing a "Too many connections" error on my face. If I didn't pay the bill, they should stop serving my site temporarily and shouldn't be this weird or stupid. After checking out with the admin, I just realized they're carrying out a server update. In fact, it's a huge update... .
The RAM has arrived at the datacentre and they have advised an upgrade window of approximately four (4) hours. The upgrade will only take a few minutes, but please allow the full window so as to allow time for any issues that may arise. We expect full services to be restored by approximately 14:30 AEST.
...
We are waiting for a response from the data centre about an upgrade due to a RAM issue on the Milkyway server, the server is currently running on a gigabyte of RAM thus using quite abit of swap causing the slow accessing times. The main services suffering are - ftp, email and sql. We appologise for the inconvinience.
So, during the update process in these few days, sometimes the site is totally down, sometimes it's up but the PHP script has sql connection problem. If I managed to get through, either everything is fine or I'll notice the site's content is old one. It's sort of a database rollback, just that the problem is it didn't rollback to the most recents one. It's like right now I'm seeing the most updated content on my site, 1 hr later I visit again it's rollback to the content that's few days back. Then I come back again, it's restored to the latest one... I can't issue a lockdown on my site because of this and also FTP is not working too...
Anyway, thank god the update has completed, and thank god again all the data is restored properly
Darren's Outpost is now 1 year old ! - 3:57 pm
Happy birthday !
Personal , Site Issue - DaRen
Opps... I just forget something...
Happy birthday (belated) !
Darren's Outpost is now 1 year old
Some quick history: I was playing around with some really simple dynamic page content thing using PHP back in April 2005. I would say that's just getting to know the language. Later on, I wrote a simple authentication/control system which became the fundamental building block for my personal website. That time it was around August 2005. One month later, a simple weblog system along with some simple interface is hosted on 100webspace.com. The first blog entry was posted on September 27, 2005. Since then, I have named my site as Darren's Outpost
As time goes by, I feel the need of my own domain name and a greater control/configuration of the server. So I registered ahkuan.com, and moved to a paid web hosting company MDWebhosting.com  Old site is officially closed on 29/04/2006
So now, we all know time flies. According to the statistic info in my about page, at this moment it shows:
Currently there are 152 blog entries found in 41 categories. So far, there are 97 comments exist in 26 blog entries. It will be the #143 shout message if you make a new shout right now.
 Snap shot of this website I've contributed heaps of time, dedicated lots of energies, caused trillions of my brain cells to commit suicide, drank lots of coffee Coke and listened played thousands of thousands of songs to build my site. It's small, but it's my playground, a place for me to hang out and also a place for me to challenge my skills.
The image beside is a snap shot of my website at this moment. Let this be marked down in a world that time does not stop, and you're welcomed to witness the 1st anniversary of my site.
Yip, yip, hurray !
ps: This entry is forced to halt publication due to a 3 days server update. This was originally drafted on 2006.10.02 and publish on 2006.10.05
Fixed several url rewrite problem in Apache - 9:18 pm
also including a "cheat sheet" for it ^^
Bug , Site Issue , Site Updates - DaRen
Fixed several url rewrite problem in Apache on server side. Apparently that's my mistake, I tried to do something like [0-9\w], which is invalid and will be interpreted as [0-9w]. However, it works perfectly for the new version of Apache on my local computer.
Below is a quick reference or a cheat sheet for Apache mod_rewrite from www.ilovejackdaniels.com :
 Apache mod_rewrite cheat sheet, credit goes to Dave Child.
Last edited: Sat 2006-09-30 @ 23:20 , by DaRen 1 time(s)
Site updates completed. Introducing D's Bloggie v3.1 ! - 8:55 pm
Also arming my site with rifles and bobby traps...
Personal , Security , Site Issue , Site Updates - DaRen
Test... Test... Testing 1 2 3...
Ladies and gentlemen, I 'officially' announce that the updates on my site has completed! This update took me almost 3 months to finish. That's pretty long time, since all the updates are on local and I don't focus on this everyday, so sometimes I tend to forget where I stop the last time. Anyway, this update is accompanied by the release of D's Bloggie v3.1 . Weblog is the main content on my site. So for most of the time, whenever there is a major site update, my D's Bloggie will be updated too, and vice versa.
This site update, like most of the major updates, which heavily involved in backend changes. For database part, I've created 5 new tables, added 21 new columns to existing tables and dropped 5 existing columns. This is not fun, I've to change lines of lines of codes. I've also revised most of the sql queries and remove any duplicate queries. On a full standard page it usually needs around 30 queries, after the tuning, it now requires only around 20 queries =) For search engine optimization (SEO) part, I added 'description' and 'keyword' to the HTML <META> tag. Depending on the page's content, different or custom descriptions and keywords will be used. I'm not sure why Google indexed my main page but not the rest of other pages. I even added new rewrite rules to rewrite all the URLs that points to weblog and shout entries. For example, ' /weblog/100/' will now be rewrote to ' /weblog/100.html'. So I hope this will help abit for Google... although Yahoo has already crawled almost all the pages on my site. That's weird eh ?
Weblog entries are now able to carry multiple tags/categories instead of just a single tag/category. Tag and category is an exchangable term on my site. I've expended from originally 9 categories to 41 categories in this update. The new categories can be arranged into hierarchy format, which means every category can be a parent category and allowed to have sub categories beneath it. The public is also able to perform a search on the weblog entries, by matching the entry's title, description and content. The default search mode will be 'exact search', and it's the only search mode available right now. Read my other entry Stucked with "homemade" search engine for own weblog for more info.
This site update also indicates the starting of the battle between my site and spammers. Now, this site is armed with site-wide banning (IP range, hostname). On top of that, suspicious private message/shouts/comments will not be added. You're free to view my blacklisted list. For security, CAPTCHA (aka verification code) is used on several new pages as well as extra tracking to strengthen site's security.
For tools section, I added a few new tools. Most of them are for administrative purpose. Only URL Extract is opened for public. For weather report, I added new weather reports that cover most of the cities/capitals in Australia.
The most noticeable layout changes will be the new logo design and the side navigation menu. The side navigation menu is moved to the right hand side. This is also a part of the SEO, data comes first  On this update, side navigation menu is break down into modules, every page can choose to load the required or preset module instead of displaying all. For example, the shoutbox will only be loaded on the main page's side navigation menu. It will never appear in other pages because it's not needed.
For D's Bloggie part...
What's new in D's Bloggie v3.1
- ! Multibyte-safe parser and related classes since the site's default encoding is changed to UTF-8 (from ISO-8859-1) -- 2006.06.10
- ! Changes on the BBCode parser's rendering/parsing part. Right now using 2 phase parse instead of single phase. 2 phase parsing is a more "clean" way to deal with certain tags like [code], [nobb] etc
- + New [table] tag. This tag is inspired by the Wiki Table using pipe syntax. See http://meta.wikimedia.org/wiki/Help:Table -- 2006.06.12
- + Check the wellformedness of the content -- 2006.06.12
- + Allow dumping the raw structure for specific entry -- 2006.06.12
- + [code] Tag: Rewrote major part for this tag. Syntax changed. New attributes 'lang' 'linenum' 'nojs' 'title'. Now individual code snippet/fragment has their own options to highlight, show line number and etc. All this is done by setting the attributes in the [code] tag instead of controlling via settings of individual blog entry.
- + [url] Tag: Added a new attribute 'external' 'local' 'clean'. Originally needed 4 regex matching (include [lurl] tag), now simplified down to 1 regex matching only
- + [img] Tag: Rewrote almost the whole part for this tag. Syntax changed. Now support flexible attributes such as image position(left,right,center), image size, additional caption, image thumbnail. Inspired from Wikipedia.
- - New [left], [right] tag for text alignment
- - New [bquote] tag for blockquoting
- - New [pre] tag for preformatted text
- - New [ nobb ] tag for disabling bbcode parsing on certain context
- - Dropped [lurl] tag. Use the 'local' attribute in [url] instead
- - Dropped a markup tag that uses regex "===(.+)?==="
- - Added new smiley icons, also dropped/renamed a few ones
- - In this new update, anchor links from an image can be achieved with [img=pic.jpg|link=somewhere.html]. In previous version, this can only be archieved with [link=somwhere.html][img][/img][/link]
- - % WEBLOG % now points to a new folder path to avoid confusion between the virtual rewrote url and actual path
- - Dropped the 'Highlight Coding' option in the create blog page as a result affected by the changes of [code] tag
For more info, checkout here.
Again, please report any bugs or weird CSS rendering. You can also contact me and let me know.
*Update 2006-09-30* Forget to mentioned duplicate sql thing.
Stucked with "homemade" search engine for own weblog - 11:40 pm
help me ! help me !
Site Issue , SQL - DaRen
It's weekend again, it's also time for me to make progress on updating my site. This time I've completed alot of things that's on my todo list, I would say this will be another major site update. However, it will be backend-wise, nothing much unless I do some cosmectic updates (which is also on my todo list @@)
Anyway, the biggest problem I encountered right now is building my own search engine that search through my weblog entries with ability to sort results by relevancy/date/topic/category. There are few easy ways to do this, one is using MySQL built-in "Full-Text Search" function, which also includes boolean full-text searches using IN BOOLEAN MODE modifier (eg using + - etc signs). Another way to do this is using a simple sql query with LIKE %string% clause.
Everything sounds so sweet and nice before I realize that my blog entries contains bbcode tags. The content of the weblog entries are rendered on-the-fly. So if you searched a keyword that's used for a bbcode tag, then the return result will not be accurate. MySQL also requires pre-indexing the data before you can use the full-text search, that means you'll need extra database storage for indexes and slower performance too.
So, I want to do a search on my rendered weblog entries instead of entries in raw format. That's possible, but that will probably be done with regex in gayness loops in PHP rather than MySQL (well, at least that's the way I can think of). If not then I'll have to stripped the bbcode tags and build my own indexing system. That's kinda redundant and I won't implement it with a complicated relevancy matching algo, so what's the point eh ?
I read some articles/guide/how-to but neither of them mentioned or have solution to the problem I mentioned. So I went to a few other people's weblog/forums to test this. The test results surprised me. Just try yourself in those "homemade" personal website/blogs and compare the ones that uses systems like phpbb/blogger.com. Use search query like "[b ]" or "<b>" and you'll know what I mean.
For now, I'll just see what I can come out with. If anybody has experience in this or knows great resources please let me know *scratching head... *
Some readings:
MySQL Full-Text Search Functions
Solano Systems - MySQL Relevancy Search
Last edited: Wed 2007-01-17 @ 19:56 , by DaRen 3 time(s)
Installing Apache 2.2.3, PHP 5.1.4 and MySQL 5.0.24 on WindowsXP (SP2) - 6:05 pm
since when it's so hard to setup a simple LAMP?
Guides , PHP , Site Issue , SQL , Web Hosting - DaRen
Last revised: 2007.01.17
I've enough headache last night trying to figure out how to make Apache 2.2.3 and PHP 5.1.4 to work together on Windows XP. After several hours of tweaking and changing the settings, I finally gave up and search for help on the web. It seems it's not my fault that they can't work in harmony. Most of the tutorial on the web is not detailed enough and the readme from Apache and PHP is gay. I'm no expert or guru on both of them, but I'll write down the steps required to get them working and hope that one day I can make somebody's life easier if they encountered the same problem as me =)
Installing Apache
- Go to Apache HTTP server project website to download the binary for windows. This guide uses Apache 2.2.3.
- Open the file and follow the prompt. When it ask for the Network Domain and Server Name, use "localhost" if you're setting up a local server on your computer for development purpose, otherwise fill in the address and name according to your server. In the Administrator’s Email Address field, use any email address (e.g. "admin@localhost").
- Continue clicking next and choose the setup type and path to install and complete the installation.
- If Windows (SP2) firewall prompt to ask about the program, just click "Unblock".
- At this point installation is completed, Apache HTTP server should be running as a service if everything is ok. Open your browser, type in http://localhost/ in the URL bar. You should see "It works !" on the page.
- To customize the httpd.conf file (located in /conf in Apache folder), open with any text editor. Look for DocumentRoot, change the path if you want. For example:
DocumentRoot "C:/Documents and Settings/user/My Documents/My Website/localhost/www"
The default path will be pointing to /htdocs in your Apache folder.
- If you changed the DocumentRoot mentioned above, remember to scroll down and look for a line that looks like
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/...">
Change the path in the <Directory> tag to the same you set for DocumentRoot in above. For example:
<Directory "C:/Documents and Settings/user/My Documents/My Website/localhost/www">
If you don't change it, you'll get Permission Denied when you browse http://localhost
- Change any other settings to suit your server or for scricter security. The above is sufficient for normal static html hosting. See below if you need a script parser like PHP for dynamic page output.
Enable mod_rewrite for URL rewrite
See Enable mod_rewrite in Windows in another entry in my weblog.
Installing PHP
- Go to PHP website to download the binary for windows. This guide uses PHP 5.1.4.
- Please take note that if you followed the below steps and it's still not working with Apache, continue to read down to the section Another way to make Apache and PHP work together.
- Unzip the contents to the path you desire (eg. C:\php\).
- Go to Control Panel -> System -> Advanced tab -> Click on Environment Variables. In the System variables list, look for the variable name Path. Select it and click on Edit. Append
;C:\php
at the back of the variable value.
- Now go back to the PHP folder (eg. C:\php\), make a copy of the file php.ini-recommended and rename it to php.ini. Open the php.ini file with text editor. *Note* This guide uses php.ini-recommended file, you can use the php.ini-dist if you know what you're doing.
- If you changed the value of DocumentRoot in httpd.conf file mentioned above (Installing Apache, Step 6), you need to change the doc_root value to , for example:
doc_root = C:/Documents and Settings/user/My Documents/My Website/localhost/www
- Save the php.ini. Now open the Apache httpd.conf file, look for the "LoadModule" section. At the bottom of the LoadModule block, insert the following lines:
# For php5 module
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# Configure the path to php.ini
PHPIniDir "c:/php"
You can add another optional line if you know what you're doing:
AddType application/x-httpd-php .php-source .phps
*Updated 2007-01-17*
If you found a DLL file named php5apache2_2.dll in the PHP build you downloaded, change
LoadModule php5_module "c:/php/php5apache2.dll"
to
LoadModule php5_module "c:/php/php5apache2_2.dll"
- This step is optional. Scroll down a bit and look for something like
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Made changes to the DirectoryIndex and add index.php. The modified one should looks like
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
- Save the file and restart your computer (dont ask, just restart).
- Create a text file in your document root (eg. C:/Documents and Settings/user/My Documents/My Website/localhost/www), insert
<?php phpinfo(); ?>
into the file, save it and rename it to phpinfo.php.
- Start the Apache server as a service if it's not. Apache should be able to load the PHP module and start running. To check if everything is working, open your browser and type in http://localhost/phpinfo.php. You should get a page containing information on your installation of PHP and its settings. If you don’t, try restarting Apache. If Apache says it can't load the php5apache2.dll or it says that the module can't be found refer to Another way to make Apache and PHP work together section below
To manipulate the Apache web server via command line, open a command prompt in Windows, navigate to the folder /bin in your Apache folder and try the following commands.
Some useful command for Apache web server
| Command |
Description |
| httpd -k install |
Install Apache as a Windows service |
| httpd -k uninstall |
Remove Apache as a Windows service. If you didn't install Apache using windows installer and you want to uinstall it, it's better you call this command before you remove the folder manually. |
| httpd -k start |
Tell Apache to start |
| httpd -k restart |
Tell Apache to do a graceful restart |
| httpd -k stop |
Tell Apache to shutdown |
Installing MySQL
- Go to MySQL website to download the binary for windows. This guide uses MySQL 5.0.24.
- Extract the zip file and run the Setup file.
- You should choose the Custom installation, to allow you to select an installation path. Click Next to continue and install it.
- When you're asked register with MySQL, Skip it if you don't have time for it. Once the installation is complete, tick the option to launch the MySQL Configuration Wizard and finish it.
- On the configuration wizard, select the Standard Configuration option on the first screen and click Next.
- On next screen, leave the 2 checkbox in default, check the 2nd one (include Bin Directory in Windows Path) if you want to enter MySQL commands from the command prompt without first having to navigate to the MySQL \bin directory.
- On next screen, you can leave the password field blank for root user for you can assign a password for it. Depends on you but I strongly recommend you assign a password.
- Click Execute on the next screen to finish the installation. Restart your computer.
- After rebooting, to check if MySQL is running properly or not, open a command prompt and type the following command:
mysql -u root -p
You need to navigate to \bin in your MySQL folder if you didn't ask MySQL to setup the Path variable during installation. If you didn't setup the password for root user, just remove the -p in the above command.
If you get "Can't connect to MySQL server on 'localhost'" error message, that means MySQL server is not started yet. Go to Control Panel -> Administrative Tools -> Services and look for MySQL entry. Right click and select Start. Once it's started, you can make a connection to the server using the command stated above.
Alternatively, you can invoke MySQL by calling the following command:
mysqld-nt --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini" MySQL
- Once you're connected to server using the root user account, type the following command:
mysql> show schemas;
You should get the following results:
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.26 sec)
- Now you need to get PHP to talk to MySQL. Open the php.ini look for "Paths and Directories" section and find extension_dir, change it to:
extension_dir = "c:/php/ext"
- Scroll down and look for ;extension=php_mysql.dll. You need to uncomment it by removing the ';' (semi-colon). It should looks like
extension=php_mysql.dll
- This step is optional. Uncomment the ;extension=php_mbstring.dll if you need multibyte string functions (eg. to process unicode data)
- Save the file and start/restart Apache.
- *Hint* I strongly suggest that you should download the MySQL Administrator here and MySQL Query Browser here. MySQL Administrator has powerful functions that allows you to manage/browse/backup your MySQL server/database in GUI. MySQL Query Browser is a replacement for MySQL Control Centre. It's a GUI-based program that allows you to test/execute your SQL queries. Install the MySQL Query Browser first before you install the MySQL Administrator.
Isn't life's good when you do all the things just using your mouse ? =)
Voilà ~~~ ! There you go, everything should be working now. You shouldn't have any problem setup and run MySQL server. However, if everything goes that smooth, I wouldn't have to waste hours yesterday trying to figure out where it goes wrong. I can't get Apache to load PHP module, that's nasty and stupid problem.
Alright, If Apache says it can't load the php5apache2.dll or it says that the module can't be found then the below steps might save you... or not...
Another way to make Apache and PHP work together
- *Note* This section of guide assumes that you already install PHP. If not, please complete the steps in Installing PHP section before continue the steps below.
- *Updated 2007-01-17* On newer version of PHP (I tested with 5.2.0) you should able to find a DLL file name called php5apache2_2.dll. Now refering to Installing PHP - Step 7, change
LoadModule php5_module "c:/php/php5apache2.dll"
to:
LoadModule php5_module "c:/php/php5apache2_2.dll"
That should solved the problem and you can skip the steps below. If you're using older version of PHP build, please skip this step and follow the steps below.
- If you have Apache installed and you're stuck, uninstall it and remember to delete the folder manually for left overs (windows installer sometimes does not delete the config files, you need to clean it yourself). If you deploy Apache via a ZIP file instead of windows installer, you better do a httpd -k uinstall to uninstall the service then only you delete the folder manually.
- Download and install Visual C++ 2005 Redistributable Package from Microsoft. It can be downloaded at the link below:
Microsoft
- Download httpd-2.2.3-win32-x86-ssl.zip (binary by Steffen) from Apache Lounge or use the direct link below:
http://www.apachelounge.com/download/binaries/httpd-2.2.3-win32-x86-ssl.zip
*Note* This binary is build with VC 2005, that's why you need Visual C++ 2005 Redistributable Package.
- The Apache binary is in ZIP file, there is no windows installer for this build. Unzip and place it to your C:\Program Files\Apache 2.2.3\
- Repeat the steps in Installing Apache section to configure your Apache server.
- Download php5apache2.dll-php5.1.x.zip from Apache Lounge or use the direct link below:
http://www.apachelounge.com/download/mods/php5apache2.dll-php5.1.x.zip
- Unzip the file. Read the Readme First.txt.
- Copy & replace the php5apache2.dll to your php folder (eg. c:/php). Backup the original one if you feel to do so.
- Copy httpd.exe.manifest to /bin in your Apache folder.
- Open the httpd.conf file from /conf in your Apache folder. Look for ServerRoot and change the path to where you unzip the newly downloaded Apache binary. For example:
ServerRoot "C:/Program Files/Apache 2.2.3"
- Scroll down and look for
<IfModule alias_module>
...
...
...
ScriptAlias /cgi-bin/ ...
</IfModule>
Make sure the ScriptAlias is set to the correct path. For example:
ScriptAlias /cgi-bin/ "c:/Program Files/Apache 2.2.3/cgi-bin/"
- Scroll down and look for
# "c:\..." should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "c:\...">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Make sure the <Directory> tag has the correct path. For example:
<Directory "c:/Program Files/Apache 2.2.3/cgi-bin">
- Start your MySQL server and hit your Apache server. Your Apache should be able to load the php5apache2.dll now. For extra info, see also : http://www.apachelounge.com/forum/viewtopic.php?t=570
Hope this helps. By the way, I spent another 1/2 hr trying to locate another problem after I get the LAMP up (finally). The problem is that the raw source code of the PHP script is dumped out to my browser instead of excution output from the script. The cause of this problem is because one of the required php file starts with <? instead of <?php ... doh ! How strange, they worked in previous version of PHP5 I installed last time...
*EDIT 2006.08.30*
-- Hide the Visual C++ 2005 Redistributable Package actual link because the long url without spacing will not be wrapped by FireFox 1.5.0.6 during page rendering causing the page become "wide"
*EDIT 2006.09.19*
-- Added a how-to link to "Enable mod_rewrite in Windows"
*EDIT 2007.01.17*
-- Load php5apache2_2.dll instead of php5apache2.dll in newer version of PHP
|
|
|
|
|