Jump to content

Jbudone

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Jbudone's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As of now, I am so very lost! I have recently discovered this awesome technique called Comet, aka Reverse AJAX aka HTTP Push.. The idea is simple: With a "Forever iframe" you can load up a script from the server which constantly loads, and flush()'s buffered output to the client in the form of Javascript script's. These scripts may then be executed on the client WHILE the php script is still executing, hence allowing the serverside script to push events to the client as they come up. Another trick is using AJAX Longpolling, which is simply creating an AJAX request, and on the serverside if there's no events or valid data to return to the client, then it simply performs a quick sleep() and looks again for new data/events to return. As soon as it returns any data, another AJAX request is made and sent back to the server. My problem is that I'm trying to send AJAX requests WHILE one of my Comet connections is alive. I've tried it both with the forever iframe, and with AJAX's longpolling. But the issue is that my AJAX requests seem to be put on a queue, and aren't sent to the serverside until AFTER the connection closes from the iframe, or until my other AJAX LongPolling request finally returns. This is bad for me, because my goal is to create a Comet-based chatroom server; where the Comet side of things will continuously look for new messages in the chatroom and push it to the client, while concurrent AJAX requests can be sent to the server (eg. user types a message, leaves the channel, joins another channel, etc.) I've looked all over Google, asked around on IRC, and tried all sorts of test. But I can't find a single person with the same problem as me, and I can't figure out how to get this to work or what the problem could possibly be. Is this normal behavior? Are AJAX requests not supposed to be able to send until after an iframe connection has been closed, and previous AJAX requests return first? Or maybe its because both my longpolling ajax requests call the same server script? Is there any way I can get around this? Anything anything I can do? Any tips, suggestions or enlightment in the area would be very much appreciated. Thanks!
  2. Wow that was exactly what I needed! Thanks for the reply PFMaBiSmAd =] I didn't realize I had to activate .htaccess and its settings . After adding in an AllowOverride All in the global directory, it worked like a charm!
  3. Where am I? Is this the Twilight Zone? I am utterly lost here! How is it possible that I create a .htaccess file in my root directory (next to index.php), then write index.php as. <?php echo ini_get('include_path'); exit; ?> my .htaccess with, php_value include_path ".;J:/JStuff/Work/Personal/Webspace/summit" (note: I also tried : instead of ; ..and.. \\ instead of / ) The results? The EXACT same as what php.ini defines =[ hmm...what if I put this code directly into my httpd-vhosts.conf file, with this given directory, <VirtualHost *:80> ServerAdmin jbud@live.ca DocumentRoot "J:/JStuff/Work/Personal/Webspace/summit" ServerName jbud.local ServerAlias www.jbud.local <Directory J:/JStuff/Work/Personal/Webspace/summit> Order Deny,Allow Allow from 127.0.0.1 php_value include_path ".;J:/JStuff/Work/Personal/Webspace/summit" </Directory> </VirtualHost> And success! It now prints out the new include_path..but this is not a solution I can accept because although this will work on my localhost, I don't think that my online host will allow me to rewrite this info, or any future hosts that I may switch to. I decided to look further into this...perhaps I could rewrite my AccessFileName from httpd.conf (this value IS stored inside httpd.conf....isn't it?) . Well, I couldn't even find that key AT ALL inside the file how is this possible!? But I added it myself at the very bottom of the file anyways: AccessFileName .htaccess Trying the same tests produces, yet again, the default values given from php.ini INSTEAD of my .htaccess stuff. I've tried putting other pieces of code in my .htaccess file, just completely random snippets I found around google to see if anything would happen. But it appears as if its completely ignoring the file altogether. What is going on here?! D= #utterlylost
  4. Lol as soon as I read your comment, optioned, I was sure that must be the issue.. So I opened a new window in Incognito mode and, no go =[ the script still isn't activating. In fact, it seems to be continuing too! My 3rd redo-script for one of my JS files has just gotten blocked by Chrome AGAIN! Am I really the only person out there experiencing these issues? For the time being I'll be doing the bulk of my development over in Firefox instead I guess..
  5. Not at all, the problem is that it was completely blocking the CSS and JS files.. So any stuff I had in the CSS file wouldn't even go through, and anything built into the JS script were being completely ignored. You should have seen a popup when you opened the page on that site, but for me I got no popup =[
  6. Seriously? Wow, I wonder why mine is automatically blocking the script.. I hope this isn't affecting what I'm seeing on any other sites, but I guess thats okay in this case as long as its only me with these problems. Thanks for the tip on changing the Doctype placement, I didn't notice that spacing above it =]
  7. Oops! Sorry about that, I forgot to mention that it should be found directly on the page that you're brought to after logging in. Here's a screenshot of what I'm seeing here: [attachment deleted by admin]
  8. Sure, go to www.moneyscavenger.com .. Then Login @ tester tester The files are both being loaded in the <head></head>
  9. Hey guys, I'm having a very odd problem with a website where some of my files seem to be going corrupt somehow after a while. This has happened with a couple files so far, one of my .css stylesheets, and a .js file. What happens is that Chrome seems to block them but automatically appending style="display: none; visibility: hidden; " Disabled to the end of the include. I've tried changing the text around on the inside, and even when theres NOTHING inside of the files, it still blocks them. I've tried renaming the files to something else, and it seems to load up just fine again. So then I create a blank file with the old name, and once again it gets blocked. Has anybody else heard of this problem before? Do you know what could be going on? The weird thing is that everything was working perfectly fine, then it randomly started blocking the script SOMETIMES, and then eventually ALL the time. I'm completely baffled by this, as I didn't think something like this would be possible?
  10. Hey guys, I'm having a strange problem with cURL that I'm drawing an absolute blank to. It works completely fine locally, but when I upload the files to my webhost and test it over there, it doesn't work at all - it loads for about 2 minutes, and then displays: Server error. The website encountered an error while retrieving http://www.craigwatcher.me/playground/units.php. It may be down for maintenance or configured incorrectly. I've checked the error logs but nothing new is being added into there. Basically I'm just iterating through a list of URLs and cURLing each of them. Let me show you the code that I'm working with: ini_set('max_execution_time',0); require_once('../system/utilities.php'); // This will give us our getLocations() function, which has been tested to work 100% both locally and online $categories = array('jjj', 'ggg', 'bbb', 'sss', 'hhh'); $locations = getLocations(); if (!$locations) exit; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_TIMEOUT, 10); foreach ($locations as $country => $cities) { $countryCode = getCountryCode($country); foreach ($cities as $city) { foreach ($categories as $category) { $url=$city.'.en.craigslist.'.$countryCode.'/'.$category.'/index.rss'; echo $url.'<br/>'; curl_setopt($ch, CURLOPT_URL, $url); $rss = curl_exec($ch); if (!$rss) echo ' FAILED to load: '.$url.'<br/>'; } } } curl_close($ch); I've already tested everything else (eg. the getLocations() and getCountryCode(), and they prove to work 100% fine both locally and online. What could it POSSIBLY be!? I'm pulling my hair out over here, my mind is boggling and I'm completely lost at what could possibly be going wrong.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.