Laravel Exception after page is refresh - OpenSSL extension is required - exception

I am newbie in Laravel. I am using windows 7. I have downloaded and created a laravel project inside xampp inside htdocs folder.I have uncommented the statement,extension=php_openssl.dll inside php.ini. When I type the http://localhost/laravel/public/ in the browser, it shows the home page. When I refresh the page I get an exception like this.
When I remove the cookies and session variables in the browser settings, it will show the home page for once and if I refresh the page after,it shows the above page again.
NB: I have edited nothing in the project.I just tried to run the project

After uncommenting the line in the php.ini file, you must still activate it: left click on the WAMP server icon, then PHP-> PHP extensions and ensure that php_openssl is checked. If not, click it. WAMP will restart and it should be OK.

Related

How to setup XAMPP so that page navigation works?

I downloaded Xampp to work with my Mern stack website. I want to make mods to code locally before I push code to actual website. How do I go about getting local server to work with already existing code?
For example, my page navigation doesn't work. When I click on about.html from home.html I get 404 error. I think my express.js file might need to be fixed. The .createserver() function is creating the actual web server with private key and cert.
I just want everything on the web server to work locally so I cant test my code.

PhpStorm Debugger never enters code, but page doesn't finish loading while debugger is running

I am using PhpStorm on Ubuntu which I'm running on a Hyper-V machine. I'm trying to configure the PhpStorm debugger with XDebug. I've set a breakpoint in my code, but when I click "Start Listening for PHP Debug Connections" in PhpStorm and refresh my page, the debugger never enters my code. The debugger must be doing something because the page in the browser stays loading, until I click Stop in PhpStorm. If I don't click for the debugger to listen for connections, the page loads correctly.
The Debug window shows the error Remote file path '/var/www/magento2/pub/index.php' is not mapped to any file path in project, but I don't know how to get that to map correctly. In the path mappings windows, under "Include path", it shows a bunch of paths, but the path /var/www/magento2/pub isn't there. I can't find anywhere to add an additional path. Could this be a permissions issue for that folder? What permissions do I need to allow PhpStorm to map that path?
If I uncheck "use path mapping" in Preferences > Language & Framework > PHP > Servers and leave "Break at first line in PHP scripts" checked, then the debugger breaks on the first line of code, but I don't want to break until my breakpoint is hit.
If I uncheck "use path mapping" and don't check "Break at first line in PHP scripts", then I get the error Debug session was finished without being paused. It may be caused by path mappings misconfiguration or not synchronized local and remote projects. To figure out the problem check path mappings configuration for 'mydomain.local' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu).
Here's my XDebug configuration
zend_extension=xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.var_display_max_depth=-1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.idekey="PHPSTORM"
Update:
Here are the responses to #LazyOne's questions
1) The path to the project root is /var/www/magento2
2)
One thing here which I think may be related to the problem is that under Include Path, the /var/www/magento/pub directory is not shown. That's what PhpStorm is referencing on that first error I described above. It's like PhpStorm found some of my directories with PHP files, but not all of them.
3) Here is the XDebug log
Update 2:
Here is what my project looks like
Here is my Directories window
I'm assuming that the reason that all the vendor/... directories are under Excluded Folders is that they are in .gitignore. Some of the code that I'm setting a breakpoint in is in a subdirectory of one of the vendor directories and some of the code is in a subdirectory of app/code/ (which is under Source Folders)
I added /var/www/magento2/pub to the Include Path under Settings > Languages & Frameworks > PHP. That eliminated the error about /var/www/magento2/pub/index.php. Now it's partially working. If I have PhpStorm break on the first line of PHP scripts, the debugger does start as soon as I refresh my page. However, after I step over the first line of code, I get the error PHP CS Fixer: Can not correctly run the tool with parameters... and then the debugger seems to stop working.
If I don't select Break at first line in PHP Scripts, and I put a breakpoint further into my code, I still get the same "debug session was finished without being paused" error.
I'm not sure what PHP CS Fixer is, nor do I want it to run. Is there a way to disable that?

Blank page displayed when accessing html file from local host in XAMPP

I've been going mad for the last two days trying to understand why my localhost connection merely displays a blank page in any browser for my "index.html" file in my "htdocs" folder in XAMPP. The page is blank in every browser (Edge, Chrome, Firefox, IE). Strangely, I can view the source code fine for the page in the browser though! Even more strangely, my "index.html" file displays a blank page even when it's loaded from another location other than htdocs (such as the desktop). And my test html file I created displays just fine using the htdocs folder in XAMPP. I'm using the default Apache ports 80 and 443. I'm also using Windows 10.
Could this be some error in my webpage code? I'm doing pretty vanilla stuff here: just CSS/HTML and Bootstrap. All CSS/HTML/Bootstrap files are in the htdocs directory. If you'd like to see the full code, you can go to my publicly hosted site at stephengladwin.com You can also view my current XAMPP code for my "index.html" file in the attached screenshot.
Here's what I've tried:
-Unticking the "use ports 80 and 443" box in Skype
-Re-installing XAMPP
-Updating the config file to listen to a different port (used port "123")
-tried disabling "World Wide Web Publishing Service" in services.msc
Thanks in advance for any help you can provide!
XAMPP Code
The best question is the one you answer yourself! Turns out it was a bootstrap error. In the Chrome browser inspect tool I opened the console and lo and behold, there was an error where the browswer couldn't access the "tether.min.js" file which bootstrap requires. Indeed I did have the tether file linked in my index.html file, but it was not in the right order in the code flow. It had to come before the javascript link. Now my index.html page displays fine on the localhost via XAMPP!

PhpStorm code preview

In PhpStorm, is there any way to add a panel to show a html/php code preview (like in RapidPhp) ?
You could run you pages in the browser if you enable the PHP Built-in Web Server
Referenceing:
Post Link
You have to configure a run configuration for your project first.
Go to Run -> Edit Configurations, click on "PHP Built-in Web Server"
and then press "+". You should see something like this:
Run/Debug Configurations
After saving the settings you can run the web server via Run -> Run
''. It should now serve up the pages to your browser.

Live Reload not working (WIN7)

I have the windows application installed, Live Reload extension for chrome and i'm using Sublime Text with Live Refresh and Live Reload plugins. For some reason any HTML doc i edit on sublime text is not auto updating on chrome. The extension is stuck on "Live Reload is connecting" when i enable it. What exactly am i missing, do i need to setup a local web server or something like that?
I think your issue may be that you did not add the folder that contains your HTML document to the LiveReload windows application so that it can monitor for changes to the file.
If you open up the LiveReload app, it should have a list of site folders. Try adding your test project's folder to the list.
If you load from local file it does work you must runt the local file through a web server e.g python -m http.server in the folder your .html exists otherwise the option match to local file never appears and then you can have the save and reload functionality.
I mention it because I hadn't found the problem through reading the post