wamp

Why mail() PHP function does not work with WAMP default installation?

青春壹個敷衍的年華 提交于 2019-12-17 16:53:58
问题 I have a default installation of WAMP Server 2.0. I'm trying to send email using this simple script: <?php if (mail('my_email@gmail.com', 'My Title', 'Some Text')) { echo "OK"; } else { echo "Why ??"; } ?> Unfortunately, I get the following warning: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\My_Path\send_email.php on line 3 Why ?? What could be the reason for that ? I

file_exists() returns false, but the file DOES exist

﹥>﹥吖頭↗ 提交于 2019-12-17 15:54:16
问题 I'm having a very weird issue with file_exists(). I'm using this function to check if 2 different files in the same folders do exist. I've double-checked, they BOTH do exist. echo $relative . $url['path'] . '/' . $path['filename'] . '.jpg'; Result: ../../images/example/001-001.jpg echo $relative . $url['path'] . '/' . $path['filename'] . '.' . $path['extension']; Result: ../../images/example/001-001.PNG Now let's use file_exists() on these: var_dump(file_exists($relative . $url['path'] . '/'

file_exists() returns false, but the file DOES exist

ε祈祈猫儿з 提交于 2019-12-17 15:53:54
问题 I'm having a very weird issue with file_exists(). I'm using this function to check if 2 different files in the same folders do exist. I've double-checked, they BOTH do exist. echo $relative . $url['path'] . '/' . $path['filename'] . '.jpg'; Result: ../../images/example/001-001.jpg echo $relative . $url['path'] . '/' . $path['filename'] . '.' . $path['extension']; Result: ../../images/example/001-001.PNG Now let's use file_exists() on these: var_dump(file_exists($relative . $url['path'] . '/'

How to enable SSL in Wamp Server?

血红的双手。 提交于 2019-12-17 15:32:41
问题 I have tried searching for it online, but I got confused. I didn't get any clarity. 回答1: STEP BY STEP tutorial Copied from the link: Enabling SSL on WAMP This step by step guide explains how you can enble SSL on WAMP. Download WampServer 2.0 from here and install it to the default location (c:\wamp). Now, we need to have a private/public key pair as well as a CA to sign our public key. First, lets see how we can create a private/public key pair. keytool -genkey -alias rpcert -keyalg RSA

http://localhost/ not working on Windows 7. What's the problem?

[亡魂溺海] 提交于 2019-12-17 10:47:13
问题 I have a big problem opening http://localhost/ on Windows 7 (beta). I installed this os and everything went great; when I installed Wamp I saw that localhost is not working at all. I just see this error: Failed to Connect Firefox can't establish a connection to the server at localhost. in Mozilla and Explorer. I removed Wamp and after some weeks (that means two weeks from today) I installed NetBeans on Windows 7. I created a test PHP script and when I debug it, I get the same error again. I

How to set the env variable for PHP?

妖精的绣舞 提交于 2019-12-17 05:03:41
问题 I am using WAMP. I want to use php from the command prompt. What is the entry in PATH env variable for this ? 回答1: You need to put the directory that has php.exe in you WAMP installation into your PATH . It is usually something like C:\wamp\xampp\php 回答2: You need to add the PHP directory to your path. On the command line (e.g. in a batch file), it would look like this: SET PATH=%PATH%;C:\your\wamp\path\php if in doubt, it's the directory containing the php.exe . You can also pre-set the path

WAMP 403 Forbidden message on Windows 7

我的梦境 提交于 2019-12-17 04:46:48
问题 I have installed WAMP version 2.1 on my windows 7 machine. When i browse to localhost in my browser, the WAMP server page is visible. But when I browse to my IP in my browser, I get the message 403 Forbidden: You don't have permission to access / on this server. Any suggestions? 回答1: The access to your Apache server is forbidden from addresses other than 127.0.0.1 in httpd.conf (Apache's config file) : <Directory "c:/wamp/www/"> Options Indexes FollowSymLinks AllowOverride all Order Deny

How to change port number for apache in WAMP

烂漫一生 提交于 2019-12-17 04:15:15
问题 I am new to WAMP server and installed it on my system but after installing it when I check it by going to localhost url like this http://localhost/ in the browser it is not working. I am getting a 404 error and blank page . This is because my 80 port which default in Wamp server is being used by IIS server. So please let me know how to change port number in Wamp server and solved this problem. 回答1: Click on the WAMP server icon and from the menu under Config Files select httpd.conf . A long

WAMPServer, access server from mobile phone

会有一股神秘感。 提交于 2019-12-17 02:25:26
问题 So I set up a few virtual hosts with unique urls and they work just fine on the desktop. However, when I connect a mobile device on the network, it can't seem to access anything properly but the default localhost virtualhost and that's only when it's the only virtualhost I have up. My setup and coding is pretty much this except with a different site title wamp server 3.0 virtual host on another device and while that solution redirects me to my unique url, it has a lack of images on a default

How To Run PHP From Windows Command Line in WAMPServer

自古美人都是妖i 提交于 2019-12-16 19:46:08
问题 I'm new to php and wanted to run php from command line. I have installed WAMP and set the "System Variables" to my php folder ( which is C:\wamp\bin\php\php5.4.3 ). When i go to Run -> CMD -> Type php -a and hit enter, it says interactive mode enabled . But when I write echo 'Hi'; it shows nothing. I even don't see anything like 'php >" when i type php -a and hit enter. 回答1: The PHP CLI as its called ( php for the Command Line Interface ) is called php.exe It lives in c:\wamp\bin\php\php5.x.y