Links were showing, now they aren't

Problems installing LinkMan?
Post Reply
fazman

Links were showing, now they aren't

Post by fazman »

Script URL: http://www.penis-enhancement-solutions. ... urces.html and http://www.online-health-guides.com/resources.php
Version of script: 1.02
Version of PHP: 4.3.11
Hosting company: Eboundhost.com. Dedicated server
Have you searched THIS FORUM for your problem: Yes
If so, what terms did you try: Links not showing

Write your message below: I had the script working fine, all links were showing correctly on the output pages and also in the admin.
Today I recieved an email from someone that was submitting a link to my site saying my links weren't working, so I went and checked and all I see now is a "-" for every line in the linkinfo.txt file.

I know my host just upgraded the plesk control panel to the latest one, but not sure if that updated php from a previous version, and after searching on the command explode() at php.net I don't really see anything that could cause it not to work again if it did change.

On the online health guides copy of linkman I even tested out changing the delimiter to | and edited the linkinfo.txt to see if that would make a differance, it didn't, I still only see a "-" for each line that matches in the linkinfo.txt file.

This one has me completely beat, I can usually debug php problems reasonably well, but I am stumped.

Do you have any idea what this could be?

If you need access to the scripts I can get you the admin pass and ftp access if that will help.

Thanx

Fazman
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hi,

Do the links also appear as "-" in the admin panel?

Try changing $settings['system']=1; to 2 in settings.php file.

Upload this file and post the link to it, might give me a clue:
http://www.phpjunkyard.com/extras/phpinfo.zip

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
fazman

Post by fazman »

Hi Klemen, I changed that setting to 2, it didnt make a differance, probably cause my system isnt a windows system.

The "-" doesnt show up in the admin, only on the pages that are including the links.php files

I have also uploaded the phpinfo file, you can see it here http://www.online-health-guides.com/info.php

Ive changed that other setting back to 1 since my system is Linux

Thanx

fazman
fazman

Post by fazman »

One other thing, none of the links show up in the admin page.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

I'm not sure what could be wrong... Can you make a clean install in some other folder to see if the script works at all?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
fazman

Post by fazman »

Hi Klemen.

I did two new installs, one on a domain that is on an entirely new server and one on the same server.

The one on an entirely new server works fine.

The one on the same server, nothing is showing up, but the linkinfo.txt file contains the data I entered.

I may just have to write a new script using mysql and do the links that way. Shouldn't take me to long as its a reasonably simple one to do.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

fazman wrote:The one on the same server, nothing is showing up, but the linkinfo.txt file contains the data I entered.
Must be some misconfiguration or something?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
fazman

Post by fazman »

Finally got it sorted out for the most part. Something to do with the way the version of php I have works.

This line $thisline=trim($thisline);

needed to be changed to say $thisline=trim($thisline[0]);

The links now show up fine on the links.php file, now I just have to work out why I am still not seeing the admin links. Thats not so urgent, as long as the links pages show them :)
fazman

Post by fazman »

Ok the admin now works too.

Here is what we did to get it to work

Starting at line 340 there is a string of code like this
{
if (strlen($thisline)<10) {$i++; continue;}
list($name,$email,$title,$url,$recurl,$description)=explode($settings['delimiter'],$thisline);
echo "<tr>
<td valign=\"top\"><a href=\"linkman.php?action=remove&pass=$settings[apass]&id=$i\" onclick=\"return doconfirm('Are you sure you want to remove this link? This cannot be undone!');\"><img src=\"delete.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"Remove this link\"></a></td>
<td valign=\"top\"><a href=\"$url\" target=\"_new\">$title</a> - $description</td>
</tr>";
$i++;
}
What we did was change it to this
{
if (strlen($thisline[0])<10) {$i++; continue;}
list($name,$email,$title,$url,$recurl,$description)=explode($settings['delimiter'],$thisline[0]);
echo "<tr>
<td valign=\"top\"><a href=\"linkman.php?action=remove&pass=$settings[apass]&id=$i\" onclick=\"return doconfirm('Are you sure you want to remove this link? This cannot be undone!');\"><img src=\"delete.gif\" height=\"14\" width=\"16\" border=\"0\" alt=\"Remove this link\"></a></td>
<td valign=\"top\"><a href=\"$url\" target=\"_new\">$title</a> - $description</td>
</tr>";
$i++;
}

Hopefully this will help you guys out for any future problems of the same sort :)
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks for sharing.

One question: what is your server OS? (Windows 2003, Liux, Mac, ...?)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
fazman

Post by fazman »

The operating system is a red hat linux enterprise clone called centos completely identical to RHEL 3

Hope that helps :)
Guest

Nice Try

Post by Guest »

Well you know what they say, nice try but no cigar.
Post Reply