help with (include_path='.;C:\php5\pear')
Posted by: Lee (---.range81-157.btcentralplus.com)
Date: January 19, 2006 12:42AM

Hello board,
I've installed WAMP successfully it would seem. when accessing localhost i get the default index.php page displaying fine. however i get this error when i try to run one of my own files.

Warning: main(.html) [function.main]: failed to open stream: No such file or directory in c:\wamp\www\php_temp\index.php on line 17
Fatal error: main() [function.require]: Failed opening required '.html' (include_path='.;C:\php5\pear') in c:\wamp\www\php_temp\index.php on line 17

This file works fine when uploaded to my hosting company. I think its something to do with a confif file but have done a search for 'C:\php5\pear'' but cant find it... WAMP isnt even installed in C:\php5.... its in C:\wamp... & what is PEAR ?

Please help.

PS part of this page is running fine. the part that isn't is the only part that uses variable.


Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: Romain Bourdon (---.w193-251.abo.wanadoo.fr)
Date: January 19, 2006 09:56AM

It's a regsiter_çglobals problem, make a search on this forum and you'll find your answer ;-)

Romain

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: Lee (---.range81-129.btcentralplus.com)
Date: January 19, 2006 10:12PM

Thanks...

it was just a matter of opening php.ini, searching for register_globals and changing it to 'on'...

thanks again.

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: hea_young (202.84.109.---)
Date: June 08, 2006 12:59PM

This post helped me a lot...Thanks!!! smiling smiley



"If all else fail, would you be there to love me? If all else fail would you be there to see right through me..."

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: CyberSpatium (67.170.181.---)
Date: June 08, 2006 04:23PM

Do no not enalble register globals. for security reasons, the php community made register globals disabled by default starting in php 4.2.0. You need to develop your scripts to not rely on register globals being enabled because most hosts have it disabled, and all future releases of php will have it disabled by default.

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: doc_1982 (87.192.244.---)
Date: June 12, 2006 01:22PM

Ive had this exact same problem too. I want to run a PEAR module, http request, and i get this message when i try run the script

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\php\PEAR\HTTP\Request.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear') in C:\wamp\php\PEAR\HTTP\Request.php on line 46

My WAMP is also not registered to that directory, but is in c:\wamp instead. I enabled global variables, and it still did not fix the problem. Does anybody know what the problem is, or why my system would be pointing at c:\php5?

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: CyberSpatium (67.170.181.---)
Date: June 12, 2006 08:25PM

here is how to fix your include path problem. before we edit the php.ini file, you need to know that WAMP as two php.ini files, one for php4 and one for php5. So, if are currently using WAMP with php4, then edit your php.ini file and find this line:
;include_path = ".;c:\php\includes"

change this line to:
include_path = ".;C:\wamp\php4\PEAR"

If you are using php5, then open your php.ini file, and find:
;include_path = ".;c:\php\includes"

change this line to:
C:\wamp\php\PEAR

Save the php.ini file, and restart apache for the new settings to take effect.

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: lukasl (---.cpe.net.cable.rogers.com)
Date: March 13, 2007 12:53AM

This took me a while to figure out.

I'm using version 1.7 of WAMP with both PHP4 and PHP5 on WinVista

I kept modifying "C:\wamp\php\php.ini" and there was never any effect after restarting APACHE server.

Then looking at the PHP5 - PHP4 change.php script it turns out that the currently used php.ini is in "C:\wamp\Apache2\bin\php.ini" for the current php version (if switching between php4 and php5)

and the other version is either "C:\wamp\Apache2\bin\php4.ini" or "C:\wamp\Apache2\bin\php5.ini"

So I modified:

include_path = ".;C:\wamp\php4\PEAR"

in the php4 version of php.ini and

include_path = ".;C:\wamp\php\PEAR"

in the php5 version of php.ini

after installing PEAR.

Hope this helps someone.

I wish this was documented somewhere as it caused me a lot of grief. Is there a WIKI that we could setup for this project?



Post Edited (03-13-07 01:01)

Lukas

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: hazlebury (---.spitfireuk.net)
Date: March 13, 2007 12:51PM

Lukas, a BIG thank you. I've spent hours looking for the solution to this. All working now, what a relief.

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: imrannaqvi (203.189.97.---)
Date: March 16, 2007 12:51PM

Hi
I had the same problem but thanks to you all for solution.
Plz help me in this code.
Whai is wrong in this code bcoz its not working but not even showing error or warning.

imrannaqvi83@yahoo.com

require_once("HTTP\Request.php"winking smiley;
$url="[www.msn.com];;
$req= new HTTP_Request(""winking smiley;
$req->setURL($url);
$req->sendRequest();
$code=$req->GetResponseCode();
echo($code);

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: Graph (---.Red-83-55-210.dynamicIP.rima-tde.net)
Date: July 31, 2015 12:29AM

OMG Lukasl THANK YOUUUUUUUUU

That was it. An additional php.ini file that was being read! I was going CRAZY

Thanks again

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: friday (---.etisalat.com.ng)
Date: December 15, 2015 11:45PM

I 'm using WampServer 2.5 on Windows 10.

I 'm getting the following error when i run a php script:


*************************************************************
Fatal error: require(): Failed opening required 'mysqli_connect.php' (include_path='.;C:\wamp\bin\apache\apache2.4.9\bin\pear') in C:\wamp\www\simpleIdb\register-page.php on line 52
***************************************************************

My line 52 is:

require('mysqli_connect.php');

I have installed Pear in the 2 dir where I have found a php.ini file:
1. C:\wamp\bin\php\php5.5.12\
2. C:\wamp\bin\apache\apache2.4.9\bin\

and added the respective include directive on both php.ini file.

The error message won't go away!!!!

Can anyone help?

Options: ReplyQuote
Re: help with (include_path='.;C:\php5\pear')
Posted by: RiggsFolly (---.as43234.net)
Date: December 16, 2015 09:58AM

Hi,

I am not quite sure what you are doing here. You do not need to include anything to access the mysqli_ database extension.

All you need to do is ensure that the php_mysqli extension is activated by doing :-

- wampmanager -> PHP -> Extensions

Then look at the php_mysqli extension, if it has a tick beside it then it is available, if not click on php_mysqli and it will be activated and Apache will be restarted automatically.


Now if your app has a php script called 'mysqli_connect.php' then it is an application config issue that it cannot be found.
I would suggest creating a Virtual Host for each of your projects See this for help with that




NOTE: You only need to install PEAR into one place, probably PHP folder is best.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.