> The urls that i find for the php are given ashttp://localhost/dompdf/dompdf.php?base_path=www/test/&input_file=cen...
>
> Now my directory structure is as follows:
>
> myProj(root directory)
> lib(contains the files from dompdf)
> pages/temp(contains the html files that needs to be converted to pdf)
>
> Both the folders lib and pages are in the same hierarchical level and
> inside myProj folder.
>
> So what should be the base_path variable in the below mentioned case?
>
>
http://localhost/myProj/lib/dompdf.php?base_path=<?>&input_file=myFile.html
>
> where myFile.html is at
>
>
http://localhost/myProj/pages/temp/myFile.html
Are you using DOMPDF 0.5.1 or DOMPDF 0.6.0 alpha 2? The alpha version
has a hard-coded limitation on what directory it will read from. This
is due to a security vulnerability in 0.5.1. And, because of this
vulnerability, it is recommended that you *not* allow access to
dompdf.php over the web. The recommended method of use is via the
class.
That being said, if you are using DOMPDF 0.5.1 I believe the following
URL should work:
http://localhost/myProj/lib/dompdf.php?input_file=../pages/temp/myFile.html
The base_path parameter is used if DOMPDF needs to locate any images
or CSS files. If you need it, however, make sure it points to the
directory of your file, either relative to the location of dompdf.php
or using an absolute file-system path.
And with this you should be able to see why making dompdf.php
accessible via the web is bad. It can access any file that your web
server has access to because it goes through the local file system.
> Also since the files in pages/temp directory are created by php are
> there any file permissions that i need to set up for the files in the
> pages/temp folder?
As long as the files are created by the web server I wouldn't expect
any additional permissions to be required.