I am using centos 7 & apache server, for remote debug purpose in VS Code how to install and configure xdebug in Live GoDaddy VPS server?
PHP version : 5.6
if you have php7 in centos7 with webtactic and epel you can install xdebug with the following
yum install php70w-pecl-xdebug.x86_64
if you have epel and webtactic, but not php7 you can install xdebug with:
yum install php-xdebug
Now that xdebug is in your sytstem its time to confgure xdebug
open /etc/php.d/xdebug.ini in your favourite editor
add the following lines
#this line will be added automatically
zend_extension = /usr/local/lib/php/extensions/xxx/xdebug.so
#add the following
xdebug.remote_log="/tmp/xdebug.log"
xdebug.profiler_enable = 1
xdebug.remote_enable=on
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_connect_back=on
xdebug.idekey=editor-xdebug
You can find the correct paths to the files needed if you have yum-utils installed and run
repoquery --list php70w-pecl-xdebug
# the output is:
/etc/php-zts.d/xdebug.ini
/etc/php.d/xdebug.ini
/usr/bin/debugclient
/usr/lib64/php-zts/modules/xdebug.so
/usr/lib64/php/modules/xdebug.so
/usr/share/doc/php70w-pecl-xdebug-2.4.1
/usr/share/doc/php70w-pecl-xdebug-2.4.1/CREDITS
/usr/share/doc/php70w-pecl-xdebug-2.4.1/LICENSE
/usr/share/doc/php70w-pecl-xdebug-2.4.1/README.rst
/var/lib/pear/pkgxml/xdebug.xml
You now need to restart httpd
service httpd restart
# or
systemctl restart httpd.service
Xdebug will now be up and running
If you are running with SELinux enforement on, then you can run this command to let xdebug out:
setsebool -P httpd_can_network_connect 1
Eclipse
Inside eclipse, goto preferences > php > debuggers
change the debugger to xdebug
click configure
change the dropdown for “accept remote session (JIT)” to “any” or “prompt”
click ok
Firefox
Xdebug Helper is the best solution I have found for firefox – simply install the extension from here, navigate to the site you want to debug, and click the little green bug, select debug and reload your page to open in your editors debugger. You might need to add the key you added to your xdebug.ini in the previous steps.
Chrome
Xdebug Helper is the best solution I have found for chrome – simply install the extension from here, navigate to the site you want to debug, and click the little green bug, select debug and reload your page to open in your editors debugger. You might need to add the key you added to your xdebug.ini in the previous steps.
Related
I'm currently setting up a Kaltura streaming server on CentOS 7 with mariaDB. When I come to the point the installation manual requires me to install oflaDemo via browser, I only get an empty list. No connection errors occour. The debug output states:
Host: vstream-dev.my.domain
Trying to connect
Net status: NetConnection.Connect.Success
Got the application list
Got the application list
Got the application list
So, in theory there shouldn't be a problem.
Firewall is down for testing/devel
SELinux is off (permissive)
The only error that ocoured during the installation process was packet mysql-server is not installed. But the manual states that I should use mariaDB on CentOS 7.
I tried to clone https://github.com/Red5/red5-examples and link the ofla Demo folder to /usr/lib/red5/webapps/ with no success.
Ok, I solved it.
What I did:
I cloned the repo with the red5 examples: https://github.com/Red5/red5-examples and navigated into the subfolder oflaDemo (with pom.xml).
Then I had to install maven with
yum install -y maven
and do a maven build
mvn clean install
After that, I was able to grab the file target/red5-example-oflaDemo-2.0.war. I extracted this file into a folder oflaDemo in /var/lib/red5/webapps and restarted the server. Finally, I did mkdir /usr/lib/red5/webapps/oflaDemo/streams to create a folder for the streams.
After that, I was able to navigate to the demo via
http://my.domain:5080/oflaDemo/
My goal is to demonstrate creating a local debian repository with controlled versions of tools used (e.g. compiler versions) to make a build system more predictable.
I've tried to follow this example: http://linuxconfig.org/easy-way-to-create-a-debian-package-and-local-package-repository
but when I get to the apt-get update stage, I always get a 404 not found on the repository I've added.
The apache2 server is running, I can view the default page installed at http://localhost/html/index.html.
I am trying this with the file fortune-mod_1%3a1.99.1-7_amd64.deb installed to /var/www/debs. I create the Packages.gz file as the tutorial suggests:
dpkg-scanpackages debs /dev/null | gzip -9c > debs/Packages.gz
I also add a new file: /etc/apt/sources.list.d/myppa.list with this line:
deb http://localhost debs/
I restart the apache2 service just in case:
sudo service apache2 restart
but running:
sudo apt-get update
still produces this error:
W: Failed to fetch http://localhost/debs/Packages 404 Not Found
Is there something basic I'm missing? Ultimately, I'd like to get this working over a LAN, but first have to get it working on a single machine.
EDIT: I'm doing this on Ubuntu 14.04.
EDIT: Show contents of file /etc/apt/sources.list.d/myppa.list
tldr; use aptly
It's the easiest apt repository management tool I've found and it comes with neat tutorial showing how to create, populate, and publish your own apt repository.
References:
https://www.aptly.info/
https://www.aptly.info/tutorial/repo/
I ended up solving the problem. It was an issue with the default document root being different for the tutorial than on my system. All I did was move my debs folder to html (document root turns out to be /var/www/html, not just /var/www on my install). That did the trick.
Title says it all... just trying to get glassfish up and going. This is the error I get
Detected server admin port: 4848
[2015-04-06 07:37:56,138] Artifact java_web_app:war exploded: Server is not connected. Deploy is not available.
Detected server http port: 8080
Command start-domain failed.
JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:
This subcommand requires root privileges: bsexec
Surely there's a way around this? I don't really want to run Intellij with sudo every time.
Answer: GlassFish 4.1, IntelliJ IDEA 14.1
I have no idea (pun not intended) why GlassFish requires a root user account.
You need to execute something like this:
/Library/opt/payara-4.1.151/glassfish/bin/asadmin start-domain --verbose=true domain1
Go Run -> Edit Configuration -> Select configuration (acme-payara-project) -> Start Up Configuration
Edit the Startup Script and change it to add the --verbose-true parameter.
Is this a problem happening on Mac OSX 10.10.3?
If so, we were able to workaround the problem by changing the content of the file /usr/libexec/StartupItemContext to
#!/bin/sh
unset LAUNCHD_SOCKET
$#
We've also reported this workaround on the corresponding glassfish-issue: https://java.net/jira/browse/GLASSFISH-21343
Note that this will only work for glassfish 4.0. In 4.1 they changed the startup code, so this StartupItemContext file will no longer be used.
If your glassfish Version is 4.1, the only known workaround at the moment is to start glassfish with the --verbose=true param.
Solved this on OS X 10.10.4, IntelliJ 14.1.4 by adding -v to the startup script.
Changing the Startup command in the Run Configuration under the "StartUp/Connection" tab to the following worked for me:
.../glassfish-4.1/glassfish/bin/asadmin start-domain --verbose domain1
The following commands produce errors. And have only been working with yii 4 days now.. please help to solve this.
C:\wamp\www\yii\trackstar\protected\tests\unit>phpunit DbTest.php
'phpunit' is not recognized as an internal or external command, operable program or batch file.
The above error states that PHPUnit is not installed in you WAMP stack.
The easiest method to install it is using PEAR. Try following this method to install PHPUnit with PEAR :
Go to the directory where PHP is located. Typically, this is \bin\php\php5.3.8
We’ll call this path “PHP’s location”
Download “go-pear.phar” from this location:
pear.php.net/go-pear.phar
Create a folder “pear” in your PHP’s location
Put the downloaded “go-pear.phar” file in this location.
Open a command prompt with administrative privilege. For this, click
on start menu, type “cmd” – you can see the cmd.exe icon.
Right-click on this icon and click “Run as administrator”
Cmd.exe will open. Go to the direcotry of your PHP’s location, by
typing “cd” command. For example, my wamp is located in “D:\wamp”,
so I write following command:
D:
cd wamp\bin\php\php5.3.8
Now run the downloaded file, by typing:
php .\pear\go-pear.phar
Installation will begin! During installation, you’ll need to respond
to some prompts, just hit enter/press “Y” when necessary.
After installing, double-click and instal “PEAR_ENV.reg” found in
your PHP’s location.
Optionally, you can add your PHP’s location in your PATH variable.
After you can install PHPUnit like this :
Open a command-prompt, go to PHP’s location using cd, and type:
pear channel-discover components.ez.no
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear install --alldeps phpunit/PHPUnit
Type phpunit –version to confirm installation.
That should install PHPUnit, and now you may try
phpunit DbTest.php
Hopefully, it should work.
Regards,
If you're trying to set up unit tests then I found it quicker and easier to set up a ubuntu virtual machine. It will only take a couple of hours including PHPunit and selenium server. Whereas you could spend hours or days trying to get PHP paths and system variables right on windows.
I have a Rails 3 application that uses Phusion Passenger. I install the standalone version of Passenger using the command "gem install passenger" on my Macintosh MacBook Pro. The application works fine. Now, I want to change some configurations for the ngnix server but I can not find the location of the ngnix.conf file. I have looked in /usr/local and /opt/ and /etc/. Can someone assist me in either finding or creating the ngnix.conf?
Thanks
Look for the nginx.conf file in /opt/nginx/conf
You must have su privileges to edit this file.
Remember to stop and start nginx after making your changes