PHP - C And C++ Without An Ide On Ubuntu 14.04
I've been playing around with C and C++ on my Ubuntu machine. I tried it once on Windows and I didn't have a good experience because I didn't like using the Visual Studio. I like to write code, so really prefer a text editor over an IDE.
This weekend I found that it is super easy to write and run C and C++ programs on Ubuntu. GCC was already installed, and after installing G++ I could compile C++ programs easily. I just used my text editor, which is all I really want to use.
The only thing I was struggling with, and it could be the reason why I may need an IDE, is debugging. The error messages that GCC and G++ are giving are not very awesome, and sometimes I would compile the program without error, just to find that it gives a "segmentation fault" or other errors that offer no information.
So am I forced to learn and use an IDE, or are there debugging tools I should use instead? If you don't use an IDE, what do you use, and how do you debug?
Similar TutorialsThis topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=322565.0 Please tell me how to connect php and mysql in ubuntu 14.04
Code: [Select] <?php $myServer = "<remote ip>"; $myUser = "<username>"; $myPass = "<password>"; $myDB = "FAP2"; //create an instance of the ADO connection object $conn = new COM ("ADODB.Connection") or die("Cannot start ADO"); ?> No error messages reported, but page "dies" at this point. The ubuntu machine can see the sql machine, but yet this is happening. I've been doing a lot of studying of Linux lately. I enabled the root acount to do some work. When done, even if I logout, close the terminal, or reboot, I can still access the root account without supplying the root password. So what am I not understanding or what am I doing wrong? I don't really need to disable the root account, but this is just a learning experience, and I'm not understanding why I still have access. See below:
# I needed to enable root access for something
skunkbad:~$ sudo passwd root
# I did what I needed to do
skunkbad:~$ sudo -i
root@ubuntu-Inspiron-3647:~#
# I logout from root
root@ubuntu-Inspiron-3647:~# logout
# I disable the root access per instructions from many internet references
skunkbad:~$ sudo passwd -dl root
# Root access is still available, even if I close and reopen the terminal
skunkbad:~$ sudo -i
# I logout from root
root@ubuntu-Inspiron-3647:~# logout
# Trying to access root via su prompts for password, and old password is wrong
skunkbad:~$ su
Password:
su: Authentication failure
My setup: (everything on a local network) Web server: Ubuntu Server 8.10 -- Workgroup File server: Windows Server 2008 x64 -- domain Test server: Win 2000 running WAMP -- domain I'm trying to run the code snippet below. $file is a file on the File server above. It definitely exists. Running the code below on the Test server works perfectly. But the file cannot be found when running from the Web server. $file = '//server/share/file.txt'; if (file_exists($file)) echo 'yay!'; else echo 'error'; What with the safe mode considerations, I've also tried to add: ini_set('safe_mode', 'Off'); to no effect. And since file, and fopen similarly not work, I'm pretty sure it's not that either. The File & Test servers are on the same Windows domain, but that's definitely not the reason. I tried the code on a file on a Linux computer in the Workgroup (where the Web server is) with the same results: Test server works, Web server does not. Please advise; I'm really lost. This topic has been moved to Linux. http://www.phpfreaks.com/forums/index.php?topic=307024.0 |