Question
I am running WAMP on Windows 7 and my WAMP directory is at C:\wamp. I specify 'C:\wamp\www' to be my document root in Apache's httpd.conf. I create a symbolic link, C:\wamp\www\myWebSite, to point to a directory, D:\myWebSite, where my website content is located. I got the following error in the browser when trying to access any of my web pages under D:\myWebSite:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:/wamp/www/index.php' (include_path='.;C:\php5\pear') in Unknown on line 0
I've looked at the logs but there's nothing helpful. Can anyone help?
Answer
This error occurs because the latest WAMP uses PHP 5.3 which does NOT support directory junction (soft link) or hard links in Windows (refer to How To Create A Soft Link In Windows for a tutorial on creating a soft or hard link in Windows). Questions? Given this situation you have at least the following two solutions:
Solution #1: Use an older version of PHP like 5.2I tried version 5.2.11 and soft links work fine. This means rolling back PHP module to 5.2. You may have to edit the path of the following line in httpd.conf:
LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll"
And you may have to do download other related modules as well. Of course you can try to find an older WAMP that uses PHP 5.2. In my opinion this is not a good solution as you need to pull many changes once you install WAMP, which goes against the purpose of using WAMP.
Solution #2: Use correct DocumentRootIn your Apache's httpd.conf change DocumentRoot to the actual website folder which in this case is D:\myWebSite, and change other related settings accordingly. Delete the soft link C:\wamp\www\myWebSite. This should be a much better solution as your website content can be located anywhere in your file system.
Any questions let me know!
Tampilkan postingan dengan label WAMP. Tampilkan semua postingan
Tampilkan postingan dengan label WAMP. Tampilkan semua postingan
Senin, 07 Februari 2011
Rabu, 18 Agustus 2010
How To Install And Configure WAMP
Download WampServer2.0i.exe at http://www.wampserver.com/en/download.php and run it. At the time of writing WampServer2.0i.exe is the latest version but if not, you can download the then-latest version. However you may encounter issues with compatibility and stuff, in which case let me know and I'll try to resolve them for you.
Once you install and run it you should see its icon in the lower right corner. Left click on it and you should see the following pop up:
Verify that your Apache, Mysql are running by going to http://localhost/ and http://localhost/phpmyadmin/. If not, restart all services and try again. Questions?
Suppose your WAMP installation is under C:\wamp\. Add C:\wamp\bin\mysql\mysql5.1.36\bin in path so that you can do 'mysql -uroot' to connect to Mysql server in command line. There's NO root password in the default installation of Mysql.
Let's move on!
◀ HomeInstall and Configure Java ▶
How to Install WAMP, Java, Hibernate, and Eclipse
This is not an uncommon request for someone who wants to run a web server with an underlying database, backed by a server side programming language, assisted by several important one off or periodic tasks - me. Okay if it's just me then it might have been uncommon, but I have gone through a lot to finally have all these tools set up, so I'd like to share my experiences with you.
First of all I'd like to tell you why I am doing this. I'd like my web server (Apache) to serve dynamic content (PHP) driven by my database (MySQL) and dynamic content driven by one off or regular tasks (Java) with an easy way to manipulate my database content via Java objects (Hibernate), and I'd like to develop my Java code in a user friendly IDE (Eclipse). Last but not least I'd like to do ALL of these FREE, and they certainly are![]()
Let's get right down to it! Click on the next section.
Install and Configure WAMP ▶
First of all I'd like to tell you why I am doing this. I'd like my web server (Apache) to serve dynamic content (PHP) driven by my database (MySQL) and dynamic content driven by one off or regular tasks (Java) with an easy way to manipulate my database content via Java objects (Hibernate), and I'd like to develop my Java code in a user friendly IDE (Eclipse). Last but not least I'd like to do ALL of these FREE, and they certainly are
Let's get right down to it! Click on the next section.
Install and Configure WAMP ▶
Langganan:
Postingan (Atom)