Server cannot locate /includes/graphframe.php
bperet - January 15, 2009 - 03:06
| Project: | Mathematics Filter |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
Description
Getting a Drupal "page not found" error in the iframe when trying to use the [graph] command.
Analysis
The relative URL is incorrect: http://mydomain.test/node/sites/all/modules/mathfilter/includes/graphfra... (/node should not be there).
Fix
Prepended a '/' to drupal_get_path() on line 83 to make the returned path relative to the server root.
$graph_path = '/'.drupal_get_path('module', 'mathfilter') .'/includes/graphframe.php?';Fix seems to work fine on both the LInux server and Windows XP, both using Apache 2. Otherwise, the current DEV version seems to work great.

#1
Thanks for the feedback, that does seem like an easy fix. Alternatively we could use file_get_path or something similar to resolve to an absolute path.
If I ever get a chance to commit any changes I'll test this fix.
Dave