playaz Posted March 10, 2010 Share Posted March 10, 2010 Hi guys, Having to take over an ex-employees project and have moved it onto one of your PHP5 servers - I instantly get the following error :- Fatal error: Call to undefined function phpdefine() in /home/cclients/public_html/chart/conf.php on line 1 For some reason the opening php tag and the define() tag in the conf.php file are 'merging' to look like on tag - however upon viewing the code their is definately spacing between these - it would seem that PHP isn't recognising the line break between but have no idea why this has happened? Can anyone suggest how to get PHP to see it as two words rather than phpdefine() Thanks in advance.. pulling my hair out at the minute lol Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/ Share on other sites More sharing options...
trq Posted March 10, 2010 Share Posted March 10, 2010 I would open the file in an editor like vim and see if there is anything funny going on. Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/#findComment-1024163 Share on other sites More sharing options...
jl5501 Posted March 10, 2010 Share Posted March 10, 2010 can you post the code itself showing the tags, and the call to define() Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/#findComment-1024164 Share on other sites More sharing options...
playaz Posted March 10, 2010 Author Share Posted March 10, 2010 Hi Guys, I'm using phpDesigner and the file looks like this.. <?php require('./conf.php'); // all the other code in the script... ?> As you can see the file itself looks fine, but for some reason it is reading the php & require as one like this 'phprequire' - so for some reason it doesnt see the line break when outputted in the php.. Can you suggest why this is happening & way to remedy this problem (never come across this issue before) Thanks Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/#findComment-1024167 Share on other sites More sharing options...
jl5501 Posted March 10, 2010 Share Posted March 10, 2010 I would suspect that phpDesigner has a linebreak setting that is incompatible with the environment that the php is running in. Have a look for a linbreak config setting and perhaps add an actual space char after the <?php to be sure, but I think it is the linebreak type, which is different for Windows/DOS, unix and mac Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/#findComment-1024170 Share on other sites More sharing options...
playaz Posted March 10, 2010 Author Share Posted March 10, 2010 Have a look for a linbreak config setting and perhaps add an actual space char after the <?php to be sure, but I think it is the linebreak type, which is different for Windows/DOS, unix and mac I think your right it does sound like the file format, i've tried Unix/Windows & Mac still no avail - i'll try it in another editor and see if i get any joy.. i hate taking on other people's project.. :-( Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/#findComment-1024173 Share on other sites More sharing options...
playaz Posted March 10, 2010 Author Share Posted March 10, 2010 Cheers guys! I've not fixed it but opening this in another editor does show some strange results! So hopefully I can go through each php file and fix this without too much fuss.. Thanks again :-) Link to comment https://forums.phpfreaks.com/topic/194761-php-not-seeing-linebreak/#findComment-1024178 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.