Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by tibberous

  1. You're going to need to install a http server on to your computer in order to run your PHP scrupts

     

    You can run PHP command line too. While it might seem pointless, there is a lot of cool stuff you can use it for. I wrote a backup system / server checker that runs as a command line app, and it emails me if any of the servers go down. You can also do image resizing and just general PHP practicing in command line.

     

    You'll probably WANT apache, but you should know how to run PHP without it. Last time I interviewed someone, one of the interview questions was a command line script that would read a url and print the value at it every 10 ten seconds -- you'd be amazed how few people got it =/ It was even an open-internet test!

  2. Up until a few hundred years ago, all you could do if your tooth hurt was pull it, which makes having nerves in your teeth pretty damn pointless.

    How is that pointless?

     

    If your tooth hurts there is a reason, perhaps infection, and by removing the tooth you're preventing the infection from spreading. Hardly seems pointless to me.

     

    But if it was solid enamel, there would be nothing to infect. Why have smoke detectors when you can have a concrete house?

  3. Okay, want to know what I'm fucking talking about?

     

    mysql_connect("localhost", "root", "password") doesn't work anymore.

     

    it has to be:

     

    mysql_connect("127.0.0.1:3306", "root", "password")

     

    THAT IS FUCKING RETARDED!

     

    I know it is open source, and some very brilliant people have written some very brilliant code - but just once I'd like to be able to install it without something being fucked up. It's bad enough I have to install about 12 programs everytime I reformat, now I have to replace every instance of localhost with 127.0.0.1:3306??

  4. It seems like everytime I try and install apache / PHP / mySQL they manage to have it more fucked up than the time before.

     

    MySQL is working, PHP is working.

     

    Loaded Configuration File is C:\php\php.ini

     

    And in that file are the lines:

     

    extension_dir = "C:/php/ext"

    extension=php_mysql.dll

     

    And:

     

    C:/php/ext/php_mysql.dll exists

     

    So why the fuck doesn't it work, or even throw an error?

     

    MySQL isn't showing up on the phpinfo page - it's like the extension=php_mysql.dll isn't even there.

     

    Any ideas?

  5. Up until a few hundred years ago, all you could do if your tooth hurt was pull it, which makes having nerves in your teeth pretty damn pointless. Now the nerves are good for letting people know when to go to the dentist, but if your teeth were solid, they wouldn't rot to begin with. Solid enamel would mean no cavities, the tooth would literally have to wear away to stump -- so why the hell aren't teeth just enamel?

  6. I'm not sure what is wrong with me, but lately all I do is go to the bar, go eat, watch porn, shower, take a nap, play Starcraft or watch Starcraft videos / facebook / college humor. I have so much shit to get done, but I just can't focus on work. It's almost like the time I spend playing Starcraft has replaced the time I used to spend working, but I don't know what to do about it. I've tried uninstalling the game, but a couple days later I'll reinstall it - it's like I need rehab or something.

     

    I wish I never got into it, but I'm not sure what to do now.

  7. Sounds like overkill to be honest. I'd just get an external hard drive and use it. Granted, a fire or something could wipe out the computer and the hard drive, but imo it's a remote enough of a risk not to worry about.

  8. I have a server that runs CentOS / WHM. If I set the clock using the date command, within a few hours it will go back one hour. I am guessing that this is due to a problem with daylight savings time. I would think that there would be a way to turn off automatic clock adjusting, but neither myself of the server company can seem to figure out the problem.

     

    Any ideas?

  9. Surely your code was issuing an E_NOTICE ("Undefined variable: $min ...") due to the use of the $min variable which had not been defined.  I'd say that would point out the "bug" pretty darned quickly.

     

    It was return "$y-$m-$d $h:$m:$s"; originally - I fixed it, then changed it back to post it, but I didn't change $min back to $m.

  10. I guess my problem is with my boot/bcd file. When I try and run the command line command to fix it, it says it can't find a version of windows, even though on the screen right before it, it has my version of Windows. I think the problem is with my RAID driver. I loaded the RAID drivers in the Windows repair screen and everything shows up, but I think there are certain repair tools that ignore them.

  11. I generally do, it's just that to me:

     

    $y-$m-$d $h:$m:$s

     

    Is more readable than:

     

    $year-$month-$day $hours:$minutes:$seconds

     

    The second one just looks like a long string, not a date format.

  12. Yeah - it's just so repetitive. Half the time the forms don't even process the data, just load and store it from the database. I created a system called "Flexi forms", which is still used in the admin, but it was so complex I kind of stopped using it. I might need to sit down with it again - it was awesome until you needed a new data type, or needed to do something complex with the data.

  13. I just spent 20 minutes swearing at my computer. This is one of the most annoying and hard to find bugs ever:

     

    function dateToSQL($m, $d, $y, $h=0, $m=0, $s=0){
    	if($h || $m || $s) return "$y-$m-$d $h:$min:$s";
    	else return "$y-$m-$d";
    }
    

     

    See the error? It's that $m for month and $m for minute are the same. Why doesn't PHP throw an error? I have no fucking idea, but it probably should, since it would make no sense to ever intentionally do this. Since the function is so simple, I just first thought it was a problem with the query after it, then with the code before it. Then I thought that 07 was somehow getting converted into the int 0 because of the leading 0....

     

    Just one of those nights...

     

×
×
  • 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.