"Page not found" on some pages

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by macieq on April 6, 2009 at 4:51pm

Hi, i have meny drupal installation on multisite. Everythings fine except one. I have problem with "page not found", but these pages exists... Its strange sometimes everythig is good another time is not.

Please have a look at www.dobrapraktykazeglarska.pl and go to some sub-pages. If you will observe the "page not found" issue and will know why it is, please tell me.

I am working on it for few days and I have no idea what couse this situation...

Categories:

Comments

RE: Page not found

Posted by bramface on April 6, 2009 at 5:42pm

Try rebuilding the post settings.

Go to admin -> content -> post settings and click "Rebuild permissions".

Bram Moreinis, Principal
Game Face Web Design, LLC
http://www.gamefacewebdesign.com
(w) 845-750-6554

Idea

Posted by macieq on April 8, 2009 at 10:29am

I have now a point what is it but I don't know how to get better to work. I have a:

1) menu item:

<?php
$items
['getfile/%'] = array(
'title' => '',
'page callback' => 'dpz_download',
'page arguments' => array(1),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
?>

2) In node/SOME_NUMBER i have a information that downloadading will start in 3 seconds....
<?php
$output
.= "<meta http-equiv='refresh' content='3;url=/getfile/".$key."' />";
?>

3) and this function to download a file
<?php
function dpz_download($key, $filedatatype = 'application/pdf'){
if (
ob_get_level()) {
ob_end_clean();
}
$name = db_result(db_query("SELECT filename FROM {sat_file} WHERE file_id = ".$key.""));
$attachment_location = DPZ_AROOT.$name;
$filesize = filesize($attachment_location);

header('Cache-Control: public'); // needed for i.e.
header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="'.$name.'"');
//readfile($attachment_location);

if ($fd = fopen($attachment_location, 'rb')) {
while (!
feof($fd))
print
fread($fd, 1024);
fclose($fd);
}
exit();
}
?>

And all this stuff WORKS FINE but after downloading file when you go to some page you will get ALWAYS page not found! Try, and please tell my whats wrong with this code...???

Best reguards
m

Solution

Posted by macieq on April 8, 2009 at 10:20pm

I have found solution for that:

all headers must! go like this:

$header = 'Content-Disposition: attachment; filename="'.$name.'"';
$header = preg_replace('/\r?\n(?!\t| )/', '', $header);
drupal_set_header($header);

Mayby this help someone.

attachement

Posted by macieq on April 8, 2009 at 11:21am

The header -> Content-Disposition: attachment; filename="'.$name.'" couse the error. I don't know why...

When I comment this header the file is opening in browser and the error is gone...

But I want to force the download with "download window". How...?

access denied not authorized this page admin

Posted by shabanbi on September 16, 2010 at 5:56am

plz give me solution my site final stage suddenly this problem came plz give me solution

i download some modules (drupal chat,dxamp,jquery-updates) i changed permissions, usermanager

after that i didn't get any admin and user login ,all pages are showing "page not found",

after that ,i truncate all catch * table ,then after i didn't get any thing in my site plz tell me solution

give me plz my mail id hamedunisashaik@gmail.com

Regards,
shabanbi

I will...

Posted by macieq on April 6, 2009 at 7:07pm

Okey I will try. Waiting for results.

Still

Posted by macieq on April 6, 2009 at 7:25pm

Still the same...

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /