Ubuntu :: Server Cannot Read .php Strings?

Mar 24, 2010

localhost is now fine and localhost/test.php too. However php embedded in html files refused to save in /var/www? what is wrong with my server not being able to read .php strings?

View 2 Replies


ADVERTISEMENT

Programming :: Read Any Given Maze.txt Into An Internal Dynamically Allocated Array Of Strings?

Apr 26, 2011

I am looking for an easy way to convert any given maze.txt of any size to a internal array of strings(dynamically allocated). Important is that dimensions of the maze (row, col) shouldn't be written by the user instead they have to be somehow read from the file. This is not my homework assignment! It is a small part of a project that i never dealt with. I never read files to C string.... I made it for specific maze dimensions, but want it to work with any given .txt file.

View 9 Replies View Related

General :: Searching And Replacing Strings In File With Strings In Other Files

Jul 29, 2010

I want to search and replace strings in a file with strings in other files/i need to do it with big strings(string1 is big) and i want to use a txt file for this.But this code not working :

View 14 Replies View Related

Server :: Monitor Server Snmp Read From Logs Parsed Possible?

Jul 21, 2009

I would like to monitor a RedHat via snmp. I would like to make available data via snmp. The data that I would like to graph are only present in logs file. Is it possible to parse data from applicative logs and have them available for my cacti server via snmp? I already monitor CPU, mem, and others with cacti using the standard MIB.What would be the logical step I would need to achieve that?

View 1 Replies View Related

Server :: Server Change Into Read-only Mode ?

Jul 14, 2011

I've a popular vbulletin forum (10k max in vbulletin stats 'whos online') runnin in two servers like this:

1) Web server running vBulletin.
Dual Intel E5620 @ 2.40GHz (shows 16 cpus)
12 GB RAM
2 x 500 GB SATA (one for system/web and other for backups)
CentOS 5.6 64 bit
Apache/2.2.17
PHP 5.2.16

2) MySQL 5.server
Dual Intel E5620 @ 2.40GHz (shows 16 cpus)
16 GB RAM
2 x 500 GB SATA (one for system/web and other for backups)
CentOS 5.6 64 bit
MySQL 5.0.77

Web server connects to MySQL using private LAN.
Web-php server works with xcache as recommended by vBulletin.
Image/avatars and other static files (css, js, etc) are on a CDN
MySQL server uses Memcached for caching common queries.

The problem I'm facing, is from time to time (let's say one or two times a week) the Web server goes into read only mode... then the server has to be rebooted in order to get online normally and be able to work. From the logs I've seen this:

Code:

This is a new server, and in the old server the 'read only mode' issue happened very often too... so I guess it's not a HD issue.. it's just the HD have a heavy I/O usage. What do you think?

I am thinking about this solutions to improve the webserver performance:

1) 75% of the vbulletin users are anonymous users, so I've been thinking about using Cloudflare as a cache for all that traffic, that would reduce the php-webserver process a lot.

2) Using an external email server is a good option I guess... as right now the webservers also handles the email notifications for all the vbulletin users and it is constantly sending email everywhere. So, email will be stopped to gain server performance.

3) Mounting partitions with 'noatime' at /etc/fstab seems to improve I/O performance.

View 3 Replies View Related

Server :: Server Side Apt To Read DVD With Controls

Jun 3, 2010

Is there an app I can put on my website hosting server that will do the following:
1. Allow the user to view a DVD.
2. Pause / stop to view something in more detail.
3. Rewind to view something again.
4. Mark location so they can return to viewing in the same place at a later time.

I belong to a fly fishing club. We have tapes of fly tying sessions dating back to 1992. Since we are registered as an educational charter with the state, I would like to make the available to our web sight viewers for learning.The club owns all these tapes and they were filmed at club sponsored functions. There should be no copyright problems. I am in the process of converting them to digital.

View 1 Replies View Related

Ubuntu :: Extract Only The Strings After The Comma?

Jun 1, 2010

I have a csv file in this format:

Code:
1,characterswithnospace
2,same
4545,characters
I want to extract only the strings after the comma,

View 4 Replies View Related

Ubuntu :: Replace Strings Containing Special Characters With Sed?

Jan 4, 2011

here's my newbie question - I want to change the following string in text files

Code:
E:MP3
with the following string using sed:

[code]....

View 3 Replies View Related

Ubuntu :: Way Of Finding Common Strings Between Two Files?

Jul 7, 2011

I have two text files in the form:1 ItemA [value]2 ItemB [value]3 ItemC [value]Some of these items are common for both files, while others are missing from either one or the other.I want to compare the values for each common item in the two lists, but don't know how. I have a vague idea that probably grep might be useful, but I don't know how to use it for this purpose.So, to sum it up, what I would like to do is to take to text files containing lists and merge their common items into a third file in the form:

1 ItemA [value_from_list1] [value_from_list2]
2 ItemB [value_from_list1] [value_from_list2]
3 ItemC [value_from_list1] [value_from_list2]

[code]....

View 2 Replies View Related

Ubuntu Servers :: Read Server Log From Web ?

