I cannot get gulp-connect-php to work. I tried about everything SO and the www has to offer. The message I get is as following.
PHP server not started. Retrying...
Here's the last code I've tried.
gulp.task('connect', function() {
connect.server({
hostname: 'localhost',
bin: 'C:/php/php.exe',
ini: 'C:/php/php.ini',
port: 8000,
base: ''
});
});
Now I've tried using it with browser-sync and the express server. With those I can get .html-files working on localhost. But whenever I set a .php-file to load I read a 404 or if I put in the url directly I download the file.
I've tried on Windows 10 and on El Capitan (these particular lines of code adjusted of course for MacOS). I checked that PHP is installed and added to the PATH. Not to mention that I've tried various different setups in my gulpfile.js.
EDIT: I installed XAMPP. PHP works fine there. The very script I try loading with gulp works fine.
What version of gulp-connect-php are you using? I have use this for many projects and it worked great until recently when I updated the module. I deleted the module and installed the last version that worked for me 0.0.5, and it's working as expected. You could try the same and see if it works- delete the folder and use:
npm install gulp-connect-php#0.0.5
Related
I have a project with Laravel version 7.28. I run
composer require barryvdh/laravel-debugbar --dev,
After that I added Barryvdh\Debugbar\ServiceProvider::class to app/config.php under providers and added
'Debugbar' => Barryvdh\Debugbar\Facade::class
to app/config.php under aliases. Then I run
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
Even though APP_DEBUG in .env is true and I terminated and rerun the app debugbar is not showing. Where did I make my mistake?
I checked the config/debugbar.php, I see the new key DEBUGBAR_ENABLED with default is false. Then add it to .env file: DEBUGBAR_ENABLED=true
Make sure you are running on right port. I had php backend (running on port 8000) and react frontend (running on port 3000) and I did everything you have described above but it never worked. The issue I had was that I was checking if the debugbar showed up on port 3000 (which it never did sadly). I went to check on port 8000 and the debugbar was sitting there the whole time.
I didn't end up using the php debugbar because I think it only works if your frontend code is written in php (though not 100% sure).
I ended up debugging using postman. It doesn't have all the functionalities that the debugbar offers but it is a great tool to use if you just want to do basic debugging.
I created a new project using Symfony 5.1.2, then I tried to run the server using
symfony serve. Once I tried to access localhost:8000, I had this warning in the terminal : [Web Server/PHP ] Jun 22 13:47:55 |WARN | SERVER GET (404) / ip="::1".
Moreover, the page I had was symfony's default page saying "#Page not found".
I checked the existing routes and I had default ANY ANY ANY /.
I also checked the DefaultController, but everything looks fine, since it is the auto generated controller...
I don't know what else to check, how could I get this default page working ?
I had a similar issue : I had run symfony server:start and was even seeing it react to my entering HTTP addresses in the browser, but I kept having that "# Page not found" message.
Quite simply, my symfony project was in Group/SubGroup/Project... and I was running symfony server:start from Group/SubGroup. When I stopped Symfony and ran it again from Group/SubGroup/Project, it worked like a charm.
A beginner's mistake, to be sure, but beginners use this site too.
Did you run the symfony project? It will show if you didn't run the symfony project. Run the project from terminal.
cd my-project/
symfony server:start
ip="::1" is the localhost on windows and wsl 2. Symfony server listen on 127.0.0.1:8000.
You must edit the windows hosts file at C:\Windows\System32\drivers\etc\hosts.
Add this line : 127.0.0.1:8000 localhost:8000
It works for me.
I'm completly new to Symfony and tried the following guide: https://github.com/thecodingmachine/symfony-vuejs ... but without docker (I have a simple webspace, I can't use docker there).
Now I'm stuck right in the beginning, when calling composer install in the app root. I get the following message:
In EnvVarProcessor.php line 131:
Environment variable not found: "DATABASE_URL".
Well, that sounds easy, I have to setup an enviroment variable ... but I'm not using docker and I don't want to set up a temporarly variable in the shell. Few seconds of google helped me, that I can use .env for my problem like descriped here: https://symfony.com/doc/current/configuration.html#configuration-based-on-environment-variables
In the example project is already a .env file, so I extendet it by DATABASE_URL. But suddenly it is not taking that variable.
I'm working on a macbook with a simple apache/php setup without forther configuration.
What am I missing?
Mediawiki Version 1.27
Visual Editor Version 1.27
Parsoid Version latest in repository
So I have several web servers running on an Ubuntu VM. The hostname is "atocha". I have Apache running on port 8000. Under this I have a Mediawiki instance. The mediawiki instance is not private.
I installed Parsoid and it is running on port 8142.
I can access my mediawiki instance by going do "http://atocha:8000/mediawiki/index.php"
I can curl the Mediawiki api just fine. "http://atocha:8000/mediawiki/api.php"
However when I try to edit the pages using Visual Editor I receive the following error "Error loading from server: 404: docserver-http: HTTP 404. Would you like to retry?" that pops up in a display. No error is thrown in Apache.
Here is my parsoid local settings.js file
'use strict';
exports.setup = function(parsoidConfig) {
parsoidConfig.setMwApi({
uri: 'http://atocha:8000/mediawiki/api.php',
domain: 'atocha',
prefix: 'atocha'
});
parsoidConfig.useSelser = true;
};
Here is the pertinent LocalSettings.php section:
wfLoadExtension( 'VisualEditor');
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgVirtualRestConfig['modules']['parsoid'] = array(
// URL to the Parsoid instance
// Use port 8142 if you use the Debian package
'url' => 'http://127.0.0.1:8142'
);
If I try to use parsoid like this in a browser:
http://atocha:8142/localhost/v3/page/Javadoc_Basics
I get this error:
Did not find page revisions for V3/page/Javadoc_Basics
If I try parsoid like this however:
http://atocha:8142/localhost:8000/v3/page/Javadoc_Basics
I get this:
Cannot GET /atocha:8000/v3/page/Javadoc_Basics
Anyone have an idea about what's going on? Thanks in advance.
After much failure I was able to get parsoid and visual editor working.
Here is how I did it:
https://www.mediawiki.org/wiki/Parsoid/Developer_Setup
Follow Option 2 for developer setup.
Run the tests
Change the config.yaml file for mediawiki settings and changed port number
Create UpStart job
Enjoy
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