501 error while on https and wamp server - https

I added SSL to my WAMP server on local host. Everything is working fine when I request for http url but when I ask https url it returns me 501 Not implemented error message for all external included files ie. images/js/css files.
Any remedies.
I am using WAMP Server 2.4 latest version from website. and did SSL settings as per the URL http://forum.wampserver.com/read.php?2,32986 ssl working but resources would load as mentioned above.

I found the issue and fixed it.
For those who stuck with same issue.
One more major issue with Wamp 2.4 is that Resources ie. .css, .js and image files don't load even after all configuration. To solve the issue kindly do the following:
download and install 1.0.1e openssl from http://slproweb.com/products/Win32OpenSSL.html
then find the files in the installed directory:
bin\openssl.cfg (replace with confg\openssl.cnf after renaming the .cfg file to .cnf)
bin\libeay32.dll
bin\ssleay32.dll
bin\openssl.exe
Stop the server and replace those files and enjoy!

Related

Mailgun: How can send email from my local machine (Laravel)

I have setup Mailgun on my Laravel project, the project will be deployed on a (Lan based) local server which hopefully connected to internet, email should be sent from the local machine where the project is being hosted, it works great on my dev server but when I try to send email from my local machine it returns below error.
cURL error 60: SSL cert issue when sending email with artisan command
You can either modify the vendor folder GuzzleHttp\Client change verify key to false from configureDefaults method as I did in my local machine
or
You can read this conversation in Laracasts and try downloading the .pem files in some of the comments.
Here are some links:
.pem File Download
After that you should edit your php.ini file accordingly:
curl.cainfo = "[pathtothisfile]\cacert.pem"
PS: I would just edit the vendor file, because it's much faster and not hard to realize.
The reason is because the mailgun/guzzleHttp looking for valid certificate (SSL issue) for security reasons.
You can solve it like below (Wamp server):
1- Download this file from http://curl.haxx.se/ca/cacert.pem and put this in "C:/wamp64/bin/php/(your php version)/extras/ssl/" directory
2- find all php.ini files (even php.ini-production and php.ini-development) under this directory "C:/wamp64/bin/php/php (your php version)"
3- find these following parts in above .ini files and edit it as shown:
curl.cainfo = "C:/wamp64/bin/php/(your php version)/extras/ssl/cacert.pem"
openssl.cafile= "C:/wamp64/bin/php/(your php version)/extras/ssl/cacert.pem"
4- clear cache laravel and restart your laravel server
5- restart wamp server

WAMP requires curl.cainfo certficate in order to work with Pusher

I'm working in WAMP and Laravel on localhost. I was trying to broadcast an event using Pusher to my font end and Laravel was throwing an exception. I fixed the issue by downloading cainfo certficate from curl official website and setting curl.cainfo variable in php.ini to point to downloaded certificate. I was wondering why is this required? Is this only for WAMP or only for Pusher? Or it's because Pusher is using HTTPS?
Is it only for the PHP you're using in your Wamp to connect with services who requires SSL..
- download it from here: https://curl.haxx.se/docs/caextract.html
- Add it to your ssl folder in your php version, and modify your php.ini files (in Wamp folder and PHP folder):
curl.cainfo = "C:\wamp\bin\php{php_version}\extras\ssl\cacert.pem"

NOT your standard Curl error: WAMP/local copy of remote Magento site, curl_setopt() not defined