Feb 5, 2010

does anybody know if there is some web tool which allow the end user to read the server log ? I am a system administrator in my company and i would need to share the server log information to the developer team without allowing them to access to the server.I was thinking to some web applications .. i would try phpLogCon but unfortunately it reads only syslog . I need to share some application logs (php or java web application).

View 4 Replies View Related

Programming :: Using Sed To Change Strings?

Sep 3, 2010

I am having a lot of problems trying to change one string by another using sed: the sentence is like this:

sed -i 's/KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660"/KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0666"/g' 50-udev.rules
it is just to fing the line with:
KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0660"

[code]....

View 8 Replies View Related

Programming :: C Truncating Strings

Dec 11, 2009

I wrote this small program that will truncate a string that's entered in by the user.An example of its usage:if the user enters in a string say "abcdefghijklmnopqrstuvwxyz" the program will only take the first 9 characters and truncate the rest so that the user can be prompted for a second string and not be worried about remaining characters left in the stream.Now this program works O.K. but I would like to find something in C that has this functionality build into it...Does anyone know of any function that will accomplish this.

View 1 Replies View Related

Programming :: Replace Txt Between 2 Strings?

Aug 4, 2010

I am trying to replace a section of a file between the first instances of the strings {}, with the contents of another file. Example of the format of the file I'm trying to modify

Code:

