-
☆ A M B ☆
- 53 Posts
Hello,
I found a problem when I am tried to create a custom table. I made a XML schema and in next step tried to built it. I get this errors:
[2010-08-30 10:53:20] (ERROR @ /var/www/vhosts/site.com/httpdocs/core/xpdo/om/xpdogenerator.class.php : 438)
PHP warning: mkdir() [function.mkdir]: No such file or directory
[2010-08-30 10:53:20] (ERROR @ /var/www/vhosts/site.com/httpdocs/core/xpdo/om/xpdogenerator.class.php : 444)
PHP warning: mkdir() [function.mkdir]: No such file or directory
[2010-08-30 10:53:20] (ERROR @ /_comps/newsletter/trunk/_build/build.schema.php)
Could not open or create dir: /var/www/vhosts/site.com/httpdocs/_comps/newsletter/trunk/core/components/newsletter/model/newsletter/
[2010-08-30 10:53:20] (ERROR @ /_comps/newsletter/trunk/_build/build.schema.php)
Could not open or create dir: /var/www/vhosts/site.com/httpdocs/_comps/newsletter/trunk/core/components/newsletter/model/newsletter/
[2010-08-30 10:53:20] (ERROR @ /var/www/vhosts/site.com/httpdocs/core/xpdo/om/xpdogenerator.class.php : 524)
PHP warning: mkdir() [function.mkdir]: No such file or directory
[2010-08-30 10:53:20] (ERROR @ /var/www/vhosts/site.com/httpdocs/core/xpdo/om/xpdogenerator.class.php : 528)
PHP warning: mkdir() [function.mkdir]: No such file or directory
[2010-08-30 10:53:20] (ERROR @ /_comps/newsletter/trunk/_build/build.schema.php)
Could not open or create dir: /var/www/vhosts/site.com/httpdocs/_comps/newsletter/trunk/core/components/newsletter/model/newsletter/mysql
Execution time: 0.4418 s
I found the problem is in XPDO generator class (/core/xpdo/om/xpdogenerator.class.php) in calls of mkdir() function.
It doesn’t use recursive mode. Third parameter of mkdir()
http://php.net/manual/en/function.mkdir.php, I replaced
mkdir($path, 0777); with
mkdir($path, 0777, true); and tried to build again. Success!
Now, is this a "bug" or I made some mistake??
Thx for response.
---
My enviroment:
Windows 7
PHP 5.3.1
-
☆ A M B ☆
- 53 Posts
No user on Windows system had this problem?
I’d say you could file that as a bug personally, also why create with 0777? Why does it need to be writeable by all? 0775 would be better.
Use MODx, or the cat gets it!
Thanks loads -- exactly the same issue here - running on a hosted windows environment.
Adding the true parameter to line 438 & 444 fixed the issue.
Alex
-
☆ A M B ☆
- 53 Posts
Quote from: shamblett at Sep 03, 2010, 02:36 AM
I’d say you could file that as a bug personally, also why create with 0777? Why does it need to be writeable by all? 0775 would be better.
But look into /core/xpdo/om/xpdogenerator.class.php and at lines #438 and #444, there are parameters set to 0777, it is native XPDO settings.
FYI, windows ignores the mode parameter, so it doesn’t matter what you set it to there. 777 is indeed the xPDO default (and the mkdir default value for mode).
-
☆ A M B ☆
- 53 Posts
Quote from: BobRay at Sep 05, 2010, 06:13 PM
FYI, windows ignores the mode parameter, so it doesn’t matter what you set it to there. 777 is indeed the xPDO default (and the mkdir default value for mode).
I know, it was only response for previous reply to my post. Problem is third parameter of mkdir call
bool $recursive = false. Through this is PHP not possible to create a folder structure and PHP throws an error.