tags:

views:

169

answers:

1

Am trying to create a grid calendar using PEAR and PHP but when I preview the file in my browser I get the following:

*Warning: include(Calendar/Month/Weekdays.php) [function.include]: failed to open stream: No such file or directory in /Users/x/Sites/p/testing pages/Pear_Date.php on line 8 Warning: include() [function.include]: Failed opening 'Calendar/Month/Weekdays.php' for inclusion (include_path='.:') in /Users/x/Sites/p/testing pages/Pear_Date.php on line 8 Fatal error: Class 'Calendar_Month_Weekdays' not found in /Users/x/Sites/p/testing pages/Pear_Date.php on line 10*

I thought I'd fixed this before though. The install log for PEAR stated:

*Current include path : .: Configured directory : /Users/x/PEAR Currently used php.ini (guess) : Press Enter to continue: The 'pear' command is now at your service at /Users/x/bin/pear ** The 'pear' command is not currently in your PATH, so you need to ** use '/Users/x/bin/pear' until you have added ** '/Users/x/bin' to your PATH environment variable.*

I found an article which I thought resolved my problem - http://stackoverflow.com/questions/628838/...-x-10-5-leopard

So I edited the include_path line in my php.ini file so it read *include_path = ".:/php/includes:/Users/x/bin/pear"* I also updated my .bash_profile document so it stated export PATH=/Users/x/bin:$PATH like the article said

Hope that gives you enough information to assist.

A: 

Your include_path is - as PHP tells you - include_path='.:', i.e. only the current path. You need to reload apache config via (in linux as root / with sudo, I do not know about OS X)

/etc/init.d/apache2 reload

If this still does not solve the problem, then restart Apache (just to be safe) and then make sure that include_path is not commented (via a semicolon at the beginning of the line), then repeat.

[EDIT:]

if the line in php.ini is a comment, then apache will not parse it.

Is your line (correctly):

include_path = ".:/php/includes:/Users/x/bin/pear"

or a comment like:

;include_path = ".:/php/includes:/Users/x/bin/pear"

If you need to edit php.ini, then you will have to reload the apache config as decribed above.

Residuum
I get a command not found message when I try sudo /etc/init.d/apache2 reload?
OK i've managed to reload apache2 but I still get the error message stated in my original q - "include_path='.:'"
Is include_path uncommented?
Residuum
In the error message? Yes.