Servername=something.com
hosts {
macaddress1
macaddress2

[code].....

Then captured all the "macaddress#"s to a variable and used sed to swap

sed "s/$CURRENTDATA/$NEWDATA/" filename

However I get 1 of 2 errors,

Using a small number of macs in "$NEWDATA"

sed: command garbled: s/ macaddresshere

Or when using a large number of macs in the $NEWDATA variable get

bash: /usr/bin/sed: Arg list too long.

how to replace a large block of txt in one file with another large block from another?

View 6 Replies View Related

Ubuntu Security :: Filtering Connection Strings With Iptables?

Mar 12, 2011

I have several CS servers running on ubuntu server, and sometimes someone is trying to brute server's RCON password with the program called HLBrute. I've found the following rules to prevent such hack attacks, but they don't work What can be wrong in these rules?

Quote:

iptables -A INPUT -p udp -m multiport --dport 26000:30000 -m string --algo kmp --string "HLBrute" -m limit --limit 1/hour --limit-burst 5 -j LOG --log-prefix " HLBrute_Ataka "
iptables -A INPUT -p udp -m multiport --dport 26000:30000 -m string --algo kmp --string "HLBrute" -j DROP

View 3 Replies View Related

Ubuntu :: Bash Script - For Loop - Replacing Strings?

Aug 16, 2011

I'm not overly great with bash scripting. I do more batch file stuff for Windows than anything else but I'm trying to branch out a bit. (Frankly, I'd love to do this in Ruby but I'm not there yet...) Maybe I'm not using the correct terminology and that's why my searches are coming up useless...

Anyway, I have a script that does some work with HandBrake. Although it deals with HandBrake, I think the issue is not with HandBrake itself. The issue: I had a simpler script which worked fine but it would give me an MP4 with a file name of: Some Movie Name.iso.mp4 and it would still play but I wanted to get rid of the .iso in the file name. I also wanted to drop it into another directory during the encoding. That's why you see a $source & a $destination variable.

handbrake.sh
Code:
#!/bin/bash
source=/media/data/movies
destination=/media/data/movies/mp4s

[Code]...

View 7 Replies View Related

Ubuntu :: Server Side Apt To Read DVD With Controls

Jun 3, 2010

Is there an app I can put on my website hosting server that will do the following:

1. Allow the user to view a DVD.
2. Pause / stop to view something in more detail.
3. Rewind to view something again.
4. Mark location so they can return to viewing in the same place at a later time.

I belong to a fly fishing club. We have tapes of fly tying sessions dating back to 1992. Since we are registered as an educational charter with the state, I would like to make the available to our web sight viewers for learning. The club owns all these tapes and they were filmed at club sponsored functions. There should be no copyright problems. I am in the process of converting them to digital.

View 1 Replies View Related

Debian Programming :: Sh Command Strings

Feb 8, 2014

I use udhcp with some of my minimal installs. I've messed around with the code a bit when it wasn't working correctly - a few years ago. I will find time - I hope soonish - to figure out how to do a few other things with it.

For now though, I'm using this string to grab my ip after startup

Code: Select allsu -c 'ifconfig eth0&&ifdown -a&&ifup lo&&ifup eth0'&&/sbin/ifconfig eth0

I realize I could substitute ifup -a but I'm more interested in figuring out how to make ifup wait for the ip to become available if it is not available yet.

Never mind that one, just typing out the question answered it for me, when I find it in the scripting man ' ; : " & =

Or if there are any other suggestions for better construction of the string.

View 2 Replies View Related

Programming :: Extracting URLs From Strings?

Jun 28, 2009

I have a PHP script written that is checking a string to see if it contains a link in it (i.e. a URL). I have the following if statement, that uses 3 possible regular expressions to determine if there is a link or not.

Code:
// check if we found a link
// links are denoted by strings that:
// - contain http://
// - contain www.*.*

[Code]....

I'm not convinced yet that writing a shell script to do this is the best course of action. If someone is capable of doing this with a Perl or a Python script that's fine too. If you want to make it super high performance and write it in assembly

View 1 Replies View Related

General :: Sed Search To Match NOT Several Strings?

Nov 15, 2010

I am using sed to process an ascii tcpdump file whereby each packet is processed into a line with the same number of columns and useful information is pulled out like the time, packet type, length, and also IP addresses, payload type and port numbers where appropriate. The time is already changed to seconds, followed by the protocol over ethernet, such as IP, IP6, ARP etc. and I can change anything it detects as IP, IP6 and ARP into some other string, pulling out necessary information depending on the protocol and payload.The beginning part of the search for IP starts with the sed search /([0-9][0-9]*.[0-9][0-9]*)[ ]IP[ ,] ... /, where time is in seconds and ellipses means more stuff, and likewise for IP6 and ARP.But how do I process the lines that are NOT IP, IP6 or ARP? (Specifically NOT /IP[ ,]/, /IP6[ ,]/ or /ARP[ ,]/.) So that I can format them into a string with the same number of columns.

View 2 Replies View Related

Programming :: Best Command To Use To Parse Strings?

Mar 24, 2010

what is the best command to use to parse strings?I have a variable $str and need to parse this string.Can you provide an example of the command used to get a substring of $str based on the index values of start and end

View 3 Replies View Related

Red Hat / Fedora :: How To Extract Certain Strings From A Variable

Mar 18, 2009

I have one question.

Assumed I have have a variable $userlist, it has the following contents:

brownj
smithk
smithk2
smithk3
hynesp
hynesp2
leeb

How can I write a bash script that extracts all the strings smithk, smithk2, smithk3, etc from variable $userlist, and assigns these strings to a new variable?

View 1 Replies View Related

General :: Search For Text Strings

May 19, 2011

What would be the best way to search for a file that contains a string similar to this:

View 1 Replies View Related

General :: Strings: '/lib/libc.so.6': No Such File

Jul 20, 2011

I'm on Ubuntu 11.04. I get the above error when running a utility to get code from a version control system (StarTeam). The error looks generic enough that I'm hoping its an easily resolvable system problem. Below is how I get it ...

Code:

$ /bin/sh -c stcmd label -x -nologo -stop -p username:password@mydomain.com:9999/NNA/NNA/Technology/nna/tools/selenium -nl selenium-utils-1.0 -b
strings: '/lib/libc.so.6': No such file

[code].....

View 1 Replies View Related

General :: Fastest Way To Search For Strings?

Jan 29, 2010

Is there a faster way to search for a file containing a given string than using grep -re "string" /

This takes a long time to search through the entire system, so I was wondering if there is a faster way. I don't know the name of the file, just that it will contain a given string.

View 4 Replies View Related

General :: Set Operations For Strings In System?

May 11, 2011

Let me know unix commands to implement set operations on strings.

View 9 Replies View Related

Programming :: Cannot Match Strings That Appear To Be Identical

Feb 25, 2011

i have an sql table with 2 columns i run a script that randomly selects a word from the table in column 1.
the word is displayed on the screen and I guess what it means i concatenate the randomly selected word and the answer the script looks for a match in mysql if it finds a match it says "Good job!" if there is no match it will say "not correct". However when i get it right it says not correct even though when i echo the variables they look exactly the same. the script below:

#!/bin/bash
var=$(mysql translator -u root --password=*-N<<EOF
SELECT word FROM tagalog ORDER BY RAND() LIMIT 1
EOF
)

[Code]....

View 4 Replies View Related

Programming :: Get The Strings That Matched Sub-expressions?

Jun 8, 2010

Using the regex.h functions, how do you:

1) get the matched strings?

2) get the strings that matched sub-expressions?

View 4 Replies View Related

Programming :: 'strings' Binary From Binutils - How To Use It

Jul 14, 2010

it is about 'strings' binary from binutils. I recently wanted to test what it does and how it works. The best I did was this:

Code:

#!/bin/sh
PROGRAM="
int main()
{

[code]....

Ok, from the output I don't get it.Can someone show me in a simple script, what is 'strings' good for ?

View 10 Replies View Related

Programming :: Variable Strings In A Script?

Sep 5, 2009

I have a set of numbers under some headers in a file:

FNUM,BNUM,C1N,C2N,C3N,C1S,C2S,C3S,
4535, 109, 5.5955, 5.6523, 5.8084, 311.419, 295.2540, 286.9984,
4536, 109, 5.7667, 5.7174, 5.6771, 291.782, 285.0646, 271.5945,

[code]...

View 2 Replies View Related

Programming :: Working With Strings In An Xml File C++?

Mar 7, 2011

I have a function that retrives text between title and links tags from an XML file, but what i want is to test if the title and link tags are between item tags. This is my code:

Code:
istringstream iss(content);
string line;

[code]...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved