Jump to content

alexnofue

Members
  • Content Count

    160
  • Joined

  • Last visited

Community Reputation

0 Neutral

About alexnofue

  • Rank
    Member
  • Birthday 02/19/1982

Previous Fields

  • Languages
    HTML, PHP, JavaScript

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Bogotá, Colombia
  • Interests
    Learn a lot, then play videogames!!
  1. Hello, thank you for your answers. Php is running, it gests some information from a database, etc. but, for example, in the php code: echo "<script> window.location='" . $_SERVER['PHP_SELF'] . "';</script>";exit; then, the output in the browser is: <!--?php<?php<script--><html><head></head><body>window.location='/index.php';</body></html> I don't know if an Apache module can (and it is) doing that.
  2. Hello, the xmlhttp.onreadystatechange=function() {} line is an anonymous function assigned to xmlhttp.onreadystatechange, that means that it should have an semicolon to end the expression, or a new line. <!DOCTYPE html><html><head><script>function loadXMLDoc(){ var xmlhttp; if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("divpage").innerHTML = xmlhttp.responseText; } }; x
  3. Hello, I am trying to update a program from apache 2.2 to apache 2.4 and php 5.2 to php 5.6.The server seems to be working properly but something is changing the html in a php file i have: <?php//some code?><script type="text/javascript" src="/route/to/some.js" ></script><table width="100%" border="0" >... in the browser is changed to: <!--?php<script type="text/javascript" src="/route/to/some.js"--><table width="100%" border="0" >... I don't know if apache is doing that or what else. Thanks
  4. This is just a little advice, you can check how facebook or other pages do it by checking the network traffic. chrome has developer tools to check that, so does IE or firebug in firefox
  5. alexnofue

    Shoutbox

    Hi, the first thing i noticed was how big is your header, if you see this forum's header is very small. Also the page keep refreshing, i found the setting, 2 seconds is a very short time. Remember that the webserver is a computer that handles every request, in a production enviroment with thousands of users that is going to burn the place down. Maybe you could try to reduce the request doing ajax to the "shoutbox" only. When i tried to enter http://beta.mudsaf.info then it listed your files, that is a small webserver configuration. A index.php would be fine too, even if it is just the menu
  6. Hi, thanks ingolme for your response i found this page with some info that seems to work after i "change" it to php. wiki.tcl.tk/989 got it like this preg_replace('/^((?!(dog|cat)).*)|^((dog|cat).+)/i', '', 'bird'); not quite sure how does it work, wich could mean trouble later on.
  7. alexnofue

    What Ide

    I had to work in a rusty machine once, installed notepad++ and keep using it until now, even though it's not a IDE
  8. You're right, i'm trying to do a white list. i tried preg_replace('/[^(dog)(cat)]/i', '', 'bird'); and got 'd' then i tried preg_replace('/(?!(dog|cat))/i', '', 'bird'); and got 'bird'. I was somewhere close to this one with no results
  9. Hi, that is like something from a result set from a database query, what do you get from a print_r or a var_dump?
  10. Hi, i'm trying to use preg_replace to clean a variable value if it isn't what i need let's say i need a number in a variable, so i have: preg_replace('/[^0-9]/', '', $var); so if $var = 'dog' then i get '';if $var = '12' then i get '12' now i want to do the same with some values, e.g. i only want to receive 'dog' and 'cat' after replacing so if $var = 'bird' then i would get ''if $var = 'dog' then i would get 'dog' i have so far preg_replace('/dog|cat/i', '', $var); and didn't work, can i do this using preg_replace?or should i do it some other way?
  11. alexnofue

    Iframe Fun

    Are these sites yours? if they are you could put that code inside a function.
  12. Hi, don't use the align="center" use text-align instead. li div{text-align: center;}li div.current a{background-color: #FF0000;} the second style is for use a class in your current menu option, or in your example "About us" like this <div class="current" ><a href="../startup/about_us.htm">About Us</a></div>
  13. OK, i checked the network with justsomeguy's suggestion PCATTCP, i got 104865 KB / sec between BOX B and BOX C (the new servers), so i don't think is network problem.Checking sql server's profiler i got a query SELECT MAX(date3) as max FROM categoryusing 16% of CPU, this could be a problem, the table is under 50K records.
  14. Thanks Justsomeguy for your response, if i build a test, let's say a queryselect top 1000 * from biggest_tablehow can i pinpoint the slow part? comparing with the old server (i can).would it be a good test plan to compare a non-query script and then a query script to see.maybe using some microtime() or how do i test?Edit: checking links
  15. Your right Skemcin, it was in the same server ( let's say server 1, had page, db) and now is in server 2 (page) and server 3 (db).The queries were "translated" as some other things didn't work, but still posibly slow.As you pointed before, i might have to check hardware, is there a way to check how fast/slow is the network?
×
×
  • Create New...