Laravel reporting errors - php

When Laravel throw an error it show me a page with the description of error pointing me in what file is located the error, in this page are a link with this format
subl://open?url=file://home/user/etc
I know that the goal is open the file with sublime text but it doesn't work.
I would like to know how to configure firefox in order to be able to open the file.
My working environment is laravel whith ubuntu 12
Firefox 35.01
and Sublime text 2

This is done by registering a new protocol handler for the browser. In Firefox the process is discussed here for a myriad of Firefox versions and operating systems. In your specific case (FF 3.5+ on Linux), it can be done via this procedure:
Firefox 3.5 and above
(Works without installed Gnome libraries)
Type about:config into the Location Bar (address bar) and press Enter.
Right-click -> New -> Boolean -> Name: network.protocol-handler.expose.foo -> Value -> false (Replace foo with the protocol you're specifying)
Next time you click a link of protocol-type foo you will be asked which application to open it with.

Related

Cannot find name for "en_UK" locale code - error in Sylius

So I'm setting up a sylius project using docker and am getting an error when I first tried to load the page. The docker set up on sylius website didn't seem to work so I made my own docker files and can successfully start the docker containers. The error is below:
An exception has been thrown during the rendering of a template ("Cannot find name for "en_UK" locale code").
During the installation, sylius asks whether you want en_US or something different so I typed en_UK, presuming that was the notation required. Upon setup completion, I tried to load root page and I get the error message above. However, strangely, on the symfony toolbar on the error page it says US web store.
If anyone could help at all it would be greatly appreciated. Thank you in advance.
Possible ways:
go to localhost/admin, enter your login/password which you entered at the install moment, open Channels section, and there add change default locale/add new to locale list;
modify a <project-root>/config/services.yaml and change locale value to another;
in the worst case try to run php bin/console sylius:install command and reinstall database with a en_US at the beginning, then edit Admin section to en_UK
en_UK means "English (Ukraine)". No wonder it was missing. What you wanted was probably en_GB.

Install Magento 1.9x with downloader.php

I wanted to install Magento 1.9x on my localhost (I am using XAMPP), but I get an alert with an undefined error. Here is what I did so far:
I went to https://magento.com/tech-resources/download and downloaded the archive with 1.9x which contains a file named downloader.php.
I copy it on the root of my local site aka magestore.com and then went to http://local.magestore.com/downloader.php.
The first steps were pretty smooth and everything was fine except the download step.
when I click continue I get an alert with an undefined error, like this:
If I choose the FTP method at Magento Connect Channel Protocol I get another alert saying Could not connect to connect20.magentocommerce.com. Try again (refresh page)
Help, please!

PHP Desktop Chrome has stopped working

i have used php desktop application for codeigniter project its work properly
now i used inno setup to create setup for php desktop application
inno setup : step for inno setup
i have follow all the step and setup was create but after execute application not run and below error generate
Problem signature:
Problem Event Name: APPCRASH
Application Name: phpdesktop-chrome.exe
Application Version: 31.8.0.0
Application Timestamp: 546f0770
Fault Module Name: libcef.dll
Fault Module Version: 3.1650.1562.0
Fault Module Timestamp: 52d3dd6e
Exception Code: 80000003
Exception Offset: 001179c0
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
here is screenshot :
Method 1 – Reinstall google chrome or upgrade google chrome
(1) Go to “control panel –> Programs and features –> Select google chrome” to uninstall it.
(2) Now go to this path in your local computer “C:Program FilesGoogle” and delete “Chrome” folder. If you are using 64 bit computer then path of the folder will be ” C:Program Files (x86)Google”.
(3) Now, Go here and download latest version of google chrome and install it.
(4) Restart your computer after reinstalling google chrome and check whether problem is resolved or not.
Method 2 – Clear cookies and disable unwanted extensions and apps
(1) Click on this icon (Top right side of gogole chrome) –> go to settings –> Show advanced settings

Connect to MySQL Data Source in PHPStorm

I'm using an IDE "Phpstorm" with "wampserver". i want to connect with MySQL data source, but i'm getting a problem:
Connection to MySQL - DatabaseName#localhost failed: Exception in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.intellij.persistence.database.console.RemoteJdbcServer.main(RemoteJdbcServer.java:15)
I also downloaded mysql-connector-java-gpl-5.1.29.msi and installed it, but I'm still getting some problems.
When I had this issue, there was a section of the Data Sources and Drivers Dialogue box that said "Driver Files" I expanded it and there was a link to download driver files.
I clicked it - and after a few seconds (with no obvious visual progress indicator) the message changed to say using MySQL drivers.
After that it worked.
Short version:
Open the Database tab, usually located on the very upper right of
PHPSTORM.
Click on the small wrench (Data Source and Property)
In this new popup window choose MySQL from the left.
Delete Red driver files with the minus symbol
Click Download
From there on you should be good to go. (phpstorm handles the rest)
Detailed version:
Open the Database tab, usually located on the very upper right of PHPSTORM.
Click on the small wrench (Data Source and Property)
New Version v2020:
If it's not there open it from
View -> Tool Windows -> Database
New Version v2020
- In this new popup window choose MySQL from the left.
New Version v2020:
- Now you should be on the settings tab where you can see driver
files, if any of them are red just delete them with the
minus symbol, as soon as there are no driver files left you are able to click on download.
If any of the above fail try these:
Delete the drivers in use and reinstall. Usually located at ~/.PhpStormXXXX/config/jdbc-drivers.
After that repeat the first instructions in this post. (short version)
Using a proxy?
Make sure you have configured it within phpstorm!
At Appearance & Behavior -> System Settings -> HTTP Proxy.
Make sure you have the latest drivers:
Create a new mysql datasource, if the driver needs an update it will display it on the very bottom of the popup
try other versions
New Version v2020:
Installing the Driver Manually
I couldn't find any official Jetbrains mysql driver repo page, but these urls are official and work:
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.35-bin.jar
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.40-bin.jar
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.44-bin.jar
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.45-bin.jar
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.46-bin.jar
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.47-bin.jar
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-5.1.48-bin.jar
The Newest version number can be found here:
https://dev.mysql.com/downloads/connector/j/5.1.html
just replace the [VERSION] with the current version e.g.
http://download.jetbrains.com/idea/jdbc-drivers/mysql-connector-java-[VERSION]-bin.jar
Add the downloaded file with clicking on the small grey plus. (in older versions green and on the right)
New Version v2020:
Or try the official mysql repo (caution you MUST register to download!):
Go to http://dev.mysql.com/downloads/connector/ within the dropdown select "Platform Independent" it will show you the options to download tar or zip files.
Download one of them and extract it,
Within the resulting folder you will find a mysql-connector-XXX.jar file.
Add it to phpstorm in the mysql datasource dialog box.
Other stuff:
Useful phpstorm UI reference link
Code Monkey's answer pointed me in the right direction, but my firewall blocked the download from within PHPstorm. Luckily the error message included the download URL to find the driver.
So I downloaded the driver with help from the URL, and then added it manually:
PHPStorm 2020.1 with Material Dark theme:
Hit Alt+0 or View→Tool Windows→Database to open the Database tool window.
Click the pancakes-with-wrench icon
Click the TEST CONNECTION button
This will prompt you to download the drivers - do it
You will have to enter your root password again
Had the same issue. I resolved it in the Data source and drivers window on panel Mysql. There is checkbox "Use provided driver" and next to it there was link "Version 5.1 (latest)". I clicked on it a now it works.
Anyone else who came here trying to locate the Database tab in the latest version of PhpStorm (Version 2017.1), which is hidden at first, try the following, taken from PhpStorm Website
Database support is provided through the Database Tool Window on the right-hand side of the IDE. Use the View | Tool Windows | Database menu or Find Action, by pressing Ctrl+Alt+A (Alt-CMD-A on Mac OS X) and search for "Database" to open it.
if nothig of above works, you can delete .PhpStorm2017.3/config/jdbc-drivers folder. then navigate to your db properties and download the driver again

Selenium web driver not loading webpage in firefox

I am trying to get Selenium Web Driver to work with php using the Yii framework.
phpunit is installed and working.
I have the latest version of selenium server running. (selenium-server-standalone-2.37.0.jar)
I have this Yii extension for web driver installed.
I have this shell test.
Yii::import('ext.webdriver-bindings.CWebDriverDbTestCase');
class SiteTest extends CWebDriverDbTestCase
{
public function testExample() {
$this->get("http://www.example.com");
$this->assertTrue($this->isTextPresent('Example Domain'));
$this->assertTrue(true);
}
}
When I run it on the command line with
phpunit functional/SiteTest.php
The test runs. A firefox window opens with an empty profile (with the web driver plugin installed.) But the webpage doesn't load. There is nothing in the address bar. Nothing happens at all. The browser stays open, meanwhile the command line prints the following.
PHPUnit 3.7.28 by Sebastian Bergmann.
Configuration read from C:\full\path\to\yii\project\protected\tests\phpunit.xml
F
Time: 4.88 seconds, Memory: 3.50Mb
There was 1 failure:
1) SiteTest::testExample
Failed asserting that false is true.
C:\full\path\to\yii\project\protected\tests\functional\SiteTest.php:18
FAILURES!
Tests: 1, Assertions: 1, Failures: 1.
I'm on windows 7 and have tried turning off the firewall to see if that was the cause.
As you can see phpunit is working fine as the second test passes. But for some reason firefox is not opening the requested page.
Edit: I'm using the latest release of php (5.5.5)
Edit: I've now also tried with the Chrome Driver. I get the same result. Chrome opens but the page does not load. The address bar just has 'data:,' in it.
I have the same issue whenever I launch my scripts with the newest server nothing happens. But I noticed that if I use selenium server v2.33 everything works again (http://goo.gl/cxpyd2). However, I have been getting a execute js error that appears to happen with the new firefox and with 2.33? I am not sure. So I assume that it was fixed with the newer version of the server but I am not able to try it.
I experienced the same problem however downgrading the firefox version to 11.0 it started working. If you use linux you can use synaptic and force a firefox version downgrade

Categories