PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp

Postby newbie2244 » 27. February 2009 21:26

I installed XAMPP several times. The first time I installed, everything worked like a charm - Amazing really! But in my most recent install, when I try to access the demo PHP Postscript, I get the following message

Fatal error: ps_open_file() [<a href='function.ps-open-file'>function.ps-open-file</a>]: PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp\htdocs\xampp\special\ps\ps.php on line 75.

I looked through the *\special\ps directory for the file draw.ps and I found Adobe draw and a file called
draw.php'
. I checked the php.ini file and all necessary .dll's have been uncommented.

Can someone help with this??? I did a lot of deleting on my system to clear up disk space and I'm wondering if I deleted a resource that may be necessary for this demo to work???
newbie2244
 
Posts: 49
Joined: 20. February 2009 22:39

Re: PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp

Postby Izzy » 28. February 2009 01:21

newbie2244 wrote:...I did a lot of deleting on my system to clear up disk space and I'm wondering if I deleted a resource that may be necessary for this demo to work???
When ever you do a disk clean-up, temporary files and folders along with files that have a zero content are usually deleted - so you may have done more damage than can be seen at this time.

Make sure when doing a clean-up that you exclude the xampp folder as there are some 900 or so zero length files and many files and folders with a tmp extension that are required.

You may have to uninstall XAMPP and then do a fresh install again to restore all the deleted files from the disc clean-up.
Last edited by Izzy on 12. March 2009 10:00, edited 1 time in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp

Postby newbie2244 » 28. February 2009 21:37

Thanks for the pointer. I've done several reinstalls over the last two days and the problem persists, so apparently I deleted a Windows system resource. But since I don't know which resources this demo app needs, I can't even reinstall the deleted resource. I never cared much about .ps apps in the past and now I pay the price.Rats!!
newbie2244
 
Posts: 49
Joined: 20. February 2009 22:39

Re: PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp

Postby ted22 » 18. March 2009 15:53

Just installed xampp - love it. I used the windows installer.

Things seem OK, I'm going through the demos and checking things. I also get an error on the postscript thing. My error is a bit different:

Fatal error: ps_open_file() [<a href='function.ps-open-file'>function.ps-open-file</a>]: PSlib error: Could not open file 'htdocs\xampp\special\ps\draw.ps'. in C:\xampp\htdocs\xampp\special\ps\ps.php

I do not have a '/tmp/draw.ps' file at all (don't know if I need one) - but I didn't do any deleting or disk cleanup - this is as is straight from the install.

Any thoughts anyone.

Thanks
ted22
 
Posts: 1
Joined: 18. March 2009 15:34

Re: PSlib error: Could not open file '/tmp/draw.ps'. in C:\xampp

Postby Izzy » 19. March 2009 00:16

The short answer to the issues relating to the demos contained in the xampp\htdocs\xampp\special folder is not to use them until the author Uwe Steinmann has cleaned up the code mess, as they simply will not work in their present state - these demos were obviously not checked by the XAMPP developers before insertion into the XAMPP distribution but simply taken as being correct because they came from a php contributing author Uwe Steinmann who also did not check his work before releasing it to the XAMPP developers or he would have seen that the path code was incorrect.



The relevant path code in ps.php starts around line 29 which, if you know php, you may be able to edit the paths to get rid of the error messages but as always make a backup of the file first:
Code: Select all
// Some path variables


$curdir = getcwd();
list($xamppdir, $docdir) = split ('xampp\\\\htdocs', $curdir);
$htdir=ereg_replace("\\\\", "/", $docdir);
$fontdir="htdocs".$htdir;

$psdoc="htdocs".$htdir."/draw.ps";
$newpsdoc=ereg_replace("/", "\\", $psdoc);
#$newpsdoc = "/tmp/draw.ps";
#$fontdir = "/home/steinm/sourceforge/pslib/tests/c";

Incidentally the draw.ps file is created by the draw.php file (which also contains incorrect path code) and places the draw.ps file in the xampp\htdocs folder.

In fact Uwe Steinmann who created this demo or at least contributed to it's creation should take it back and have another close look at the paths in all the php files as in draw.php he has a path htdocs/xampp/external/ps/draw.ps and the fonts in htdocs/xampp/external/ps/Helvetica which clearly do not exist - as mentioned above the draw.ps file is in xampp\htdocs folder and the fonts are in the xampp\htdocs\xampp\special\ps folder - what a mess!

If you or anyone manages to sort out this mess, please post back with your amended working code.

I have also sent feedback on this issue to the developers working on the 1.7.1 Beta program and hopefully it will be looked at and finally sorted out so we don't get any more posts about these errors clogging up our forums.
Thanks
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 136 guests