Jump to content

pawel

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by pawel

  1. The test returned a 403 (forbidden) for all of the links. So far so good
  2. Hi y'all! Im am trying to force a file download after user submits a form. When user hits submit button POST data are send to a template (sort of "thank you for downloading" page). This template on successful submission redirects to another template through this code <?php $downloadurl = $pages->get('/download/')->url; header('refresh: 0; url='.$downloadurl); ?> Redirection then hits this template code (located in download template): <?php // filename & url of the pdf file $filename = $pages->get('/some-page/')->file->name; $fileurl = $pages->get('/some-page/')->file->url; $filesize = $pages->get('/some-page/')->file->filesize; // force download of the file header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename='.$filename); header("Content-Length: ".$filesize); readfile($fileurl); It downloads a file and then redirects back to thank you page. The only problem is that the downloaded file is empty (0KB). When i download a file "the standard way" clicking on a link that directs to $pages->get('/some-page/')->plik->url; everything is ok. Any ideas?
  3. For anyone else that is using home.pl services. Everything is working now. Admin commented 113 line in .htaccess which is: #RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" Can you tell me why it works?
  4. I contacted the server administrator and I'm waiting for a response. But in the meantime I've installed Wordpress and checked if it has a problem with GET variables in the URL, and it doesn't. Here's a link http://massgravity.home.pl/wordpress/ The RewriteEngine seems to be working fine in this case. http://massgravity.home.pl/wordpress/sample-page/ http://massgravity.home.pl/wordpress/sample-page/?id=2
  5. Ryan, I've PM you info which you've asked for. Thanks
  6. Another discovery - when a domain is redirected to directory on ftp in which PW is installed (so the http://domain.com is where the pw installation is) there's only a problem with admin working properly. It looks like this:
  7. I've managed to make some steps forward. In index.php I've commented lines 42 - 54 and replaced them with hardcoded variables $httpHost = 'http://domain.com'; $rootURL = '/directory/'; The fronted works fine, but admin panel does not. PW doesn't display the pages tree, and every time I want to edit something, for example a template - link directs to: http://domain.com/directory/processwire/setup/template/edit?id=29 I get a 404 404 Not Found The request /directory/processwire/setup/template/edit was not found on this server. Any ideas?
  8. There's nothing in phpinfo about mod_rewrite or any of the things you mentioned. I think this server host is using some custom made mod_rewrite module and not everything is working properly...
  9. I don't see anything about htaccess, but there's some info about php variables: _SERVER["SERVER_NAME"] = domain.com _SERVER["REQUEST_URI"] = /directory/info.php _SERVER["SCRIPT_URI"] = http://domain.com/directory/info.php _SERVER["DOCUMENT_ROOT"] = / Maybe it has something to do with document_root variable?
  10. Yes, I've uploaded a fresh install package, downloaded directly from github. A little update: I've visited the install.php file directly and the installation went good. But there's something wrong with paths. I've my installation in http://domain.com/direcotry, but ProcessWire thinks it's in http://domain.com/ because all of assets are served from that domain. For example: there's an image that in html has relative path "/site/assets/files/1/westin_interior1.jpg" PW path for that file is http://domain.com/site/assets/files/1/westin_interior1.jpg Actual path is http://domain.com/directory/site/assets/files/1/westin_interior1.jpg Is it problem with htaccess or config file?
  11. Hello there! First of all I want to say hello to everyone. This is my first post, although I've been working with ProcessWire for some time now. I must say PW is a great little CMS/CMF and I'm learning so much from it. Here's m problem: I've uploaded a fresh copy of PW into my clients ftp. The first message that I get after i visit pw directory in the browser is: Error Exception: DB connect error 1045 - Access denied for user ''@'localhost' (using password: NO) (in /navigroup.pl/wire/core/ProcessWire.php line 95) I didn't change any of the files, only uploaded them to the server. Can anyone tell me what might be the problem here? Thanks, Paweł
×
×
  • Create New...