Search Results

Search found 9 results on 1 pages for 'talkingnews'.

Page 1/1 | 1 

  • apache2 and php slow first load on Ubuntu VPS - something like mysqltuner but for apache?

    - by talkingnews
    Ubuntu 10.10 64 bit VPS, 512Mb dedicated RAM. Mysql tuned so that sqltuner is completely happy. Used RAM never above 350Mb out of the 493 available. Load never exceeds 1.04 or so. httpd.conf tuned as per all the guides for vps of that memory - amount of preforks, spares etc. But for the FIRST load a site after having not visited for a while, it's taking ages. First load: Parse Time: 3.576 - Number of Queries: 50 - Query Time: 0.019723195953369 Reload Parse Time: 0.096 - Number of Queries: 39 - Query Time: 0.0066126374511719 Subsequent reloads will be at this speed. htop shows two items as soon as I load that page for the first time: php-cgi /usr/sbin/apache2 -k start I'm using suPHP but I've tried fast-cgi and cgi. Stuck now, a weekend of tweaking has brought me nothing. Advice appreciated.

    Read the article

  • I need a few minutes of dedicated server a week, but not for hosting, just to convert ogg etc.

    - by talkingnews
    I'm completely happy with my webhosting, it's just that I need to do one little thing they won't allow, and that's run an instance of Sox to convert about 30 mp3s to ogg files, in various directories, a couple of times a week, to be done automatically in response to the detection of the upload of an mp3. Probably looking at a minute of server time over the whole week. I've had unhelpful suggestions on other forums like "why not leave your home PC on 24 hours a day and then use all your isp bandwidth to do this", which doesn't work for me. I know that I can host files on, say, Amazon S3, but is there something similar for my needs? All it would need to do would be: wget/ftp the mp3 files, convert them to ogg, ftp the files back to my hosting. Of course, all this wouldn't be needed if there was such a thing as a compiled binary of Sox (or any mp3ogg converter) for Centos which I could upload without needing root access, but I've given up asking that one, but always open to suggestions!

    Read the article

  • Seeking past end of file causes Apache hang, and it never restarts.

    - by talkingnews
    I've actually solved my problem with a better script, but I'm still left wondering why Apache2 hung completely - this is an out-of-the-box ISPCONFIG 3.03 install, everything bang up to date, running perfectly. Until... The troublesome but innocent-looking script: $fp = fopen("/var/log/ispconfig/cron.log", "r"); fseek($fp, -5000, SEEK_END); $line_buffer = array(); while (!feof($fp)) { $line = fgets($fp, 1024); $line_buffer[] = $line; $line_buffer = array_slice($line_buffer, -10, 10); } foreach ($line_buffer as $line) { echo $line; } You get the idea, just a script I found on a forum somwehere. I did this for various logs, since it's a nice easy window on what's occurring (in a protect dir, of course!). One day, the logs having grown large an me having sorted all my cron, scripting and mail queue errors, I thought I was time to start afresh. updated, rebooted, archived and deleted the logs. When I ran my script a couple of hours later, it hung. And hung. 8 minutes I waited. Chrome timed the page out, of course, but the server never came back to life. htop showed /usr/sbin/apache2 -k restart using 100% CPU. Never came back until I did a service apache2 restart. Ran fine, as soon as I hit that logfile again...dead. So, I worked out it was the logfile script, and I worked out that seeking beyond the end of the file wasn't good, and I found a better script http://www.php.net/manual/en/function.fseek.php#90450 But what I'm left wondering is... why didn't something restart or kill the process? How was one hanging page able to bring down the whole server? It's running suphp. I say "out of the box", I've tweaked mysql and apache to fork and reserve sensible amounts of processes for the 512Mb RAM the VPS has, and it'll handle multiple refreshes of large pages, and hadn't hung before. Any ideas how I'd avoid this? Google isn't my friend in this instance beyond the reccs. above about number of processes vs RAM available.

    Read the article

  • I need a few minutes of dedicated server a week, but not for hosting, just to convert ogg etc

    - by talkingnews
    I'm completely happy with my webhosting, it's just that I need to do one little thing they won't allow, and that's run an instance of Sox to convert about 30 mp3s to ogg files, in various directories, a couple of times a week, to be done automatically in response to the detection of the upload of an mp3. Probably looking at a minute of server time over the whole week. I've had unhelpful suggestions on other forums like "why not leave your home PC on 24 hours a day and then use all your isp bandwidth to do this", which doesn't work for me. I know that I can host files on, say, Amazon S3, but is there something similar for my needs? All it would need to do would be: wget/ftp the mp3 files, convert them to ogg, ftp the files back to my hosting. Of course, all this wouldn't be needed if there was such a thing as a compiled binary of Sox (or any mp3ogg converter) for Centos which I could upload without needing root access, but I've given up asking that one, but always open to suggestions!

    Read the article

  • Add rss xmlns namespace definition to a php simplexml document?

    - by talkingnews
    I'm trying to create an itunes-valid podcast feed using php5's simplexml: <?php $xml_string = <<<XML <?xml version="1.0" encoding="UTF-8"?> <channel> </channel> XML; $xml_generator = new SimpleXMLElement($xml_string); $tnsoundfile = $xml_generator->addChild('title', 'Main Title'); $tnsoundfile->addChild('itunes:author', "Author", ' '); $tnsoundfile->addChild('category', 'Audio Podcasts'); $tnsoundfile = $xml_generator->addChild('item'); $tnsoundfile->addChild('title', 'The track title'); $enclosure = $tnsoundfile->addChild('enclosure'); $enclosure->addAttribute('url', 'http://test.com'); $enclosure->addAttribute('length', 'filelength'); $enclosure->addAttribute('type', 'audio/mpeg'); $tnsoundfile->addChild('itunes:author', "Author", ' '); header("Content-Type: text/xml"); echo $xml_generator->asXML(); ?> It doesn't validate, because I've got to put the line: <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"> as per http://www.apple.com/itunes/podcasts/specs.html. So the output SHOULD be: <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"> <channel> etc. I've been over and over the manual and forums, just can't get it right. If I put, near the footer: header("Content-Type: text/xml"); echo '<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">'; echo $xml_generator->asXML(); ?> Then it sort of looks right in firefox and it doesn't complain about undefined namespaces anymore, but feedvalidator complains that line 1, column 77: XML parsing error: :1:77: xml declaration not at start of external entity [help] because the document now starts: <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><?xml version="1.0" encoding="UTF-8"?> and not <?xml version="1.0" encoding="UTF-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"> Thank you in advance.

    Read the article

  • Evaluating php generated javascript "inline"?

    - by talkingnews
    If you look at the source of this page http://kingston.talking-newspapers.co.uk/ you will see a large amount of inline javascript near the top. I don't really want all this extra stuff floating around in my page source, I'd much rather get it off into a script tag, and then I can minify it and all sorts. If I call it as a php file, this SHOULD work in theory, I just end the js file extension with php instead, and in the header I put the following: header("Content-type:application/x-javascript"); but... a lot of the php variables used to generate the playlist within the javascript are setup at the beginning of the main index.php file, and in calling this php-generated js playlist file like this, it seems to evaluate it entirely separately, so it's full of errors. The only way round it I can think of is to have the page write a file, then immediately read it in. The other thing is, the playlist is likely to change often and dynamically, so I think I need to get minify to NOT cache it?

    Read the article

  • Sending an email with browser capabilities and screen size etc.

    - by talkingnews
    A lot of my visitors are blind (with it being a site for the blind), and often when trying to diagnose problems, I'd like to know what version of browser etc they're using, whether flash is installed. Because more often than not, someone will swear they are using X, when in fact Y is installed. Currently, I'm using http://jsbrwsniff.sourceforge.net/usage.html piped into an email, but I've got 2 problems here: First of all, jsbrwsniff is quite "heavy" and hasn't been updated since early 2007, so there's a lot of -1's in the result. Secondly, if I call it as follows, the page reloads: <a href="#" onclick="sendEmail()">Email feedback</a> And if I call it like this, the page goes blank and looks like it's trying to infinitely load a blank page: <a href="javascript:sendEmail()">Email feedback</a> See the nightmare for yourself here: http://kingston.talking-newspapers.co.uk/ Now, I know there are 1001 articles and comments here and elsewhere saying "don't use browser sniffers, they can be spoofed (etc)", but honestly, you'll have to trust me that this is a significantly useful tool when you're talking someone in their more "senior years" and using a screenreader through "help about", when they've clicked the wrong window to start with! I'm using jquery anyway in the site, and I'm aware of $jQuery.browser and $jQuery.support, but these don't tell me the elements I need (like whether Flash is installed, and what version etc). I've looked everywhere for a jquery plugin for my needs, with no luck. Finally, if I have to stick to the current method of jsbrwsniff then it's not the end of the world, but if anyone knows a way of launching the user's email client populated with the information I need but WITHOUT refreshing or blanking the page, I'd love to know. BTW - there's a good reason for not using a webform, which is simply because it's easier for the screen-reader user to use an email client they are used to. Thanks!

    Read the article

  • Is there a simple way to "roll your own forms" for mysql in php, for example in jquery?

    - by talkingnews
    I've been googling around for a really simple way of making what is, in effect, nothing more than an enhanced phpMySql. In a mysql database, I have: Name, address, phone, website etc, plus 2 or 3 custom fields. This data is pulled out to make a website. All I want is to be able to make a freeform form, a bit like Access, but for the web, and the only thing I want to do over and above normal field editing would be to have a list of when I contact them, what was said, and perhaps a reminder when the next action is due. I've looked at so many CRMs my mind is boggling, and they all do WAY more than I need. I don't have leads or accounts, all I have is the need to make sure than when I update the person's details, and for that data to be in the same DB as my site is generate from. I'm happy to learn if I can get pointed in the right direction, and I have a feeling that something like what I want might lie in the direction of jquery. It's just that there's so much good jquery stuff about, I can't see the wood for the trees! Thanks.

    Read the article

  • How to get a Javascript routine to NOT act if it's in a text box?

    - by talkingnews
    I've got a simple page, and in that page runs a simple jquery keypress routine to catch clicks of the numbers 1 to 9 (has to be that to pass RNIB accessibility test). And in that page is a form, which can have numbers entered as part of a postcode. http://find.talking-newspapers.co.uk/result.php?addressInput=kingston Scroll to the bottom, try typing 8 or 9 for example. The text is entered, but it also acts on the keypress. Expected, but not good. I'm aware of various things like document.getElementById, but I can't figure out how to put these together to ensure that while the cursor is in the text input box, it doesn't act out the keypress catcher.

    Read the article

1