forum.netbsd.se - NetBSD Sweden

You are not logged in.

#1 2004-10-15 17:34:39

Riba
Member
Registered: 2004-09-02
Posts: 11

NetBSD web server poblems

I'm setting up a NetBSD based web server. I've got apache, mysql and PHP installed without problems (once the bad memory got replaced smile), but I'm experiencing some problems now.
For example, I can't seem to make phpmyadmin work. Yes, the phpmyadmin.conf is included in the apache conf file and the /phpmyadmin location opens up, however everyhing I get is a blank screen. Searching around I've found suggestions to turn of the output compression, but it did not help.
Another problem is with Mambo CMS which runs ok, but when I try to upload a component it acts as if the PHP safe mode is turned on, spitting out errors 'unable to create directory blahblah', but the safe mode is turned off.
I'm suspecting that this might as well be a PHP configuration issue, but I am at loss what to look for. I have tried to use the php.ini file from my linux and OS X servers but that did not change a thing.
Also another NetBSD user said that phpmyadmin is running ok for them.
I'd be greateful for any tips.

Offline

 

#2 2004-10-16 07:44:41

fredrik
Administrator
From: Göteborg, Sweden
Registered: 2004-05-10
Posts: 229
Website

Re: NetBSD web server poblems

Check your error log for Apache and se if it gives you a hint of the problem.
The problem with phpmyadmin sound like a permission thing.

Offline

 

#3 2004-10-17 19:19:47

Riba
Member
Registered: 2004-09-02
Posts: 11

Re: NetBSD web server poblems

Hello fredrik - no problems in the Apache error log. In the mean time I have done some troubleshooting and here is what I've found. The phpmyadmin (older version) was working fine when I copied it from the OS X machine, while the current from pkgsrc (2.6.0 i believe) would not. I'd assume that it was a phpmyadmin problem but another NetBSD user claims that the pkgsrc built one works ok for him. Oh well...

Rgarding the other, more important problem:
The following code that fails on me with error Warning: mkdir(/home/jab/components/com_mos-chat/): No such file or directory:

Code:

if(!file_exists($this->componentDir()) && !mkdir($this->componentDir(),0777))
                {
                        $this->setError(1,"Failed to create directory'" . $this->componentDir() . "'");
                        return false;
                }

This is running on NetBSD/PHP 4.3.9. I have found that if I enclose the $this->componentDir() argument in quotes it works fine. The weird thing is that the same works on Linux or OS X box using the exact same PHP setup.
I was guggested to turn magic_quotes_gpc to Off, but that did not change a thing.
What am I missing? Thanks!

Offline

 

#4 2004-10-19 06:11:52

Riba
Member
Registered: 2004-09-02
Posts: 11

Re: NetBSD web server poblems

I just found out the most interesting thing. The problem is actually caused by the trailing slash! For example, mkdir("/home/jab/test/",0777) fails on NetBSD while it works ok on Linux/OS X. mkdir("/home/jab/test",0777) works ok everywhere.
Can anyone confirm the same problem on their side? Thanks.

Offline

 

#5 2004-10-19 09:21:31

fredrik
Administrator
From: Göteborg, Sweden
Registered: 2004-05-10
Posts: 229
Website

Re: NetBSD web server poblems

I only have NetBSD machines availible that php is installed on but i tested
mkdir("/home/jab/test/",0777) on NetBSD and as you said it failes but
mkdir("/home/jab/test",0777) work fine. Maybe you should mail to the phpmyadmin project and tell them about this.

Offline

 

#6 2004-10-19 09:21:37

fredrik
Administrator
From: Göteborg, Sweden
Registered: 2004-05-10
Posts: 229
Website

Re: NetBSD web server poblems

I only have NetBSD machines availible that php is installed on but i tested
mkdir("/home/jab/test/",0777) on NetBSD and as you said it failes but
mkdir("/home/jab/test",0777) work fine. Maybe you should mail to the phpmyadmin project and tell them about this.

Offline

 

#7 2004-10-19 12:17:15

Riba
Member
Registered: 2004-09-02
Posts: 11

Offline

 

#8 2004-10-19 12:33:36

Riba
Member
Registered: 2004-09-02
Posts: 11

Re: NetBSD web server poblems

It seems to be a NetBSD feature, and there is a lot of political talk about it on the net...this has been dragging since version 1.2. At the same time majority of developers keep using trailing slashes believing that all systems will accept it.
I'm filing a bug request to the authors of the CMS, and hopefully they will remove the trailing slashes, that would not affect other systems but will make it work on NetBSD. Thanks for all your help, one mistery down smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB