Page 1 of 2
Why is links.php a jumbled mess?
Posted: Wed May 27, 2009 12:02 am
by Brad
Script URL:
http://www.sextoyscentral.net/links/links.php
Version of script: 1.7
Hosting company: 247-host.com
URL of phpinfo.php:
http://www.sextoyscentral.net/links/phpinfo.php
URL of session_test.php:
http://www.sextoyscentral.net/links/session_test.php
What terms did you try when SEARCHING for a solution: various
Write your message below:
1st post..
hell getting this to work out of the box! Partially resolved now but still issues.... this caused my admin to be a jumbled mess LOL
admin.php has an error on line 1750 - its missing a simple
;
Code: Select all
if (d.recurl.value == 'http://' || d.recurl.value == '')
should be
Code: Select all
if (d.recurl.value == 'http://' || d.recurl.value == '');
All seems to have installed ok after solving a few minor problems, I have customized my forms.html page to suit my needs and added a link to another site I have (it doesnt show in admin)?? But my next concern is why is the links page so screwed up? This is where the links are displayed - right?
thanks for any help,
Brad
*edit* from this jumbled mess that is links.php, I can submit a link exchange and it
will show in admin unlike adding directly from admin????? What is wrong here?
If I could get this thing working 100% and it does what I need, I'll buy it assuming support is fairly quick.
Posted: Wed May 27, 2009 4:02 am
by DC
Your referring to a java script section, I have actually bug tested 1.7
and did not find any of the problems your having. And any problems I did find have been fixed in 1.7 ...
It should work with ease right out of the box and does for most.
Did you download your copy direct from PHPJunkyard?
What do you mean by a jumbled mess, what did you use to upload the files to your server with? Also only edit files in a real editor or text based editor like note pad my reason for telling you this is some have tried to edit code in a program like MS Word and that will make a mess in most cases as it adds its own formating and junk code. Just a side not not saying this is what you did but its od that you say the code is a mess ...
From what I see your outputting php code directly to the page, check to see if you have the php opening and closing tags <?php code ?>
OK I think I see what going on your editor has changed the <?php tags to its own html based tags this is no good ?> as I can see the output of the entire code in your page so do make sure that you have <?php tags not somthing else
Best bet in my opin is to re-upload the files clean with a good ftp client and do not edit anything first see if it all works.
I am sure Klem will respond to this shortly as well.
DC
Posted: Wed May 27, 2009 6:01 am
by Klemen
Hi,
Line 1750 is correct, it mustn't have a ; at the end because the if block continues in the next three lines. This is working normally on hundreds of servers.
As DC already said your links.php page is outputting
source code instead of being parsed by the server. If you open
http://www.sextoyscentral.net/links/links.php
in your browser and View source of the page you will get the exact contents of links.php file, but your server should parse the file and the PHP code and output just the HTML result.
Same happens when you try to access
http://www.sextoyscentral.net/links/approve.php
but some files output correctly, for example the settings file outputs an error as it should:
http://www.sextoyscentral.net/links/settings.php
PHP obviously works on your server so why is it doing so? Not sure, I would suggest that you try uploading all the LinkMan files again and make 100% sure you upload them in ASCII mode.
Or even better try a completely clean install in another folder ("links2") and don't make any modifications to any of the files.
If that doesn't work you'll need to check with your host why some PHP files aren't being parsed and output PHP source code to the browser.
Posted: Wed May 27, 2009 1:33 pm
by Brad
Hi and thank you both for your responses.
I made a new folder /links2 as suggested and made no changes to any files. Uploaded in ASCII (I use ws_ftp) except images folder, chmod the 3 files to 666 and the 1 directory to 777 as readme states.
I get exactly the same results as 1st experienced yesterday (admin is a mess) and here is a snapshot of this and the error IE7 shows me. The entire page all the way down is as pictured here.
If I add the missing '
;' then the admin area loads like supposed to.
I have added the session_test and phpinfo files for troubleshooting.
http://www.sextoyscentral.net/links2/admin.php can be accessed with no password, so you can see the full effect.
What should I do at this point? Klemen, would FTP access so you may see what is wrong here be useful?
thank you for your help
Posted: Wed May 27, 2009 2:07 pm
by DC
Hi somthing is going astray in my opin when you upload ...
because I see php tags that have been converted to ?> and thats no good.
This ?> needs to be this ?>
Can you look at the file links.php before you uplaod it does it start with <?php
and end with ?>
The reason for the errors is because the code is somehow damaged when its on your server becouse all that code is working for all others so its not a code issue all the code its flagging is correct but somehow damaged after its on the server thats my opin on this prob.
As Klem said we can see php is working on your server because it works on some of your pages, so this is odd to both of us as normally this would be seen if a server had no php installed but thats not the problem here, so im going with my first choice that some of the tags have been converted to ?> .
Please let me know if you see that in the code it shouldn't be there if it is.
if you want pm me temp FTP access and il have a peek do not post any
passwords here just PM me the info if you like.
DC
Posted: Wed May 27, 2009 2:12 pm
by Klemen
Your page shows the PHP source, that's the problem, not the Javascript.
Posted: Wed May 27, 2009 2:21 pm
by Brad
When I look at the actual file that I unzipped (links.php) I see <?php and its closing ?> same as in browser when I view source for links.php
I cannot find where or how you are seeing this? My linkman was downloaded from php junkyard and not elsewhere. Also, I use ws_ftp as I have for quite a few years.
My whole site is based on php, the shopping cart I use is all php and it works fine. I'm not fluent in php but can muddle my way through some of it to a small degree.
I will send you a PM DC, I'd love to get this thing working as I have tried a few different link exchange scripts and didnt care for any of them in one way or another.
thanks for the help, PM on the way
Posted: Wed May 27, 2009 2:41 pm
by DC
Hi have a look at this test ...
http://www.sextoyscentral.net/links2/links_test.php
Now here's yours
http://www.sextoyscentral.net/links2/links.php
all I did was upload a fresh copy of the file via my ftp client rename it and its fine. so to me this means some how your ftp is not playing nice with the code.
I am going to reload your links2 dir with a compleate fresh upload overwriting your files and we can then see what happens I will do this in the links2 dir ...
DC
Posted: Wed May 27, 2009 3:14 pm
by Brad
Both appear the same so I assume you've already uploaded new files before I could see the difference in the 2. Thanks!
I use WS_FTP, never had a problem with it, do you have a recommendation on what I should switch to?
Posted: Wed May 27, 2009 3:41 pm
by DC
Brad, there may be a little more to this mystery then meets the eye I am going to talk to Klem about what I feel has happened here ...
But for now please test the script and let me know, it should all be working now. please do not change or edit anything just yet ok.
Just test what I have uploaded ...
DC
Posted: Wed May 27, 2009 3:43 pm
by Brad
Did a simple test...
downloaded FileZilla FTP, made a new directory /links3, uploaded unaltered files as downloaded from php junkyard, set permissions on the 4 items as required and I come up with the same issues as I had from the beginning.
So this tells me it is not the FTP client, something is wrong with either the downloaded files, or the unzipping of those files Ughhh!
Posted: Wed May 27, 2009 3:45 pm
by Brad
/links2 seems to all work fine for all that I could think of testing. I'm curious to know what the problem is exactly. I appreciate your help!
DC wrote:Brad, there may be a little more to this mystery then meets the eye I am going to talk to Klem about what I feel has happened here ...
But for now please test the script and let me know it should all e working now. please do not change or edit anything just yet ok.
Just test what I have uploaded ...
DC
Posted: Wed May 27, 2009 3:53 pm
by DC
I will let you know as soon as I know for sure, at this point I can only make a hypotheses. I have an idea but more testing is required for me to be 100% on this ...
I am going to try and create the same problem on my test server.
DC
Posted: Wed May 27, 2009 4:09 pm
by Brad
I use a program called WinMerge, it shows me the differences in files line for line and from looking at what you uploaded to /links2 and comparing those to the unaltered files from the .zip shows some differences.
Most differences are not major and are just some line differences with a { here and there but the one big difference I did see so far is addlink.php and your own addition of the curl coding. In fact, addlink.php has several differences in code on various lines throughout.
I'll wait until you get back to me, until then I'll compare more files.
thanks DC, really appreciate your help!
Posted: Wed May 27, 2009 4:23 pm
by DC
Yes I used my own test file to see if I could get that page working on your server for now, as theres such an odd problem I had to try a few things.
as soon as I know for sure I will let you know.
As for now the files that you downloaded from PHPJunkyard do work as expected on my test server so thats why this must be looked into more before I feel I have solved the mystery.
Think of me as the CSI of php code ...
DC