LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-26-2015, 09:32 PM   #1
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Rep: Reputation: 6
setting up xdebug for php on Linux


I followed this site -> https://www.box.com/blog/how-to-debu...ebug-on-linux/
but I'm not having much luck. I followed the firections and my phpinfo() functions is showing that xdebug is up and running but I see don evidence of xdebug from within vim. I typed in my localhost url, localhost/mysite.php?XDEBUG_SESSION_START=1 and then wen to vim and pressed f5 but that didn't seem to have an effect at all. When I run cat /var/log/apache/error.log I get no errors showing.
And here are my xdebug setting in my /etc/php5/apache/php.ini file


Code:
;My Modules
[bash][Zend] zend_extension = /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable = 1
xdebug.remote_port = 9000 xdebug.remote_host = localhost [/bash]
Any ideas? Thanks.

Update, as of today I'm not getting these errors under the /var/log/apacher/error.log file, note that I wasn't even trying to edit the project under the udemy directory, that must have been loaded because google chrome loads every tab when it starts up. It says no such file or directory for the xdebug.so file but I verified that the files are there with the find command, that's where I got the path so I could put it in the php.ini file.

garrett@mint-desktop ~ $ cat /var/log/apache2/error.log
[Sat Dec 26 12:24:26.923482 2015] [mpm_prefork:notice] [pid 6988] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sat Dec 26 12:24:26.923532 2015] [core:notice] [pid 6988] AH00094: Command line: '/usr/sbin/apache2'
[Sat Dec 26 21:30:03.324359 2015] [:error] [pid 6994] [client 127.0.0.1:59142] PHP Fatal error: Call to undefined function redicrect() in /var/www/html/udemy/php-oop/gallery/admin/includes/header.php on line 5
[Sat Dec 26 21:30:03.325177 2015] [:error] [pid 6994] [client 127.0.0.1:59142] PHP Stack trace:
[Sat Dec 26 21:30:03.325203 2015] [:error] [pid 6994] [client 127.0.0.1:59142] PHP 1. {main}() /var/www/html/udemy/php-oop/gallery/admin/index.php:0
[Sat Dec 26 21:30:03.325210 2015] [:error] [pid 6994] [client 127.0.0.1:59142] PHP 2. include() /var/www/html/udemy/php-oop/gallery/admin/index.php:1
[Sat Dec 26 22:06:06.614227 2015] [:error] [pid 6991] [client 127.0.0.1:60717] PHP Fatal error: Call to undefined function redicrect() in /var/www/html/udemy/php-oop/gallery/admin/includes/header.php on line 5
[Sat Dec 26 22:06:06.614259 2015] [:error] [pid 6991] [client 127.0.0.1:60717] PHP Stack trace:
[Sat Dec 26 22:06:06.614270 2015] [:error] [pid 6991] [client 127.0.0.1:60717] PHP 1. {main}() /var/www/html/udemy/php-oop/gallery/admin/index.php:0
[Sat Dec 26 22:06:06.614277 2015] [:error] [pid 6991] [client 127.0.0.1:60717] PHP 2. include() /var/www/html/udemy/php-oop/gallery/admin/index.php:1
[Sat Dec 26 23:28:51.517560 2015] [mpm_prefork:notice] [pid 1762] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sat Dec 26 23:28:51.517871 2015] [core:notice] [pid 1762] AH00094: Command line: '/usr/sbin/apache2'
PHP: syntax error, unexpected '=' in /etc/php5/apache2/php.ini on line 1834
Failed loading /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : cannot open shared object file: No such file or directory
PHP: syntax error, unexpected '=' in /etc/php5/apache2/php.ini on line 1834
Failed loading /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : cannot open shared object file: No such file or directory
PHP: syntax error, unexpected '=' in /etc/php5/apache2/php.ini on line 1834
Failed loading /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : cannot open shared object file: No such file or directory
PHP: syntax error, unexpected '=' in /etc/php5/apache2/php.ini on line 1834
Failed loading /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : cannot open shared object file: No such file or directory
PHP: syntax error, unexpected '=' in /etc/php5/apache2/php.ini on line 1834
Failed loading /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : cannot open shared object file: No such file or directory
[Sun Dec 27 05:06:40.685115 2015] [mpm_prefork:notice] [pid 1762] AH00169: caught SIGTERM, shutting down
PHP: syntax error, unexpected '=' in /etc/php5/apache2/php.ini on line 1834
Failed loading /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable : cannot open shared object file: No such file or directory
[Sun Dec 27 09:01:51.112516 2015] [mpm_prefork:notice] [pid 1768] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Dec 27 09:01:51.113407 2015] [core:notice] [pid 1768] AH00094: Command line: '/usr/sbin/apache2'
[Sun Dec 27 09:02:25.582938 2015] [:error] [pid 1789] [client 127.0.0.1:45028] PHP Fatal error: Call to undefined function redicrect() in /var/www/html/udemy/php-oop/gallery/admin/includes/header.php on line 5
[Sun Dec 27 09:02:25.582963 2015] [:error] [pid 1789] [client 127.0.0.1:45028] PHP Stack trace:
[Sun Dec 27 09:02:25.582974 2015] [:error] [pid 1789] [client 127.0.0.1:45028] PHP 1. {main}() /var/www/html/udemy/php-oop/gallery/admin/index.php:0
[Sun Dec 27 09:02:25.582992 2015] [:error] [pid 1789] [client 127.0.0.1:45028] PHP 2. include() /var/www/html/udemy/php-oop/gallery/admin/index.php:1

