Board index   FAQ   Search  
Register  Login
Board index PHP PHP Installation

PHP5 Include does not work.

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

PHP5 Include does not work.

Postby BertieBuckley » Sat Sep 25, 2010 5:55 am

Hi,

I recently updated my server to run Ubuntu 10.04 and installed PHP Version 5.3.2-1ubuntu4.5 with apache.

My website used the include statement which no longer seems to work.
The index.php is in the www folder where as the include in located in the design folder on the server.

PHP example:
<?php include("/var/www/design/topbar/topbar.inc/"); ?>

I have seen a lot of posts regarding this problem however, they all seem to indicate that the include function is disabled by default and that the php.ini needs to be edited in order to activate this function. They all suggest that allow_url_fopen should be 'On' & allow_url_include should be 'On'.

Firstly: I have seen that there are 2 php.ini files on my server, which one needs to be changed?
Secondly: When I look at phpinfo this is what I see.
Directive Local Value Master Value
allow_url_fopen On On
allow_url_include On On

Any help would be appreciated on this as I really like this function. Does anyone know why there is a security issue with using it?

Regards,
Bertie
BertieBuckley
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sat Sep 25, 2010 5:39 am

Re: PHP5 Include does not work.

Postby BertieBuckley » Sat Sep 25, 2010 8:08 am

Issue Resolved:
Original:
<?php include("/var/www/design/topbar/topbar.inc/"); ?>

New:
<?php include ('/var/www/design/topbar/topbar.inc'); ?>

Subtle but different;
Why was it changed?
BertieBuckley
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sat Sep 25, 2010 5:39 am


Return to PHP Installation

Who is online

Users browsing this forum: No registered users and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.