You are not logged in.
Hi everyone,
I know I am not the only one having trouble with that upgrade but so far I still have some issues.
I have read the news about the update and the wiki. I use apache, php, mysql and phpmyadmin.
After the update, I installed php-apache, php-mcrypt and used php.ini.pacnew to do my new configuration.
Everything works fine except mysql.
I have a weird problem that is that I can access and do whatever I want to databases with phpmyadmin but as soon as I try to connect to the mysql database with php code then my browser tells me that the page can't be loaded and that "the connection terminated unexpectedly". What is the problem ? Am I the only one in this situation ?
Thanks for your time !
Sorry for any English mistakes, I am not a native speaker.
Offline
Check out this thread and see if it helps (post #4 in particular):
Offline
Hi,
I did read this post and try what is suggested but it doesn't work for me. (I am not quite sure what they mean by "full path" to the modules though)
Sorry for any English mistakes, I am not a native speaker.
Offline
full path is full path; example '/some/path/foobar.so' instead of 'foobar.so'
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Yeah, that's what I understood too. In that case, using the full path did not help.
The strange thing is that phpmyadmin is fine. I can use it and do whatever I want to my databases. I get errors only when I try to access mysql through php code.
Sorry for any English mistakes, I am not a native speaker.
Offline
What exactly are the errors?
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
I mentioned in the first post:
[...] my browser tells me that the page can't be loaded and that "the connection terminated unexpectedly".
No page is loaded (like when firefox tells you to type www.example.com instead of ww.example.com) and thus there is no precise error message. It depends on the browser. (I use Midori) Lynx for instance does not load the page and "Alert!: Unexpected network read error; connection aborted." and then tells me that it can not access the document.
Of course when I remove the mysql_connect statement in my php code, everything is loaded flawlessly (except the content which comes from the database of course).
Sorry for any English mistakes, I am not a native speaker.
Offline
Check what the server log says about it
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Here it is, that's the error log of httpd:
[Sun Sep 27 17:25:07 2009] [notice] child pid 2006 exit signal Segmentation fault (11)
[Sun Sep 27 19:40:32 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 19:40:36 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 60, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 73, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 60, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/yms/projects/homepage/yms/index.php on line 73, referer: http://localhost/~yms/
[Sun Sep 27 19:40:37 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 19:40:38 2009] [notice] child pid 2003 exit signal Segmentation fault (11)
[Sun Sep 27 19:40:38 2009] [notice] child pid 2577 exit signal Segmentation fault (11)
And that's the access log in case it is useful:
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET / HTTP/1.1" 200 788
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /icons/blank.gif HTTP/1.1" 200 148
127.0.0.1 - - [27/Sep/2009:19:40:32 +0200] "GET /icons/folder.gif HTTP/1.1" 200 225
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /~yms HTTP/1.1" 301 368
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /~yms/ HTTP/1.1" 200 1150
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
127.0.0.1 - - [27/Sep/2009:19:40:36 +0200] "GET /icons/back.gif HTTP/1.1" 200 216
127.0.0.1 - - [27/Sep/2009:19:40:37 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
And thanks for trying to help me ;-)
Sorry for any English mistakes, I am not a native speaker.
Offline
Make sure you set the time zone in php.ini to get rid of that warning.
Second, make sure if you had a custom httpd-vhosts.conf that it is still correct. Also -- depending on how long you;ve had Apache/PHP installed on your machine -- make sure the document root is correct for your machine. One of mine used /home/httpd/html as the doc root, but later upgrades kept wanting to default to /srv/http. Make sure that things are as you expect in the httpd.conf.
Matt
"It is very difficult to educate the educated."
Offline
Hi,
I did all the checks you suggested (most of the time I use default values so there is no problem with that. I fixed this timezone thing and here is what I get now in error_log. (I guess I can ignore the favicon things, I'm more worried by the segfault ...)
[Sun Sep 27 22:50:11 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 22:50:17 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 22:50:18 2009] [error] [client 127.0.0.1] File does not exist: /srv/http/favicon.ico
[Sun Sep 27 22:50:19 2009] [notice] child pid 3778 exit signal Segmentation fault (11)
and here is my access log (which seems fine):
127.0.0.1 - - [27/Sep/2009:22:50:11 +0200] "GET / HTTP/1.1" 200 788
127.0.0.1 - - [27/Sep/2009:22:50:11 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
127.0.0.1 - - [27/Sep/2009:22:50:17 +0200] "GET /~yms HTTP/1.1" 301 368
127.0.0.1 - - [27/Sep/2009:22:50:17 +0200] "GET /~yms/ HTTP/1.1" 200 1150
127.0.0.1 - - [27/Sep/2009:22:50:17 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
127.0.0.1 - - [27/Sep/2009:22:50:18 +0200] "GET /favicon.ico HTTP/1.1" 404 1085
I insist that the weirdest thing is that phpmyadmin works fine... I have no clue why.
Edit: There is something even more strange I found out. There is some code in the pages I desperately try to load that updates some entries in a database. That code gets executed and the database is actually updated.
Last edited by yms (2009-09-27 21:17:27)
Sorry for any English mistakes, I am not a native speaker.
Offline
I have the same problem, and it looks like the segfault happens on mysql_close().
Just found out how to fix it: new PHP doesn't like to close databases without a database handler.
Source: http://discussions.apple.com/thread.jsp … 6&tstart=0
It's already fixed in SVN, Arch maintainers may want to backport it: http://bugs.php.net/bug.php?id=48754
Last edited by RazZziel (2009-09-28 10:09:04)
Offline
A bug... I was getting crazy with packages and configurations, and it was just a bug... Hope there's a bugfix release soon (or a backport, whatever comes first).
Offline
Ok so I guess the simplest thing would be to wait for a bugfix. This should not take long. However, this does not explain why phpmyadmin runs as it should. Doesn't it EVER call mysql_close ?
I'll not put the [SOLVED] tag right now, I'll try to remember to do that once a bugfix has been released.
Sorry for any English mistakes, I am not a native speaker.
Offline
Ok so I guess the simplest thing would be to wait for a bugfix. This should not take long. However, this does not explain why phpmyadmin runs as it should. Doesn't it EVER call mysql_close ?
I'll not put the [SOLVED] tag right now, I'll try to remember to do that once a bugfix has been released.
No idea. The only thing I can tell about the issue is that I can't use the PHP + MySQL code I was using.
Offline
I have similar problem. I use lighttpd. I upgraded php5.2.6 to php5.3. PHP works fine, but it can not connect to MySQL as well as to PostgreSQL. I can connect to them from console.
There is nothing in logs. I set strict error raporting in php.ini, but when I try tu run phpBB 3 I have nothing. Only phpgpadmin shows:
/home/lighttpd/ssl/html/phppgadmin/classes/Misc.php on line 342
Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.
So it looks like PHP doesn't load modules. I use php-cgi, maybe the logs go to strange place?
Offline
I have similar problem. I use lighttpd. I upgraded php5.2.6 to php5.3. PHP works fine, but it can not connect to MySQL as well as to PostgreSQL. I can connect to them from console.
There is nothing in logs. I set strict error raporting in php.ini, but when I try tu run phpBB 3 I have nothing. Only phpgpadmin shows:
/home/lighttpd/ssl/html/phppgadmin/classes/Misc.php on line 342 Your PHP installation does not support PostgreSQL. You need to recompile PHP using the --with-pgsql configure option.
So it looks like PHP doesn't load modules. I use php-cgi, maybe the logs go to strange place?
S***, I had forgotten about this entry in the forum XD
It works for me now. If I'm not wrong, I had to get the php.conf.pacnew file, modify it while reading the old one (php.conf), and moving the .pacnew to the older place (# mv /path/to/php.conf.pacnew /path/to/php.conf).
Try, hope it works for you.
Offline
It didn't help. My extension section in php.ini
cat /etc/php/php.ini | grep extension | grep -v ";"
extension_dir = "/usr/lib/php/modules/"
extension=bz2.so
extension=curl.so
extension=gd.so
extension=gettext.so
extension=json.so
extension=mysql.so
extension=openssl.so
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_pgsql.so
extension=pdo_sqlite.so
extension=pgsql.so
extension=pspell.so
extension=soap.so
extension=sqlite3.so
extension=xsl.so
extension=zip.so
Like I said, I have lighttpd with php-cgi and I am not sure where PHP errors are going to. There is nothing in /var/log/lighttpd/error.log.
I could return to PHP 5.2. I found archive php package, but not php-cgi.
Offline