![]() |
removing a file on a Linux server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: removing a file on a Linux server (/showthread.php?tid=71633) |
removing a file on a Linux server - richb201 - 09-08-2018 Somehow some of my local development files got on my server. In the attached screenshot you can see a file called "C:\xampp\php\logs\php_error_log". It shouldn't be on Ubuntu and is causing havoc. l want to remove it with rm. So I change to the /opt/bitnami/apps directory by using "cd apps". But now when I do a ls -l to list the directory I get: bitnami@ip-172-26-10-99:~/apps$ ls -l total 4 drwxr-xr-x 5 root root 4096 May 23 10:57 phpmyadmin As you can see, "C:\xampp\php\logs\php_error_log" is not showing. So how can I delete it? if I type sudo rm "C:\xampp\php\logs\php_error_log" I get: bitnami@ip-172-26-10-99:~/apps$ sudo rm C:\xampp\php\logs\php_error_log rm: cannot remove 'C:xamppphplogsphp_error_log': No such file or directory So how do i get rid of this thing??? I am aslo having a problem loading php. When I try to run php -v I get bitnami@ip-172-26-10-99:~$ php -v Failed loading C:\xampp\php\ext/xdebug.so: C:\xampp\php\ext/xdebug.so: cannot open shared object file: No such file or directory PHP 5.6.36 (cli) (built: Apr 27 2018 22:46:36) Copyright © 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies The only lines in my server's php.ini that refer to my local PC are: include_path=C:\xampp\php\PEAR extension_dir="C:\xampp\php\ext" upload_tmp_dir="C:\xampp\tmp" error_log="C:\xampp\php\logs\php_error_log" mail.log = c:/mail_log browscap="C:\xampp\php\extras\browscap.ini" session.save_path="C:\xampp\tmp" openssl.cafile=c:\users\richb201\.aws\cacert.pem openssl.capath=c:\users\richb201\.aws\ So what do I change these to? Any help is appreciated. RE: removing a file on a Linux server - skunkbad - 09-08-2018 Richard, you're in the wrong directory. If you look closely at your image, the directory that contains the file you want to delete is not ~/apps. You were in that directory, but then you went up one directory with cd .. The directory that contains the file you want to delete is your home directory (~). You should be able to do this: sudo rm -f ~/C:\xampp\php\logs\php_error_log or to make it easy on yourself: sudo rm -f ~/*php_error_log Just a tip; most Linux distros will allow you to type "ll" instead of "ls -l" or "ls -la". It's really fast. Give it a shot. RE: removing a file on a Linux server - richb201 - 09-08-2018 Thanks Brian. I'll check it out. BTW, I was thinking that perhaps my php install is pretty screwed up and I should delete it and reinstall a fresh one. Is there an easy way to remove the install and then a way to reinstall? RE: removing a file on a Linux server - skunkbad - 09-08-2018 "Easy" just depends on your skill level. I have doubts that PHP is screwed up. Why do you think that? RE: removing a file on a Linux server - richb201 - 09-08-2018 (09-08-2018, 08:30 AM)skunkbad Wrote: "Easy" just depends on your skill level. I have doubts that PHP is screwed up. Why do you think that? Because I made a mistake and copied my php.ini from my windows PC to my linux server. There are many places in the php.ini that point at my local hard drive. I don't have a copy of the original linux php.ini. So I need a new copy. Is there anywhere I can get a linux version of php.ini without re-installing? I guess I could just create a new LAMP instance, copy the php.ini, and then delete the instance? OK. I created another instance and copied the php.ini from that instance to mine. Now I just need to install Xdebug to it. Which one should I install? is there a windows version vs a Linux version. I know that I need 64 bit and I am using php 5.6. Do I need threadsafe for working with CI? RE: removing a file on a Linux server - richb201 - 09-08-2018 (09-08-2018, 11:00 AM)richb201 Wrote:(09-08-2018, 08:30 AM)skunkbad Wrote: "Easy" just depends on your skill level. I have doubts that PHP is screwed up. Why do you think that? well my phpStorm is still complaining "Invalid descendent file name "C:\xampp\php\logs\php_error_log" ". This is causing phpStorm to show PHP version: not installed. RE: removing a file on a Linux server - skunkbad - 09-08-2018 I know it can be difficult to give up Windows, because I was there once, but if you started developing your websites on Linux, you'd never have these weird issues. I use Ubuntu Desktop. Current version has PHP 7.2 which is a bonus. RE: removing a file on a Linux server - richb201 - 09-08-2018 Yes. I guess so. In my routes.php for windows I have $route['default_controller'] = 'Users/login'; $route['404_override'] = ''; $route['translate_uri_dashes'] = FALSE; $route['registration'] = 'registration'; $route['login'] = 'login'; $route['subit_backend']['GET']='subit_backend/register'; Do I need to manually change these to be "\" to run on Linux? I have other things such as a view that has the following line in it <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> Do I need to change this to: [i]<script src="http:\\html5shim.googlecode.com\svn\trunk\html5.js"></script>[/i] RE: removing a file on a Linux server - skunkbad - 09-08-2018 (09-08-2018, 08:48 PM)richb201 Wrote: Yes. I guess so. In my routes.php for windows I have No, you don't need to make that change. |