|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
V4 Vs V5 IssueHi
First Post here, I hope this is the right place for this post. This is probably not a php problem, I think it may a configuration issue, but sorry I just dont know where to look I have a V4 site the calls an on line editor and part of the process is by window.onload. If I had to explain how it all works I could'nt JS is not my thing and this is a fairly old piece of code. anyways -------------------------- Have a bit of code that looks like this . . <body leftmargin="2" marginwidth="2" topmargin="2" marginheight="2" onResize="blockDefault();"> content; include($settings['app_dir'].'/js/core_js.php'); echo <<<content <script LANGUAGE="Javascript"> window.onload=initEditor </script> <table border="0" cellpadding="5" cellspacing="0" width="100%" height="100%" class="framed"> . . . ---------------------------------------------------------- Under My V4 Sever it works fine .....the Java script loads and an all is fine. On my V5 Sever I get the following Errors Line: 68 Char: 21 Error: Syntax error Code: 0 URL: ...... and then Line: 600 Char: 11 Error 'initEditor' is undefined Code 0 URL........ Now the thing is, when I view source code in IE off both servers the the core_js.php is being read and is visible, the initEditor function is there for all the world to see. If I rename the initEditor function on the V5 version and add a new empty function I still get the same error messages. I dont have much hair and I am tearing out the rest as we speak :).....I have no idea where to look so I am just hoping someone can point me in the right direction. Like I said in the beginning I think it must be a configuration issue but I just dont know what or where. Anyways TIA Cheers Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
|
|
|
Re: V4 Vs V5 IssueOn Tue, Jul 1, 2008 at 11:27 AM, Neil <neil@...> wrote:
> Hi > > First Post here, I hope this is the right place for this post. > > This is probably not a php problem, I think it may a configuration issue, > but sorry I just dont know where to look > > I have a V4 site the calls an on line editor and part of the process is by > window.onload. If I had to explain how it all works I could'nt JS is not my > thing and this is a fairly old piece of code. > > anyways > > -------------------------- Have a bit of code that looks like this > > . > . > <body leftmargin="2" marginwidth="2" topmargin="2" marginheight="2" > onResize="blockDefault();"> > content; > > include($settings['app_dir'].'/js/core_js.php'); > > echo <<<content > <script LANGUAGE="Javascript"> > window.onload=initEditor > </script> > > <table border="0" cellpadding="5" cellspacing="0" width="100%" height="100%" > class="framed"> > . > . > . > ---------------------------------------------------------- > > Under My V4 Sever it works fine .....the Java script loads and an all is > fine. > > On my V5 Sever > > I get the following Errors > > Line: 68 > Char: 21 > Error: Syntax error > Code: 0 > URL: ...... > and then > > Line: 600 > Char: 11 > Error 'initEditor' is undefined > Code 0 > URL........ > > Now the thing is, when I view source code in IE off both servers the the > core_js.php is being read and is visible, the initEditor function is there > for all the world to see. > > If I rename the initEditor function on the V5 version and add a new empty > function I still get the same error messages. > > I dont have much hair and I am tearing out the rest as we speak :).....I > have no idea where to look so I am just hoping someone can point me in the > right direction. > > Like I said in the beginning I think it must be a configuration issue but I > just dont know what or where. > > Anyways TIA > > Cheers > > Neil > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Compare your rendered output from the v4 and the v5. You might see something in the php5 version that has some sort of error displaying to screen that causes a parse error inside your JS block that wasn't there before. Something might have changed about the way your settings variable works too. Do a var_dump($settings['app_dir'].'/js/core_js.php') and see if it actually prints out a real path to a file that exists. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: V4 Vs V5 IssueThanks Wolf
I have replied to all, I hope that is the correct way here. A configuration issue on the PHP V5 Server ......... thats my problem, I dont know where I should be looking. The source code, php and JS is absolutely identical on both machines. Cheers Neil At 01:36 AM 2/07/2008, Wolf wrote: >---- Neil <neil@...> wrote: > > Hi > > > > First Post here, I hope this is the right place for this post. > > > > This is probably not a php problem, I think it may a configuration > > issue, but sorry I just dont know where to look > >Configuration issue of what? > > > > I have a V4 site the calls an on line editor and part of the process > > is by window.onload. If I had to explain how it all works I could'nt > > JS is not my thing and this is a fairly old piece of code. > > > > anyways ><!-- SNIP --> > > > Line: 68 > > Char: 21 > > Error: Syntax error > > Code: 0 > >It's probably all JS, but if this is a PHP page that you've actually >cut/pasted from, look at lines 67 and 68 and check to make sure you >have a ; at the end of line 67. Or a ) or a } or some other closing >brace that you could be using previously. > >Otherwise, check with a javascript list to see what the javascript errors are. > >HTH, >Wolf > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
|
|
|
Re: V4 Vs V5 IssueNeil wrote:
> > Hi Thanks > > I have tested the path, that works fine. I set up a dummy file on the > same path just to check that, it found that and printed out some echo'd > text from that file. > > I can see the content of core_js.php file in the the IE view source view. debugging javascript in IE is about as much fun as slamming your head in a car door. try it in firefox with firebug installed, it should give you much better feedback about what is going on. -jsd- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Re: V4 Vs V5 IssueHi
Unfortunately this editor does not run in any other browsers. however I do not believe that it is the java script that is the problem because it runs and works and has done so for years on the current and earlier V4 servers. Cheers Neil At 07:10 AM 2/07/2008, Jon Drukman wrote: >Neil wrote: >>Hi Thanks >>I have tested the path, that works fine. I set up a dummy file on >>the same path just to check that, it found that and printed out >>some echo'd text from that file. >>I can see the content of core_js.php file in the the IE view source view. > >debugging javascript in IE is about as much fun as slamming your >head in a car door. > >try it in firefox with firebug installed, it should give you much >better feedback about what is going on. > >-jsd- > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: V4 Vs V5 IssueNeil wrote:
> Hi > > First Post here, I hope this is the right place for this post. > > This is probably not a php problem, I think it may a configuration > issue, but sorry I just dont know where to look > > I have a V4 site the calls an on line editor and part of the process is > by window.onload. If I had to explain how it all works I could'nt JS is > not my thing and this is a fairly old piece of code. > > anyways > > -------------------------- Have a bit of code that looks like this > > . > . > <body leftmargin="2" marginwidth="2" topmargin="2" marginheight="2" > onResize="blockDefault();"> > content; > > include($settings['app_dir'].'/js/core_js.php'); > > echo <<<content > <script LANGUAGE="Javascript"> > window.onload=initEditor > </script> > > <table border="0" cellpadding="5" cellspacing="0" width="100%" > height="100%" class="framed"> > . > . > . > ---------------------------------------------------------- > > Under My V4 Sever it works fine .....the Java script loads and an all is > fine. > > On my V5 Sever > > I get the following Errors > > Line: 68 > Char: 21 > Error: Syntax error > Code: 0 > URL: ...... > and then > > Line: 600 > Char: 11 > Error 'initEditor' is undefined > Code 0 > URL........ > > Now the thing is, when I view source code in IE off both servers the the > core_js.php is being read and is visible, the initEditor function is > there for all the world to see. > > If I rename the initEditor function on the V5 version and add a new > empty function I still get the same error messages. > > I dont have much hair and I am tearing out the rest as we speak :).....I > have no idea where to look so I am just hoping someone can point me in > the right direction. > > Like I said in the beginning I think it must be a configuration issue > but I just dont know what or where. > > Anyways TIA > > Cheers > > Neil > > > > > > Two things come to mind. 1) Is their any PHP inside you javascript file that needs to be parsed? And if so, is the new V5 install configured in such a way that it parses/processes javascript files? where the old install was processing javascript files. This would be a configuration issue from the actual web server POV. i.e. Apache, lighttpd, etc... Once reconfigured, make sure you restart your web server. 2) Is your code using short tags in php? This allows the programmer to use <? instead of <?php . In this case you might want to enable short tags in the new version of PHP. I think php 5 comes with short tags disabled and version 4 had it enabled by default. This setting would be found in your php.ini file on the server. If you need to change the setting, make sure you restart your httpd server before testing. Just a couple of thoughts -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: Re: V4 Vs V5 IssueNeil wrote:
> Hi > > Unfortunately this editor does not run in any other browsers. however I > do not believe that it is the java script that is the problem because it > runs and works and has done so for years on the current and earlier V4 > servers. http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en Not as powerful as firebug but it gives you a lot more help than the IE script debugger. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: V4 Vs V5 IssueThanks Jim >> > > >Two things come to mind. > >1) Is their any PHP inside you javascript file that needs to be >parsed? And if so, is the new V5 install configured in such a way >that it parses/processes javascript files? where the old install was >processing javascript files. This would be a configuration issue >from the actual web server POV. i.e. Apache, lighttpd, >etc... Once reconfigured, make sure you restart your web server. Yes there is PHP inside the javascript that is being passed. As an exorcise I was just looking at deleting it all out of the code and seeing what happens, however it is everywhere. The Webserver with the V5 PHP is Apache 2.2.4, but I can not really see where I would make the changes you are suggesting. The older server with V4 is Apache 1.34.4 >2) Is your code using short tags in php? This allows the programmer >to use <? instead of <?php . In this case you might want to >enable short tags in the new version of PHP. I think php 5 comes >with short tags disabled and version 4 had it enabled by >default. This setting would be found in your php.ini file on the >server. If you need to change the setting, make sure you restart >your httpd server before testing. Short tags is enabled and working.... most of the application is short tagged. Cheers Neil >Just a couple of thoughts > >-- >Jim Lucas > > "Some men are born to greatness, some achieve greatness, > and some have greatness thrust upon them." > >Twelfth Night, Act II, Scene V > by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
|
|
|
Re: V4 Vs V5 IssueHi Thanks to those who got back to me on this. Turns out the issue was HTTP_POST_VARS..GET, SERVER being so depreciated that they no longer worked at all. Changed all to _POST..._GET, _SERVER etc and all worked fine. I guess they will make a programmer of me yet...hmmm one day maybe. Anyway thanks again Cheers Neil At 01:27 AM 2/07/2008, Neil wrote: >Hi > >First Post here, I hope this is the right place for this post. > >This is probably not a php problem, I think it may a configuration >issue, but sorry I just dont know where to look > >I have a V4 site the calls an on line editor and part of the process >is by window.onload. If I had to explain how it all works I could'nt >JS is not my thing and this is a fairly old piece of code. > >anyways > >-------------------------- Have a bit of code that looks like this > >. >. ><body leftmargin="2" marginwidth="2" topmargin="2" marginheight="2" >onResize="blockDefault();"> >content; > >include($settings['app_dir'].'/js/core_js.php'); > >echo <<<content ><script LANGUAGE="Javascript"> > window.onload=initEditor ></script> > ><table border="0" cellpadding="5" cellspacing="0" width="100%" >height="100%" class="framed"> >. >. >. >---------------------------------------------------------- > >Under My V4 Sever it works fine .....the Java script loads and an all is fine. > >On my V5 Sever > >I get the following Errors > >Line: 68 >Char: 21 >Error: Syntax error >Code: 0 >URL: ...... >and then > >Line: 600 >Char: 11 >Error 'initEditor' is undefined >Code 0 >URL........ > >Now the thing is, when I view source code in IE off both servers the >the core_js.php is being read and is visible, the initEditor >function is there for all the world to see. > >If I rename the initEditor function on the V5 version and add a new >empty function I still get the same error messages. > >I dont have much hair and I am tearing out the rest as we speak >:).....I have no idea where to look so I am just hoping someone can >point me in the right direction. > >Like I said in the beginning I think it must be a configuration >issue but I just dont know what or where. > >Anyways TIA > >Cheers > >Neil > > > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
| Free Forum Powered by Nabble | Forum Help |