born life mate die
Random header image... Refresh for more!

Parse error: syntax error, unexpected $end in Command line code

this is very strange error on PHP, i’ve using php since 2005 and never got this error, but yesterday after installing xampp on my laptop and try to put my website project on it, i got this error.

Parse error: syntax error, unexpected $end in Command line code

it’s strange because on the another machine my code run well, so i got stuck for a few days, but of course i still curious why i got an error while it’s run well on other machine.

the answer is on our php tag, this what i got from google

Situations:

* you forgot to close a quote, so PHP is continuing to analyze your code until it finds the closing quotation mark.
* You forgot to close a bracket, so from the last opening, Php considers all the code that follows as part of a block that never ends.
* You forgot to close a parenthesis, so from the last open parenthesis, Php considers all the code that follows as part of a specific block (condition, arguments of functions etc …) that does not end.
* You forgot a comma, so for PHP there is an instruction in your code that has no end.

of course i do checked my code and pretty sure that i ain’t forgot anything, but the answer is we sometime using a sort open tag, what i mean is it’s like open and end php tag just using <?…?>  well,a solution of course replacing <? with <?php makes the problem go away.  but i have another solution for this Parse error: syntax error, unexpected $end in Command line code problem.

we can turn on short open tag on PHP, to use short open tags, it must be enabled in PHP.INI. Search for short_open_tag in PHP.INI, and change the value to On. The line should look line:

short_open_tag = On

enjoy :D


March 28, 2010   No Comments

Warcraft III: Frozen Throne acces violation

yes, i’m a big fan of warcraft, usually play at my office when my went out of town. but for the first time yesterday i had an error when i click war3.exe, like always it show the warcraft icon and then BANG! FATAL ERROR

Program: C:\Games\Warcraft III\war3.exe
Exception: 0xC0000005 (ACCESS_VIOLATION) at 001B:6F57A1A4

The instruction at ‘0×6F57A1A4′ referenced memory at ‘0×000000C0′.
The memory could not be ‘read’.

well, it very annoying facing a problem when we’re about to playing games. i dunno what’s the problem a day before it’s working well. and how the fuck now it’s has an error a fucking fatal error!!!. but just relax i’ve solve the problem, what you have to do is download a registry from link below (just click it). extract the zip and double click the .reg file. chose yes and you done. so what do you waiting for!? let’s PLAY!!

March 24, 2010   No Comments

blue screen when xp installation

first, this is a good news, i have a laptop!! finally, bought it with my own money.. YEAAAAHHH

but something annoying happen when i run installation on my new laptop,the problem is when installing windows xp, after setup prosses and the status bar shows something about start windows and BANG!! it show a blue screen like memory dump.

after searching and googling, i found the problem and of course the solution, it’s because the bios configuration is using AHCI hardisk setting, you should change it to IDE or COMPATIBILITY and try re install the windows, it wont happen again :

so what the different about AHCI or IDE bios setting, i dunno neither but from what i read, using ahci is making our system slower, so why using ahci if it make us slower????

March 23, 2010   No Comments

blank screen when XP installation

this is the first time i found something like this, when i’m going to install XP operating system on my computer. after “press any key to boot from CD ” menu then “inspecting hardware” notification showed, my monitor only give me a blank screen, like nothing happen.

it sucks! knowing have to face a problem that i never expected even i don’t know there is a problem that i/we will face when installation step. every time i install a new operating system it goes well, not like this one.

after checking all hardware on my box and i reassure that everything still working fine, i do cross checking the CD installation to another computer, well the CD still works too. so what the hell problem?? why it show me a blank screen when installation step??

here is the answer, the answer is still on the installation CD, my XP installation CD is do not have a SATA hardisk driver (my new computer using SATA hardisk). so i reburn a XP image that support SATA hardisk and the problem solved. :D

January 17, 2010   2 Comments

Can’t logon due different time setting

Sometimes when a new computer join a domain you will get this error

The current time on the computer and the current time on the network are different

this is because the clock on workstation is different from the time setting on the domain server. here is the step to solve this problem.

  • Login as local administrator
  • Open run and type ‘cmd’
  • type ‘net use \\serverIP /user:serverUsername’
  • type ‘net time /domain:domainName /set /y’
  • type ‘net time \\serverIP /set /y’
  • Log out, and you done.

that’s all, piece a cake isn’t it?

January 15, 2010   1 Comment

connecting 2 different subnet

first you have to know that i’m a new guy at my office and yesterday my bos give me a problem, he told me to build a webserver,, ok, i know it easy, but when he told that my office using 2 different access point which is using different ISP and even he told that he didn’t know where is the access point position (my office have a large and number of building ) and of course it not connected one to another. so i ask my senior my office network topology, he said that he doesn’t, i try to ask him any information about the network he has no clue.so i face a dead end.

after asking, thinking and reading many articels i came whit some solution, here it is :

  • of course adding a router will resolve the problem.
  • using VPN also resolve the problem, but i need to configure gateway on both side.
  • the easiest way n stupid one is using double interface on my webserver. so both user from 2 different subnet could connect. :D

January 7, 2010   1 Comment