PHP ini

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP ini

Postby LadyYepperz » 23. October 2010 20:36

Aiight... in my scripts my includes arent being included. Ive tried altering my PHP.ini file but when i go back and check the values are back to their original state.

:?: This ini is located in xampp/php ,is there a second file ini file hidden in Xammp.

Code: Select all
Directive -       Local Value   -           Master Value
allow_url_include   - Off                    -          Off
include_path       - .;\xampp\php\PEAR     -       .;\xampp\php\PEAR


:?: why does the include path point to PEAR?
<?
function Greeting($var){
if($var <= brainless || $var < 25 || $var == !sexy )
echo "Goodbye, $var, do not waste your time.";
else
echo "Hello, $var, want to learn how to play strip scripting?";
}
Greeting($YOU);
?>
User avatar
LadyYepperz
 
Posts: 11
Joined: 21. October 2010 22:47

Re: PHP ini

Postby Dariusc123456 » 23. October 2010 23:28

I dont know exactly why you need to change the include path but you should try adding it in apache vhost. Here is an example

Code: Select all

<VirtualHost *:80>
    ServerAdmin postmaster@example.com
    DocumentRoot "/xampp/htdocs/example.com/htdocs/www/"
    ServerName example.com
   
    ServerAlias www.example.com
    ErrorLog "/xampp/htdocs/example.com/logs/error.log"
    CustomLog "/xampp/htdocs/example.com/logs/access.log" combined
   <Directory "/xampp/htdocs/example.com/htdocs/www/">
      Options Indexes FollowSymLinks Includes ExecCGI
      AllowOverride All
      Allow from all
   </Directory>
   <IfModule php5_module>
      php_admin_flag safe_mode Off
      php_admin_value upload_tmp_dir "/xampp/htdocs/example.com/tmp/"
                php_admin_value include_path "/path/to/include/"
   </IfModule>   
</VirtualHost>


Change what you need but everything works for me. In the php.ini you should add or edit

Code: Select all
include_path = ".:/php/includes"


Its also pointed to PEAR by default so thats common.
Dariusc123456
 
Posts: 22
Joined: 15. October 2010 15:18

Re: PHP ini

Postby LadyYepperz » 24. October 2010 04:32

my freaking includes were not parsing... needed to figure out why they werent
<?
function Greeting($var){
if($var <= brainless || $var < 25 || $var == !sexy )
echo "Goodbye, $var, do not waste your time.";
else
echo "Hello, $var, want to learn how to play strip scripting?";
}
Greeting($YOU);
?>
User avatar
LadyYepperz
 
Posts: 11
Joined: 21. October 2010 22:47

Re: PHP ini

Postby Altrea » 24. October 2010 22:00

1st: what kind of include file? php include? Apache include?
2nd: why don't you show us one of the failed include in your sourcecode? Shall i ask my crystal ball?

LadyYepperz wrote:is there a second file ini file hidden in Xammp

Depends on the XAMPP version. XAMPP 1.7.3 does only have 1 php.ini

LadyYepperz wrote:why does the include path point to PEAR?

Because PEAR is part of the XAMPP package
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 80 guests