Page 1 of 1

Even weirder problem.

Posted: Thu May 15, 2003 7:00 am
by mikusan
This one is giving me MAJOR headaches. My problem is with functions. I am making a very modular website where many functions are stored on different *.php files. One of my main files index.php calls another one functions.php which has a set of functions in it. The two are connected with an require_once statement in index.php.

The problem arises when i make a new function in functions.php and then call the function from index.php. My page just dies! blank... as if there is a problem... so i try everything possible... until for some reason... it works!! after some time the function works fine and all good... so ignore the happening and go on with my little life... but now i made a new function, called it... and voila poop in my face... so i desperately try everything...EVERYTHING... and then after like 1 hour it works again.

The old functions there work absolutely fine, the new ones i create are simple output functions that make debugging easy.

Oh my god i really don't understand what is wrong.. and this takes up so much time... Thanks...

Posted: Thu May 15, 2003 7:07 am
by twigletmac
Do you have display_errors turned on in your php.ini? If it's off and there's a parse error, you get no information just a blank page.

Mac

Posted: Thu May 15, 2003 8:09 am
by mikusan
Well regardless... have you ever encountered a problem of the sort... i mean i change the name of the function many times still no go.. but after a <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> of changes it accepts it and works fine... hooowww?? whhyyy??

Posted: Thu May 15, 2003 8:16 am
by twigletmac
I have encountered this problem with display_errors off in the php.ini (although it was logging the errors to a file). Do you have display_errors on or off in your php.ini. It may not be the problem but is definitely somewhere to start...

Mac

Posted: Thu May 15, 2003 9:37 am
by volka
parse errors will not show up with display_errors=On as long as display_startup_errors is disabled.
Since parse errors take place before any ini_set(,) instruction can be processed you cannot alter the setting within your script but in php.ini or .htaccess

Posted: Thu May 15, 2003 12:20 pm
by mikusan
I cannot update the php.ini because i am not root, however, although without a plausible error it is hard to find what is wrong... but my code is right... for some reason i cannot make new functions and that bugs me..

Posted: Thu May 15, 2003 1:36 pm
by twigletmac
Why don't you post one of the offending functions - maybe we can help a bit better then.

Mac

Posted: Thu May 15, 2003 1:55 pm
by mikusan
Any new function i make somehow gives me the blank page... if i change the call to the function (ie modify the name, position ) a few hundred times... somehowe that one function that i made passes thru... now whatever i do to it somehow php remembers that one "works" and i can work with it... the functions i am talkng of are simple:

Code: Select all

function foo()
&#123;
   echo('hopefully this will display');
&#125;
i call the function from another file...

I am so frustrated...and the problem seems so obscure... i am starting to think it is something within the server settings...