Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I just installed WAMP on my new computer, and have set everything up so that localhost and my alias website works.

I am having trouble setting up the include_path. It was set up to .;C:\php\pear and I changed it to /. This left me with these error messages:

 Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'MYFILENAME.php' for inclusion (include_path='/') in C:\wamp\www\MYSITENAME\index2.php on line 13

I've made sure that allow_url_fopen and allow_url_include are both enabled.

Does anyone know what I should change or what more setup needs to be done so that my include("somefile.php") will work properly?

Also, what additional information would you need to help troubleshoot this?

Thanks!!

share|improve this question
    
Environment variables and PATHs if set via Windows use the C:\ format –  ekaj Nov 30 '12 at 3:16
1  
/ isn't the right slash for starters. The include_path is a list of locations separated by a semicolon, i.e. ".;c:\php\includes". The locations must reside under your web root, wherever that may be. The period literally means "the current directory". The locations are searched in the order given. I'm guessing that your include_path would be something like ".;c:\wamp\www\MYSITENAME\includes\". –  Ian Atkin Nov 30 '12 at 4:45
    
Also, read up on Windows paths and read the PHP manual: php.net/manual/en/ini.core.php#ini.include-path –  Ian Atkin Nov 30 '12 at 4:54
    
@IanAtkin Thank you!!! why not submit that as an answer? –  d-_-b Nov 30 '12 at 13:06

1 Answer 1

/ isn't the right slash for starters. The include_path is a list of locations separated by a semicolon, i.e. ".;c:\php\includes". The locations must reside under your web root, wherever that may be. The period literally means "the current directory". The locations are searched in the order given. I'm guessing that your include_path would be something like ".;c:\wamp\www\MYSITENAME\includes\".

Also, read up on Windows paths and read the PHP manual: php.net/manual/en/ini.core.php#ini.include-path.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.