Last edited by Garrett85; 12-27-2015 at 09:18 AM. Reason: update
 
Old 12-28-2015, 09:18 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

This just seems wrong:

Quote:
;My Modules
[bash][Zend] zend_extension = /usr/lib/php5/20121212/xdebug.so xdebug.remote_enable = 1
xdebug.remote_port = 9000 xdebug.remote_host = localhost [/bash]
From the error log, it looks like it is trying to find a file called "/usr/lib/php5/20121212/xdebug.so xdebug.remote_enable" and it fails.

Try putting them on a line for each item:

Quote:
zend_extension = /usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host = localhost
 
Old 12-28-2015, 07:25 PM   #3
Garrett85
Member
 
Registered: Jan 2011
Posts: 332

Original Poster
Rep: Reputation: 6
I changed it like so and I got this as soon as I booted up my computer and started Chrome.

garrett@mint-desktop ~ $ cat /var/log/apache2/error.log
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Mon Dec 28 19:16:59.939461 2015] [mpm_prefork:notice] [pid 19352] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Mon Dec 28 19:16:59.939508 2015] [core:notice] [pid 19352] AH00094: Command line: '/usr/sbin/apache2'
[Mon Dec 28 19:17:17.547077 2015] [mpm_prefork:notice] [pid 19352] AH00169: caught SIGTERM, shutting down
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Mon Dec 28 19:18:00.921610 2015] [mpm_prefork:notice] [pid 1751] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Mon Dec 28 19:18:00.921660 2015] [core:notice] [pid 1751] AH00094: Command line: '/usr/sbin/apache2'
[Mon Dec 28 19:18:58.210770 2015] [:error] [pid 1754] [client 127.0.0.1:48231] script '/var/www/html/udemy/php-oop/gallery/admin/login.php' not found or unable to stat

I'm also still not seeing this message in vim -> 'waiting for a new connection on port 9000 for 5 seconds' as depicted at https://www.box.com/blog/how-to-debu...ebug-on-linux/
Any other ideas?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux mint 17 cinnamon with xampp and xdebug BobMoore Linux - Newbie 1 10-21-2014 02:23 PM
vim not connecting with xdebug for php debugging qhhatman Linux - Software 1 02-24-2010 02:59 AM
Apache + PHP xdebug + fcgid = read data timeout in 40 seconds Miggleness Linux - Software 1 12-18-2009 09:43 AM
LXer: How to Debug PHP with Vim and XDebug on Linux LXer Syndicated Linux News 0 03-04-2008 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration