php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40552 donation
Submitted: 2007-02-20 02:39 UTC Modified: 2007-03-09 23:41 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:5 (100.0%)
From: lepage at grm dot polymtl dot ca Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.1 OS: Solaris 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: lepage at grm dot polymtl dot ca
New email:
PHP Version: OS:

 

 [2007-02-20 02:39 UTC] lepage at grm dot polymtl dot ca
Description:
------------
Since I upgraded from php 5.1.5 to php 5.20 and now php 5.21, I got serious errors that is not present in php 5.1.5. 

Users installation of phpBB and phpAlbum does not work anymore. I have look for many hours with finding a solution.

While phpAlbum is working fine in the web server root directory, phpAlbum installed under users directories does not work anymore. It is like it's not able to include files under user directories. 

Reproduce code:
---------------
see and try phpBB.com or phpAlbum.net in a user directory.

Expected result:
----------------
I would expect php 5.2x to work better that this. Or a more comprenhensive error message saying why it cannot open a file in the current directory.

I would be nice to find upgrade informations in the FAQ from 5.1x to 5.2x, I have look and find nothing about includes.



Actual result:
--------------
---error-start----
Warning: fopen(data_rejdshflkj/writablity_test) [function.fopen]: failed to open stream: No such file or directory in /home/lepage/HTML/avendre/main.php on line 1886

Warning: fclose(): supplied argument is not a valid stream resource in /home/lepage/HTML/avendre/main.php on line 1887

Notice: Undefined variable: phpalbum_version in /home/lepage/HTML/avendre/main.php on line 36
Welcome to phpAlbum_
Your data directory data_rej123/ is eather not existing or not writable
Please check for existing of this directory and setup the access rights with CHMOD 777
---error-end----

**
This error is not limited to phpAlbum since it does the same kind of error with phpBB installed in users directories, here is an example of the errors,


---error-start----
Warning: include(./extension.inc) [function.include]: failed to open stream: No such file or directory in /home/pyrobert/HTML/Forum/index.php on line 25

Warning: include() [function.include]: Failed opening './extension.inc' for inclusion (include_path='.:/usr/local_9/opt/php/lib/php:/php/includes:/home/lepage/HTML/avendre:~lepage/avendre') in /home/pyrobert/HTML/Forum/index.php on line 25

Notice: Undefined variable: phpEx in /home/pyrobert/HTML/Forum/index.php on line 26

Warning: include(./common.) [function.include]: failed to open stream: No such file or directory in /home/pyrobert/HTML/Forum/index.php on line 26

Warning: include() [function.include]: Failed opening './common.' for inclusion (include_path='.:/usr/local_9/opt/php/lib/php:/php/includes') in /home/pyrobert/HTML/Forum/index.php on line 26

Fatal error: Call to undefined function session_pagestart() in /home/pyrobert/HTML/Forum/index.php on line 31
---error-end----

I have tryed to add user directories to include_path in the php.ini but it does not work. I have looked for changes that could explain that, none are found.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-20 08:04 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

.
 [2007-02-21 00:04 UTC] lepage at grm dot polymtl dot ca
I have search for this bug for so long, I waited the new version 5.2.1 and it still has this problem.

All the search on google I made with those errors, actually  give me web site that are not working and display those errors... so I think it's a bug... At least in the documentation since I found nothing.
 [2007-02-21 02:12 UTC] lepage at grm dot polymtl dot ca
It is working with php 5.1.5 not with 5.2.x using the exact same config file (php.ini).

It's like php 5.2x is not chdir to the script dir when running the script. 

Information about this should be included into the php upgrade documentation (from 5.1x to 5.2x). I have looked at many bugs like #30881 but it's too old.. my problem is it was working with version 5.1.5.

It is still not working... what did change from 5.1.5 to 5.2 that can cause that?
 [2007-02-21 02:40 UTC] lepage at grm dot polymtl dot ca
Although I have '.' in include_path = "/usr/local_9/opt/php/lib/php:/php/includes:."
it is not opening file when preceded by ./

for one example in phpBB it's define $phpbb_root_path = './'
and it does not work unless I redefine it to 
$phpbb_root_path = '/some/absolute/path/' then it work.

Again it was working in 5.1.5 and not in 5.2.0, it is a bug, dot in search path is no longer working.
 [2007-02-21 08:06 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2007-02-22 01:21 UTC] lepage at grm dot polymtl dot ca
Here is the error, While it is not working in a user directory it does in the web root directory.

=== file info.php ===
<?php
include('./include.inc');
include('include.inc');
phpinfo();

?>

=== file include.inc ===
allo...
<?php
/* allo
 *
 * nothing really */
?>

-----

Warning: include(./include.inc) [function.include]: failed to open stream: No such file or directory in /home/lepage/HTML/info.php on line 3

Warning: include() [function.include]: Failed opening './include.inc' for inclusion (include_path='/usr/local_9/opt/php/lib/php:/php/includes:.') in /home/lepage/HTML/info.php on line 3
allo...
and then the php_info() output.


==
I found odd that I have to code since I am a sysAdmin trying to update php to latest, I am not a php coder and therefore it should be easier for SysAdmin to update php to the latest...
 [2007-02-22 01:44 UTC] lepage at grm dot polymtl dot ca
note that if I use 
  include('/home/lepage/HTML/include.inc');
it does work while using 
  include('./include.inc'); 
does not work.

It was woking fine in php-5.1.5 and not in php-5.2.0 nor php-5.2.1, I see in change log :

- Removed current working directory from the php.ini search path for CLI and re-added it for other SAPIs (restore to pre 5.1.x behavior). (Edin)

may be it was not well restore... I don't know. Can you please help me fix this. it cause many problem with user installed phpBB and phpAlbum.
 [2007-02-27 18:31 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-03-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-03-07 13:18 UTC] hakkarainen at cs dot joensuu dot fi
I have the very same problem with php5.2-200703060530 and Solaris 9
(php5.2-200611160530 did not had this problem).
 [2007-03-08 01:11 UTC] lepage at grm dot polymtl dot ca
I am loosing fate in the php team. They have no test bench or what?
No longer looking for '.' in the path is a pretty serious stupid bug.

I was looking every where for a solution only thing I found looking for those keyword where site that are actually down..!

I was even told here it's not a bug, I had to do coding to prove that include ./file does not work.

hakkarainen, thank for tesing the latest version for me, I have no more time to test all the latest php crap.
 [2007-03-09 10:07 UTC] tony2001@php.net
Feel free to donate a Solaris 9 machine to me.
Until then you'll have to test release candidates yourself.
 [2007-03-09 19:03 UTC] lepage at grm dot polymtl dot ca
Do you mean this dot search path bug is only a problem on Solaris ?

About the donation, yes I am willing to give you a working Sun system with Solaris. Contact me for the donation.
 [2007-03-09 23:41 UTC] tony2001@php.net
>Do you mean this dot search path bug is only a problem on Solaris ?
Exactly.
Solaris is a system with broken everything, including realpath() and other quite vital utilities.
On other (working) systems it does work just fine.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 10:01:34 2025 UTC