Thursday, June 24, 2004
back to square one
sighhhh... it's not workin :'(
aaaaarrghaarghhhhhh crap crap crap!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! < tears out hair >
it seems as if the zend.c file is not involved whatsoever!
forget printf("%s",bc_op_array->type); for starters
-it's not even seeing my lovely printf("can u seee meeeee"); statement
modifications were done and the CLI version was compiled. filled with anticipation, i get nothing. N-O-T-H-I-N-G. it just obliviously carried on as if i never even surgically altered its very source.
horrible horrible PHP developers...
Comments:
<< Home
Question: How do you know its not working? how did u use the CLI version? Can you tell me the steps?
Suggestions
1. Put a pause after ur printf. (whole thing might be happening to fast)
2. Try printing it to a file.
Suggestions
1. Put a pause after ur printf. (whole thing might be happening to fast)
2. Try printing it to a file.
1. How do i know it's not working?
Well, i compiled the whole thing, having changed the zend.c file just after the zend_compile_file function is called. changes included printing the first element of a copy of the op_array and just in case this wasn't right, i added a printf("can u see me"); for kicks. Then from the command prompt i ran php test.php where php is name of the cli exe file and test.php has the following code:
< ?
$x=1;
$y=1;
$z=$x+$y;
print $z;
print "\nHello World";
?>after running this the output i get is:
2
Hello WorldThats it. No can u see me or anything!
2. I tried using a system("pause"); and a pause(); function which goes like the following:
pause(){
int move_on;
printf("press enter to continue");
move_on=getchar();
return(0);
}in the same place and the same way as mentioned above. still no change.
3. I tried the FILE I/O thing as well as follows again in the same place:
ofp = fopen("c:/bytecode.txt","w");
fprintf(ofp,"test %s",bc_op_array->type);
fclose(ofp);Still no luck, it doesn't even create a bytecode.txt file nor does it write to an existing one.
It's just being ignored! I shall bring my code to thee tomorrow to seek thy counsel.
Post a Comment
Well, i compiled the whole thing, having changed the zend.c file just after the zend_compile_file function is called. changes included printing the first element of a copy of the op_array and just in case this wasn't right, i added a printf("can u see me"); for kicks. Then from the command prompt i ran php test.php where php is name of the cli exe file and test.php has the following code:
< ?
$x=1;
$y=1;
$z=$x+$y;
print $z;
print "\nHello World";
?>after running this the output i get is:
2
Hello WorldThats it. No can u see me or anything!
2. I tried using a system("pause"); and a pause(); function which goes like the following:
pause(){
int move_on;
printf("press enter to continue");
move_on=getchar();
return(0);
}in the same place and the same way as mentioned above. still no change.
3. I tried the FILE I/O thing as well as follows again in the same place:
ofp = fopen("c:/bytecode.txt","w");
fprintf(ofp,"test %s",bc_op_array->type);
fclose(ofp);Still no luck, it doesn't even create a bytecode.txt file nor does it write to an existing one.
It's just being ignored! I shall bring my code to thee tomorrow to seek thy counsel.
<< Home