I have created a local copy of my remote store (Magento Community 1.6.2.0) using WampServer 2.2E:
Cleared entire Magento cache on remote site
exported remote MySql database using phpMyAdmin
tar'd up the entire remote public_html folder and downloaded to local PC
Recreated directory structure locally under C:\wamp\www\
created a new database locally (I'm using WAMPserver) with appropriate user/pass/DBname according to /app/etc/local.xml -- note: dbase host in local.xml is "localhost"
imported database with no errors
modified mage_core_config_data table's baseurl variables to both point to http://www.localhost.com/
modified local .htaccess to prevent configuration that would result in crashing as well as to modify the rewrite rule that does the 301 redirect for domain.com to www.domain.com (I changed domain.com to be localhost.com).
deleted everything in var/cache, var/session, var/tmp, and the system /tmp folder, as suggested in another Q&A
verified that WAMP has curl PHP extension enabled
So now everything loads except for the admin panel. When I go to http://localhost.com/index.php/admin and log in, the error is:
( ! ) SCREAM: Error suppression ignored for
( ! ) Fatal error: Call to undefined function curl_setopt() in C:\wamp\www\includes\src\Varien_Http_Adapter_Curl.php on line 52
I assume that curl_setopt() is defined in the curl library, and that extension is enabled in WAMPserver.. anyone know what's going on with this?
I just realized that my php version is 5.4.3. Wampserver.com offers a 2.2E package with 5.3.13, but that also doesn't work.
I got this to work only by finally trying wampserver 2.2D, which has php version 5.3.10. I used the 64-bit installer -- didn't try the 32-bit but I assume it will work.. This information is notably absent from the magentocommerce.com wiki entry on setting up Magento with WampServer.
New problem is now no page other than the home page loads (404 not found happens for all product pages and categories). This is solved by ensuring that Apache rewrites are enabled (wampserver menu->apache->apache modules->rewrite_module)
Fatal error: Call to undefined function curl_setopt()
This error mean that php5-curl is not available/activated on your system. You should be able to activate it through the wamp configuration panel.
For linux users, install php5-curl through your packet manager.

Xdebug + XAMPP + Netbeans = fail. Cannot get debugger to work in Netbeans

I've read other questions regarding this topic. The listed solutions haven't worked.
Installed:
XAMPP 1.7.7
Netbeans 7.1.1
XDebug 2.1.4
phpinfo() shows that Xdebug is installed with all the correct parameters:
zend_extension = C:\xampp\php\ext\php_xdebug-2.1.4-5.3-vc9.dll
xdebug.remote_enable = on
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
However, when I start a Netbeans debug session, it cycles for awhile with no effect. When I stop it, I get the Info box informing me that "No connection from xdebug was detected with in nn seconds. The reasons could be that xdebug is not installed or not properly configured. (their emphasis).
As far as I can tell, I configured everything correctly, restarted the Apache server and it still doesn't work. I'm at a total loss on how to proceed. Any help is appreciated.
Can you believe it!? After spending literally HOURS researching this problem, I finally found the cause which I can only classify as a bug. Now, how do I report a bug? That's the next question.
Here's a summary:
create PHP project and setup NetBeans project site root to subfolder.
(In order to not register for Apache new test site for any new task I
put every new task into subfolder under my local test domain, e.g.
http://test.my/project3/ ). NetBeans will not start debugging session
automatically in this case. You will see a ‘waiting for connection’
message from the image below. Do not worry. Left it as it is. Go to
your browser. I use FireFox 4. And call the script you wish to debug
with additional parameter, e.g.
http://test.my/project3/index.php?XDEBUG_SESSION_START=netbeans-xdebug
When you return to NetBeans you will see that connection with xdebug
is established successfully. To stop XDebug session manually call any
script from the same subdirectory with this parameter
?XDEBUG_SESSION_STOP_NO_EXEC=netbeans-xdebug
The complete solution can be found on my newest hero's blog NetBeans 7.0 for PHP Waiting for Connection to XDebug
Edit: Know what I just discovered? I removed index.php as the index file of my run configuration. Works like a charm without having to manually insert the xdebug section of the url.
I just ran into this with Netbeans 8 and while your answer worked around my problem I think I found the solution that will fix it forever.
Project Properties => Run Configuration => Advanced ...
Ensure that the following entry is selected
Debug URL: 'Default: YOUR URL'
Mine was set to "Do Not Open Web Browser" .....
Now it works as it used to work many months ago :)
I am a .Net programmer and very new to PHP. Recently I was trying to host an open source PHP application on my machine(Windows). After the Struggle for 5-6 days I will list the steps which worked for me.
I uninstalled every previous installations of XAMPP and NetBeans and proceeded with fresh installations.
This might not be the solution for everyone but it worked for me and I hope it helps someone.
install XAMPP
install netbeans for PHP.
Open IIS and stop it. It is running on port 80 by default.(I am running XAMPP on port 80 i.e. default, Running on other port might need additional configuration settings)
Open XAMPP control panel and start Apache. If port 80 is free no problem should arise.
Open localhost in browser in should display XAMPP home page.
open phpinfo() link on the left pane and copy all the contents on page. Go to: http://xdebug.org/wizard.php and paste all the content in TextBox and click Analyze my phpinfo output. It will diplay you the Xdebug file suitable for your configuration.
Download the given Xdebug dll and copy it in C:\xampp\php\ext (Xampp being the default Xampp installation directory)
Goto XAMPP control panel, click on Config button in front of Apache and select php.in,
Find line similar or exacly like,
;zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
(Semicolon means it is commented)
Remove the semicolon and replace the path with the path of dll you just copied like:
zend_extension = "C:\xampp\php\ext\php_xdebug-2.3.2-5.4-vc9.dll"
Similarly find lines
;xdebug.remote_enable = 0 ;xdebug.remote_handler = "dbgp"
remove semicolons in front of both lines and make remote_enable = 1
xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp"
Restart Apache server.
Copy your website code under C:/XAMPP/htdocs/(your_website)/ that means your index.php should be at C:/XAMPP/htdocs/(your_website)/index.php
Open Netbeans select New project -> PHP -> PHP project from existing source and select the folder you just copied in htdocs folder. Set it to run on Local web server.
Set a breakpoint on first line of index.php and debug.
That's it.
Additional settings were suggested on various different posts but above mentioned steps worked perfectly for me.
I think what you might be missing is
xdebug.idekey=netbeans-xdebug
this is the settings I use in my php.ini
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.remote_autostart=false
Read the installation of XAMPP 1.7.7 & Netbeans 7.1 with edditing
the php.ini file as suggested:
http://netbeans.org/kb/docs/php/configure-php-environment-windows.html
Create your PHP project in the local XAMPP directory, c:\xammp\htdocs\*yourproject*
Debug the index.php, you will see that your browser will start with additional parameters:
http://*yourproject*/index.php?XDEBUG_SESSION_START=netbeans-xdebug
Go to your Netbeans, your debugger will be started.

500 error when installing symfony2

I'm trying to install and configure Symfony2 on my server.
My website is on a shared hosting plateform therefore have limited access to root level, apache & php.ini files...
I downloaded then extracted symfony2 files on my dev environment:
www/
dev/
symfony/
app/
bin/
web/
...
When I navigate to http://dev.mydomain.com/symfony/web/config.php I get some recommendations:
Install and enable a PHP accelerator like APC (highly recommended).
Upgrade your intl extension with a newer ICU version (4+).
Set short_open_tag to off in php.ini*.
Set magic_quotes_gpc to off in php.ini*.
Being on a shared hosting plateform I'm not allowed to modify/download the necessary files to fix those recommendations (which I believe shouldn't block the install).
I follow the link "Bypass configuration and go to the Welcome page" which sends me to http://dev.mydomain.com/symfony/web/app_dev.php/
The server throws a 500 Internal Server Error.
Any advice on how to fix that issue would be very much appreciated.
Thanks,
John
When it happened to me I forgot to tell my FTP client to transfer also invisible file (.htaccess) OR permissions on /web folder are not correct

Resources