Newspic-Desperation

letsrock / 1 decade ago (12 November 2004 11:28)

Hey Guys,


after a night of trial-and-error i thought you could help me with this:

i already changed the db.inc.php paths - see here:

$news_path = "/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/news";

$news_url = "../newman/gfx/news/";


and referenced the local db.inc.php in the newman_lib.php, but the #*@! - WebMagazine wants to find the picture in the WebMagazine folder - i have no idea why...


try and see yourself @ http://letsrock.le.funpic.de/rotschrift/WebMagazine/


you have to be very quick to see the missing picture and hit the right mouse button to see its location


crazy side-effect: the smileys ARE working, the smiley´s path in the db.inc.php is:

$smileys_path = "/usr/export/www/vhosts/funnetwork/hosting/letsrock/rotschrift/newman/gfx/smileys";

$smiley_url = "../newman/gfx/smileys/";


CRAZY, ISTN´T IT?


thanks in advance for your help,


Stefan



Post replies:


1 decade ago (17.11.2004 05:40)
Reply by: Peter_Vazed
Ok, now i can login with Internet Explorer.
I can add news and upload a picture, even insert a picture in Preview.

But IE closes when i hit Submit to post the news.
This happend twice.

And when i am in to write the news,
in the left bottom of IE there is a javascript error.

Just used my test page , did the same news and no errors came up.

See how to ad a picture to the Preview:
[LINK]

:car


1 decade ago (17.11.2004 09:25)
Reply by: letsrock
believe it or not, but the page is working

thank you very, very much for all your support - i really appreciate that!
1 decade ago (17.11.2004 09:47)
Reply by: Peter_Vazed
Yes i have seen it.
Great. Magician

And i saw that the test "Preview image" i did was submitted.
Even the Comment on the news was there.

Good luck with the site.

Just one thing: center the page.
Can be done in header.php just center the first two tables.

Up to the next error Snowing

:car
1 decade ago (24.11.2004 11:59)
Reply by: letsrock
hehe - here it is: the next error!

can you explain, why the news ticker on the right side isn´t working any more all of a sudden?
1 decade ago (25.11.2004 07:58)
Reply by: Peter_Vazed
Errors?
Well, the output is html.
So: vieuw source or Netscape CTRL U

See:
body
just 8 lines before where the script starts.

What is the body tag doing there?

All the scriptcode is there.
It does not show up.

What have you changed?


:car
1 decade ago (25.11.2004 11:50)
Reply by: letsrock
as far as i know, nothing has been changed (at least i didn´t change anything) - what about overwriting the concerning file?
1 decade ago (26.11.2004 01:09)
Reply by: letsrock
i could just overwrite the index.php with an older one, couldn´t i?
1 decade ago (26.11.2004 01:11)
Reply by: letsrock
no, this doesn´t help...
1 decade ago (26.11.2004 01:18)
Reply by: letsrock
in my opinion, it must have to do with this (see below) function:

