Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

install phpreports - path_include and include once 1

Status
Not open for further replies.

scriggs

IS-IT--Management
Jun 1, 2004
286
GB
I am trying to install and use phpreports but do not understand how to install. I am using Apache and PHP5 on Windows 2000 Server.

The instructions state:
"so you can choose to put this path inside your php.ini file and restart your web server (I think this way
is better) or put a ini set() call before using some PHPReports class, like this:
<?php
ini set("include path",ini get("include path").":/usr/lib/phpreports/");
include once "PHPReportMaker.php";
$oRpt = new PHPReportMaker();
?>"

Can anyone give me a simple walkthrough of how to proceed? I have never edited php.ini....
 
1. open up php.ini in windows notepad (often just typing php.ini in the start->run dialog works).
2. search for "include_path="
3. add to the end of the string "; path/to/phpreport/directory"
4. save php.ini
5. stop and restart the web server (if you are using php as a module)
 
Thanks

I tried adding the path as you say, but in Windows format "c:\program files\xampp\htdocs\php\phpreport\". I wasn't sure of the format for 2 entries, as I already have "c:\program files\xampp\htdocs\php\pear\" listed - I just seperated with a semicolon?

Also, do I need to do anything with the other two lines?
include once "PHPReportMaker.php";
$oRpt = new PHPReportMaker();

Thanks...
 
just add the bit to the include-path. separate with semicolons as you say . remember to include double quotes so the string might look like
Code:
include_path=".;C:\php\pear;c:\php\includes"

provided you have added the directory that includes teh phpreportmaker.php file you'll be fine.

you do need to make sure, as well, that the internet server process has at least read access to the relevant directory too. you do this in NT permissions.

remember to restart the server after editing the php.ini file.
 
Thanks for the help, got going now! My php.ini was in a strange place and I was not editing the correct one - viewing phpinfo() cleared that up for me tho.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top