You are not logged in.

#1 2009-09-25 09:12:38

kayrune
Member
Registered: 2007-12-15
Posts: 43

Php problems after pacman -Syu (Apache issue?)

Problem is browser says file is missing on some php files, others work fine.
Like the php info test script - runs fine with no error.

so
//serverip/test.php works fine
//serverip/login.php - browser reports file not found

Both files are there, both files have chmod 644 and is owned by same user.group

Last edited by kayrune (2009-09-25 10:42:15)

Offline

#2 2009-09-25 09:31:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Php problems after pacman -Syu (Apache issue?)

Check Arch news, see if it helps.

Offline

#3 2009-09-25 10:36:48

kayrune
Member
Registered: 2007-12-15
Posts: 43

Re: Php problems after pacman -Syu (Apache issue?)

Thank you for your reply, I have checked the news post, and I have installed the packages I believe I need. And it seems php is working since the php info test reports no errors. I've tried the default php.ini file with adding the timezone only, but it makes no difference.

I'm thinking it might be an apache issue, since it reports file not found when you try to access the php file directly.

Offline

#4 2009-09-27 20:49:33

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: Php problems after pacman -Syu (Apache issue?)

would this login.php be referring to a file hosted outside the default basedir allowed in php.ini? (i.e. you forgot to update php.ini's basedir option)

Last edited by stefanwilkens (2009-09-27 22:20:59)


Arch i686 on Phenom X4 | GTX760

Offline

#5 2009-09-29 16:31:28

csergec
Member
Registered: 2009-09-29
Posts: 62

Re: Php problems after pacman -Syu (Apache issue?)

Hi

If you use mysql and in your php page has

 mysql_close();

you will get a segfault .
Having a look at

/var/log/httpd/error_log

You will see that php segfault.
Today I have got this and could no understand why suddenly it did not work anymore.
I googled on the net to get this answer...
Thats a bug! Php crashes on that command

You have 3 possibilities:
- avoiding "mysql_close()".
- using mysqli instead of mysql
- switching to pdo

Hope it will help and it is the problem you have.

For the while I think I will use mysqli because with pdo I cannot get

SET character_set_client=utf8
SET character_set_connection=utf8
SET character_set_results=utf8

working..



Serge

Offline

#6 2009-10-30 06:13:35

jni
Member
Registered: 2009-10-30
Posts: 36

Re: Php problems after pacman -Syu (Apache issue?)

Yes this is a bug from the 5.3.0 release. I spent 5 hours today to find this... I installed php and apache from pacman, tried to load html and it worked. Then i loaded a php file which happened to have a mysql_close() in it and it didnt load. So i thought the problem was PHP... but i didnt expect that. Later found that php files with no mysql access worked, then that mysql_close() was the issue.

In fact, the problem is not with mysql_close(), the issue is with mysql_close() without the handler. If you use:

$a = mysql_connect(some credentials);
mysql_close($a);

everything will work perfectly. The bug existed for 1 year now, but they fixed it last month.

If you want the full bug report : http://bugs.php.net/bug.php?id=48754

The solution i used was to build the 5.3.1 version from the snapshots : http://snaps.php.net/ . It fixed the problem instantly. I know this is a snapshot version, but it think it could be worth replacing the repos version with it, since many people will use mysql_close() without a handler.

Thanks
Jni

Offline

Board footer

Powered by FluxBB