function ShowScrollNews($num,$delay=3000,$width=150,$height=150,$type=0)
{
?>
language="JavaScript1.2">
var delay= //set delay between message change (in miliseconds)
var fcontent=new Array()
begintag=´´ //set opening tag, such as font declarations
if ($type == 1) $types = "RAND()";
else $types = datum;

$x = 0;
$res = mysql_query("SELECT * FROM ".$GLOBALS[´db_news´]." ORDER BY ".$types." DESC LIMIT ".$num) or die("LINE 1074: ".mysql_error());
while($ar = mysql_fetch_array($res))
{
$ar[preview] = eregi_replace("\n","",$ar[preview]);
$ar[preview] = eregi_replace("\r","",$ar[preview]);
$ar[preview] = wordwrap($ar[preview], 25, " ", 1);

echo ´fcontent[´.$x.´]="´.$ar[headline].´
´.substr(pic($ar[preview],0), 0, 100).´...   \"\"/"´."\n";
$x++;
}
?>
1 decade ago (29.11.2004 10:47)
Reply by: letsrock
very, very strange...
try to hit f5 a couple of times or browse around on the site and then go back to the index and all of a sudden the ticker works again...
1 decade ago (31.12.2004 11:42)
Reply by: onuzu
I have the same problem but your explanation a bit too advance for me. I cannot add photos to news, The new ticker is not working, if I try to upload photos to news I get these messages:

LINE 262:Unknown column ´thumbnail´ in ´field list´

LINE 42:Unknown column ´gid´ in ´where clause´
1 decade ago (31.12.2004 11:53)
Reply by: Peter_Vazed
Hi onuzu,

see my test site:
[LINK]

There you can download the files.
There were a few errors in the original script.
Click the link: ´Read This First´

You can browse this forrum, to find out what was wrong.
Like gid has to be id, thumbnail is wrong to.
The first script was OK.
After adding new items, a few old codes were still in the script
thats why you get the errormessages.

:car


1 decade ago (01.01.2005 05:19)
Reply by: onuzu
Hi Peter,

Thanks very much, I re intalled the program it got better but when I tried to upload a photo I got the following message:

First it shows Error! When I click on the alert pop up I got: Warning: move_uploaded_file(/home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/gfx/gallery/4A90799775.jpg): failed to open stream: Permission denied in /home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/pictures.php on line 375

Warning: move_uploaded_file(): Unable to move ´/tmp/php9IGJEU´ to ´/home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/gfx/gallery/4A90799775.jpg´ in /home/virtual/site19/fst/home/thismonth/public_html/WebMagazine/newman/pictures.php on line 375

Do you know how I can fix this?

Thanks
1 decade ago (01.01.2005 09:18)
Reply by: Peter_Vazed
´failed to open stream: Permission denied"

Most of the time a chmod
Try setting: 755 or 644


If not working, read this:

In the file db.inc.php
you have the path to the items:
smilys, partners, topic, news
gallery, weather, story and news_pics

Download the db.inc.php to your computer ( in a different folder) look if the items are there.
Like this below:

$smileys_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\smileys";
$smiley_url = "./gfx/smileys/";
$partners_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\partners";
$partners_url = "./gfx/partners/";
$topic_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\topic";
$topic_url = "./topic/";
$rss_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\rss";
$news_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\news";
$news_url = "./gfx/news/";
$gallery_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\gallery";
$gallery_url = "./gfx/gallery/";
$weather_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\weather";
$weather_url = "./gfx/weather/";
$story_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\news";
$story_url = "./gfx/news/";
$news_pics_path = "d:\www\zeepoort.nl\www\dvzkruiningen\newman\gfx\news";
$news_pics_url = "./gfx/news/";

Of not add them by hand, and upload the file.
Rememeber, never overwrite an existing file, unlless you have a copy of the original.
On your server you firtst can renema the original to old_filename.php

This are the lines on my lycos site:
$smileys_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/gfx/smileys";
$smiley_url = "./newman/gfx/smileys/";
$partners_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/gfx/partners";
$partners_url = "./newman/gfx/partners/";
$topic_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/topic";
$topic_url = "./newman/topic";
$rss_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/rss";
$news_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs//newman/gfx/news";
$news_url = "./newman/gfx/news/";
$gallery_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs/webmagazine/newman/gfx/gallery";
$gallery_url = "[LINK]";
$weather_path = "/data/members/free/tripod/nl/v/a/z/vazed/htdocs/newman/gfx/weather";
$weather_url = "./newman/gfx/weather/";

Different from the one above.
Because we have two parts: Newman and Webmagazine.

Just depending on the way you set it up.
You can have a folder Webmagaxine and in this folder a folder Newman.
Or you have a folder Webmagazine and a folder Newman in the root.

And you need TWO db.inc.php files.
The original one is in Newman. This is OK after the install.
A copy of the file has to go in Webmagazine, and in this file you have to set the path to Newman. The script has to know where the files are.

BTW
the newman script is not running under PHP5
On lycos with PHP4 it is doing fine.

There are different versions of php an mysql.
That´s why not al scripts will run on all servers.

:car
1 decade ago (13.01.2005 05:42)
Reply by: hestanoff
how come you folks r not gettin tired typin all of dat shit i wonder? dam i admire you eggheads!!!!
1 2 3 4