Page 1 of 1

A tribute to Izzy:: Know your Apache /&/ cd pdf Files work

PostPosted: 01. May 2009 20:51
by newbie2244
Greetings All-

This probably seems mundane to all who are frantically upgrading to XAMPP v.1.7.1 or installing it for the first time.

I finally got my .pdf files to work in XAMPP v.1.7.0. (Windows XP SP2) In tracing all the error messages that xampp generated when I tried my cds.php/ pdf and cds-fpdf.php I discovered some interesting things about Windows and Apache. (There is no excuse for an OS like Windows XP Home Edition.)

First, I still had directory entries in Registryfor previous Apache/php installations even though I uninstalled them and deleted some of them. I deleted all these Registry entries as well as renamed all previous apache & php folders. Restarted my machine.

Second, even after I did the above, I discovered that I still had 2 apache.exe processes running concurrently. I don't know if that is what should be happening. I killed one process but then the whole Apache service died. I restarted my machine again.

Third,** I discovered that-----> although phpinfo() indicates that XAMPP reads or loads the php.ini file in the apache\bin directory, my cds-fpdf.php program was accessing/using the php.ini file in xampp\php. **This may seem surprising but in fact makes very good sense, if you consider that there is either a Windows PATH variable or an include_path statement in php.ini , which has the value "C:\xampp\php\pear". As Apache traverses these directories it executes? the *.ini files that it finds. In this regard, Izzy's advice to delete all *.ini files not in apache\bin is a very good idea. ( a previous post)------->And I remembered what the folks at Apache tell all newbies who are installing APache for the first time - - take time to understand the *.conf file(s) and how it all works. No I know why.

(Still not reached that "how it all works" level of understanding but I am working at it. )

Fourth, I finally changed the "include('fpdf.php');" statement in cds-fpdf.php to point to the file explicitly with the statement "include('\xampp\php\pear\fpdf'\fpdf.php') with
"single quotes
" around the path(won't work with double quotes).
include('C:\xampp\php\pear\fpdf\fpdf.php')
also works.

AND Then I l
ocalhosted
my cd-fpdf.php file and magically I saw Adobe open up for the first time in XAMPP. ANd that's when I realized what pdf is really good for. REPORTS. So...

I am somewhat disappointed that cds-fpdf.php didn't work out of the box. Still, it was a worthwhile learning experience

BUT before I upgrade to XAMPP v.1.7.1, I need to know my Apache better. SO I'm spending some serious time with the source.

A suggestion to the XAMPP team -- how about a demo report with .pdf??

Happy sleeping &&
Regards to All- :D

newbie2244

Re: A tribute to Izzy:: Know your Apache /&/ cd pdf Files work

PostPosted: 02. May 2009 00:27
by Sharley
When upgrading to 1.7.1 you will find the php.ini file used is now the one located in the xampp\php folder - for previous XAMPP version users this may be confusing but for new XAMPP users this is where most would expect to find the php.ini file.

Best wishes.

Re: A tribute to Izzy:: Know your Apache /&/ cd pdf Files work

PostPosted: 14. May 2009 23:45
by newbie2244
Greetings-

First thanks for putting up with my somewhat convoluted root cause analysis as to why I had .pdf problems in V.1.7.0. My problems(I think) stemmed from two things:

1) two php.ini files
2) not having enabled 3rd party browser extensions.

It should be understood that I understand that at no time was XAMPP buggy or the problem, but rather my system configuration.

--Regards to all.